* [PR PATCH] New package: libgccjit-10.2.1_pre1
@ 2021-02-16 1:36 lane-brain
2021-02-16 1:40 ` ericonr
` (163 more replies)
0 siblings, 164 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 1:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]
There is a new pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 54686 bytes --]
From 411d9929b4ed25956af216c643e9c165a8fc26a6 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Mon, 15 Feb 2021 20:32:51 -0500
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/c89.1 | 80 ++++++
srcpkgs/libgccjit/files/c89.sh | 2 +
srcpkgs/libgccjit/files/c99.1 | 81 ++++++
srcpkgs/libgccjit/files/c99.sh | 2 +
srcpkgs/libgccjit/files/gccgo-musl.patch | 222 ++++++++++++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 125 +++++++++
srcpkgs/libgccjit/files/libssp-musl.patch | 70 +++++
srcpkgs/libgccjit/patches/ada-shared.patch | 28 ++
.../patches/consistent-library-paths.patch | 110 ++++++++
.../patches/fix-cxxflags-passing.patch | 10 +
.../libgccjit/patches/fix-musl-execinfo.patch | 33 +++
.../patches/fix-vtv-link-order.patch | 20 ++
.../libgccjit/patches/libffi_gnulinux.patch | 11 +
.../patches/libgcc-ibm128-no-tag.patch | 38 +++
.../libgccjit/patches/mips-sgidefs_h.patch | 11 +
.../libgccjit/patches/mips-soft-float.patch | 18 ++
srcpkgs/libgccjit/patches/musl-ada.patch | 204 +++++++++++++++
srcpkgs/libgccjit/template | 241 ++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
19 files changed, 1308 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/c89.1
create mode 100644 srcpkgs/libgccjit/files/c89.sh
create mode 100644 srcpkgs/libgccjit/files/c99.1
create mode 100644 srcpkgs/libgccjit/files/c99.sh
create mode 100644 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 100644 srcpkgs/libgccjit/patches/ada-shared.patch
create mode 100644 srcpkgs/libgccjit/patches/consistent-library-paths.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
create mode 100644 srcpkgs/libgccjit/patches/libffi_gnulinux.patch
create mode 100644 srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
create mode 100644 srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
create mode 100644 srcpkgs/libgccjit/patches/mips-soft-float.patch
create mode 100644 srcpkgs/libgccjit/patches/musl-ada.patch
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/srcpkgs/libgccjit/files/c89.1 b/srcpkgs/libgccjit/files/c89.1
new file mode 100644
index 00000000000..3ed984da33f
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.1
@@ -0,0 +1,80 @@
+.\" $NetBSD: c89.1,v 1.2 2008/04/30 13:10:50 martin Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 5, 1999
+.Dt C89 1
+.Os
+.Sh NAME
+.Nm c89
+.Nd ANSI (1989) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -ansiC
+specification.
+.Pp
+This includes proper handling of trigraphs,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar inline ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+appeared in
+.Nx 1.4 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c89.sh b/srcpkgs/libgccjit/files/c89.sh
new file mode 100644
index 00000000000..52d6d45431b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c89 "$@"
diff --git a/srcpkgs/libgccjit/files/c99.1 b/srcpkgs/libgccjit/files/c99.1
new file mode 100644
index 00000000000..d368f1a874b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.1
@@ -0,0 +1,81 @@
+.\" $NetBSD: c99.1,v 1.3 2010/05/14 01:53:28 joerg Exp $
+.\"
+.\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd September 24, 2008
+.Dt C99 1
+.Os
+.Sh NAME
+.Nm c99
+.Nd ANSI (1999) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -isoC-99
+specification.
+.Pp
+This includes
+inline functions, variable-length arrays, support for one-line
+comments beginning with //,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+first appeared in
+.Nx 5.0 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c99.sh b/srcpkgs/libgccjit/files/c99.sh
new file mode 100644
index 00000000000..15cab47c748
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c99 "$@"
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 100644
index 00000000000..a2ce4b2b046
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1,222 @@
+This is not among the normal patches as these changes are musl specific and
+there is no way to easily conditionalize it in source for some of the changes.
+
+Added by q66: runtime.h now uses libucontext_ prefixed APIs to allow build
+with freestanding versions of libucontext
+
+Souurce: Adélie Linux, q66
+URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
+
+--- Makefile.in
++++ Makefile.in
+@@ -46325,7 +46325,7 @@ configure-target-libgo:
+ esac; \
+ module_srcdir=libgo; \
+ rm -f no-such-file || : ; \
+- CONFIG_SITE=no-such-file $(SHELL) \
++ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+--- libgo/mksysinfo.sh
++++ libgo/mksysinfo.sh
+@@ -379,11 +379,7 @@ fi
+ # Some basic types.
+ echo 'type Size_t _size_t' >> ${OUT}
+ echo "type Ssize_t _ssize_t" >> ${OUT}
+-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
+- echo "type Offset_t _off64_t" >> ${OUT}
+-else
+- echo "type Offset_t _off_t" >> ${OUT}
+-fi
++echo "type Offset_t _off_t" >> ${OUT}
+ echo "type Mode_t _mode_t" >> ${OUT}
+ echo "type Pid_t _pid_t" >> ${OUT}
+ echo "type Uid_t _uid_t" >> ${OUT}
+--- libgo/go/runtime/mem_gccgo.go
++++ libgo/go/runtime/mem_gccgo.go
+@@ -16,7 +16,7 @@ import (
+ //go:linkname sysFree runtime.sysFree
+
+ //extern mmap
+-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
++func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer
+
+ //extern munmap
+ func munmap(addr unsafe.Pointer, length uintptr) int32
+@@ -38,7 +38,7 @@ func init() {
+ }
+ }
+
+-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
++func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) {
+ p := sysMmap(addr, n, prot, flags, fd, off)
+ if uintptr(p) == _MAP_FAILED {
+ return nil, errno()
+--- libgo/go/runtime/signal_gccgo.go
++++ libgo/go/runtime/signal_gccgo.go
+@@ -111,7 +111,7 @@ func getsig(i uint32) uintptr {
+ if sigaction(i, nil, &sa) < 0 {
+ // On GNU/Linux glibc rejects attempts to call
+ // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID).
+- if GOOS == "linux" && (i == 32 || i == 33) {
++ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) {
+ return _SIG_DFL
+ }
+ throw("sigaction read failure")
+--- libgo/go/syscall/errstr.go
++++ libgo/go/syscall/errstr.go
+@@ -5,7 +5,6 @@
+ // license that can be found in the LICENSE file.
+
+ // +build !hurd
+-// +build !linux
+
+ package syscall
+
+--- libgo/go/syscall/errstr_glibc.go
++++ /dev/null
+@@ -1,33 +0,0 @@
+-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
+-
+-// Copyright 2010 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-// We use this rather than errstr.go because on GNU/Linux sterror_r
+-// returns a pointer to the error message, and may not use buf at all.
+-
+-// +build hurd linux
+-
+-package syscall
+-
+-import "unsafe"
+-
+-//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
+-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
+-
+-func Errstr(errnum int) string {
+- a := make([]byte, 128)
+- p := strerror_r(errnum, a)
+- b := (*[1000]byte)(unsafe.Pointer(p))
+- i := 0
+- for b[i] != 0 {
+- i++
+- }
+- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
+- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
+- c := b[0] + 'a' - 'A'
+- return string(c) + string(b[1:i])
+- }
+- return string(b[:i])
+-}
+--- libgo/go/syscall/libcall_linux.go
++++ libgo/go/syscall/libcall_linux.go
+@@ -206,19 +206,19 @@ func Gettid() (tid int) {
+ //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
+ //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
+
+-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
+-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
++//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error)
++//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t
+ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+- var lroff _loff_t
+- var plroff *_loff_t
++ var lroff _off_t
++ var plroff *_off_t
+ if roff != nil {
+- lroff = _loff_t(*roff)
++ lroff = _off_t(*roff)
+ plroff = &lroff
+ }
+- var lwoff _loff_t
+- var plwoff *_loff_t
++ var lwoff _off_t
++ var plwoff *_off_t
+ if woff != nil {
+- lwoff = _loff_t(*woff)
++ lwoff = _off_t(*woff)
+ plwoff = &lwoff
+ }
+ n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
+--- libgo/mksigtab.sh
++++ libgo/mksigtab.sh
+@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}'
+ checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}'
+ checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}'
+ checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}'
+-checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
++#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
+ checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}'
+ checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}'
+ checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}'
+@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G
+
+ # Special handling of signals 32 and 33 on GNU/Linux systems,
+ # because they are special to glibc.
++# Signal 34 is additionally special to Linux systems with musl.
+ if test "${GOOS}" = "linux"; then
+- SIGLIST=$SIGLIST"_32__33_"
++ SIGLIST=$SIGLIST"_32__33__34_"
+ echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */'
+ echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */'
++ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */'
+ fi
+
+ if test "${GOOS}" = "aix"; then
+--- libgo/runtime/go-signal.c 2020-07-23 08:35:19.004402840 +0200
++++ - 2020-08-09 21:35:54.352886232 +0200
+@@ -224,7 +224,11 @@
+ #elif defined(__alpha__) && defined(__linux__)
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc;
+ #elif defined(__PPC__) && defined(__linux__)
+- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
++ #ifdef __PPC64__
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32];
++ #else
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32];
++ #endif
+ #elif defined(__PPC__) && defined(_AIX)
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar;
+ #elif defined(__aarch64__) && defined(__linux__)
+@@ -333,7 +337,7 @@
+ runtime_printf("sp %X\n", m->sc_regs[30]);
+ runtime_printf("pc %X\n", m->sc_pc);
+ }
+-#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__)
++#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__) && defined(__GLIBC__)
+ {
+ mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
+ int i;
+--- libgo/runtime/runtime.h
++++ libgo/runtime/runtime.h
+@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*);
+ void __go_makecontext(__go_context_t*, void (*)(), void*, size_t);
+ #else
+ #define __go_context_t ucontext_t
+-#define __go_getcontext(c) getcontext(c)
+-#define __go_setcontext(c) setcontext(c)
++int libucontext_getcontext(__go_context_t *);
++void libucontext_makecontext(__go_context_t *, void (*)(), int, ...);
++int libucontext_setcontext(const __go_context_t *);
++#define __go_getcontext(c) libucontext_getcontext(c)
++#define __go_setcontext(c) libucontext_setcontext(c)
+ #define __go_makecontext(c, fn, sp, size) \
+- ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, makecontext(c, fn, 0))
++ ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, libucontext_makecontext(c, fn, 0))
+ #endif
+
+ // Symbols defined by the linker.
+--- libgo/sysinfo.c
++++ libgo/sysinfo.c
+@@ -73,9 +73,6 @@
+ #include <sys/times.h>
+ #include <sys/wait.h>
+ #include <sys/un.h>
+-#if defined(HAVE_SYS_USER_H)
+-#include <sys/user.h>
+-#endif
+ #if defined(HAVE_SYS_UTSNAME_H)
+ #include <sys/utsname.h>
+ #endif
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 100644
index 00000000000..5ed9f16f558
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1,125 @@
+Source: Alpine Linux
+Upstream: Unknown
+Reason: Patch libgnarl to not use function missing from musl.
+
+diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads
+--- gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800
++++ gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700
+@@ -394,12 +394,6 @@ package System.OS_Interface is
+ PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
+
+- function pthread_rwlockattr_setkind_np
+- (attr : access pthread_rwlockattr_t;
+- pref : int) return int;
+- pragma Import
+- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
+-
+ function pthread_rwlock_init
+ (mutex : access pthread_rwlock_t;
+ attr : access pthread_rwlockattr_t) return int;
+@@ -464,11 +458,6 @@ package System.OS_Interface is
+ protocol : int) return int;
+ pragma Import (C, pthread_mutexattr_setprotocol);
+
+- function pthread_mutexattr_setprioceiling
+- (attr : access pthread_mutexattr_t;
+- prioceiling : int) return int;
+- pragma Import (C, pthread_mutexattr_setprioceiling);
+-
+ type struct_sched_param is record
+ sched_priority : int; -- scheduling priority
+ end record;
+diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb
+--- gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800
++++ gcc/ada/libgnarl/s-taprop__linux.adb 2018-11-13 11:28:36.433964449 -0800
+@@ -202,9 +202,6 @@ package body System.Task_Primitives.Oper
+ pragma Import
+ (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
+
+- function GNAT_has_cap_sys_nice return C.int;
+- pragma Import
+- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
+ -- We do not have pragma Linker_Options ("-lcap"); here, because this
+ -- library is not present on many Linux systems. 'libcap' is the Linux
+ -- "capabilities" library, called by __gnat_has_cap_sys_nice.
+@@ -214,38 +211,6 @@ package body System.Task_Primitives.Oper
+ -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
+ -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
+
+- function Get_Ceiling_Support return Boolean;
+- -- Get the value of the Ceiling_Support constant (see below).
+- -- Note well: If this function or related code is modified, it should be
+- -- tested by hand, because automated testing doesn't exercise it.
+-
+- -------------------------
+- -- Get_Ceiling_Support --
+- -------------------------
+-
+- function Get_Ceiling_Support return Boolean is
+- Ceiling_Support : Boolean := False;
+- begin
+- if Locking_Policy /= 'C' then
+- return False;
+- end if;
+-
+- declare
+- function geteuid return Integer;
+- pragma Import (C, geteuid, "geteuid");
+- Superuser : constant Boolean := geteuid = 0;
+- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
+- pragma Assert (Has_Cap in 0 | 1);
+- begin
+- Ceiling_Support := Superuser or else Has_Cap = 1;
+- end;
+-
+- return Ceiling_Support;
+- end Get_Ceiling_Support;
+-
+- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
+- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
+- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
+ -- True if the locking policy is Ceiling_Locking, and the current process
+ -- has permission to use this policy. The process has permission if it is
+ -- running as 'root', or if the capability was set by the setcap command,
+@@ -348,7 +313,9 @@ package body System.Task_Primitives.Oper
+ -- Init_Mutex --
+ ----------------
+
++ pragma Warnings (Off, "formal parameter * is not referenced");
+ function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
++ pragma Warnings (On, "formal parameter * is not referenced");
+ Mutex_Attr : aliased pthread_mutexattr_t;
+ Result, Result_2 : C.int;
+
+@@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper
+ return Result;
+ end if;
+
+- if Ceiling_Support then
+- Result := pthread_mutexattr_setprotocol
+- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
+- pragma Assert (Result = 0);
+-
+- Result := pthread_mutexattr_setprioceiling
+- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
+- pragma Assert (Result = 0);
+-
+- elsif Locking_Policy = 'I' then
++ if Locking_Policy = 'I' then
+ Result := pthread_mutexattr_setprotocol
+ (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
+ pragma Assert (Result = 0);
+@@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper
+ Result := pthread_rwlockattr_init (RWlock_Attr'Access);
+ pragma Assert (Result = 0);
+
+- Result := pthread_rwlockattr_setkind_np
+- (RWlock_Attr'Access,
+- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
+- pragma Assert (Result = 0);
+-
+ Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
+
+ pragma Assert (Result in 0 | ENOMEM);
+
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 100644
index 00000000000..e0b84f9acc9
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1,70 @@
+First part taken from Alpine.
+
+Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
+
+--- gcc/gcc.c
++++ gcc/gcc.c
+@@ -874,10 +874,15 @@ proper position among the other output files. */
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
+ #endif
+
++#ifdef ENABLE_DEFAULT_SSP
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
++#else
++#define NO_SSP_SPEC ""
++#endif
++
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+- "|fstack-protector-strong|fstack-protector-explicit:}"
++#define LINK_SSP_SPEC "-lssp_nonshared"
+ #else
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ "|fstack-protector-strong|fstack-protector-explicit" \
+@@ -1155,7 +1160,7 @@ static const char *cc1_options =
+ %{-version:--version}\
+ %{-help=*:--help=%*}\
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
+- %{fsyntax-only:-o %j} %{-param*}\
++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
+ %{coverage:-fprofile-arcs -ftest-coverage}\
+ %{fprofile-arcs|fprofile-generate*|coverage:\
+ %{!fprofile-update=single:\
+--- gcc/params.opt
++++ gcc/params.opt
+@@ -853,7 +853,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
+ The maximum number of SSA_NAME assignments to follow in determining a value.
+
+ -param=ssp-buffer-size=
+-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
++Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
+ The lower bound for a buffer to be considered for stack smashing protection.
+
+ -param=stack-clash-protection-guard-size=
+--- gcc/config/i386/gnu-user-common.h
++++ gcc/config/i386/gnu-user-common.h
+@@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see
+
+ /* Static stack checking is supported by means of probes. */
+ #define STACK_CHECK_STATIC_BUILTIN 1
+-
+-/* We only build the -fsplit-stack support in libgcc if the
+- assembler has full support for the CFI directives. */
+-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+-#define TARGET_CAN_SPLIT_STACK
+-#endif
+--- gcc/config/i386/gnu.h
++++ gcc/config/i386/gnu.h
+@@ -40,11 +40,6 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
+ /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
+ #define TARGET_THREAD_SSP_OFFSET 0x14
+
+-/* We only build the -fsplit-stack support in libgcc if the
+- assembler has full support for the CFI directives. */
+-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+-#define TARGET_CAN_SPLIT_STACK
+-#endif
+ /* We steal the last transactional memory word. */
+ #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
+ #endif
diff --git a/srcpkgs/libgccjit/patches/ada-shared.patch b/srcpkgs/libgccjit/patches/ada-shared.patch
new file mode 100644
index 00000000000..7b4280620fe
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/ada-shared.patch
@@ -0,0 +1,28 @@
+--- gcc/ada/link.c
++++ gcc/ada/link.c
+@@ -105,9 +105,9 @@
+
+ #elif defined (__FreeBSD__)
+ const char *__gnat_object_file_option = "-Wl,@";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
+-char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
++char __gnat_shared_libgcc_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ const char *__gnat_object_library_extension = ".a";
+@@ -127,9 +127,9 @@
+
+ #elif defined (linux) || defined(__GLIBC__)
+ const char *__gnat_object_file_option = "-Wl,@";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
+-char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
++char __gnat_shared_libgcc_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ const char *__gnat_object_library_extension = ".a";
diff --git a/srcpkgs/libgccjit/patches/consistent-library-paths.patch b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
new file mode 100644
index 00000000000..1ec0e258526
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
@@ -0,0 +1,110 @@
+Always use lib64 for 64-bit and lib32 for 32-bit.
+
+Do not change the dynamic linkers in any way, though.
+
+When adding a new platform, fix this up too.
+
+--- gcc/config/aarch64/t-aarch64-linux
++++ gcc/config/aarch64/t-aarch64-linux
+@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+ AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES = mabi.lp64=../lib64
+ MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+ MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+--- gcc/config/i386/t-linux64
++++ gcc/config/i386/t-linux64
+@@ -33,6 +33,6 @@
+ comma=,
+ MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+ MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+--- gcc/config/mips/t-linux64
++++ gcc/config/mips/t-linux64
+@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
+ MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+ MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+ MULTILIB_OSDIRNAMES = \
+- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++ ../lib32 \
++ ../lib \
++ ../lib64
+--- gcc/config/rs6000/t-linux
++++ gcc/config/rs6000/t-linux
+@@ -2,7 +2,8 @@
+ # or soft-float.
+ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ ifneq (,$(findstring powerpc64,$(target)))
+-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ else
+ MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
+ endif
+@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
+ MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
+ endif
+ ifneq (,$(findstring powerpc64le,$(target)))
+-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ endif
+ endif
+
+--- gcc/config/rs6000/t-linux64
++++ gcc/config/rs6000/t-linux64
+@@ -28,8 +28,8 @@
+ MULTILIB_OPTIONS := m64/m32
+ MULTILIB_DIRNAMES := 64 32
+ MULTILIB_EXTRA_OPTS :=
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ $(COMPILE) $<
+--- gcc/config/rs6000/t-linux64bele
++++ gcc/config/rs6000/t-linux64bele
+@@ -2,6 +2,6 @@
+
+ MULTILIB_OPTIONS += mlittle
+ MULTILIB_DIRNAMES += le
+-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/rs6000/t-linux64lebe
++++ gcc/config/rs6000/t-linux64lebe
+@@ -2,6 +2,6 @@
+
+ MULTILIB_OPTIONS += mbig
+ MULTILIB_DIRNAMES += be
+-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/s390/t-linux64
++++ gcc/config/s390/t-linux64
+@@ -7,5 +7,5 @@
+
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+--
+2.29.2
+
diff --git a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
new file mode 100644
index 00000000000..dda2a50460b
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
@@ -0,0 +1,10 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -169,6 +169,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASSS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
diff --git a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
new file mode 100644
index 00000000000..583eac7b0dc
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
@@ -0,0 +1,33 @@
+There is no <execinfo.h> in musl libc
+
+--- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200
++++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200
+@@ -124,7 +124,7 @@
+ #include <windows.h>
+ #include <winternl.h>
+ #include <psapi.h>
+-#else
++#elif defined (__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+--- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200
++++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200
+@@ -34,7 +34,7 @@
+ #include <string.h>
+ #if defined (__CYGWIN__) || defined (__MINGW32__)
+ #include <windows.h>
+-#else
++#elif defined (__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+@@ -178,7 +178,7 @@
+
+ __vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg);
+
+-#if !defined (__CYGWIN__) && !defined (__MINGW32__)
++#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__)
+ if (generate_backtrace)
+ {
+ #define STACK_DEPTH 20
diff --git a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
new file mode 100644
index 00000000000..3315c3e990b
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
@@ -0,0 +1,20 @@
+put vtv_end.o in front of postdep_objects_CXX
+having it after crtendS.o leads to missing zero termination in eh_frame section
+
+This is in line with comment in libgcc/vtv_end.c:
+
+ When the GCC driver inserts vtv_start.o into the link line (just
+ after crtbegin.o) it also inserts vtv_end.o into the link line,
+ just before crtend.o.
+
+--- libstdc++-v3/configure
++++ libstdc++-v3/configure
+@@ -15443,7 +15443,7 @@
+
+ if test "$enable_vtable_verify" = yes; then
+ predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
+- postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
++ postdep_objects_CXX="${glibcxx_builddir}/../libgcc/vtv_end.o ${postdep_objects_CXX}"
+ fi
+
+
diff --git a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
new file mode 100644
index 00000000000..413b4aef5af
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
@@ -0,0 +1,11 @@
+--- libffi/src/closures.c.orig
++++ libffi/src/closures.c
+@@ -34,7 +34,7 @@
+ #include <ffi_common.h>
+
+ #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
+-# if __gnu_linux__ && !defined(__ANDROID__)
++# if __linux__ && !defined(__ANDROID__)
+ /* This macro indicates it may be forbidden to map anonymous memory
+ with both write and execute permission. Code compiled when this
+ option is defined will attempt to map such pages once, but if it
diff --git a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
new file mode 100644
index 00000000000..855f8f1b035
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
@@ -0,0 +1,38 @@
+From 236634eed58fa6e00cc50f19e7202903a9d8fae6 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Thu, 12 Dec 2019 04:03:56 +0100
+Subject: [PATCH] libgcc: use -mno-gnu-attribute for 128-bit IBM ldouble
+ support code
+
+Doing this will allow libgcc to emit the appropriate symbols without actually
+emitting the FP ABI tag for them, which allows 64-bit long double environments
+to function and even link statically while still allowing usage of
+explicit __ibm128.
+---
+ libgcc/config/rs6000/t-ibm-ldouble | 2 +-
+ libgcc/config/rs6000/t-linux | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgcc/config/rs6000/t-ibm-ldouble b/libgcc/config/rs6000/t-ibm-ldouble
+index b132784..fb5eca8 100644
+--- libgcc/config/rs6000/t-ibm-ldouble
++++ libgcc/config/rs6000/t-ibm-ldouble
+@@ -1,6 +1,6 @@
+ # GCC 128-bit long double support routines.
+ LIB2ADD += $(srcdir)/config/rs6000/ibm-ldouble.c
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128
++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute
+
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ibm-ldouble.ver
+diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
+index 4f6d4c4..fa93bb6 100644
+--- libgcc/config/rs6000/t-linux
++++ libgcc/config/rs6000/t-linux
+@@ -1,3 +1,3 @@
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc
+--
+2.24.0
diff --git a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
new file mode 100644
index 00000000000..e5fdbf9f96f
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
@@ -0,0 +1,11 @@
+--- libffi/src/mips/ffitarget.h 2014-11-08 13:47:24.000000000 +0100
++++ libffi/src/mips/ffitarget.h 2017-11-09 16:51:11.866848444 +0100
+@@ -42,7 +42,7 @@
+ #define _MIPS_SIM_NABI32 2
+ #define _MIPS_SIM_ABI64 3
+ #elif !defined(__OpenBSD__)
+-# include <sgidefs.h>
++# include <asm/sgidefs.h>
+ #endif
+
+ # ifndef _ABIN32
diff --git a/srcpkgs/libgccjit/patches/mips-soft-float.patch b/srcpkgs/libgccjit/patches/mips-soft-float.patch
new file mode 100644
index 00000000000..4db0e2fb07a
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/mips-soft-float.patch
@@ -0,0 +1,18 @@
+--- libffi/src/mips/o32.S 2020-03-12 12:07:23.000000000 +0100
++++ libffi/src/mips/o32.S 2020-05-14 20:52:45.701809054 +0200
+@@ -278,6 +278,7 @@
+ li $9, FFI_TYPE_VOID
+ beq $8, $9, closure_done
+
++#ifndef __mips_soft_float
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+
+@@ -289,6 +290,7 @@
+ l.d $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
+ 1:
++#endif
+ REG_L $3, V1_OFF2($fp)
+ REG_L $2, V0_OFF2($fp)
+
diff --git a/srcpkgs/libgccjit/patches/musl-ada.patch b/srcpkgs/libgccjit/patches/musl-ada.patch
new file mode 100644
index 00000000000..61823684da5
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/musl-ada.patch
@@ -0,0 +1,204 @@
+diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
+index 3b0aea9..ee0bb69 100644
+--- gcc/ada/adaint.c
++++ gcc/ada/adaint.c
+@@ -76,6 +76,11 @@
+ #include <sys/param.h>
+ #include <sys/pstat.h>
+ #endif
++
++#if defined (linux)
++#define _GNU_SOURCE 1
++#include <sched.h>
++#endif
+
+ #ifdef __PikeOS__
+ #define __BSD_VISIBLE 1
+@@ -3255,7 +3260,6 @@ __gnat_lwp_self (void)
+ #endif
+
+ #if defined (__linux__)
+-#include <sched.h>
+
+ /* glibc versions earlier than 2.7 do not define the routines to handle
+ dynamically allocated CPU sets. For these targets, we use the static
+@@ -3265,7 +3269,7 @@ __gnat_lwp_self (void)
+
+ /* Dynamic cpu sets */
+
+-cpu_set_t *
++void *
+ __gnat_cpu_alloc (size_t count)
+ {
+ return CPU_ALLOC (count);
+@@ -3278,33 +3282,33 @@ __gnat_cpu_alloc_size (size_t count)
+ }
+
+ void
+-__gnat_cpu_free (cpu_set_t *set)
++__gnat_cpu_free (void *set)
+ {
+- CPU_FREE (set);
++ CPU_FREE ((cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_zero (size_t count, cpu_set_t *set)
++__gnat_cpu_zero (size_t count, void *set)
+ {
+- CPU_ZERO_S (count, set);
++ CPU_ZERO_S (count, (cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
++__gnat_cpu_set (int cpu, size_t count, void *set)
+ {
+ /* Ada handles CPU numbers starting from 1, while C identifies the first
+ CPU by a 0, so we need to adjust. */
+- CPU_SET_S (cpu - 1, count, set);
++ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
+ }
+
+ #else /* !CPU_ALLOC */
+
+ /* Static cpu sets */
+
+-cpu_set_t *
++void *
+ __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
+ {
+- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
++ return xmalloc (sizeof (cpu_set_t));
+ }
+
+ size_t
+@@ -3314,23 +3318,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
+ }
+
+ void
+-__gnat_cpu_free (cpu_set_t *set)
++__gnat_cpu_free (void *set)
+ {
+ free (set);
+ }
+
+ void
+-__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
++__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
+ {
+- CPU_ZERO (set);
++ CPU_ZERO ((cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
++__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
+ {
+ /* Ada handles CPU numbers starting from 1, while C identifies the first
+ CPU by a 0, so we need to adjust. */
+- CPU_SET (cpu - 1, set);
++ CPU_SET (cpu - 1, (cpu_set_t *) set);
+ }
+ #endif /* !CPU_ALLOC */
+ #endif /* __linux__ */
+diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
+index 0d12f7e..a063b47 100644
+--- gcc/ada/adaint.h
++++ gcc/ada/adaint.h
+@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
+
+ /* Routines for interface to required CPU set primitives */
+
+-#include <sched.h>
+-
+-extern cpu_set_t *__gnat_cpu_alloc (size_t);
++extern void * __gnat_cpu_alloc (size_t);
+ extern size_t __gnat_cpu_alloc_size (size_t);
+-extern void __gnat_cpu_free (cpu_set_t *);
+-extern void __gnat_cpu_zero (size_t, cpu_set_t *);
+-extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
++extern void __gnat_cpu_free (void *);
++extern void __gnat_cpu_zero (size_t, void *);
++extern void __gnat_cpu_set (int, size_t, void *);
+ #endif
+
+ #if defined (_WIN32)
+--- gcc/ada/Makefile.rtl 2020-07-23 08:35:17.052381336 +0200
++++ - 2020-08-09 19:38:24.230351406 +0200
+@@ -1533,7 +1533,7 @@
+ s-intman.adb<libgnarl/s-intman__posix.adb \
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ a-exetim.adb<libgnarl/a-exetim__posix.adb \
+ a-exetim.ads<libgnarl/a-exetim__default.ads \
+ s-linux.ads<libgnarl/s-linux.ads \
+@@ -2083,7 +2083,7 @@
+ s-osinte.adb<libgnarl/s-osinte__posix.adb \
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-ppc.ads
+@@ -2112,7 +2112,7 @@
+ endif
+
+ # ARM linux, GNU eabi
+-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
++ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<libgnarl/a-intnam__linux.ads \
+ s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
+@@ -2305,7 +2305,7 @@
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-ia64.ads
+@@ -2401,7 +2401,7 @@
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ s-taspri.ads<libgnarl/s-taspri__posix.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(X86_64_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-x86.ads
+--- gcc/ada/terminals.c 2019-01-08 10:54:04.000000000 +0100
++++ gcc/ada/terminals.c 2019-05-15 13:14:09.935742526 +0200
+@@ -1136,7 +1136,7 @@
+ /* POSIX does not specify how to open the master side of a terminal.Several
+ methods are available (system specific):
+ 1- using a cloning device (USE_CLONE_DEVICE)
+- 2- getpt (USE_GETPT)
++ 2- posix_openpt (USE_POSIX_OPENPT)
+ 3- openpty (USE_OPENPTY)
+
+ When using the cloning device method, the macro USE_CLONE_DEVICE should
+@@ -1150,7 +1150,7 @@
+ #if defined (__APPLE__) || defined (BSD)
+ #define USE_OPENPTY
+ #elif defined (__linux__)
+-#define USE_GETPT
++#define USE_POSIX_OPENPT
+ #elif defined (__sun__)
+ #define USE_CLONE_DEVICE "/dev/ptmx"
+ #elif defined (_AIX)
+@@ -1199,8 +1199,8 @@
+ int master_fd = -1;
+ char *slave_name = NULL;
+
+-#ifdef USE_GETPT
+- master_fd = getpt ();
++#if defined(USE_POSIX_OPENPT)
++ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
+ #elif defined (USE_OPENPTY)
+ status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
+ #elif defined (USE_CLONE_DEVICE)
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 00000000000..0e8551d062c
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,241 @@
+# Template file for 'libgccjit'
+_majorver=10
+_minorver=${_majorver}.2
+_patchver=${_minorver}.1
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=${_patchver}pre1
+wrksrc=gcc-${version/pre/_pre}
+revision=2
+short_desc="GNU Compiler Collection"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+nopie=yes
+lib32disabled=yes
+
+# MIPS is untested and does not have go in crosstoolchains
+# 32-bit PowerPC seems weirdly broken since the 10.x release
+# 32-bit little endian PowerPC has no support at all (no GOARCH)
+case "$XBPS_TARGET_MACHINE" in
+ ppc64*) ;;
+ mips*-musl|ppc*) _have_gccgo=no ;;
+esac
+
+if [ "$CHROOT_READY" ]; then
+ hostmakedepends="tar texinfo perl flex"
+fi
+
+makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel
+ libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
+depends="gcc>=${_minorver}"
+checkdepends="dejagnu"
+
+case "$XBPS_TARGET_MACHINE" in
+ i686) _triplet="i686-pc-linux-gnu";;
+ i686-musl) _triplet="i686-linux-musl";;
+ x86_64) _triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _triplet="x86_64-linux-musl";;
+ armv5tel) _triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _triplet="arm-linux-musleabi";;
+ armv6l) _triplet="arm-linux-gnueabihf";;
+ armv7l) _triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _triplet="arm-linux-musleabihf";;
+ armv7l-musl) _triplet="armv7l-linux-musleabihf";;
+ aarch64) _triplet="aarch64-linux-gnu";;
+ aarch64-musl) _triplet="aarch64-linux-musl";;
+ ppc) _triplet="powerpc-linux-gnu";;
+ ppc-musl) _triplet="powerpc-linux-musl";;
+ ppcle) _triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _triplet="powerpcle-linux-musl";;
+ ppc64le) _triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _triplet="powerpc64le-linux-musl";;
+ ppc64) _triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _triplet="powerpc64-linux-musl";;
+ mips-musl) _triplet="mips-linux-musl";;
+ mipshf-musl) _triplet="mips-linux-muslhf";;
+ mipsel-musl) _triplet="mipsel-linux-musl";;
+ mipselhf-musl) _triplet="mipsel-linux-muslhf";;
+esac
+case "$XBPS_TARGET_MACHINE" in
+ *-musl) depends+=" musl-devel";;
+ *) depends+=" glibc-devel"
+ ;;
+esac
+
+pre_configure() {
+ # _FORTIFY_SOURCE needs an optimization level.
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/libssp-musl.patch
+ patch -p0 -i ${FILESDIR}/gccgo-musl.patch
+ ;;
+ esac
+}
+do_configure() {
+ local _langs _args _hash
+
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_triplet}"
+ else
+ _langs="jit,lto"
+ _args+=" --build=${_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --with-system-zlib"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --enable-linker-build-id"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-lto"
+ _args+=" --enable-shared"
+ _args+=" --enable-host-shared"
+ _args+=" --enable-checking=release"
+ _args+=" --enable-plugins"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-default-pie"
+ _args+=" --disable-multilib"
+ _args+=" --disable-bootstrap"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+
+}
+
+do_build() {
+ if [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ fi
+ cd build
+ make ${makejobs}
+}
+
+post_build() {
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
+
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
+
+ vinstall "${wrksrc}/install/usr/lib64/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
+
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 00000000000..fb8dd58f204
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
@ 2021-02-16 1:40 ` ericonr
2021-02-16 1:50 ` [PR REVIEW] " ericonr
` (162 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-779528725
Comment:
Ook, quick suggestions from a brief skim. The `files/c*` stuff isn't necessary. Patches you probably want to have as a symlink to the gcc `patches/` directory.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
2021-02-16 1:40 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (161 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576500301
Comment:
This isn't in the bootstrap path, so it doesn't need to contain anything about `CHROOT_READY`. Just assume it is.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (3 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (158 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576499968
Comment:
Why not use `XBPS_TARGET_TRIPLET`?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (2 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (159 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576500072
Comment:
Already available in masterdir, shouldn't be listed (it can break the masterdir for subsequent builds).
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
2021-02-16 1:40 ` ericonr
2021-02-16 1:50 ` [PR REVIEW] " ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (160 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576500371
Comment:
Does Go matter at all for libgccjit?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (4 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (157 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501389
Comment:
indentation
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (6 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (155 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 232 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501251
Comment:
Should happen in `post_patch`, if anywhere. But I'm not sure they need to be applied.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (5 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (156 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576500459
Comment:
I don't think Gottox wants to maintain this ;)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (7 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (154 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576500994
Comment:
Both of these should already be available... And
- you don't want to depend on a specific revision of a package from another template, since they can get updated independently from each other
- you shouldn't specify versions in `hostmakedepends` or `depends`. The versions that will be used will be the ones listed in the templates for each package, so they don't affect anything besides possibly breaking a build.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (8 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (153 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 159 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576500504
Comment:
Should be 1.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (10 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (151 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501425
Comment:
indentation
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (12 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (149 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501097
Comment:
Hm, interesting. I guess `libgccjit` calls gcc as a process?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (11 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (150 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501840
Comment:
I'm not sure this is at all necessary>
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (9 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (152 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 234 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501948
Comment:
Ideally we would let it create these symlinks itself. No make target available for it?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (13 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (148 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501574
Comment:
Do we really need to specify so many options? :/
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (14 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
` (147 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501710
Comment:
From here on down you're using spaces where there should be tabs.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (15 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 1:50 ` ericonr
2021-02-16 6:00 ` lane-brain
` (146 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 1:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576501407
Comment:
indentation
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (16 preceding siblings ...)
2021-02-16 1:50 ` ericonr
@ 2021-02-16 6:00 ` lane-brain
2021-02-16 6:00 ` lane-brain
` (145 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 278 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576567056
Comment:
Changed this. Thank you for such throughout feedback on this, will be responding to all these comments as I revise the template.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (17 preceding siblings ...)
2021-02-16 6:00 ` lane-brain
@ 2021-02-16 6:00 ` lane-brain
2021-02-16 6:01 ` lane-brain
` (144 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576567194
Comment:
changing to my contact info
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (18 preceding siblings ...)
2021-02-16 6:00 ` lane-brain
@ 2021-02-16 6:01 ` lane-brain
2021-02-16 6:02 ` lane-brain
` (143 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 208 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576567390
Comment:
holdover from the gcc template, deleted this case section.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (19 preceding siblings ...)
2021-02-16 6:01 ` lane-brain
@ 2021-02-16 6:02 ` lane-brain
2021-02-16 6:05 ` lane-brain
` (142 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576567651
Comment:
gotcha. extracted contents from if block
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (20 preceding siblings ...)
2021-02-16 6:02 ` lane-brain
@ 2021-02-16 6:05 ` lane-brain
2021-02-16 6:23 ` lane-brain
` (141 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 647 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576568406
Comment:
so as it turns out this was due to my choice to substitute the source distfiles for these libraries with the void repo-provided packages. this causes problems when I attempt to cross-compile, so I reverted to the original distfiles def that pulls the source packages for mpfr, mpc, etc.
zlib-devel however had to remain included in order to compile, mainly because of the use of --with-system-zlib flag. If it's advisable to try to see if dropping this flag works, I can go ahead and test that.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (21 preceding siblings ...)
2021-02-16 6:05 ` lane-brain
@ 2021-02-16 6:23 ` lane-brain
2021-02-16 6:23 ` lane-brain
` (140 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576574137
Comment:
these are for the most part lifted from the original template to match how gcc is configured in void-packages. my rationale is that if we are rebuilding the compiler for the JIT, the JIT target configuration ought to match the original build as closely as possible. what I don't know is whether these flags aren't relevant if we aren't bootstrapping
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (22 preceding siblings ...)
2021-02-16 6:23 ` lane-brain
@ 2021-02-16 6:23 ` lane-brain
2021-02-16 6:28 ` lane-brain
` (139 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576574213
Comment:
I'll go ahead and s/r
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (23 preceding siblings ...)
2021-02-16 6:23 ` lane-brain
@ 2021-02-16 6:28 ` lane-brain
2021-02-16 6:32 ` lane-brain
` (138 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576576097
Comment:
if we are going by the documentation, these are the build flags it specifies for testing the package:
```
--enable-host-shared \
--enable-languages=jit,c++ \
--disable-bootstrap \
--enable-checking=release \
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (24 preceding siblings ...)
2021-02-16 6:28 ` lane-brain
@ 2021-02-16 6:32 ` lane-brain
2021-02-16 6:33 ` lane-brain
` (137 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 776 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576577664
Comment:
I use this when I stage the install in post_build. weirdly, the make script doesn't create the symlinks, so there has to be manual symlink creation anyways. I chose the more targeted installation because the default behavior is to install the entire gcc toolchain, so then I would have to go ahead and clear out all the unnecessary files. It seems much simpler to install the sonames and headers directly to isolate its libgccjit's contents from conflicting with gcc, and in line with the documentation which specifies that these are the only necessary components to work with libgccjit on top of an existing gcc installation.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (25 preceding siblings ...)
2021-02-16 6:32 ` lane-brain
@ 2021-02-16 6:33 ` lane-brain
2021-02-16 6:33 ` lane-brain
` (136 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576577664
Comment:
I use this when I stage the install in post_build. weirdly, the make script doesn't create the symlinks, so there has to be manual symlink creation anyways. I chose the more targeted installation because the default behavior is to install the entire gcc toolchain, so in that case I would have to go ahead and clear out all the unnecessary files. It seems much simpler to install the sonames and headers directly to isolate its libgccjit's contents from conflicting with gcc, and in line with the documentation which specifies that these are the only necessary components to work with libgccjit on top of an existing gcc installation.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (26 preceding siblings ...)
2021-02-16 6:33 ` lane-brain
@ 2021-02-16 6:33 ` lane-brain
2021-02-16 6:34 ` lane-brain
` (135 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576577664
Comment:
I use this when I stage the install in post_build. weirdly, the make script doesn't create the symlinks, so there has to be manual symlink creation anyways. I chose the more targeted installation because the default behavior is to install the entire gcc toolchain, so in that case I would have to go ahead and clear out all the unnecessary files. It seems much simpler to install the sonames and headers directly so as to isolate libgccjit's contents from conflicting with gcc, and this is in line with the documentation which specifies that these are the only necessary components to work with libgccjit on top of an existing gcc installation.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (27 preceding siblings ...)
2021-02-16 6:33 ` lane-brain
@ 2021-02-16 6:34 ` lane-brain
2021-02-16 6:35 ` lane-brain
` (134 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576577664
Comment:
I use this when I stage the install in post_build. weirdly, the make script doesn't create the symlinks, so there has to be manual symlink creation anyways. I chose the more targeted installation because the default behavior is to install the entire gcc toolchain, so in that case I would have to go ahead and clear out all the unnecessary files. It seems much simpler to install the sonames and headers directly so as to isolate libgccjit's contents from conflicting with gcc, and this is in line with the documentation which specifies that these are the only necessary components to work with libgccjit on top of an existing gcc installation. (ref[https://gcc.gnu.org/onlinedocs/jit/])(url)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (28 preceding siblings ...)
2021-02-16 6:34 ` lane-brain
@ 2021-02-16 6:35 ` lane-brain
2021-02-16 6:35 ` lane-brain
` (133 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576577664
Comment:
I use this when I stage the install in post_build. weirdly, the make script doesn't create the symlinks, so there has to be manual symlink creation anyways. I chose the more targeted installation because the default behavior is to install the entire gcc toolchain, so in that case I would have to go ahead and clear out all the unnecessary files. It seems much simpler to install the sonames and headers directly so as to isolate libgccjit's contents from conflicting with gcc, and this is in line with the documentation which specifies that these are the only necessary components to work with libgccjit on top of an existing gcc installation.
ref:[https://gcc.gnu.org/onlinedocs/jit/internals/index.html#working-on-the-jit-library])(url)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (29 preceding siblings ...)
2021-02-16 6:35 ` lane-brain
@ 2021-02-16 6:35 ` lane-brain
2021-02-16 6:44 ` lane-brain
` (132 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576577664
Comment:
I use this when I stage the install in post_build. weirdly, the make script doesn't create the symlinks, so there has to be manual symlink creation anyways. I chose the more targeted installation because the default behavior is to install the entire gcc toolchain, so in that case I would have to go ahead and clear out all the unnecessary files. It seems much simpler to install the sonames and headers directly so as to isolate libgccjit's contents from conflicting with gcc, and this is in line with the documentation which specifies that these are the only necessary components to work with libgccjit on top of an existing gcc installation.
[(reference)](https://gcc.gnu.org/onlinedocs/jit/internals/index.html#working-on-the-jit-library)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (30 preceding siblings ...)
2021-02-16 6:35 ` lane-brain
@ 2021-02-16 6:44 ` lane-brain
2021-02-16 6:48 ` ericonr
` (131 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 6:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-779624051
Comment:
> Ook, quick suggestions from a brief skim. The `files/c*` stuff isn't necessary. Patches you probably want to have as a symlink to the gcc `patches/` directory.
I can remove those and symlink the patches directory. I suppose I could also symlink the remaining patches in files for musl builds, although on that note I am trying and not currently succeeding to get a working musl build.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (31 preceding siblings ...)
2021-02-16 6:44 ` lane-brain
@ 2021-02-16 6:48 ` ericonr
2021-02-16 10:03 ` [PR REVIEW] " fosslinux
` (130 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 6:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 432 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-779626164
Comment:
I won't answer the whole thing now, but see my patch in https://github.com/void-linux/void-packages/issues/24240#issuecomment-715671265
I think you should be able to just symlink the `files/` directory as a whole, unless there's a bad reason to do this that I'm not thinking of right now.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (32 preceding siblings ...)
2021-02-16 6:48 ` ericonr
@ 2021-02-16 10:03 ` fosslinux
2021-02-16 17:19 ` [PR PATCH] [Updated] " lane-brain
` (129 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: fosslinux @ 2021-02-16 10:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
New review comment by fosslinux on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r576697161
Comment:
I think that @ericonr just means that `libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}` ... i think the rest can stay
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (33 preceding siblings ...)
2021-02-16 10:03 ` [PR REVIEW] " fosslinux
@ 2021-02-16 17:19 ` lane-brain
2021-02-16 17:25 ` lane-brain
` (128 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 96881 bytes --]
From 411d9929b4ed25956af216c643e9c165a8fc26a6 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Mon, 15 Feb 2021 20:32:51 -0500
Subject: [PATCH 1/2] New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/c89.1 | 80 ++++++
srcpkgs/libgccjit/files/c89.sh | 2 +
srcpkgs/libgccjit/files/c99.1 | 81 ++++++
srcpkgs/libgccjit/files/c99.sh | 2 +
srcpkgs/libgccjit/files/gccgo-musl.patch | 222 ++++++++++++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 125 +++++++++
srcpkgs/libgccjit/files/libssp-musl.patch | 70 +++++
srcpkgs/libgccjit/patches/ada-shared.patch | 28 ++
.../patches/consistent-library-paths.patch | 110 ++++++++
.../patches/fix-cxxflags-passing.patch | 10 +
.../libgccjit/patches/fix-musl-execinfo.patch | 33 +++
.../patches/fix-vtv-link-order.patch | 20 ++
.../libgccjit/patches/libffi_gnulinux.patch | 11 +
.../patches/libgcc-ibm128-no-tag.patch | 38 +++
.../libgccjit/patches/mips-sgidefs_h.patch | 11 +
.../libgccjit/patches/mips-soft-float.patch | 18 ++
srcpkgs/libgccjit/patches/musl-ada.patch | 204 +++++++++++++++
srcpkgs/libgccjit/template | 241 ++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
19 files changed, 1308 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/c89.1
create mode 100644 srcpkgs/libgccjit/files/c89.sh
create mode 100644 srcpkgs/libgccjit/files/c99.1
create mode 100644 srcpkgs/libgccjit/files/c99.sh
create mode 100644 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 100644 srcpkgs/libgccjit/patches/ada-shared.patch
create mode 100644 srcpkgs/libgccjit/patches/consistent-library-paths.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
create mode 100644 srcpkgs/libgccjit/patches/libffi_gnulinux.patch
create mode 100644 srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
create mode 100644 srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
create mode 100644 srcpkgs/libgccjit/patches/mips-soft-float.patch
create mode 100644 srcpkgs/libgccjit/patches/musl-ada.patch
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/srcpkgs/libgccjit/files/c89.1 b/srcpkgs/libgccjit/files/c89.1
new file mode 100644
index 00000000000..3ed984da33f
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.1
@@ -0,0 +1,80 @@
+.\" $NetBSD: c89.1,v 1.2 2008/04/30 13:10:50 martin Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 5, 1999
+.Dt C89 1
+.Os
+.Sh NAME
+.Nm c89
+.Nd ANSI (1989) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -ansiC
+specification.
+.Pp
+This includes proper handling of trigraphs,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar inline ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+appeared in
+.Nx 1.4 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c89.sh b/srcpkgs/libgccjit/files/c89.sh
new file mode 100644
index 00000000000..52d6d45431b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c89 "$@"
diff --git a/srcpkgs/libgccjit/files/c99.1 b/srcpkgs/libgccjit/files/c99.1
new file mode 100644
index 00000000000..d368f1a874b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.1
@@ -0,0 +1,81 @@
+.\" $NetBSD: c99.1,v 1.3 2010/05/14 01:53:28 joerg Exp $
+.\"
+.\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd September 24, 2008
+.Dt C99 1
+.Os
+.Sh NAME
+.Nm c99
+.Nd ANSI (1999) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -isoC-99
+specification.
+.Pp
+This includes
+inline functions, variable-length arrays, support for one-line
+comments beginning with //,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+first appeared in
+.Nx 5.0 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c99.sh b/srcpkgs/libgccjit/files/c99.sh
new file mode 100644
index 00000000000..15cab47c748
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c99 "$@"
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 100644
index 00000000000..a2ce4b2b046
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1,222 @@
+This is not among the normal patches as these changes are musl specific and
+there is no way to easily conditionalize it in source for some of the changes.
+
+Added by q66: runtime.h now uses libucontext_ prefixed APIs to allow build
+with freestanding versions of libucontext
+
+Souurce: Adélie Linux, q66
+URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
+
+--- Makefile.in
++++ Makefile.in
+@@ -46325,7 +46325,7 @@ configure-target-libgo:
+ esac; \
+ module_srcdir=libgo; \
+ rm -f no-such-file || : ; \
+- CONFIG_SITE=no-such-file $(SHELL) \
++ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+--- libgo/mksysinfo.sh
++++ libgo/mksysinfo.sh
+@@ -379,11 +379,7 @@ fi
+ # Some basic types.
+ echo 'type Size_t _size_t' >> ${OUT}
+ echo "type Ssize_t _ssize_t" >> ${OUT}
+-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
+- echo "type Offset_t _off64_t" >> ${OUT}
+-else
+- echo "type Offset_t _off_t" >> ${OUT}
+-fi
++echo "type Offset_t _off_t" >> ${OUT}
+ echo "type Mode_t _mode_t" >> ${OUT}
+ echo "type Pid_t _pid_t" >> ${OUT}
+ echo "type Uid_t _uid_t" >> ${OUT}
+--- libgo/go/runtime/mem_gccgo.go
++++ libgo/go/runtime/mem_gccgo.go
+@@ -16,7 +16,7 @@ import (
+ //go:linkname sysFree runtime.sysFree
+
+ //extern mmap
+-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
++func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer
+
+ //extern munmap
+ func munmap(addr unsafe.Pointer, length uintptr) int32
+@@ -38,7 +38,7 @@ func init() {
+ }
+ }
+
+-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
++func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) {
+ p := sysMmap(addr, n, prot, flags, fd, off)
+ if uintptr(p) == _MAP_FAILED {
+ return nil, errno()
+--- libgo/go/runtime/signal_gccgo.go
++++ libgo/go/runtime/signal_gccgo.go
+@@ -111,7 +111,7 @@ func getsig(i uint32) uintptr {
+ if sigaction(i, nil, &sa) < 0 {
+ // On GNU/Linux glibc rejects attempts to call
+ // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID).
+- if GOOS == "linux" && (i == 32 || i == 33) {
++ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) {
+ return _SIG_DFL
+ }
+ throw("sigaction read failure")
+--- libgo/go/syscall/errstr.go
++++ libgo/go/syscall/errstr.go
+@@ -5,7 +5,6 @@
+ // license that can be found in the LICENSE file.
+
+ // +build !hurd
+-// +build !linux
+
+ package syscall
+
+--- libgo/go/syscall/errstr_glibc.go
++++ /dev/null
+@@ -1,33 +0,0 @@
+-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
+-
+-// Copyright 2010 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-// We use this rather than errstr.go because on GNU/Linux sterror_r
+-// returns a pointer to the error message, and may not use buf at all.
+-
+-// +build hurd linux
+-
+-package syscall
+-
+-import "unsafe"
+-
+-//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
+-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
+-
+-func Errstr(errnum int) string {
+- a := make([]byte, 128)
+- p := strerror_r(errnum, a)
+- b := (*[1000]byte)(unsafe.Pointer(p))
+- i := 0
+- for b[i] != 0 {
+- i++
+- }
+- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
+- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
+- c := b[0] + 'a' - 'A'
+- return string(c) + string(b[1:i])
+- }
+- return string(b[:i])
+-}
+--- libgo/go/syscall/libcall_linux.go
++++ libgo/go/syscall/libcall_linux.go
+@@ -206,19 +206,19 @@ func Gettid() (tid int) {
+ //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
+ //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
+
+-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
+-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
++//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error)
++//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t
+ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+- var lroff _loff_t
+- var plroff *_loff_t
++ var lroff _off_t
++ var plroff *_off_t
+ if roff != nil {
+- lroff = _loff_t(*roff)
++ lroff = _off_t(*roff)
+ plroff = &lroff
+ }
+- var lwoff _loff_t
+- var plwoff *_loff_t
++ var lwoff _off_t
++ var plwoff *_off_t
+ if woff != nil {
+- lwoff = _loff_t(*woff)
++ lwoff = _off_t(*woff)
+ plwoff = &lwoff
+ }
+ n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
+--- libgo/mksigtab.sh
++++ libgo/mksigtab.sh
+@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}'
+ checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}'
+ checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}'
+ checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}'
+-checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
++#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
+ checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}'
+ checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}'
+ checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}'
+@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G
+
+ # Special handling of signals 32 and 33 on GNU/Linux systems,
+ # because they are special to glibc.
++# Signal 34 is additionally special to Linux systems with musl.
+ if test "${GOOS}" = "linux"; then
+- SIGLIST=$SIGLIST"_32__33_"
++ SIGLIST=$SIGLIST"_32__33__34_"
+ echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */'
+ echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */'
++ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */'
+ fi
+
+ if test "${GOOS}" = "aix"; then
+--- libgo/runtime/go-signal.c 2020-07-23 08:35:19.004402840 +0200
++++ - 2020-08-09 21:35:54.352886232 +0200
+@@ -224,7 +224,11 @@
+ #elif defined(__alpha__) && defined(__linux__)
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc;
+ #elif defined(__PPC__) && defined(__linux__)
+- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
++ #ifdef __PPC64__
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32];
++ #else
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32];
++ #endif
+ #elif defined(__PPC__) && defined(_AIX)
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar;
+ #elif defined(__aarch64__) && defined(__linux__)
+@@ -333,7 +337,7 @@
+ runtime_printf("sp %X\n", m->sc_regs[30]);
+ runtime_printf("pc %X\n", m->sc_pc);
+ }
+-#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__)
++#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__) && defined(__GLIBC__)
+ {
+ mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
+ int i;
+--- libgo/runtime/runtime.h
++++ libgo/runtime/runtime.h
+@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*);
+ void __go_makecontext(__go_context_t*, void (*)(), void*, size_t);
+ #else
+ #define __go_context_t ucontext_t
+-#define __go_getcontext(c) getcontext(c)
+-#define __go_setcontext(c) setcontext(c)
++int libucontext_getcontext(__go_context_t *);
++void libucontext_makecontext(__go_context_t *, void (*)(), int, ...);
++int libucontext_setcontext(const __go_context_t *);
++#define __go_getcontext(c) libucontext_getcontext(c)
++#define __go_setcontext(c) libucontext_setcontext(c)
+ #define __go_makecontext(c, fn, sp, size) \
+- ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, makecontext(c, fn, 0))
++ ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, libucontext_makecontext(c, fn, 0))
+ #endif
+
+ // Symbols defined by the linker.
+--- libgo/sysinfo.c
++++ libgo/sysinfo.c
+@@ -73,9 +73,6 @@
+ #include <sys/times.h>
+ #include <sys/wait.h>
+ #include <sys/un.h>
+-#if defined(HAVE_SYS_USER_H)
+-#include <sys/user.h>
+-#endif
+ #if defined(HAVE_SYS_UTSNAME_H)
+ #include <sys/utsname.h>
+ #endif
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 100644
index 00000000000..5ed9f16f558
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1,125 @@
+Source: Alpine Linux
+Upstream: Unknown
+Reason: Patch libgnarl to not use function missing from musl.
+
+diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads
+--- gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800
++++ gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700
+@@ -394,12 +394,6 @@ package System.OS_Interface is
+ PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
+
+- function pthread_rwlockattr_setkind_np
+- (attr : access pthread_rwlockattr_t;
+- pref : int) return int;
+- pragma Import
+- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
+-
+ function pthread_rwlock_init
+ (mutex : access pthread_rwlock_t;
+ attr : access pthread_rwlockattr_t) return int;
+@@ -464,11 +458,6 @@ package System.OS_Interface is
+ protocol : int) return int;
+ pragma Import (C, pthread_mutexattr_setprotocol);
+
+- function pthread_mutexattr_setprioceiling
+- (attr : access pthread_mutexattr_t;
+- prioceiling : int) return int;
+- pragma Import (C, pthread_mutexattr_setprioceiling);
+-
+ type struct_sched_param is record
+ sched_priority : int; -- scheduling priority
+ end record;
+diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb
+--- gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800
++++ gcc/ada/libgnarl/s-taprop__linux.adb 2018-11-13 11:28:36.433964449 -0800
+@@ -202,9 +202,6 @@ package body System.Task_Primitives.Oper
+ pragma Import
+ (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
+
+- function GNAT_has_cap_sys_nice return C.int;
+- pragma Import
+- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
+ -- We do not have pragma Linker_Options ("-lcap"); here, because this
+ -- library is not present on many Linux systems. 'libcap' is the Linux
+ -- "capabilities" library, called by __gnat_has_cap_sys_nice.
+@@ -214,38 +211,6 @@ package body System.Task_Primitives.Oper
+ -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
+ -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
+
+- function Get_Ceiling_Support return Boolean;
+- -- Get the value of the Ceiling_Support constant (see below).
+- -- Note well: If this function or related code is modified, it should be
+- -- tested by hand, because automated testing doesn't exercise it.
+-
+- -------------------------
+- -- Get_Ceiling_Support --
+- -------------------------
+-
+- function Get_Ceiling_Support return Boolean is
+- Ceiling_Support : Boolean := False;
+- begin
+- if Locking_Policy /= 'C' then
+- return False;
+- end if;
+-
+- declare
+- function geteuid return Integer;
+- pragma Import (C, geteuid, "geteuid");
+- Superuser : constant Boolean := geteuid = 0;
+- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
+- pragma Assert (Has_Cap in 0 | 1);
+- begin
+- Ceiling_Support := Superuser or else Has_Cap = 1;
+- end;
+-
+- return Ceiling_Support;
+- end Get_Ceiling_Support;
+-
+- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
+- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
+- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
+ -- True if the locking policy is Ceiling_Locking, and the current process
+ -- has permission to use this policy. The process has permission if it is
+ -- running as 'root', or if the capability was set by the setcap command,
+@@ -348,7 +313,9 @@ package body System.Task_Primitives.Oper
+ -- Init_Mutex --
+ ----------------
+
++ pragma Warnings (Off, "formal parameter * is not referenced");
+ function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
++ pragma Warnings (On, "formal parameter * is not referenced");
+ Mutex_Attr : aliased pthread_mutexattr_t;
+ Result, Result_2 : C.int;
+
+@@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper
+ return Result;
+ end if;
+
+- if Ceiling_Support then
+- Result := pthread_mutexattr_setprotocol
+- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
+- pragma Assert (Result = 0);
+-
+- Result := pthread_mutexattr_setprioceiling
+- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
+- pragma Assert (Result = 0);
+-
+- elsif Locking_Policy = 'I' then
++ if Locking_Policy = 'I' then
+ Result := pthread_mutexattr_setprotocol
+ (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
+ pragma Assert (Result = 0);
+@@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper
+ Result := pthread_rwlockattr_init (RWlock_Attr'Access);
+ pragma Assert (Result = 0);
+
+- Result := pthread_rwlockattr_setkind_np
+- (RWlock_Attr'Access,
+- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
+- pragma Assert (Result = 0);
+-
+ Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
+
+ pragma Assert (Result in 0 | ENOMEM);
+
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 100644
index 00000000000..e0b84f9acc9
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1,70 @@
+First part taken from Alpine.
+
+Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
+
+--- gcc/gcc.c
++++ gcc/gcc.c
+@@ -874,10 +874,15 @@ proper position among the other output files. */
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
+ #endif
+
++#ifdef ENABLE_DEFAULT_SSP
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
++#else
++#define NO_SSP_SPEC ""
++#endif
++
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+- "|fstack-protector-strong|fstack-protector-explicit:}"
++#define LINK_SSP_SPEC "-lssp_nonshared"
+ #else
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ "|fstack-protector-strong|fstack-protector-explicit" \
+@@ -1155,7 +1160,7 @@ static const char *cc1_options =
+ %{-version:--version}\
+ %{-help=*:--help=%*}\
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
+- %{fsyntax-only:-o %j} %{-param*}\
++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
+ %{coverage:-fprofile-arcs -ftest-coverage}\
+ %{fprofile-arcs|fprofile-generate*|coverage:\
+ %{!fprofile-update=single:\
+--- gcc/params.opt
++++ gcc/params.opt
+@@ -853,7 +853,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
+ The maximum number of SSA_NAME assignments to follow in determining a value.
+
+ -param=ssp-buffer-size=
+-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
++Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
+ The lower bound for a buffer to be considered for stack smashing protection.
+
+ -param=stack-clash-protection-guard-size=
+--- gcc/config/i386/gnu-user-common.h
++++ gcc/config/i386/gnu-user-common.h
+@@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see
+
+ /* Static stack checking is supported by means of probes. */
+ #define STACK_CHECK_STATIC_BUILTIN 1
+-
+-/* We only build the -fsplit-stack support in libgcc if the
+- assembler has full support for the CFI directives. */
+-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+-#define TARGET_CAN_SPLIT_STACK
+-#endif
+--- gcc/config/i386/gnu.h
++++ gcc/config/i386/gnu.h
+@@ -40,11 +40,6 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
+ /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
+ #define TARGET_THREAD_SSP_OFFSET 0x14
+
+-/* We only build the -fsplit-stack support in libgcc if the
+- assembler has full support for the CFI directives. */
+-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+-#define TARGET_CAN_SPLIT_STACK
+-#endif
+ /* We steal the last transactional memory word. */
+ #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
+ #endif
diff --git a/srcpkgs/libgccjit/patches/ada-shared.patch b/srcpkgs/libgccjit/patches/ada-shared.patch
new file mode 100644
index 00000000000..7b4280620fe
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/ada-shared.patch
@@ -0,0 +1,28 @@
+--- gcc/ada/link.c
++++ gcc/ada/link.c
+@@ -105,9 +105,9 @@
+
+ #elif defined (__FreeBSD__)
+ const char *__gnat_object_file_option = "-Wl,@";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
+-char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
++char __gnat_shared_libgcc_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ const char *__gnat_object_library_extension = ".a";
+@@ -127,9 +127,9 @@
+
+ #elif defined (linux) || defined(__GLIBC__)
+ const char *__gnat_object_file_option = "-Wl,@";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
+-char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
++char __gnat_shared_libgcc_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ const char *__gnat_object_library_extension = ".a";
diff --git a/srcpkgs/libgccjit/patches/consistent-library-paths.patch b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
new file mode 100644
index 00000000000..1ec0e258526
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
@@ -0,0 +1,110 @@
+Always use lib64 for 64-bit and lib32 for 32-bit.
+
+Do not change the dynamic linkers in any way, though.
+
+When adding a new platform, fix this up too.
+
+--- gcc/config/aarch64/t-aarch64-linux
++++ gcc/config/aarch64/t-aarch64-linux
+@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+ AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES = mabi.lp64=../lib64
+ MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+ MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+--- gcc/config/i386/t-linux64
++++ gcc/config/i386/t-linux64
+@@ -33,6 +33,6 @@
+ comma=,
+ MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+ MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+--- gcc/config/mips/t-linux64
++++ gcc/config/mips/t-linux64
+@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
+ MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+ MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+ MULTILIB_OSDIRNAMES = \
+- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++ ../lib32 \
++ ../lib \
++ ../lib64
+--- gcc/config/rs6000/t-linux
++++ gcc/config/rs6000/t-linux
+@@ -2,7 +2,8 @@
+ # or soft-float.
+ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ ifneq (,$(findstring powerpc64,$(target)))
+-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ else
+ MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
+ endif
+@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
+ MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
+ endif
+ ifneq (,$(findstring powerpc64le,$(target)))
+-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ endif
+ endif
+
+--- gcc/config/rs6000/t-linux64
++++ gcc/config/rs6000/t-linux64
+@@ -28,8 +28,8 @@
+ MULTILIB_OPTIONS := m64/m32
+ MULTILIB_DIRNAMES := 64 32
+ MULTILIB_EXTRA_OPTS :=
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ $(COMPILE) $<
+--- gcc/config/rs6000/t-linux64bele
++++ gcc/config/rs6000/t-linux64bele
+@@ -2,6 +2,6 @@
+
+ MULTILIB_OPTIONS += mlittle
+ MULTILIB_DIRNAMES += le
+-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/rs6000/t-linux64lebe
++++ gcc/config/rs6000/t-linux64lebe
+@@ -2,6 +2,6 @@
+
+ MULTILIB_OPTIONS += mbig
+ MULTILIB_DIRNAMES += be
+-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/s390/t-linux64
++++ gcc/config/s390/t-linux64
+@@ -7,5 +7,5 @@
+
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+--
+2.29.2
+
diff --git a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
new file mode 100644
index 00000000000..dda2a50460b
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
@@ -0,0 +1,10 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -169,6 +169,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASSS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
diff --git a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
new file mode 100644
index 00000000000..583eac7b0dc
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
@@ -0,0 +1,33 @@
+There is no <execinfo.h> in musl libc
+
+--- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200
++++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200
+@@ -124,7 +124,7 @@
+ #include <windows.h>
+ #include <winternl.h>
+ #include <psapi.h>
+-#else
++#elif defined (__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+--- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200
++++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200
+@@ -34,7 +34,7 @@
+ #include <string.h>
+ #if defined (__CYGWIN__) || defined (__MINGW32__)
+ #include <windows.h>
+-#else
++#elif defined (__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+@@ -178,7 +178,7 @@
+
+ __vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg);
+
+-#if !defined (__CYGWIN__) && !defined (__MINGW32__)
++#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__)
+ if (generate_backtrace)
+ {
+ #define STACK_DEPTH 20
diff --git a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
new file mode 100644
index 00000000000..3315c3e990b
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
@@ -0,0 +1,20 @@
+put vtv_end.o in front of postdep_objects_CXX
+having it after crtendS.o leads to missing zero termination in eh_frame section
+
+This is in line with comment in libgcc/vtv_end.c:
+
+ When the GCC driver inserts vtv_start.o into the link line (just
+ after crtbegin.o) it also inserts vtv_end.o into the link line,
+ just before crtend.o.
+
+--- libstdc++-v3/configure
++++ libstdc++-v3/configure
+@@ -15443,7 +15443,7 @@
+
+ if test "$enable_vtable_verify" = yes; then
+ predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
+- postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
++ postdep_objects_CXX="${glibcxx_builddir}/../libgcc/vtv_end.o ${postdep_objects_CXX}"
+ fi
+
+
diff --git a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
new file mode 100644
index 00000000000..413b4aef5af
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
@@ -0,0 +1,11 @@
+--- libffi/src/closures.c.orig
++++ libffi/src/closures.c
+@@ -34,7 +34,7 @@
+ #include <ffi_common.h>
+
+ #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
+-# if __gnu_linux__ && !defined(__ANDROID__)
++# if __linux__ && !defined(__ANDROID__)
+ /* This macro indicates it may be forbidden to map anonymous memory
+ with both write and execute permission. Code compiled when this
+ option is defined will attempt to map such pages once, but if it
diff --git a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
new file mode 100644
index 00000000000..855f8f1b035
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
@@ -0,0 +1,38 @@
+From 236634eed58fa6e00cc50f19e7202903a9d8fae6 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Thu, 12 Dec 2019 04:03:56 +0100
+Subject: [PATCH] libgcc: use -mno-gnu-attribute for 128-bit IBM ldouble
+ support code
+
+Doing this will allow libgcc to emit the appropriate symbols without actually
+emitting the FP ABI tag for them, which allows 64-bit long double environments
+to function and even link statically while still allowing usage of
+explicit __ibm128.
+---
+ libgcc/config/rs6000/t-ibm-ldouble | 2 +-
+ libgcc/config/rs6000/t-linux | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgcc/config/rs6000/t-ibm-ldouble b/libgcc/config/rs6000/t-ibm-ldouble
+index b132784..fb5eca8 100644
+--- libgcc/config/rs6000/t-ibm-ldouble
++++ libgcc/config/rs6000/t-ibm-ldouble
+@@ -1,6 +1,6 @@
+ # GCC 128-bit long double support routines.
+ LIB2ADD += $(srcdir)/config/rs6000/ibm-ldouble.c
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128
++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute
+
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ibm-ldouble.ver
+diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
+index 4f6d4c4..fa93bb6 100644
+--- libgcc/config/rs6000/t-linux
++++ libgcc/config/rs6000/t-linux
+@@ -1,3 +1,3 @@
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc
+--
+2.24.0
diff --git a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
new file mode 100644
index 00000000000..e5fdbf9f96f
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
@@ -0,0 +1,11 @@
+--- libffi/src/mips/ffitarget.h 2014-11-08 13:47:24.000000000 +0100
++++ libffi/src/mips/ffitarget.h 2017-11-09 16:51:11.866848444 +0100
+@@ -42,7 +42,7 @@
+ #define _MIPS_SIM_NABI32 2
+ #define _MIPS_SIM_ABI64 3
+ #elif !defined(__OpenBSD__)
+-# include <sgidefs.h>
++# include <asm/sgidefs.h>
+ #endif
+
+ # ifndef _ABIN32
diff --git a/srcpkgs/libgccjit/patches/mips-soft-float.patch b/srcpkgs/libgccjit/patches/mips-soft-float.patch
new file mode 100644
index 00000000000..4db0e2fb07a
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/mips-soft-float.patch
@@ -0,0 +1,18 @@
+--- libffi/src/mips/o32.S 2020-03-12 12:07:23.000000000 +0100
++++ libffi/src/mips/o32.S 2020-05-14 20:52:45.701809054 +0200
+@@ -278,6 +278,7 @@
+ li $9, FFI_TYPE_VOID
+ beq $8, $9, closure_done
+
++#ifndef __mips_soft_float
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+
+@@ -289,6 +290,7 @@
+ l.d $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
+ 1:
++#endif
+ REG_L $3, V1_OFF2($fp)
+ REG_L $2, V0_OFF2($fp)
+
diff --git a/srcpkgs/libgccjit/patches/musl-ada.patch b/srcpkgs/libgccjit/patches/musl-ada.patch
new file mode 100644
index 00000000000..61823684da5
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/musl-ada.patch
@@ -0,0 +1,204 @@
+diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
+index 3b0aea9..ee0bb69 100644
+--- gcc/ada/adaint.c
++++ gcc/ada/adaint.c
+@@ -76,6 +76,11 @@
+ #include <sys/param.h>
+ #include <sys/pstat.h>
+ #endif
++
++#if defined (linux)
++#define _GNU_SOURCE 1
++#include <sched.h>
++#endif
+
+ #ifdef __PikeOS__
+ #define __BSD_VISIBLE 1
+@@ -3255,7 +3260,6 @@ __gnat_lwp_self (void)
+ #endif
+
+ #if defined (__linux__)
+-#include <sched.h>
+
+ /* glibc versions earlier than 2.7 do not define the routines to handle
+ dynamically allocated CPU sets. For these targets, we use the static
+@@ -3265,7 +3269,7 @@ __gnat_lwp_self (void)
+
+ /* Dynamic cpu sets */
+
+-cpu_set_t *
++void *
+ __gnat_cpu_alloc (size_t count)
+ {
+ return CPU_ALLOC (count);
+@@ -3278,33 +3282,33 @@ __gnat_cpu_alloc_size (size_t count)
+ }
+
+ void
+-__gnat_cpu_free (cpu_set_t *set)
++__gnat_cpu_free (void *set)
+ {
+- CPU_FREE (set);
++ CPU_FREE ((cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_zero (size_t count, cpu_set_t *set)
++__gnat_cpu_zero (size_t count, void *set)
+ {
+- CPU_ZERO_S (count, set);
++ CPU_ZERO_S (count, (cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
++__gnat_cpu_set (int cpu, size_t count, void *set)
+ {
+ /* Ada handles CPU numbers starting from 1, while C identifies the first
+ CPU by a 0, so we need to adjust. */
+- CPU_SET_S (cpu - 1, count, set);
++ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
+ }
+
+ #else /* !CPU_ALLOC */
+
+ /* Static cpu sets */
+
+-cpu_set_t *
++void *
+ __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
+ {
+- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
++ return xmalloc (sizeof (cpu_set_t));
+ }
+
+ size_t
+@@ -3314,23 +3318,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
+ }
+
+ void
+-__gnat_cpu_free (cpu_set_t *set)
++__gnat_cpu_free (void *set)
+ {
+ free (set);
+ }
+
+ void
+-__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
++__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
+ {
+- CPU_ZERO (set);
++ CPU_ZERO ((cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
++__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
+ {
+ /* Ada handles CPU numbers starting from 1, while C identifies the first
+ CPU by a 0, so we need to adjust. */
+- CPU_SET (cpu - 1, set);
++ CPU_SET (cpu - 1, (cpu_set_t *) set);
+ }
+ #endif /* !CPU_ALLOC */
+ #endif /* __linux__ */
+diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
+index 0d12f7e..a063b47 100644
+--- gcc/ada/adaint.h
++++ gcc/ada/adaint.h
+@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
+
+ /* Routines for interface to required CPU set primitives */
+
+-#include <sched.h>
+-
+-extern cpu_set_t *__gnat_cpu_alloc (size_t);
++extern void * __gnat_cpu_alloc (size_t);
+ extern size_t __gnat_cpu_alloc_size (size_t);
+-extern void __gnat_cpu_free (cpu_set_t *);
+-extern void __gnat_cpu_zero (size_t, cpu_set_t *);
+-extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
++extern void __gnat_cpu_free (void *);
++extern void __gnat_cpu_zero (size_t, void *);
++extern void __gnat_cpu_set (int, size_t, void *);
+ #endif
+
+ #if defined (_WIN32)
+--- gcc/ada/Makefile.rtl 2020-07-23 08:35:17.052381336 +0200
++++ - 2020-08-09 19:38:24.230351406 +0200
+@@ -1533,7 +1533,7 @@
+ s-intman.adb<libgnarl/s-intman__posix.adb \
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ a-exetim.adb<libgnarl/a-exetim__posix.adb \
+ a-exetim.ads<libgnarl/a-exetim__default.ads \
+ s-linux.ads<libgnarl/s-linux.ads \
+@@ -2083,7 +2083,7 @@
+ s-osinte.adb<libgnarl/s-osinte__posix.adb \
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-ppc.ads
+@@ -2112,7 +2112,7 @@
+ endif
+
+ # ARM linux, GNU eabi
+-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
++ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<libgnarl/a-intnam__linux.ads \
+ s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
+@@ -2305,7 +2305,7 @@
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-ia64.ads
+@@ -2401,7 +2401,7 @@
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ s-taspri.ads<libgnarl/s-taspri__posix.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(X86_64_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-x86.ads
+--- gcc/ada/terminals.c 2019-01-08 10:54:04.000000000 +0100
++++ gcc/ada/terminals.c 2019-05-15 13:14:09.935742526 +0200
+@@ -1136,7 +1136,7 @@
+ /* POSIX does not specify how to open the master side of a terminal.Several
+ methods are available (system specific):
+ 1- using a cloning device (USE_CLONE_DEVICE)
+- 2- getpt (USE_GETPT)
++ 2- posix_openpt (USE_POSIX_OPENPT)
+ 3- openpty (USE_OPENPTY)
+
+ When using the cloning device method, the macro USE_CLONE_DEVICE should
+@@ -1150,7 +1150,7 @@
+ #if defined (__APPLE__) || defined (BSD)
+ #define USE_OPENPTY
+ #elif defined (__linux__)
+-#define USE_GETPT
++#define USE_POSIX_OPENPT
+ #elif defined (__sun__)
+ #define USE_CLONE_DEVICE "/dev/ptmx"
+ #elif defined (_AIX)
+@@ -1199,8 +1199,8 @@
+ int master_fd = -1;
+ char *slave_name = NULL;
+
+-#ifdef USE_GETPT
+- master_fd = getpt ();
++#if defined(USE_POSIX_OPENPT)
++ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
+ #elif defined (USE_OPENPTY)
+ status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
+ #elif defined (USE_CLONE_DEVICE)
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 00000000000..0e8551d062c
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,241 @@
+# Template file for 'libgccjit'
+_majorver=10
+_minorver=${_majorver}.2
+_patchver=${_minorver}.1
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=${_patchver}pre1
+wrksrc=gcc-${version/pre/_pre}
+revision=2
+short_desc="GNU Compiler Collection"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+nopie=yes
+lib32disabled=yes
+
+# MIPS is untested and does not have go in crosstoolchains
+# 32-bit PowerPC seems weirdly broken since the 10.x release
+# 32-bit little endian PowerPC has no support at all (no GOARCH)
+case "$XBPS_TARGET_MACHINE" in
+ ppc64*) ;;
+ mips*-musl|ppc*) _have_gccgo=no ;;
+esac
+
+if [ "$CHROOT_READY" ]; then
+ hostmakedepends="tar texinfo perl flex"
+fi
+
+makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel
+ libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
+depends="gcc>=${_minorver}"
+checkdepends="dejagnu"
+
+case "$XBPS_TARGET_MACHINE" in
+ i686) _triplet="i686-pc-linux-gnu";;
+ i686-musl) _triplet="i686-linux-musl";;
+ x86_64) _triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _triplet="x86_64-linux-musl";;
+ armv5tel) _triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _triplet="arm-linux-musleabi";;
+ armv6l) _triplet="arm-linux-gnueabihf";;
+ armv7l) _triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _triplet="arm-linux-musleabihf";;
+ armv7l-musl) _triplet="armv7l-linux-musleabihf";;
+ aarch64) _triplet="aarch64-linux-gnu";;
+ aarch64-musl) _triplet="aarch64-linux-musl";;
+ ppc) _triplet="powerpc-linux-gnu";;
+ ppc-musl) _triplet="powerpc-linux-musl";;
+ ppcle) _triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _triplet="powerpcle-linux-musl";;
+ ppc64le) _triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _triplet="powerpc64le-linux-musl";;
+ ppc64) _triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _triplet="powerpc64-linux-musl";;
+ mips-musl) _triplet="mips-linux-musl";;
+ mipshf-musl) _triplet="mips-linux-muslhf";;
+ mipsel-musl) _triplet="mipsel-linux-musl";;
+ mipselhf-musl) _triplet="mipsel-linux-muslhf";;
+esac
+case "$XBPS_TARGET_MACHINE" in
+ *-musl) depends+=" musl-devel";;
+ *) depends+=" glibc-devel"
+ ;;
+esac
+
+pre_configure() {
+ # _FORTIFY_SOURCE needs an optimization level.
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/libssp-musl.patch
+ patch -p0 -i ${FILESDIR}/gccgo-musl.patch
+ ;;
+ esac
+}
+do_configure() {
+ local _langs _args _hash
+
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_triplet}"
+ else
+ _langs="jit,lto"
+ _args+=" --build=${_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --with-system-zlib"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --enable-linker-build-id"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-lto"
+ _args+=" --enable-shared"
+ _args+=" --enable-host-shared"
+ _args+=" --enable-checking=release"
+ _args+=" --enable-plugins"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-default-pie"
+ _args+=" --disable-multilib"
+ _args+=" --disable-bootstrap"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+
+}
+
+do_build() {
+ if [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ fi
+ cd build
+ make ${makejobs}
+}
+
+post_build() {
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
+
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
+
+ vinstall "${wrksrc}/install/usr/lib64/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
+
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 00000000000..fb8dd58f204
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
From 50c7abf2083bd6c29c00d7e5437de59b8f933396 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Tue, 16 Feb 2021 12:19:13 -0500
Subject: [PATCH 2/2] New package: New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 ++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 126 +----------
srcpkgs/libgccjit/files/libssp-musl.patch | 71 +-----
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/patches/ada-shared.patch | 28 ---
.../patches/consistent-library-paths.patch | 110 ----------
.../patches/fix-cxxflags-passing.patch | 10 -
.../libgccjit/patches/fix-musl-execinfo.patch | 33 ---
.../patches/fix-vtv-link-order.patch | 20 --
.../libgccjit/patches/libffi_gnulinux.patch | 11 -
.../patches/libgcc-ibm128-no-tag.patch | 38 ----
.../libgccjit/patches/mips-sgidefs_h.patch | 11 -
.../libgccjit/patches/mips-soft-float.patch | 18 --
srcpkgs/libgccjit/patches/musl-ada.patch | 204 ------------------
srcpkgs/libgccjit/template | 148 +++++++------
15 files changed, 147 insertions(+), 745 deletions(-)
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
mode change 100644 => 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
mode change 100644 => 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
delete mode 100644 srcpkgs/libgccjit/patches/ada-shared.patch
delete mode 100644 srcpkgs/libgccjit/patches/consistent-library-paths.patch
delete mode 100644 srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
delete mode 100644 srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
delete mode 100644 srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
delete mode 100644 srcpkgs/libgccjit/patches/libffi_gnulinux.patch
delete mode 100644 srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
delete mode 100644 srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
delete mode 100644 srcpkgs/libgccjit/patches/mips-soft-float.patch
delete mode 100644 srcpkgs/libgccjit/patches/musl-ada.patch
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 00000000000..d2ed16928c8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
deleted file mode 100644
index 5ed9f16f558..00000000000
--- a/srcpkgs/libgccjit/files/libgnarl-musl.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-Source: Alpine Linux
-Upstream: Unknown
-Reason: Patch libgnarl to not use function missing from musl.
-
-diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads
---- gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800
-+++ gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700
-@@ -394,12 +394,6 @@ package System.OS_Interface is
- PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
-
-- function pthread_rwlockattr_setkind_np
-- (attr : access pthread_rwlockattr_t;
-- pref : int) return int;
-- pragma Import
-- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
--
- function pthread_rwlock_init
- (mutex : access pthread_rwlock_t;
- attr : access pthread_rwlockattr_t) return int;
-@@ -464,11 +458,6 @@ package System.OS_Interface is
- protocol : int) return int;
- pragma Import (C, pthread_mutexattr_setprotocol);
-
-- function pthread_mutexattr_setprioceiling
-- (attr : access pthread_mutexattr_t;
-- prioceiling : int) return int;
-- pragma Import (C, pthread_mutexattr_setprioceiling);
--
- type struct_sched_param is record
- sched_priority : int; -- scheduling priority
- end record;
-diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb
---- gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800
-+++ gcc/ada/libgnarl/s-taprop__linux.adb 2018-11-13 11:28:36.433964449 -0800
-@@ -202,9 +202,6 @@ package body System.Task_Primitives.Oper
- pragma Import
- (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
-
-- function GNAT_has_cap_sys_nice return C.int;
-- pragma Import
-- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
- -- We do not have pragma Linker_Options ("-lcap"); here, because this
- -- library is not present on many Linux systems. 'libcap' is the Linux
- -- "capabilities" library, called by __gnat_has_cap_sys_nice.
-@@ -214,38 +211,6 @@ package body System.Task_Primitives.Oper
- -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
- -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
-
-- function Get_Ceiling_Support return Boolean;
-- -- Get the value of the Ceiling_Support constant (see below).
-- -- Note well: If this function or related code is modified, it should be
-- -- tested by hand, because automated testing doesn't exercise it.
--
-- -------------------------
-- -- Get_Ceiling_Support --
-- -------------------------
--
-- function Get_Ceiling_Support return Boolean is
-- Ceiling_Support : Boolean := False;
-- begin
-- if Locking_Policy /= 'C' then
-- return False;
-- end if;
--
-- declare
-- function geteuid return Integer;
-- pragma Import (C, geteuid, "geteuid");
-- Superuser : constant Boolean := geteuid = 0;
-- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
-- pragma Assert (Has_Cap in 0 | 1);
-- begin
-- Ceiling_Support := Superuser or else Has_Cap = 1;
-- end;
--
-- return Ceiling_Support;
-- end Get_Ceiling_Support;
--
-- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
-- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
-- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
- -- True if the locking policy is Ceiling_Locking, and the current process
- -- has permission to use this policy. The process has permission if it is
- -- running as 'root', or if the capability was set by the setcap command,
-@@ -348,7 +313,9 @@ package body System.Task_Primitives.Oper
- -- Init_Mutex --
- ----------------
-
-+ pragma Warnings (Off, "formal parameter * is not referenced");
- function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
-+ pragma Warnings (On, "formal parameter * is not referenced");
- Mutex_Attr : aliased pthread_mutexattr_t;
- Result, Result_2 : C.int;
-
-@@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper
- return Result;
- end if;
-
-- if Ceiling_Support then
-- Result := pthread_mutexattr_setprotocol
-- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
-- pragma Assert (Result = 0);
--
-- Result := pthread_mutexattr_setprioceiling
-- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
-- pragma Assert (Result = 0);
--
-- elsif Locking_Policy = 'I' then
-+ if Locking_Policy = 'I' then
- Result := pthread_mutexattr_setprotocol
- (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
- pragma Assert (Result = 0);
-@@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper
- Result := pthread_rwlockattr_init (RWlock_Attr'Access);
- pragma Assert (Result = 0);
-
-- Result := pthread_rwlockattr_setkind_np
-- (RWlock_Attr'Access,
-- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-- pragma Assert (Result = 0);
--
- Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
-
- pragma Assert (Result in 0 | ENOMEM);
-
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 00000000000..cab291e893c
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
deleted file mode 100644
index e0b84f9acc9..00000000000
--- a/srcpkgs/libgccjit/files/libssp-musl.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-First part taken from Alpine.
-
-Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
-
---- gcc/gcc.c
-+++ gcc/gcc.c
-@@ -874,10 +874,15 @@ proper position among the other output files. */
- #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
- #endif
-
-+#ifdef ENABLE_DEFAULT_SSP
-+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
-+#else
-+#define NO_SSP_SPEC ""
-+#endif
-+
- #ifndef LINK_SSP_SPEC
- #ifdef TARGET_LIBC_PROVIDES_SSP
--#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-- "|fstack-protector-strong|fstack-protector-explicit:}"
-+#define LINK_SSP_SPEC "-lssp_nonshared"
- #else
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit" \
-@@ -1155,7 +1160,7 @@ static const char *cc1_options =
- %{-version:--version}\
- %{-help=*:--help=%*}\
- %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
-- %{fsyntax-only:-o %j} %{-param*}\
-+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
- %{coverage:-fprofile-arcs -ftest-coverage}\
- %{fprofile-arcs|fprofile-generate*|coverage:\
- %{!fprofile-update=single:\
---- gcc/params.opt
-+++ gcc/params.opt
-@@ -853,7 +853,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
- The maximum number of SSA_NAME assignments to follow in determining a value.
-
- -param=ssp-buffer-size=
--Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
-+Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
- The lower bound for a buffer to be considered for stack smashing protection.
-
- -param=stack-clash-protection-guard-size=
---- gcc/config/i386/gnu-user-common.h
-+++ gcc/config/i386/gnu-user-common.h
-@@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see
-
- /* Static stack checking is supported by means of probes. */
- #define STACK_CHECK_STATIC_BUILTIN 1
--
--/* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
--#define TARGET_CAN_SPLIT_STACK
--#endif
---- gcc/config/i386/gnu.h
-+++ gcc/config/i386/gnu.h
-@@ -40,11 +40,6 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
- /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
- #define TARGET_THREAD_SSP_OFFSET 0x14
-
--/* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
--#define TARGET_CAN_SPLIT_STACK
--#endif
- /* We steal the last transactional memory word. */
- #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
- #endif
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 00000000000..bf43b096e8b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 00000000000..c42218ef09d
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches/ada-shared.patch b/srcpkgs/libgccjit/patches/ada-shared.patch
deleted file mode 100644
index 7b4280620fe..00000000000
--- a/srcpkgs/libgccjit/patches/ada-shared.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- gcc/ada/link.c
-+++ gcc/ada/link.c
-@@ -105,9 +105,9 @@
-
- #elif defined (__FreeBSD__)
- const char *__gnat_object_file_option = "-Wl,@";
--const char *__gnat_run_path_option = "-Wl,-rpath,";
--char __gnat_shared_libgnat_default = STATIC;
--char __gnat_shared_libgcc_default = STATIC;
-+const char *__gnat_run_path_option = "";
-+char __gnat_shared_libgnat_default = SHARED;
-+char __gnat_shared_libgcc_default = SHARED;
- int __gnat_link_max = 8192;
- unsigned char __gnat_objlist_file_supported = 1;
- const char *__gnat_object_library_extension = ".a";
-@@ -127,9 +127,9 @@
-
- #elif defined (linux) || defined(__GLIBC__)
- const char *__gnat_object_file_option = "-Wl,@";
--const char *__gnat_run_path_option = "-Wl,-rpath,";
--char __gnat_shared_libgnat_default = STATIC;
--char __gnat_shared_libgcc_default = STATIC;
-+const char *__gnat_run_path_option = "";
-+char __gnat_shared_libgnat_default = SHARED;
-+char __gnat_shared_libgcc_default = SHARED;
- int __gnat_link_max = 8192;
- unsigned char __gnat_objlist_file_supported = 1;
- const char *__gnat_object_library_extension = ".a";
diff --git a/srcpkgs/libgccjit/patches/consistent-library-paths.patch b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
deleted file mode 100644
index 1ec0e258526..00000000000
--- a/srcpkgs/libgccjit/patches/consistent-library-paths.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-Always use lib64 for 64-bit and lib32 for 32-bit.
-
-Do not change the dynamic linkers in any way, though.
-
-When adding a new platform, fix this up too.
-
---- gcc/config/aarch64/t-aarch64-linux
-+++ gcc/config/aarch64/t-aarch64-linux
-@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
- AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+MULTILIB_OSDIRNAMES = mabi.lp64=../lib64
- MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
- MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
---- gcc/config/i386/t-linux64
-+++ gcc/config/i386/t-linux64
-@@ -33,6 +33,6 @@
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
- MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
-+MULTILIB_OSDIRNAMES = m64=../lib64
-+MULTILIB_OSDIRNAMES+= m32=../lib32
- MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
---- gcc/config/mips/t-linux64
-+++ gcc/config/mips/t-linux64
-@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
- MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
- MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
- MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+ ../lib32 \
-+ ../lib \
-+ ../lib64
---- gcc/config/rs6000/t-linux
-+++ gcc/config/rs6000/t-linux
-@@ -2,7 +2,8 @@
- # or soft-float.
- ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
- ifneq (,$(findstring powerpc64,$(target)))
--MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
- else
- MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
- endif
-@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
- MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
- endif
- ifneq (,$(findstring powerpc64le,$(target)))
--MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
- endif
- endif
-
---- gcc/config/rs6000/t-linux64
-+++ gcc/config/rs6000/t-linux64
-@@ -28,8 +28,8 @@
- MULTILIB_OPTIONS := m64/m32
- MULTILIB_DIRNAMES := 64 32
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
---- gcc/config/rs6000/t-linux64bele
-+++ gcc/config/rs6000/t-linux64bele
-@@ -2,6 +2,6 @@
-
- MULTILIB_OPTIONS += mlittle
- MULTILIB_DIRNAMES += le
--MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
--MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
-+MULTILIB_OSDIRNAMES = m64=../lib64
-+MULTILIB_OSDIRNAMES+= m32=../lib32
- MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
---- gcc/config/rs6000/t-linux64lebe
-+++ gcc/config/rs6000/t-linux64lebe
-@@ -2,6 +2,6 @@
-
- MULTILIB_OPTIONS += mbig
- MULTILIB_DIRNAMES += be
--MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
--MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
- MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
---- gcc/config/s390/t-linux64
-+++ gcc/config/s390/t-linux64
-@@ -7,5 +7,5 @@
-
- MULTILIB_OPTIONS = m64/m31
- MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
--MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
-+MULTILIB_OSDIRNAMES = m64=../lib64
-+MULTILIB_OSDIRNAMES+= m32=../lib32
---
-2.29.2
-
diff --git a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
deleted file mode 100644
index dda2a50460b..00000000000
--- a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.in.orig
-+++ Makefile.in
-@@ -169,6 +169,7 @@
- # built for the build system to override those in BASE_FLAGS_TO_PASSS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
diff --git a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
deleted file mode 100644
index 583eac7b0dc..00000000000
--- a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-There is no <execinfo.h> in musl libc
-
---- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200
-+++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200
-@@ -124,7 +124,7 @@
- #include <windows.h>
- #include <winternl.h>
- #include <psapi.h>
--#else
-+#elif defined (__GLIBC__)
- #include <execinfo.h>
- #endif
-
---- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200
-+++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200
-@@ -34,7 +34,7 @@
- #include <string.h>
- #if defined (__CYGWIN__) || defined (__MINGW32__)
- #include <windows.h>
--#else
-+#elif defined (__GLIBC__)
- #include <execinfo.h>
- #endif
-
-@@ -178,7 +178,7 @@
-
- __vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg);
-
--#if !defined (__CYGWIN__) && !defined (__MINGW32__)
-+#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__)
- if (generate_backtrace)
- {
- #define STACK_DEPTH 20
diff --git a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
deleted file mode 100644
index 3315c3e990b..00000000000
--- a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-put vtv_end.o in front of postdep_objects_CXX
-having it after crtendS.o leads to missing zero termination in eh_frame section
-
-This is in line with comment in libgcc/vtv_end.c:
-
- When the GCC driver inserts vtv_start.o into the link line (just
- after crtbegin.o) it also inserts vtv_end.o into the link line,
- just before crtend.o.
-
---- libstdc++-v3/configure
-+++ libstdc++-v3/configure
-@@ -15443,7 +15443,7 @@
-
- if test "$enable_vtable_verify" = yes; then
- predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
-- postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
-+ postdep_objects_CXX="${glibcxx_builddir}/../libgcc/vtv_end.o ${postdep_objects_CXX}"
- fi
-
-
diff --git a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
deleted file mode 100644
index 413b4aef5af..00000000000
--- a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libffi/src/closures.c.orig
-+++ libffi/src/closures.c
-@@ -34,7 +34,7 @@
- #include <ffi_common.h>
-
- #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
--# if __gnu_linux__ && !defined(__ANDROID__)
-+# if __linux__ && !defined(__ANDROID__)
- /* This macro indicates it may be forbidden to map anonymous memory
- with both write and execute permission. Code compiled when this
- option is defined will attempt to map such pages once, but if it
diff --git a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
deleted file mode 100644
index 855f8f1b035..00000000000
--- a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 236634eed58fa6e00cc50f19e7202903a9d8fae6 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Thu, 12 Dec 2019 04:03:56 +0100
-Subject: [PATCH] libgcc: use -mno-gnu-attribute for 128-bit IBM ldouble
- support code
-
-Doing this will allow libgcc to emit the appropriate symbols without actually
-emitting the FP ABI tag for them, which allows 64-bit long double environments
-to function and even link statically while still allowing usage of
-explicit __ibm128.
----
- libgcc/config/rs6000/t-ibm-ldouble | 2 +-
- libgcc/config/rs6000/t-linux | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgcc/config/rs6000/t-ibm-ldouble b/libgcc/config/rs6000/t-ibm-ldouble
-index b132784..fb5eca8 100644
---- libgcc/config/rs6000/t-ibm-ldouble
-+++ libgcc/config/rs6000/t-ibm-ldouble
-@@ -1,6 +1,6 @@
- # GCC 128-bit long double support routines.
- LIB2ADD += $(srcdir)/config/rs6000/ibm-ldouble.c
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute
-
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ibm-ldouble.ver
-diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
-index 4f6d4c4..fa93bb6 100644
---- libgcc/config/rs6000/t-linux
-+++ libgcc/config/rs6000/t-linux
-@@ -1,3 +1,3 @@
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc
---
-2.24.0
diff --git a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
deleted file mode 100644
index e5fdbf9f96f..00000000000
--- a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libffi/src/mips/ffitarget.h 2014-11-08 13:47:24.000000000 +0100
-+++ libffi/src/mips/ffitarget.h 2017-11-09 16:51:11.866848444 +0100
-@@ -42,7 +42,7 @@
- #define _MIPS_SIM_NABI32 2
- #define _MIPS_SIM_ABI64 3
- #elif !defined(__OpenBSD__)
--# include <sgidefs.h>
-+# include <asm/sgidefs.h>
- #endif
-
- # ifndef _ABIN32
diff --git a/srcpkgs/libgccjit/patches/mips-soft-float.patch b/srcpkgs/libgccjit/patches/mips-soft-float.patch
deleted file mode 100644
index 4db0e2fb07a..00000000000
--- a/srcpkgs/libgccjit/patches/mips-soft-float.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- libffi/src/mips/o32.S 2020-03-12 12:07:23.000000000 +0100
-+++ libffi/src/mips/o32.S 2020-05-14 20:52:45.701809054 +0200
-@@ -278,6 +278,7 @@
- li $9, FFI_TYPE_VOID
- beq $8, $9, closure_done
-
-+#ifndef __mips_soft_float
- li $13, 1 # FFI_O32
- bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
-
-@@ -289,6 +290,7 @@
- l.d $f0, V0_OFF2($fp)
- beq $8, $9, closure_done
- 1:
-+#endif
- REG_L $3, V1_OFF2($fp)
- REG_L $2, V0_OFF2($fp)
-
diff --git a/srcpkgs/libgccjit/patches/musl-ada.patch b/srcpkgs/libgccjit/patches/musl-ada.patch
deleted file mode 100644
index 61823684da5..00000000000
--- a/srcpkgs/libgccjit/patches/musl-ada.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
-index 3b0aea9..ee0bb69 100644
---- gcc/ada/adaint.c
-+++ gcc/ada/adaint.c
-@@ -76,6 +76,11 @@
- #include <sys/param.h>
- #include <sys/pstat.h>
- #endif
-+
-+#if defined (linux)
-+#define _GNU_SOURCE 1
-+#include <sched.h>
-+#endif
-
- #ifdef __PikeOS__
- #define __BSD_VISIBLE 1
-@@ -3255,7 +3260,6 @@ __gnat_lwp_self (void)
- #endif
-
- #if defined (__linux__)
--#include <sched.h>
-
- /* glibc versions earlier than 2.7 do not define the routines to handle
- dynamically allocated CPU sets. For these targets, we use the static
-@@ -3265,7 +3269,7 @@ __gnat_lwp_self (void)
-
- /* Dynamic cpu sets */
-
--cpu_set_t *
-+void *
- __gnat_cpu_alloc (size_t count)
- {
- return CPU_ALLOC (count);
-@@ -3278,33 +3282,33 @@ __gnat_cpu_alloc_size (size_t count)
- }
-
- void
--__gnat_cpu_free (cpu_set_t *set)
-+__gnat_cpu_free (void *set)
- {
-- CPU_FREE (set);
-+ CPU_FREE ((cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_zero (size_t count, cpu_set_t *set)
-+__gnat_cpu_zero (size_t count, void *set)
- {
-- CPU_ZERO_S (count, set);
-+ CPU_ZERO_S (count, (cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
-+__gnat_cpu_set (int cpu, size_t count, void *set)
- {
- /* Ada handles CPU numbers starting from 1, while C identifies the first
- CPU by a 0, so we need to adjust. */
-- CPU_SET_S (cpu - 1, count, set);
-+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
- }
-
- #else /* !CPU_ALLOC */
-
- /* Static cpu sets */
-
--cpu_set_t *
-+void *
- __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
- {
-- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
-+ return xmalloc (sizeof (cpu_set_t));
- }
-
- size_t
-@@ -3314,23 +3318,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
- }
-
- void
--__gnat_cpu_free (cpu_set_t *set)
-+__gnat_cpu_free (void *set)
- {
- free (set);
- }
-
- void
--__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
-+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
- {
-- CPU_ZERO (set);
-+ CPU_ZERO ((cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
-+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
- {
- /* Ada handles CPU numbers starting from 1, while C identifies the first
- CPU by a 0, so we need to adjust. */
-- CPU_SET (cpu - 1, set);
-+ CPU_SET (cpu - 1, (cpu_set_t *) set);
- }
- #endif /* !CPU_ALLOC */
- #endif /* __linux__ */
-diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
-index 0d12f7e..a063b47 100644
---- gcc/ada/adaint.h
-+++ gcc/ada/adaint.h
-@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
-
- /* Routines for interface to required CPU set primitives */
-
--#include <sched.h>
--
--extern cpu_set_t *__gnat_cpu_alloc (size_t);
-+extern void * __gnat_cpu_alloc (size_t);
- extern size_t __gnat_cpu_alloc_size (size_t);
--extern void __gnat_cpu_free (cpu_set_t *);
--extern void __gnat_cpu_zero (size_t, cpu_set_t *);
--extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
-+extern void __gnat_cpu_free (void *);
-+extern void __gnat_cpu_zero (size_t, void *);
-+extern void __gnat_cpu_set (int, size_t, void *);
- #endif
-
- #if defined (_WIN32)
---- gcc/ada/Makefile.rtl 2020-07-23 08:35:17.052381336 +0200
-+++ - 2020-08-09 19:38:24.230351406 +0200
-@@ -1533,7 +1533,7 @@
- s-intman.adb<libgnarl/s-intman__posix.adb \
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- a-exetim.adb<libgnarl/a-exetim__posix.adb \
- a-exetim.ads<libgnarl/a-exetim__default.ads \
- s-linux.ads<libgnarl/s-linux.ads \
-@@ -2083,7 +2083,7 @@
- s-osinte.adb<libgnarl/s-osinte__posix.adb \
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- $(ATOMICS_TARGET_PAIRS) \
- $(ATOMICS_BUILTINS_TARGET_PAIRS) \
- system.ads<libgnat/system-linux-ppc.ads
-@@ -2112,7 +2112,7 @@
- endif
-
- # ARM linux, GNU eabi
--ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
-+ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<libgnarl/a-intnam__linux.ads \
- s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
-@@ -2305,7 +2305,7 @@
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- $(ATOMICS_TARGET_PAIRS) \
- $(ATOMICS_BUILTINS_TARGET_PAIRS) \
- system.ads<libgnat/system-linux-ia64.ads
-@@ -2401,7 +2401,7 @@
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- s-taspri.ads<libgnarl/s-taspri__posix.ads \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- $(ATOMICS_TARGET_PAIRS) \
- $(X86_64_TARGET_PAIRS) \
- system.ads<libgnat/system-linux-x86.ads
---- gcc/ada/terminals.c 2019-01-08 10:54:04.000000000 +0100
-+++ gcc/ada/terminals.c 2019-05-15 13:14:09.935742526 +0200
-@@ -1136,7 +1136,7 @@
- /* POSIX does not specify how to open the master side of a terminal.Several
- methods are available (system specific):
- 1- using a cloning device (USE_CLONE_DEVICE)
-- 2- getpt (USE_GETPT)
-+ 2- posix_openpt (USE_POSIX_OPENPT)
- 3- openpty (USE_OPENPTY)
-
- When using the cloning device method, the macro USE_CLONE_DEVICE should
-@@ -1150,7 +1150,7 @@
- #if defined (__APPLE__) || defined (BSD)
- #define USE_OPENPTY
- #elif defined (__linux__)
--#define USE_GETPT
-+#define USE_POSIX_OPENPT
- #elif defined (__sun__)
- #define USE_CLONE_DEVICE "/dev/ptmx"
- #elif defined (_AIX)
-@@ -1199,8 +1199,8 @@
- int master_fd = -1;
- char *slave_name = NULL;
-
--#ifdef USE_GETPT
-- master_fd = getpt ();
-+#if defined(USE_POSIX_OPENPT)
-+ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
- #elif defined (USE_OPENPTY)
- status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
- #elif defined (USE_CLONE_DEVICE)
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
index 0e8551d062c..b80af58a837 100644
--- a/srcpkgs/libgccjit/template
+++ b/srcpkgs/libgccjit/template
@@ -2,41 +2,43 @@
_majorver=10
_minorver=${_majorver}.2
_patchver=${_minorver}.1
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
pkgname=libgccjit
# we are using a 10-stable git snapshot alpine is using in order
# to get regression fixes not yet incorporate into a stable release
# it should be possible to switch back to stable with 10.3 or 11
version=${_patchver}pre1
+revision=1
wrksrc=gcc-${version/pre/_pre}
-revision=2
short_desc="GNU Compiler Collection"
-maintainer="Enno Boland <gottox@voidlinux.org>"
+maintainer="Lane Biocini <lane@mailbox.org>"
homepage="http://gcc.gnu.org"
license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
-distfiles="https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz"
-checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ http://isl.gforge.inria.fr/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
nopie=yes
lib32disabled=yes
-
-# MIPS is untested and does not have go in crosstoolchains
-# 32-bit PowerPC seems weirdly broken since the 10.x release
-# 32-bit little endian PowerPC has no support at all (no GOARCH)
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- mips*-musl|ppc*) _have_gccgo=no ;;
-esac
-
-if [ "$CHROOT_READY" ]; then
- hostmakedepends="tar texinfo perl flex"
-fi
-
-makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel
- libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
-depends="gcc>=${_minorver}"
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex" #gmp-devel mpfr-devel libmpc-devel isl-devel libssp-devel"
+depends="gcc"
checkdepends="dejagnu"
+# needed for cross builds
case "$XBPS_TARGET_MACHINE" in
i686) _triplet="i686-pc-linux-gnu";;
i686-musl) _triplet="i686-linux-musl";;
@@ -63,11 +65,17 @@ case "$XBPS_TARGET_MACHINE" in
mipsel-musl) _triplet="mipsel-linux-musl";;
mipselhf-musl) _triplet="mipsel-linux-muslhf";;
esac
-case "$XBPS_TARGET_MACHINE" in
- *-musl) depends+=" musl-devel";;
- *) depends+=" glibc-devel"
- ;;
-esac
+#if [ "$CROSS_BUILD" ]; then
+# hostmakedepends+=" cross-${_triplet}"
+#fi
+
+post_extract() {
+ mkdir -p ${wrksrc}/{gmp,mpfr,mpc,isl}
+ cp -ar ${XBPS_BUILDDIR}/gmp-${_gmp_version}/* ${wrksrc}/gmp/
+ cp -ar ${XBPS_BUILDDIR}/mpfr-${_mpfr_version}/* ${wrksrc}/mpfr/
+ cp -ar ${XBPS_BUILDDIR}/mpc-${_mpc_version}/* ${wrksrc}/mpc/
+ cp -ar ${XBPS_BUILDDIR}/isl-${_isl_version}/* ${wrksrc}/isl/
+}
pre_configure() {
# _FORTIFY_SOURCE needs an optimization level.
@@ -80,7 +88,7 @@ pre_configure() {
*-musl)
patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
patch -p0 -i ${FILESDIR}/libssp-musl.patch
- patch -p0 -i ${FILESDIR}/gccgo-musl.patch
+ patch -p1 -i ${FILESDIR}/libgccjit-musl.patch
;;
esac
}
@@ -107,7 +115,6 @@ do_configure() {
ppc*-musl) _args+=" --disable-decimal-float";;
esac
-
if [ "$CROSS_BUILD" ]; then
export CC_FOR_TARGET="$CC"
export GCC_FOR_TARGET="$CC"
@@ -119,7 +126,6 @@ do_configure() {
export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
_args+=" --build=${_triplet}"
else
- _langs="jit,lto"
_args+=" --build=${_triplet}"
fi
@@ -144,10 +150,15 @@ do_configure() {
export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
export LDFLAGS="${LDFLAGS//-no-pie/}"
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+ export LDFLAGS+=" -fPIC"
+
_args+=" --prefix=/usr"
_args+=" --mandir=/usr/share/man"
_args+=" --infodir=/usr/share/info"
- _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
_args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
_args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
_args+=" --with-system-zlib"
@@ -156,7 +167,7 @@ do_configure() {
_args+=" --enable-threads=posix"
_args+=" --enable-lto"
_args+=" --enable-shared"
- _args+=" --enable-host-shared"
+ _args+=" --enable-host-shared"
_args+=" --enable-checking=release"
_args+=" --enable-plugins"
_args+=" --enable-default-ssp"
@@ -164,13 +175,13 @@ do_configure() {
_args+=" --disable-multilib"
_args+=" --disable-bootstrap"
_args+=" --enable-__cxa_atexit"
- _args+=" --disable-libquadmath"
- _args+=" --disable-libquadmath-support"
- _args+=" --disable-libgomp"
- _args+=" --disable-liboffloadmic"
- _args+=" --disable-libada"
- _args+=" --disable-libvtv"
- _args+=" --disable-libsanitizer"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
_args+=" --disable-werror"
_args+=" --disable-nls"
_args+=" --disable-libstdcxx-pch"
@@ -180,33 +191,32 @@ do_configure() {
mkdir -p build
cd build
- # If we are checking packages, we need to have c++ compiled
- [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
- _args+=" --enable-languages=${_langs}"
- CONFIG_SHELL=/bin/bash \
- ${wrksrc}/configure ${_args}
-
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
}
do_build() {
- if [ -z "$CHROOT_READY" ]; then
- export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
- fi
- cd build
- make ${makejobs}
+# if [ -z "$CHROOT_READY" ]; then
+# export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+# fi
+ cd build
+ make ${makejobs}
}
post_build() {
- # Lets create a staging folder to install into
- mkdir -p "${wrksrc}/install"
- cd "${wrksrc}/build"
- make DESTDIR="${wrksrc}/install" -C gcc install
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
}
do_check() {
- cd "${wrksrc}/build/gcc"
- make check-jit RUNTESTFLAGS="-v -v -v"
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
}
pre_install() {
@@ -219,23 +229,27 @@ pre_install() {
}
do_install() {
- _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
-
- # Get the shlibs over
- cd "${wrksrc}/install"
+ if [ "$CROSS_BUILD" ]; then
+ _includehostdir="usr/lib/gcc/${XBPS_CROSS_TRIPLET}/${_minorver}/include"
+ else
+ _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
+ fi
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
- vinstall "${wrksrc}/install/usr/lib64/libgccjit.so.0.0.1" 0755 usr/lib
- ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
- ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
+ vinstall "${wrksrc}/install/usr/lib${XBPS_TARGET_WORDSIZE}/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
- # Get the header files in place
- vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
- vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
- # The most important part, the info file
- vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
}
post_install() {
- vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
}
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (34 preceding siblings ...)
2021-02-16 17:19 ` [PR PATCH] [Updated] " lane-brain
@ 2021-02-16 17:25 ` lane-brain
2021-02-16 17:39 ` lane-brain
` (127 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 113725 bytes --]
From 411d9929b4ed25956af216c643e9c165a8fc26a6 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Mon, 15 Feb 2021 20:32:51 -0500
Subject: [PATCH 1/3] New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/c89.1 | 80 ++++++
srcpkgs/libgccjit/files/c89.sh | 2 +
srcpkgs/libgccjit/files/c99.1 | 81 ++++++
srcpkgs/libgccjit/files/c99.sh | 2 +
srcpkgs/libgccjit/files/gccgo-musl.patch | 222 ++++++++++++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 125 +++++++++
srcpkgs/libgccjit/files/libssp-musl.patch | 70 +++++
srcpkgs/libgccjit/patches/ada-shared.patch | 28 ++
.../patches/consistent-library-paths.patch | 110 ++++++++
.../patches/fix-cxxflags-passing.patch | 10 +
.../libgccjit/patches/fix-musl-execinfo.patch | 33 +++
.../patches/fix-vtv-link-order.patch | 20 ++
.../libgccjit/patches/libffi_gnulinux.patch | 11 +
.../patches/libgcc-ibm128-no-tag.patch | 38 +++
.../libgccjit/patches/mips-sgidefs_h.patch | 11 +
.../libgccjit/patches/mips-soft-float.patch | 18 ++
srcpkgs/libgccjit/patches/musl-ada.patch | 204 +++++++++++++++
srcpkgs/libgccjit/template | 241 ++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
19 files changed, 1308 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/c89.1
create mode 100644 srcpkgs/libgccjit/files/c89.sh
create mode 100644 srcpkgs/libgccjit/files/c99.1
create mode 100644 srcpkgs/libgccjit/files/c99.sh
create mode 100644 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 100644 srcpkgs/libgccjit/patches/ada-shared.patch
create mode 100644 srcpkgs/libgccjit/patches/consistent-library-paths.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
create mode 100644 srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
create mode 100644 srcpkgs/libgccjit/patches/libffi_gnulinux.patch
create mode 100644 srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
create mode 100644 srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
create mode 100644 srcpkgs/libgccjit/patches/mips-soft-float.patch
create mode 100644 srcpkgs/libgccjit/patches/musl-ada.patch
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/srcpkgs/libgccjit/files/c89.1 b/srcpkgs/libgccjit/files/c89.1
new file mode 100644
index 00000000000..3ed984da33f
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.1
@@ -0,0 +1,80 @@
+.\" $NetBSD: c89.1,v 1.2 2008/04/30 13:10:50 martin Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 5, 1999
+.Dt C89 1
+.Os
+.Sh NAME
+.Nm c89
+.Nd ANSI (1989) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -ansiC
+specification.
+.Pp
+This includes proper handling of trigraphs,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar inline ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+appeared in
+.Nx 1.4 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c89.sh b/srcpkgs/libgccjit/files/c89.sh
new file mode 100644
index 00000000000..52d6d45431b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c89 "$@"
diff --git a/srcpkgs/libgccjit/files/c99.1 b/srcpkgs/libgccjit/files/c99.1
new file mode 100644
index 00000000000..d368f1a874b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.1
@@ -0,0 +1,81 @@
+.\" $NetBSD: c99.1,v 1.3 2010/05/14 01:53:28 joerg Exp $
+.\"
+.\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd September 24, 2008
+.Dt C99 1
+.Os
+.Sh NAME
+.Nm c99
+.Nd ANSI (1999) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -isoC-99
+specification.
+.Pp
+This includes
+inline functions, variable-length arrays, support for one-line
+comments beginning with //,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+first appeared in
+.Nx 5.0 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c99.sh b/srcpkgs/libgccjit/files/c99.sh
new file mode 100644
index 00000000000..15cab47c748
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c99 "$@"
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 100644
index 00000000000..a2ce4b2b046
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1,222 @@
+This is not among the normal patches as these changes are musl specific and
+there is no way to easily conditionalize it in source for some of the changes.
+
+Added by q66: runtime.h now uses libucontext_ prefixed APIs to allow build
+with freestanding versions of libucontext
+
+Souurce: Adélie Linux, q66
+URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
+
+--- Makefile.in
++++ Makefile.in
+@@ -46325,7 +46325,7 @@ configure-target-libgo:
+ esac; \
+ module_srcdir=libgo; \
+ rm -f no-such-file || : ; \
+- CONFIG_SITE=no-such-file $(SHELL) \
++ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
+ $$s/$$module_srcdir/configure \
+ --srcdir=$${topdir}/$$module_srcdir \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+--- libgo/mksysinfo.sh
++++ libgo/mksysinfo.sh
+@@ -379,11 +379,7 @@ fi
+ # Some basic types.
+ echo 'type Size_t _size_t' >> ${OUT}
+ echo "type Ssize_t _ssize_t" >> ${OUT}
+-if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
+- echo "type Offset_t _off64_t" >> ${OUT}
+-else
+- echo "type Offset_t _off_t" >> ${OUT}
+-fi
++echo "type Offset_t _off_t" >> ${OUT}
+ echo "type Mode_t _mode_t" >> ${OUT}
+ echo "type Pid_t _pid_t" >> ${OUT}
+ echo "type Uid_t _uid_t" >> ${OUT}
+--- libgo/go/runtime/mem_gccgo.go
++++ libgo/go/runtime/mem_gccgo.go
+@@ -16,7 +16,7 @@ import (
+ //go:linkname sysFree runtime.sysFree
+
+ //extern mmap
+-func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
++func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer
+
+ //extern munmap
+ func munmap(addr unsafe.Pointer, length uintptr) int32
+@@ -38,7 +38,7 @@ func init() {
+ }
+ }
+
+-func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
++func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) {
+ p := sysMmap(addr, n, prot, flags, fd, off)
+ if uintptr(p) == _MAP_FAILED {
+ return nil, errno()
+--- libgo/go/runtime/signal_gccgo.go
++++ libgo/go/runtime/signal_gccgo.go
+@@ -111,7 +111,7 @@ func getsig(i uint32) uintptr {
+ if sigaction(i, nil, &sa) < 0 {
+ // On GNU/Linux glibc rejects attempts to call
+ // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID).
+- if GOOS == "linux" && (i == 32 || i == 33) {
++ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) {
+ return _SIG_DFL
+ }
+ throw("sigaction read failure")
+--- libgo/go/syscall/errstr.go
++++ libgo/go/syscall/errstr.go
+@@ -5,7 +5,6 @@
+ // license that can be found in the LICENSE file.
+
+ // +build !hurd
+-// +build !linux
+
+ package syscall
+
+--- libgo/go/syscall/errstr_glibc.go
++++ /dev/null
+@@ -1,33 +0,0 @@
+-// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
+-
+-// Copyright 2010 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-// We use this rather than errstr.go because on GNU/Linux sterror_r
+-// returns a pointer to the error message, and may not use buf at all.
+-
+-// +build hurd linux
+-
+-package syscall
+-
+-import "unsafe"
+-
+-//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
+-//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
+-
+-func Errstr(errnum int) string {
+- a := make([]byte, 128)
+- p := strerror_r(errnum, a)
+- b := (*[1000]byte)(unsafe.Pointer(p))
+- i := 0
+- for b[i] != 0 {
+- i++
+- }
+- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
+- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
+- c := b[0] + 'a' - 'A'
+- return string(c) + string(b[1:i])
+- }
+- return string(b[:i])
+-}
+--- libgo/go/syscall/libcall_linux.go
++++ libgo/go/syscall/libcall_linux.go
+@@ -206,19 +206,19 @@ func Gettid() (tid int) {
+ //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
+ //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
+
+-//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
+-//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
++//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error)
++//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t
+ func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+- var lroff _loff_t
+- var plroff *_loff_t
++ var lroff _off_t
++ var plroff *_off_t
+ if roff != nil {
+- lroff = _loff_t(*roff)
++ lroff = _off_t(*roff)
+ plroff = &lroff
+ }
+- var lwoff _loff_t
+- var plwoff *_loff_t
++ var lwoff _off_t
++ var plwoff *_off_t
+ if woff != nil {
+- lwoff = _loff_t(*woff)
++ lwoff = _off_t(*woff)
+ plwoff = &lwoff
+ }
+ n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
+--- libgo/mksigtab.sh
++++ libgo/mksigtab.sh
+@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}'
+ checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}'
+ checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}'
+ checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}'
+-checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
++#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
+ checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}'
+ checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}'
+ checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}'
+@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G
+
+ # Special handling of signals 32 and 33 on GNU/Linux systems,
+ # because they are special to glibc.
++# Signal 34 is additionally special to Linux systems with musl.
+ if test "${GOOS}" = "linux"; then
+- SIGLIST=$SIGLIST"_32__33_"
++ SIGLIST=$SIGLIST"_32__33__34_"
+ echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */'
+ echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */'
++ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */'
+ fi
+
+ if test "${GOOS}" = "aix"; then
+--- libgo/runtime/go-signal.c 2020-07-23 08:35:19.004402840 +0200
++++ - 2020-08-09 21:35:54.352886232 +0200
+@@ -224,7 +224,11 @@
+ #elif defined(__alpha__) && defined(__linux__)
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc;
+ #elif defined(__PPC__) && defined(__linux__)
+- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
++ #ifdef __PPC64__
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32];
++ #else
++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32];
++ #endif
+ #elif defined(__PPC__) && defined(_AIX)
+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar;
+ #elif defined(__aarch64__) && defined(__linux__)
+@@ -333,7 +337,7 @@
+ runtime_printf("sp %X\n", m->sc_regs[30]);
+ runtime_printf("pc %X\n", m->sc_pc);
+ }
+-#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__)
++#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__) && defined(__GLIBC__)
+ {
+ mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
+ int i;
+--- libgo/runtime/runtime.h
++++ libgo/runtime/runtime.h
+@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*);
+ void __go_makecontext(__go_context_t*, void (*)(), void*, size_t);
+ #else
+ #define __go_context_t ucontext_t
+-#define __go_getcontext(c) getcontext(c)
+-#define __go_setcontext(c) setcontext(c)
++int libucontext_getcontext(__go_context_t *);
++void libucontext_makecontext(__go_context_t *, void (*)(), int, ...);
++int libucontext_setcontext(const __go_context_t *);
++#define __go_getcontext(c) libucontext_getcontext(c)
++#define __go_setcontext(c) libucontext_setcontext(c)
+ #define __go_makecontext(c, fn, sp, size) \
+- ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, makecontext(c, fn, 0))
++ ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, libucontext_makecontext(c, fn, 0))
+ #endif
+
+ // Symbols defined by the linker.
+--- libgo/sysinfo.c
++++ libgo/sysinfo.c
+@@ -73,9 +73,6 @@
+ #include <sys/times.h>
+ #include <sys/wait.h>
+ #include <sys/un.h>
+-#if defined(HAVE_SYS_USER_H)
+-#include <sys/user.h>
+-#endif
+ #if defined(HAVE_SYS_UTSNAME_H)
+ #include <sys/utsname.h>
+ #endif
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 100644
index 00000000000..5ed9f16f558
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1,125 @@
+Source: Alpine Linux
+Upstream: Unknown
+Reason: Patch libgnarl to not use function missing from musl.
+
+diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads
+--- gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800
++++ gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700
+@@ -394,12 +394,6 @@ package System.OS_Interface is
+ PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
+
+- function pthread_rwlockattr_setkind_np
+- (attr : access pthread_rwlockattr_t;
+- pref : int) return int;
+- pragma Import
+- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
+-
+ function pthread_rwlock_init
+ (mutex : access pthread_rwlock_t;
+ attr : access pthread_rwlockattr_t) return int;
+@@ -464,11 +458,6 @@ package System.OS_Interface is
+ protocol : int) return int;
+ pragma Import (C, pthread_mutexattr_setprotocol);
+
+- function pthread_mutexattr_setprioceiling
+- (attr : access pthread_mutexattr_t;
+- prioceiling : int) return int;
+- pragma Import (C, pthread_mutexattr_setprioceiling);
+-
+ type struct_sched_param is record
+ sched_priority : int; -- scheduling priority
+ end record;
+diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb
+--- gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800
++++ gcc/ada/libgnarl/s-taprop__linux.adb 2018-11-13 11:28:36.433964449 -0800
+@@ -202,9 +202,6 @@ package body System.Task_Primitives.Oper
+ pragma Import
+ (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
+
+- function GNAT_has_cap_sys_nice return C.int;
+- pragma Import
+- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
+ -- We do not have pragma Linker_Options ("-lcap"); here, because this
+ -- library is not present on many Linux systems. 'libcap' is the Linux
+ -- "capabilities" library, called by __gnat_has_cap_sys_nice.
+@@ -214,38 +211,6 @@ package body System.Task_Primitives.Oper
+ -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
+ -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
+
+- function Get_Ceiling_Support return Boolean;
+- -- Get the value of the Ceiling_Support constant (see below).
+- -- Note well: If this function or related code is modified, it should be
+- -- tested by hand, because automated testing doesn't exercise it.
+-
+- -------------------------
+- -- Get_Ceiling_Support --
+- -------------------------
+-
+- function Get_Ceiling_Support return Boolean is
+- Ceiling_Support : Boolean := False;
+- begin
+- if Locking_Policy /= 'C' then
+- return False;
+- end if;
+-
+- declare
+- function geteuid return Integer;
+- pragma Import (C, geteuid, "geteuid");
+- Superuser : constant Boolean := geteuid = 0;
+- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
+- pragma Assert (Has_Cap in 0 | 1);
+- begin
+- Ceiling_Support := Superuser or else Has_Cap = 1;
+- end;
+-
+- return Ceiling_Support;
+- end Get_Ceiling_Support;
+-
+- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
+- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
+- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
+ -- True if the locking policy is Ceiling_Locking, and the current process
+ -- has permission to use this policy. The process has permission if it is
+ -- running as 'root', or if the capability was set by the setcap command,
+@@ -348,7 +313,9 @@ package body System.Task_Primitives.Oper
+ -- Init_Mutex --
+ ----------------
+
++ pragma Warnings (Off, "formal parameter * is not referenced");
+ function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
++ pragma Warnings (On, "formal parameter * is not referenced");
+ Mutex_Attr : aliased pthread_mutexattr_t;
+ Result, Result_2 : C.int;
+
+@@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper
+ return Result;
+ end if;
+
+- if Ceiling_Support then
+- Result := pthread_mutexattr_setprotocol
+- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
+- pragma Assert (Result = 0);
+-
+- Result := pthread_mutexattr_setprioceiling
+- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
+- pragma Assert (Result = 0);
+-
+- elsif Locking_Policy = 'I' then
++ if Locking_Policy = 'I' then
+ Result := pthread_mutexattr_setprotocol
+ (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
+ pragma Assert (Result = 0);
+@@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper
+ Result := pthread_rwlockattr_init (RWlock_Attr'Access);
+ pragma Assert (Result = 0);
+
+- Result := pthread_rwlockattr_setkind_np
+- (RWlock_Attr'Access,
+- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
+- pragma Assert (Result = 0);
+-
+ Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
+
+ pragma Assert (Result in 0 | ENOMEM);
+
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 100644
index 00000000000..e0b84f9acc9
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1,70 @@
+First part taken from Alpine.
+
+Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
+
+--- gcc/gcc.c
++++ gcc/gcc.c
+@@ -874,10 +874,15 @@ proper position among the other output files. */
+ #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
+ #endif
+
++#ifdef ENABLE_DEFAULT_SSP
++#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
++#else
++#define NO_SSP_SPEC ""
++#endif
++
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+- "|fstack-protector-strong|fstack-protector-explicit:}"
++#define LINK_SSP_SPEC "-lssp_nonshared"
+ #else
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ "|fstack-protector-strong|fstack-protector-explicit" \
+@@ -1155,7 +1160,7 @@ static const char *cc1_options =
+ %{-version:--version}\
+ %{-help=*:--help=%*}\
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
+- %{fsyntax-only:-o %j} %{-param*}\
++ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
+ %{coverage:-fprofile-arcs -ftest-coverage}\
+ %{fprofile-arcs|fprofile-generate*|coverage:\
+ %{!fprofile-update=single:\
+--- gcc/params.opt
++++ gcc/params.opt
+@@ -853,7 +853,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
+ The maximum number of SSA_NAME assignments to follow in determining a value.
+
+ -param=ssp-buffer-size=
+-Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
++Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
+ The lower bound for a buffer to be considered for stack smashing protection.
+
+ -param=stack-clash-protection-guard-size=
+--- gcc/config/i386/gnu-user-common.h
++++ gcc/config/i386/gnu-user-common.h
+@@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see
+
+ /* Static stack checking is supported by means of probes. */
+ #define STACK_CHECK_STATIC_BUILTIN 1
+-
+-/* We only build the -fsplit-stack support in libgcc if the
+- assembler has full support for the CFI directives. */
+-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+-#define TARGET_CAN_SPLIT_STACK
+-#endif
+--- gcc/config/i386/gnu.h
++++ gcc/config/i386/gnu.h
+@@ -40,11 +40,6 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
+ /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
+ #define TARGET_THREAD_SSP_OFFSET 0x14
+
+-/* We only build the -fsplit-stack support in libgcc if the
+- assembler has full support for the CFI directives. */
+-#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
+-#define TARGET_CAN_SPLIT_STACK
+-#endif
+ /* We steal the last transactional memory word. */
+ #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
+ #endif
diff --git a/srcpkgs/libgccjit/patches/ada-shared.patch b/srcpkgs/libgccjit/patches/ada-shared.patch
new file mode 100644
index 00000000000..7b4280620fe
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/ada-shared.patch
@@ -0,0 +1,28 @@
+--- gcc/ada/link.c
++++ gcc/ada/link.c
+@@ -105,9 +105,9 @@
+
+ #elif defined (__FreeBSD__)
+ const char *__gnat_object_file_option = "-Wl,@";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
+-char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
++char __gnat_shared_libgcc_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ const char *__gnat_object_library_extension = ".a";
+@@ -127,9 +127,9 @@
+
+ #elif defined (linux) || defined(__GLIBC__)
+ const char *__gnat_object_file_option = "-Wl,@";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
+-char __gnat_shared_libgcc_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
++char __gnat_shared_libgcc_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ const char *__gnat_object_library_extension = ".a";
diff --git a/srcpkgs/libgccjit/patches/consistent-library-paths.patch b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
new file mode 100644
index 00000000000..1ec0e258526
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
@@ -0,0 +1,110 @@
+Always use lib64 for 64-bit and lib32 for 32-bit.
+
+Do not change the dynamic linkers in any way, though.
+
+When adding a new platform, fix this up too.
+
+--- gcc/config/aarch64/t-aarch64-linux
++++ gcc/config/aarch64/t-aarch64-linux
+@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+
+ AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++MULTILIB_OSDIRNAMES = mabi.lp64=../lib64
+ MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+
+ MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
+--- gcc/config/i386/t-linux64
++++ gcc/config/i386/t-linux64
+@@ -33,6 +33,6 @@
+ comma=,
+ MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+ MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+--- gcc/config/mips/t-linux64
++++ gcc/config/mips/t-linux64
+@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
+ MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+ MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+ MULTILIB_OSDIRNAMES = \
+- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++ ../lib32 \
++ ../lib \
++ ../lib64
+--- gcc/config/rs6000/t-linux
++++ gcc/config/rs6000/t-linux
+@@ -2,7 +2,8 @@
+ # or soft-float.
+ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ ifneq (,$(findstring powerpc64,$(target)))
+-MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ else
+ MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
+ endif
+@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
+ MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
+ endif
+ ifneq (,$(findstring powerpc64le,$(target)))
+-MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ endif
+ endif
+
+--- gcc/config/rs6000/t-linux64
++++ gcc/config/rs6000/t-linux64
+@@ -28,8 +28,8 @@
+ MULTILIB_OPTIONS := m64/m32
+ MULTILIB_DIRNAMES := 64 32
+ MULTILIB_EXTRA_OPTS :=
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ $(COMPILE) $<
+--- gcc/config/rs6000/t-linux64bele
++++ gcc/config/rs6000/t-linux64bele
+@@ -2,6 +2,6 @@
+
+ MULTILIB_OPTIONS += mlittle
+ MULTILIB_DIRNAMES += le
+-MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+ MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/rs6000/t-linux64lebe
++++ gcc/config/rs6000/t-linux64lebe
+@@ -2,6 +2,6 @@
+
+ MULTILIB_OPTIONS += mbig
+ MULTILIB_DIRNAMES += be
+-MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
+-MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
++MULTILIB_OSDIRNAMES := m64=../lib64
++MULTILIB_OSDIRNAMES += m32=../lib32
+ MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
+--- gcc/config/s390/t-linux64
++++ gcc/config/s390/t-linux64
+@@ -7,5 +7,5 @@
+
+ MULTILIB_OPTIONS = m64/m31
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
+-MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
++MULTILIB_OSDIRNAMES = m64=../lib64
++MULTILIB_OSDIRNAMES+= m32=../lib32
+--
+2.29.2
+
diff --git a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
new file mode 100644
index 00000000000..dda2a50460b
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
@@ -0,0 +1,10 @@
+--- Makefile.in.orig
++++ Makefile.in
+@@ -169,6 +169,7 @@
+ # built for the build system to override those in BASE_FLAGS_TO_PASSS.
+ EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
++ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
+ # This is the list of directories to built for the host system.
diff --git a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
new file mode 100644
index 00000000000..583eac7b0dc
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
@@ -0,0 +1,33 @@
+There is no <execinfo.h> in musl libc
+
+--- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200
++++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200
+@@ -124,7 +124,7 @@
+ #include <windows.h>
+ #include <winternl.h>
+ #include <psapi.h>
+-#else
++#elif defined (__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+--- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200
++++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200
+@@ -34,7 +34,7 @@
+ #include <string.h>
+ #if defined (__CYGWIN__) || defined (__MINGW32__)
+ #include <windows.h>
+-#else
++#elif defined (__GLIBC__)
+ #include <execinfo.h>
+ #endif
+
+@@ -178,7 +178,7 @@
+
+ __vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg);
+
+-#if !defined (__CYGWIN__) && !defined (__MINGW32__)
++#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__)
+ if (generate_backtrace)
+ {
+ #define STACK_DEPTH 20
diff --git a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
new file mode 100644
index 00000000000..3315c3e990b
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
@@ -0,0 +1,20 @@
+put vtv_end.o in front of postdep_objects_CXX
+having it after crtendS.o leads to missing zero termination in eh_frame section
+
+This is in line with comment in libgcc/vtv_end.c:
+
+ When the GCC driver inserts vtv_start.o into the link line (just
+ after crtbegin.o) it also inserts vtv_end.o into the link line,
+ just before crtend.o.
+
+--- libstdc++-v3/configure
++++ libstdc++-v3/configure
+@@ -15443,7 +15443,7 @@
+
+ if test "$enable_vtable_verify" = yes; then
+ predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
+- postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
++ postdep_objects_CXX="${glibcxx_builddir}/../libgcc/vtv_end.o ${postdep_objects_CXX}"
+ fi
+
+
diff --git a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
new file mode 100644
index 00000000000..413b4aef5af
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
@@ -0,0 +1,11 @@
+--- libffi/src/closures.c.orig
++++ libffi/src/closures.c
+@@ -34,7 +34,7 @@
+ #include <ffi_common.h>
+
+ #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
+-# if __gnu_linux__ && !defined(__ANDROID__)
++# if __linux__ && !defined(__ANDROID__)
+ /* This macro indicates it may be forbidden to map anonymous memory
+ with both write and execute permission. Code compiled when this
+ option is defined will attempt to map such pages once, but if it
diff --git a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
new file mode 100644
index 00000000000..855f8f1b035
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
@@ -0,0 +1,38 @@
+From 236634eed58fa6e00cc50f19e7202903a9d8fae6 Mon Sep 17 00:00:00 2001
+From: q66 <daniel@octaforge.org>
+Date: Thu, 12 Dec 2019 04:03:56 +0100
+Subject: [PATCH] libgcc: use -mno-gnu-attribute for 128-bit IBM ldouble
+ support code
+
+Doing this will allow libgcc to emit the appropriate symbols without actually
+emitting the FP ABI tag for them, which allows 64-bit long double environments
+to function and even link statically while still allowing usage of
+explicit __ibm128.
+---
+ libgcc/config/rs6000/t-ibm-ldouble | 2 +-
+ libgcc/config/rs6000/t-linux | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgcc/config/rs6000/t-ibm-ldouble b/libgcc/config/rs6000/t-ibm-ldouble
+index b132784..fb5eca8 100644
+--- libgcc/config/rs6000/t-ibm-ldouble
++++ libgcc/config/rs6000/t-ibm-ldouble
+@@ -1,6 +1,6 @@
+ # GCC 128-bit long double support routines.
+ LIB2ADD += $(srcdir)/config/rs6000/ibm-ldouble.c
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128
++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute
+
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ibm-ldouble.ver
+diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
+index 4f6d4c4..fa93bb6 100644
+--- libgcc/config/rs6000/t-linux
++++ libgcc/config/rs6000/t-linux
+@@ -1,3 +1,3 @@
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
+
+-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc
+--
+2.24.0
diff --git a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
new file mode 100644
index 00000000000..e5fdbf9f96f
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
@@ -0,0 +1,11 @@
+--- libffi/src/mips/ffitarget.h 2014-11-08 13:47:24.000000000 +0100
++++ libffi/src/mips/ffitarget.h 2017-11-09 16:51:11.866848444 +0100
+@@ -42,7 +42,7 @@
+ #define _MIPS_SIM_NABI32 2
+ #define _MIPS_SIM_ABI64 3
+ #elif !defined(__OpenBSD__)
+-# include <sgidefs.h>
++# include <asm/sgidefs.h>
+ #endif
+
+ # ifndef _ABIN32
diff --git a/srcpkgs/libgccjit/patches/mips-soft-float.patch b/srcpkgs/libgccjit/patches/mips-soft-float.patch
new file mode 100644
index 00000000000..4db0e2fb07a
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/mips-soft-float.patch
@@ -0,0 +1,18 @@
+--- libffi/src/mips/o32.S 2020-03-12 12:07:23.000000000 +0100
++++ libffi/src/mips/o32.S 2020-05-14 20:52:45.701809054 +0200
+@@ -278,6 +278,7 @@
+ li $9, FFI_TYPE_VOID
+ beq $8, $9, closure_done
+
++#ifndef __mips_soft_float
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+
+@@ -289,6 +290,7 @@
+ l.d $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
+ 1:
++#endif
+ REG_L $3, V1_OFF2($fp)
+ REG_L $2, V0_OFF2($fp)
+
diff --git a/srcpkgs/libgccjit/patches/musl-ada.patch b/srcpkgs/libgccjit/patches/musl-ada.patch
new file mode 100644
index 00000000000..61823684da5
--- /dev/null
+++ b/srcpkgs/libgccjit/patches/musl-ada.patch
@@ -0,0 +1,204 @@
+diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
+index 3b0aea9..ee0bb69 100644
+--- gcc/ada/adaint.c
++++ gcc/ada/adaint.c
+@@ -76,6 +76,11 @@
+ #include <sys/param.h>
+ #include <sys/pstat.h>
+ #endif
++
++#if defined (linux)
++#define _GNU_SOURCE 1
++#include <sched.h>
++#endif
+
+ #ifdef __PikeOS__
+ #define __BSD_VISIBLE 1
+@@ -3255,7 +3260,6 @@ __gnat_lwp_self (void)
+ #endif
+
+ #if defined (__linux__)
+-#include <sched.h>
+
+ /* glibc versions earlier than 2.7 do not define the routines to handle
+ dynamically allocated CPU sets. For these targets, we use the static
+@@ -3265,7 +3269,7 @@ __gnat_lwp_self (void)
+
+ /* Dynamic cpu sets */
+
+-cpu_set_t *
++void *
+ __gnat_cpu_alloc (size_t count)
+ {
+ return CPU_ALLOC (count);
+@@ -3278,33 +3282,33 @@ __gnat_cpu_alloc_size (size_t count)
+ }
+
+ void
+-__gnat_cpu_free (cpu_set_t *set)
++__gnat_cpu_free (void *set)
+ {
+- CPU_FREE (set);
++ CPU_FREE ((cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_zero (size_t count, cpu_set_t *set)
++__gnat_cpu_zero (size_t count, void *set)
+ {
+- CPU_ZERO_S (count, set);
++ CPU_ZERO_S (count, (cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
++__gnat_cpu_set (int cpu, size_t count, void *set)
+ {
+ /* Ada handles CPU numbers starting from 1, while C identifies the first
+ CPU by a 0, so we need to adjust. */
+- CPU_SET_S (cpu - 1, count, set);
++ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
+ }
+
+ #else /* !CPU_ALLOC */
+
+ /* Static cpu sets */
+
+-cpu_set_t *
++void *
+ __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
+ {
+- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
++ return xmalloc (sizeof (cpu_set_t));
+ }
+
+ size_t
+@@ -3314,23 +3318,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
+ }
+
+ void
+-__gnat_cpu_free (cpu_set_t *set)
++__gnat_cpu_free (void *set)
+ {
+ free (set);
+ }
+
+ void
+-__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
++__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
+ {
+- CPU_ZERO (set);
++ CPU_ZERO ((cpu_set_t *) set);
+ }
+
+ void
+-__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
++__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
+ {
+ /* Ada handles CPU numbers starting from 1, while C identifies the first
+ CPU by a 0, so we need to adjust. */
+- CPU_SET (cpu - 1, set);
++ CPU_SET (cpu - 1, (cpu_set_t *) set);
+ }
+ #endif /* !CPU_ALLOC */
+ #endif /* __linux__ */
+diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
+index 0d12f7e..a063b47 100644
+--- gcc/ada/adaint.h
++++ gcc/ada/adaint.h
+@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
+
+ /* Routines for interface to required CPU set primitives */
+
+-#include <sched.h>
+-
+-extern cpu_set_t *__gnat_cpu_alloc (size_t);
++extern void * __gnat_cpu_alloc (size_t);
+ extern size_t __gnat_cpu_alloc_size (size_t);
+-extern void __gnat_cpu_free (cpu_set_t *);
+-extern void __gnat_cpu_zero (size_t, cpu_set_t *);
+-extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
++extern void __gnat_cpu_free (void *);
++extern void __gnat_cpu_zero (size_t, void *);
++extern void __gnat_cpu_set (int, size_t, void *);
+ #endif
+
+ #if defined (_WIN32)
+--- gcc/ada/Makefile.rtl 2020-07-23 08:35:17.052381336 +0200
++++ - 2020-08-09 19:38:24.230351406 +0200
+@@ -1533,7 +1533,7 @@
+ s-intman.adb<libgnarl/s-intman__posix.adb \
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ a-exetim.adb<libgnarl/a-exetim__posix.adb \
+ a-exetim.ads<libgnarl/a-exetim__default.ads \
+ s-linux.ads<libgnarl/s-linux.ads \
+@@ -2083,7 +2083,7 @@
+ s-osinte.adb<libgnarl/s-osinte__posix.adb \
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-ppc.ads
+@@ -2112,7 +2112,7 @@
+ endif
+
+ # ARM linux, GNU eabi
+-ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
++ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<libgnarl/a-intnam__linux.ads \
+ s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
+@@ -2305,7 +2305,7 @@
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(ATOMICS_BUILTINS_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-ia64.ads
+@@ -2401,7 +2401,7 @@
+ s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
+ s-taspri.ads<libgnarl/s-taspri__posix.ads \
+ $(TRASYM_DWARF_UNIX_PAIRS) \
+- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
++ s-tsmona.adb<libgnat/s-tsmona.adb \
+ $(ATOMICS_TARGET_PAIRS) \
+ $(X86_64_TARGET_PAIRS) \
+ system.ads<libgnat/system-linux-x86.ads
+--- gcc/ada/terminals.c 2019-01-08 10:54:04.000000000 +0100
++++ gcc/ada/terminals.c 2019-05-15 13:14:09.935742526 +0200
+@@ -1136,7 +1136,7 @@
+ /* POSIX does not specify how to open the master side of a terminal.Several
+ methods are available (system specific):
+ 1- using a cloning device (USE_CLONE_DEVICE)
+- 2- getpt (USE_GETPT)
++ 2- posix_openpt (USE_POSIX_OPENPT)
+ 3- openpty (USE_OPENPTY)
+
+ When using the cloning device method, the macro USE_CLONE_DEVICE should
+@@ -1150,7 +1150,7 @@
+ #if defined (__APPLE__) || defined (BSD)
+ #define USE_OPENPTY
+ #elif defined (__linux__)
+-#define USE_GETPT
++#define USE_POSIX_OPENPT
+ #elif defined (__sun__)
+ #define USE_CLONE_DEVICE "/dev/ptmx"
+ #elif defined (_AIX)
+@@ -1199,8 +1199,8 @@
+ int master_fd = -1;
+ char *slave_name = NULL;
+
+-#ifdef USE_GETPT
+- master_fd = getpt ();
++#if defined(USE_POSIX_OPENPT)
++ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
+ #elif defined (USE_OPENPTY)
+ status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
+ #elif defined (USE_CLONE_DEVICE)
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 00000000000..0e8551d062c
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,241 @@
+# Template file for 'libgccjit'
+_majorver=10
+_minorver=${_majorver}.2
+_patchver=${_minorver}.1
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=${_patchver}pre1
+wrksrc=gcc-${version/pre/_pre}
+revision=2
+short_desc="GNU Compiler Collection"
+maintainer="Enno Boland <gottox@voidlinux.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+nopie=yes
+lib32disabled=yes
+
+# MIPS is untested and does not have go in crosstoolchains
+# 32-bit PowerPC seems weirdly broken since the 10.x release
+# 32-bit little endian PowerPC has no support at all (no GOARCH)
+case "$XBPS_TARGET_MACHINE" in
+ ppc64*) ;;
+ mips*-musl|ppc*) _have_gccgo=no ;;
+esac
+
+if [ "$CHROOT_READY" ]; then
+ hostmakedepends="tar texinfo perl flex"
+fi
+
+makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel
+ libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
+depends="gcc>=${_minorver}"
+checkdepends="dejagnu"
+
+case "$XBPS_TARGET_MACHINE" in
+ i686) _triplet="i686-pc-linux-gnu";;
+ i686-musl) _triplet="i686-linux-musl";;
+ x86_64) _triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _triplet="x86_64-linux-musl";;
+ armv5tel) _triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _triplet="arm-linux-musleabi";;
+ armv6l) _triplet="arm-linux-gnueabihf";;
+ armv7l) _triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _triplet="arm-linux-musleabihf";;
+ armv7l-musl) _triplet="armv7l-linux-musleabihf";;
+ aarch64) _triplet="aarch64-linux-gnu";;
+ aarch64-musl) _triplet="aarch64-linux-musl";;
+ ppc) _triplet="powerpc-linux-gnu";;
+ ppc-musl) _triplet="powerpc-linux-musl";;
+ ppcle) _triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _triplet="powerpcle-linux-musl";;
+ ppc64le) _triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _triplet="powerpc64le-linux-musl";;
+ ppc64) _triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _triplet="powerpc64-linux-musl";;
+ mips-musl) _triplet="mips-linux-musl";;
+ mipshf-musl) _triplet="mips-linux-muslhf";;
+ mipsel-musl) _triplet="mipsel-linux-musl";;
+ mipselhf-musl) _triplet="mipsel-linux-muslhf";;
+esac
+case "$XBPS_TARGET_MACHINE" in
+ *-musl) depends+=" musl-devel";;
+ *) depends+=" glibc-devel"
+ ;;
+esac
+
+pre_configure() {
+ # _FORTIFY_SOURCE needs an optimization level.
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/libssp-musl.patch
+ patch -p0 -i ${FILESDIR}/gccgo-musl.patch
+ ;;
+ esac
+}
+do_configure() {
+ local _langs _args _hash
+
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_triplet}"
+ else
+ _langs="jit,lto"
+ _args+=" --build=${_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --with-system-zlib"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --enable-linker-build-id"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-lto"
+ _args+=" --enable-shared"
+ _args+=" --enable-host-shared"
+ _args+=" --enable-checking=release"
+ _args+=" --enable-plugins"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-default-pie"
+ _args+=" --disable-multilib"
+ _args+=" --disable-bootstrap"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+
+}
+
+do_build() {
+ if [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ fi
+ cd build
+ make ${makejobs}
+}
+
+post_build() {
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
+
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
+
+ vinstall "${wrksrc}/install/usr/lib64/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
+
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 00000000000..fb8dd58f204
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
From 50c7abf2083bd6c29c00d7e5437de59b8f933396 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Tue, 16 Feb 2021 12:19:13 -0500
Subject: [PATCH 2/3] New package: New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 ++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 126 +----------
srcpkgs/libgccjit/files/libssp-musl.patch | 71 +-----
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/patches/ada-shared.patch | 28 ---
.../patches/consistent-library-paths.patch | 110 ----------
.../patches/fix-cxxflags-passing.patch | 10 -
.../libgccjit/patches/fix-musl-execinfo.patch | 33 ---
.../patches/fix-vtv-link-order.patch | 20 --
.../libgccjit/patches/libffi_gnulinux.patch | 11 -
.../patches/libgcc-ibm128-no-tag.patch | 38 ----
.../libgccjit/patches/mips-sgidefs_h.patch | 11 -
.../libgccjit/patches/mips-soft-float.patch | 18 --
srcpkgs/libgccjit/patches/musl-ada.patch | 204 ------------------
srcpkgs/libgccjit/template | 148 +++++++------
15 files changed, 147 insertions(+), 745 deletions(-)
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
mode change 100644 => 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
mode change 100644 => 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
delete mode 100644 srcpkgs/libgccjit/patches/ada-shared.patch
delete mode 100644 srcpkgs/libgccjit/patches/consistent-library-paths.patch
delete mode 100644 srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
delete mode 100644 srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
delete mode 100644 srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
delete mode 100644 srcpkgs/libgccjit/patches/libffi_gnulinux.patch
delete mode 100644 srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
delete mode 100644 srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
delete mode 100644 srcpkgs/libgccjit/patches/mips-soft-float.patch
delete mode 100644 srcpkgs/libgccjit/patches/musl-ada.patch
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 00000000000..d2ed16928c8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
deleted file mode 100644
index 5ed9f16f558..00000000000
--- a/srcpkgs/libgccjit/files/libgnarl-musl.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-Source: Alpine Linux
-Upstream: Unknown
-Reason: Patch libgnarl to not use function missing from musl.
-
-diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads
---- gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800
-+++ gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700
-@@ -394,12 +394,6 @@ package System.OS_Interface is
- PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
-
-- function pthread_rwlockattr_setkind_np
-- (attr : access pthread_rwlockattr_t;
-- pref : int) return int;
-- pragma Import
-- (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
--
- function pthread_rwlock_init
- (mutex : access pthread_rwlock_t;
- attr : access pthread_rwlockattr_t) return int;
-@@ -464,11 +458,6 @@ package System.OS_Interface is
- protocol : int) return int;
- pragma Import (C, pthread_mutexattr_setprotocol);
-
-- function pthread_mutexattr_setprioceiling
-- (attr : access pthread_mutexattr_t;
-- prioceiling : int) return int;
-- pragma Import (C, pthread_mutexattr_setprioceiling);
--
- type struct_sched_param is record
- sched_priority : int; -- scheduling priority
- end record;
-diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb
---- gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800
-+++ gcc/ada/libgnarl/s-taprop__linux.adb 2018-11-13 11:28:36.433964449 -0800
-@@ -202,9 +202,6 @@ package body System.Task_Primitives.Oper
- pragma Import
- (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
-
-- function GNAT_has_cap_sys_nice return C.int;
-- pragma Import
-- (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
- -- We do not have pragma Linker_Options ("-lcap"); here, because this
- -- library is not present on many Linux systems. 'libcap' is the Linux
- -- "capabilities" library, called by __gnat_has_cap_sys_nice.
-@@ -214,38 +211,6 @@ package body System.Task_Primitives.Oper
- -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
- -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
-
-- function Get_Ceiling_Support return Boolean;
-- -- Get the value of the Ceiling_Support constant (see below).
-- -- Note well: If this function or related code is modified, it should be
-- -- tested by hand, because automated testing doesn't exercise it.
--
-- -------------------------
-- -- Get_Ceiling_Support --
-- -------------------------
--
-- function Get_Ceiling_Support return Boolean is
-- Ceiling_Support : Boolean := False;
-- begin
-- if Locking_Policy /= 'C' then
-- return False;
-- end if;
--
-- declare
-- function geteuid return Integer;
-- pragma Import (C, geteuid, "geteuid");
-- Superuser : constant Boolean := geteuid = 0;
-- Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
-- pragma Assert (Has_Cap in 0 | 1);
-- begin
-- Ceiling_Support := Superuser or else Has_Cap = 1;
-- end;
--
-- return Ceiling_Support;
-- end Get_Ceiling_Support;
--
-- pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
-- Ceiling_Support : constant Boolean := Get_Ceiling_Support;
-- pragma Warnings (On, "non-static call not allowed in preelaborated unit");
- -- True if the locking policy is Ceiling_Locking, and the current process
- -- has permission to use this policy. The process has permission if it is
- -- running as 'root', or if the capability was set by the setcap command,
-@@ -348,7 +313,9 @@ package body System.Task_Primitives.Oper
- -- Init_Mutex --
- ----------------
-
-+ pragma Warnings (Off, "formal parameter * is not referenced");
- function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
-+ pragma Warnings (On, "formal parameter * is not referenced");
- Mutex_Attr : aliased pthread_mutexattr_t;
- Result, Result_2 : C.int;
-
-@@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper
- return Result;
- end if;
-
-- if Ceiling_Support then
-- Result := pthread_mutexattr_setprotocol
-- (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
-- pragma Assert (Result = 0);
--
-- Result := pthread_mutexattr_setprioceiling
-- (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
-- pragma Assert (Result = 0);
--
-- elsif Locking_Policy = 'I' then
-+ if Locking_Policy = 'I' then
- Result := pthread_mutexattr_setprotocol
- (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
- pragma Assert (Result = 0);
-@@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper
- Result := pthread_rwlockattr_init (RWlock_Attr'Access);
- pragma Assert (Result = 0);
-
-- Result := pthread_rwlockattr_setkind_np
-- (RWlock_Attr'Access,
-- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
-- pragma Assert (Result = 0);
--
- Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
-
- pragma Assert (Result in 0 | ENOMEM);
-
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 00000000000..cab291e893c
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
deleted file mode 100644
index e0b84f9acc9..00000000000
--- a/srcpkgs/libgccjit/files/libssp-musl.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-First part taken from Alpine.
-
-Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
-
---- gcc/gcc.c
-+++ gcc/gcc.c
-@@ -874,10 +874,15 @@ proper position among the other output files. */
- #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
- #endif
-
-+#ifdef ENABLE_DEFAULT_SSP
-+#define NO_SSP_SPEC "%{nostdlib|nodefaultlibs|ffreestanding:-fno-stack-protector} "
-+#else
-+#define NO_SSP_SPEC ""
-+#endif
-+
- #ifndef LINK_SSP_SPEC
- #ifdef TARGET_LIBC_PROVIDES_SSP
--#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-- "|fstack-protector-strong|fstack-protector-explicit:}"
-+#define LINK_SSP_SPEC "-lssp_nonshared"
- #else
- #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
- "|fstack-protector-strong|fstack-protector-explicit" \
-@@ -1155,7 +1160,7 @@ static const char *cc1_options =
- %{-version:--version}\
- %{-help=*:--help=%*}\
- %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
-- %{fsyntax-only:-o %j} %{-param*}\
-+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
- %{coverage:-fprofile-arcs -ftest-coverage}\
- %{fprofile-arcs|fprofile-generate*|coverage:\
- %{!fprofile-update=single:\
---- gcc/params.opt
-+++ gcc/params.opt
-@@ -853,7 +853,7 @@ Common Joined UInteger Var(param_ssa_name_def_chain_limit) Init(512) Param Optim
- The maximum number of SSA_NAME assignments to follow in determining a value.
-
- -param=ssp-buffer-size=
--Common Joined UInteger Var(param_ssp_buffer_size) Init(8) IntegerRange(1, 65536) Param Optimization
-+Common Joined UInteger Var(param_ssp_buffer_size) Init(4) IntegerRange(1, 65536) Param Optimization
- The lower bound for a buffer to be considered for stack smashing protection.
-
- -param=stack-clash-protection-guard-size=
---- gcc/config/i386/gnu-user-common.h
-+++ gcc/config/i386/gnu-user-common.h
-@@ -64,9 +64,3 @@ along with GCC; see the file COPYING3. If not see
-
- /* Static stack checking is supported by means of probes. */
- #define STACK_CHECK_STATIC_BUILTIN 1
--
--/* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
--#define TARGET_CAN_SPLIT_STACK
--#endif
---- gcc/config/i386/gnu.h
-+++ gcc/config/i386/gnu.h
-@@ -40,11 +40,6 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>.
- /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
- #define TARGET_THREAD_SSP_OFFSET 0x14
-
--/* We only build the -fsplit-stack support in libgcc if the
-- assembler has full support for the CFI directives. */
--#if HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
--#define TARGET_CAN_SPLIT_STACK
--#endif
- /* We steal the last transactional memory word. */
- #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
- #endif
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 00000000000..bf43b096e8b
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 00000000000..c42218ef09d
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches/ada-shared.patch b/srcpkgs/libgccjit/patches/ada-shared.patch
deleted file mode 100644
index 7b4280620fe..00000000000
--- a/srcpkgs/libgccjit/patches/ada-shared.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- gcc/ada/link.c
-+++ gcc/ada/link.c
-@@ -105,9 +105,9 @@
-
- #elif defined (__FreeBSD__)
- const char *__gnat_object_file_option = "-Wl,@";
--const char *__gnat_run_path_option = "-Wl,-rpath,";
--char __gnat_shared_libgnat_default = STATIC;
--char __gnat_shared_libgcc_default = STATIC;
-+const char *__gnat_run_path_option = "";
-+char __gnat_shared_libgnat_default = SHARED;
-+char __gnat_shared_libgcc_default = SHARED;
- int __gnat_link_max = 8192;
- unsigned char __gnat_objlist_file_supported = 1;
- const char *__gnat_object_library_extension = ".a";
-@@ -127,9 +127,9 @@
-
- #elif defined (linux) || defined(__GLIBC__)
- const char *__gnat_object_file_option = "-Wl,@";
--const char *__gnat_run_path_option = "-Wl,-rpath,";
--char __gnat_shared_libgnat_default = STATIC;
--char __gnat_shared_libgcc_default = STATIC;
-+const char *__gnat_run_path_option = "";
-+char __gnat_shared_libgnat_default = SHARED;
-+char __gnat_shared_libgcc_default = SHARED;
- int __gnat_link_max = 8192;
- unsigned char __gnat_objlist_file_supported = 1;
- const char *__gnat_object_library_extension = ".a";
diff --git a/srcpkgs/libgccjit/patches/consistent-library-paths.patch b/srcpkgs/libgccjit/patches/consistent-library-paths.patch
deleted file mode 100644
index 1ec0e258526..00000000000
--- a/srcpkgs/libgccjit/patches/consistent-library-paths.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-Always use lib64 for 64-bit and lib32 for 32-bit.
-
-Do not change the dynamic linkers in any way, though.
-
-When adding a new platform, fix this up too.
-
---- gcc/config/aarch64/t-aarch64-linux
-+++ gcc/config/aarch64/t-aarch64-linux
-@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
-
- AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+MULTILIB_OSDIRNAMES = mabi.lp64=../lib64
- MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-
- MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32)
---- gcc/config/i386/t-linux64
-+++ gcc/config/i386/t-linux64
-@@ -33,6 +33,6 @@
- comma=,
- MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
- MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
-+MULTILIB_OSDIRNAMES = m64=../lib64
-+MULTILIB_OSDIRNAMES+= m32=../lib32
- MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
---- gcc/config/mips/t-linux64
-+++ gcc/config/mips/t-linux64
-@@ -21,6 +21,6 @@ MULTILIB_DIRNAMES = n32 32 64
- MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
- MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
- MULTILIB_OSDIRNAMES = \
-- ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
-- ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
-- ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+ ../lib32 \
-+ ../lib \
-+ ../lib64
---- gcc/config/rs6000/t-linux
-+++ gcc/config/rs6000/t-linux
-@@ -2,7 +2,8 @@
- # or soft-float.
- ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
- ifneq (,$(findstring powerpc64,$(target)))
--MULTILIB_OSDIRNAMES := .=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
- else
- MULTIARCH_DIRNAME := $(call if_multiarch,powerpc-linux-gnu)
- endif
-@@ -10,7 +11,8 @@ ifneq (,$(findstring powerpcle,$(target)))
- MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME))
- endif
- ifneq (,$(findstring powerpc64le,$(target)))
--MULTILIB_OSDIRNAMES := $(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
- endif
- endif
-
---- gcc/config/rs6000/t-linux64
-+++ gcc/config/rs6000/t-linux64
-@@ -28,8 +28,8 @@
- MULTILIB_OPTIONS := m64/m32
- MULTILIB_DIRNAMES := 64 32
- MULTILIB_EXTRA_OPTS :=
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
-
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- $(COMPILE) $<
---- gcc/config/rs6000/t-linux64bele
-+++ gcc/config/rs6000/t-linux64bele
-@@ -2,6 +2,6 @@
-
- MULTILIB_OPTIONS += mlittle
- MULTILIB_DIRNAMES += le
--MULTILIB_OSDIRNAMES += $(subst =,.mlittle=,$(subst lible32,lib32le,$(subst lible64,lib64le,$(subst lib,lible,$(subst -linux,le-linux,$(MULTILIB_OSDIRNAMES))))))
--MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mlittle%,$(MULTILIB_OSDIRNAMES)))
-+MULTILIB_OSDIRNAMES = m64=../lib64
-+MULTILIB_OSDIRNAMES+= m32=../lib32
- MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
---- gcc/config/rs6000/t-linux64lebe
-+++ gcc/config/rs6000/t-linux64lebe
-@@ -2,6 +2,6 @@
-
- MULTILIB_OPTIONS += mbig
- MULTILIB_DIRNAMES += be
--MULTILIB_OSDIRNAMES += $(subst =,.mbig=,$(subst libbe32,lib32be,$(subst libbe64,lib64be,$(subst lib,libbe,$(subst le-linux,-linux,$(MULTILIB_OSDIRNAMES))))))
--MULTILIB_OSDIRNAMES += $(subst $(if $(findstring 64,$(target)),m64,m32).,,$(filter $(if $(findstring 64,$(target)),m64,m32).mbig%,$(MULTILIB_OSDIRNAMES)))
-+MULTILIB_OSDIRNAMES := m64=../lib64
-+MULTILIB_OSDIRNAMES += m32=../lib32
- MULTILIB_MATCHES := ${MULTILIB_MATCHES_ENDIAN}
---- gcc/config/s390/t-linux64
-+++ gcc/config/s390/t-linux64
-@@ -7,5 +7,5 @@
-
- MULTILIB_OPTIONS = m64/m31
- MULTILIB_DIRNAMES = 64 32
--MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
--MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
-+MULTILIB_OSDIRNAMES = m64=../lib64
-+MULTILIB_OSDIRNAMES+= m32=../lib32
---
-2.29.2
-
diff --git a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch b/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
deleted file mode 100644
index dda2a50460b..00000000000
--- a/srcpkgs/libgccjit/patches/fix-cxxflags-passing.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- Makefile.in.orig
-+++ Makefile.in
-@@ -169,6 +169,7 @@
- # built for the build system to override those in BASE_FLAGS_TO_PASSS.
- EXTRA_BUILD_FLAGS = \
- CFLAGS="$(CFLAGS_FOR_BUILD)" \
-+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
- LDFLAGS="$(LDFLAGS_FOR_BUILD)"
-
- # This is the list of directories to built for the host system.
diff --git a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch b/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
deleted file mode 100644
index 583eac7b0dc..00000000000
--- a/srcpkgs/libgccjit/patches/fix-musl-execinfo.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-There is no <execinfo.h> in musl libc
-
---- libvtv/vtv_rts.cc 2016-09-23 16:17:11.000000000 +0200
-+++ libvtc/vtv_rts.cc 2016-09-25 15:08:57.896000000 +0200
-@@ -124,7 +124,7 @@
- #include <windows.h>
- #include <winternl.h>
- #include <psapi.h>
--#else
-+#elif defined (__GLIBC__)
- #include <execinfo.h>
- #endif
-
---- libvtv/vtv_utils.cc 2016-09-23 16:17:11.000000000 +0200
-+++ libvtv/vtv_utils.cc 2016-09-25 15:15:35.529000000 +0200
-@@ -34,7 +34,7 @@
- #include <string.h>
- #if defined (__CYGWIN__) || defined (__MINGW32__)
- #include <windows.h>
--#else
-+#elif defined (__GLIBC__)
- #include <execinfo.h>
- #endif
-
-@@ -178,7 +178,7 @@
-
- __vtv_add_to_log (vtv_failures_log_fd, "%s", log_msg);
-
--#if !defined (__CYGWIN__) && !defined (__MINGW32__)
-+#if !defined (__CYGWIN__) && !defined (__MINGW32__) && defined(__GLIBC__)
- if (generate_backtrace)
- {
- #define STACK_DEPTH 20
diff --git a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch b/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
deleted file mode 100644
index 3315c3e990b..00000000000
--- a/srcpkgs/libgccjit/patches/fix-vtv-link-order.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-put vtv_end.o in front of postdep_objects_CXX
-having it after crtendS.o leads to missing zero termination in eh_frame section
-
-This is in line with comment in libgcc/vtv_end.c:
-
- When the GCC driver inserts vtv_start.o into the link line (just
- after crtbegin.o) it also inserts vtv_end.o into the link line,
- just before crtend.o.
-
---- libstdc++-v3/configure
-+++ libstdc++-v3/configure
-@@ -15443,7 +15443,7 @@
-
- if test "$enable_vtable_verify" = yes; then
- predep_objects_CXX="${predep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_start.o"
-- postdep_objects_CXX="${postdep_objects_CXX} ${glibcxx_builddir}/../libgcc/vtv_end.o"
-+ postdep_objects_CXX="${glibcxx_builddir}/../libgcc/vtv_end.o ${postdep_objects_CXX}"
- fi
-
-
diff --git a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch b/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
deleted file mode 100644
index 413b4aef5af..00000000000
--- a/srcpkgs/libgccjit/patches/libffi_gnulinux.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libffi/src/closures.c.orig
-+++ libffi/src/closures.c
-@@ -34,7 +34,7 @@
- #include <ffi_common.h>
-
- #if !FFI_MMAP_EXEC_WRIT && !FFI_EXEC_TRAMPOLINE_TABLE
--# if __gnu_linux__ && !defined(__ANDROID__)
-+# if __linux__ && !defined(__ANDROID__)
- /* This macro indicates it may be forbidden to map anonymous memory
- with both write and execute permission. Code compiled when this
- option is defined will attempt to map such pages once, but if it
diff --git a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch b/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
deleted file mode 100644
index 855f8f1b035..00000000000
--- a/srcpkgs/libgccjit/patches/libgcc-ibm128-no-tag.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 236634eed58fa6e00cc50f19e7202903a9d8fae6 Mon Sep 17 00:00:00 2001
-From: q66 <daniel@octaforge.org>
-Date: Thu, 12 Dec 2019 04:03:56 +0100
-Subject: [PATCH] libgcc: use -mno-gnu-attribute for 128-bit IBM ldouble
- support code
-
-Doing this will allow libgcc to emit the appropriate symbols without actually
-emitting the FP ABI tag for them, which allows 64-bit long double environments
-to function and even link statically while still allowing usage of
-explicit __ibm128.
----
- libgcc/config/rs6000/t-ibm-ldouble | 2 +-
- libgcc/config/rs6000/t-linux | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgcc/config/rs6000/t-ibm-ldouble b/libgcc/config/rs6000/t-ibm-ldouble
-index b132784..fb5eca8 100644
---- libgcc/config/rs6000/t-ibm-ldouble
-+++ libgcc/config/rs6000/t-ibm-ldouble
-@@ -1,6 +1,6 @@
- # GCC 128-bit long double support routines.
- LIB2ADD += $(srcdir)/config/rs6000/ibm-ldouble.c
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute
-
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ibm-ldouble.ver
-diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
-index 4f6d4c4..fa93bb6 100644
---- libgcc/config/rs6000/t-linux
-+++ libgcc/config/rs6000/t-linux
-@@ -1,3 +1,3 @@
- SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
-
--HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc
-+HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc
---
-2.24.0
diff --git a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch b/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
deleted file mode 100644
index e5fdbf9f96f..00000000000
--- a/srcpkgs/libgccjit/patches/mips-sgidefs_h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libffi/src/mips/ffitarget.h 2014-11-08 13:47:24.000000000 +0100
-+++ libffi/src/mips/ffitarget.h 2017-11-09 16:51:11.866848444 +0100
-@@ -42,7 +42,7 @@
- #define _MIPS_SIM_NABI32 2
- #define _MIPS_SIM_ABI64 3
- #elif !defined(__OpenBSD__)
--# include <sgidefs.h>
-+# include <asm/sgidefs.h>
- #endif
-
- # ifndef _ABIN32
diff --git a/srcpkgs/libgccjit/patches/mips-soft-float.patch b/srcpkgs/libgccjit/patches/mips-soft-float.patch
deleted file mode 100644
index 4db0e2fb07a..00000000000
--- a/srcpkgs/libgccjit/patches/mips-soft-float.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- libffi/src/mips/o32.S 2020-03-12 12:07:23.000000000 +0100
-+++ libffi/src/mips/o32.S 2020-05-14 20:52:45.701809054 +0200
-@@ -278,6 +278,7 @@
- li $9, FFI_TYPE_VOID
- beq $8, $9, closure_done
-
-+#ifndef __mips_soft_float
- li $13, 1 # FFI_O32
- bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
-
-@@ -289,6 +290,7 @@
- l.d $f0, V0_OFF2($fp)
- beq $8, $9, closure_done
- 1:
-+#endif
- REG_L $3, V1_OFF2($fp)
- REG_L $2, V0_OFF2($fp)
-
diff --git a/srcpkgs/libgccjit/patches/musl-ada.patch b/srcpkgs/libgccjit/patches/musl-ada.patch
deleted file mode 100644
index 61823684da5..00000000000
--- a/srcpkgs/libgccjit/patches/musl-ada.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
-index 3b0aea9..ee0bb69 100644
---- gcc/ada/adaint.c
-+++ gcc/ada/adaint.c
-@@ -76,6 +76,11 @@
- #include <sys/param.h>
- #include <sys/pstat.h>
- #endif
-+
-+#if defined (linux)
-+#define _GNU_SOURCE 1
-+#include <sched.h>
-+#endif
-
- #ifdef __PikeOS__
- #define __BSD_VISIBLE 1
-@@ -3255,7 +3260,6 @@ __gnat_lwp_self (void)
- #endif
-
- #if defined (__linux__)
--#include <sched.h>
-
- /* glibc versions earlier than 2.7 do not define the routines to handle
- dynamically allocated CPU sets. For these targets, we use the static
-@@ -3265,7 +3269,7 @@ __gnat_lwp_self (void)
-
- /* Dynamic cpu sets */
-
--cpu_set_t *
-+void *
- __gnat_cpu_alloc (size_t count)
- {
- return CPU_ALLOC (count);
-@@ -3278,33 +3282,33 @@ __gnat_cpu_alloc_size (size_t count)
- }
-
- void
--__gnat_cpu_free (cpu_set_t *set)
-+__gnat_cpu_free (void *set)
- {
-- CPU_FREE (set);
-+ CPU_FREE ((cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_zero (size_t count, cpu_set_t *set)
-+__gnat_cpu_zero (size_t count, void *set)
- {
-- CPU_ZERO_S (count, set);
-+ CPU_ZERO_S (count, (cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
-+__gnat_cpu_set (int cpu, size_t count, void *set)
- {
- /* Ada handles CPU numbers starting from 1, while C identifies the first
- CPU by a 0, so we need to adjust. */
-- CPU_SET_S (cpu - 1, count, set);
-+ CPU_SET_S (cpu - 1, count, (cpu_set_t *) set);
- }
-
- #else /* !CPU_ALLOC */
-
- /* Static cpu sets */
-
--cpu_set_t *
-+void *
- __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
- {
-- return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
-+ return xmalloc (sizeof (cpu_set_t));
- }
-
- size_t
-@@ -3314,23 +3318,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
- }
-
- void
--__gnat_cpu_free (cpu_set_t *set)
-+__gnat_cpu_free (void *set)
- {
- free (set);
- }
-
- void
--__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
-+__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
- {
-- CPU_ZERO (set);
-+ CPU_ZERO ((cpu_set_t *) set);
- }
-
- void
--__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
-+__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
- {
- /* Ada handles CPU numbers starting from 1, while C identifies the first
- CPU by a 0, so we need to adjust. */
-- CPU_SET (cpu - 1, set);
-+ CPU_SET (cpu - 1, (cpu_set_t *) set);
- }
- #endif /* !CPU_ALLOC */
- #endif /* __linux__ */
-diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
-index 0d12f7e..a063b47 100644
---- gcc/ada/adaint.h
-+++ gcc/ada/adaint.h
-@@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
-
- /* Routines for interface to required CPU set primitives */
-
--#include <sched.h>
--
--extern cpu_set_t *__gnat_cpu_alloc (size_t);
-+extern void * __gnat_cpu_alloc (size_t);
- extern size_t __gnat_cpu_alloc_size (size_t);
--extern void __gnat_cpu_free (cpu_set_t *);
--extern void __gnat_cpu_zero (size_t, cpu_set_t *);
--extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
-+extern void __gnat_cpu_free (void *);
-+extern void __gnat_cpu_zero (size_t, void *);
-+extern void __gnat_cpu_set (int, size_t, void *);
- #endif
-
- #if defined (_WIN32)
---- gcc/ada/Makefile.rtl 2020-07-23 08:35:17.052381336 +0200
-+++ - 2020-08-09 19:38:24.230351406 +0200
-@@ -1533,7 +1533,7 @@
- s-intman.adb<libgnarl/s-intman__posix.adb \
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- a-exetim.adb<libgnarl/a-exetim__posix.adb \
- a-exetim.ads<libgnarl/a-exetim__default.ads \
- s-linux.ads<libgnarl/s-linux.ads \
-@@ -2083,7 +2083,7 @@
- s-osinte.adb<libgnarl/s-osinte__posix.adb \
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- $(ATOMICS_TARGET_PAIRS) \
- $(ATOMICS_BUILTINS_TARGET_PAIRS) \
- system.ads<libgnat/system-linux-ppc.ads
-@@ -2112,7 +2112,7 @@
- endif
-
- # ARM linux, GNU eabi
--ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(target_cpu) $(target_os))),)
-+ifeq ($(strip $(filter-out arm% linux-gnueabi% linux-musleabi% linux-muslgnueabi%,$(target_cpu) $(target_os))),)
- LIBGNAT_TARGET_PAIRS = \
- a-intnam.ads<libgnarl/a-intnam__linux.ads \
- s-inmaop.adb<libgnarl/s-inmaop__posix.adb \
-@@ -2305,7 +2305,7 @@
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- s-taspri.ads<libgnarl/s-taspri__posix-noaltstack.ads \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- $(ATOMICS_TARGET_PAIRS) \
- $(ATOMICS_BUILTINS_TARGET_PAIRS) \
- system.ads<libgnat/system-linux-ia64.ads
-@@ -2401,7 +2401,7 @@
- s-tpopsp.adb<libgnarl/s-tpopsp__tls.adb \
- s-taspri.ads<libgnarl/s-taspri__posix.ads \
- $(TRASYM_DWARF_UNIX_PAIRS) \
-- s-tsmona.adb<libgnat/s-tsmona__linux.adb \
-+ s-tsmona.adb<libgnat/s-tsmona.adb \
- $(ATOMICS_TARGET_PAIRS) \
- $(X86_64_TARGET_PAIRS) \
- system.ads<libgnat/system-linux-x86.ads
---- gcc/ada/terminals.c 2019-01-08 10:54:04.000000000 +0100
-+++ gcc/ada/terminals.c 2019-05-15 13:14:09.935742526 +0200
-@@ -1136,7 +1136,7 @@
- /* POSIX does not specify how to open the master side of a terminal.Several
- methods are available (system specific):
- 1- using a cloning device (USE_CLONE_DEVICE)
-- 2- getpt (USE_GETPT)
-+ 2- posix_openpt (USE_POSIX_OPENPT)
- 3- openpty (USE_OPENPTY)
-
- When using the cloning device method, the macro USE_CLONE_DEVICE should
-@@ -1150,7 +1150,7 @@
- #if defined (__APPLE__) || defined (BSD)
- #define USE_OPENPTY
- #elif defined (__linux__)
--#define USE_GETPT
-+#define USE_POSIX_OPENPT
- #elif defined (__sun__)
- #define USE_CLONE_DEVICE "/dev/ptmx"
- #elif defined (_AIX)
-@@ -1199,8 +1199,8 @@
- int master_fd = -1;
- char *slave_name = NULL;
-
--#ifdef USE_GETPT
-- master_fd = getpt ();
-+#if defined(USE_POSIX_OPENPT)
-+ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
- #elif defined (USE_OPENPTY)
- status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
- #elif defined (USE_CLONE_DEVICE)
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
index 0e8551d062c..b80af58a837 100644
--- a/srcpkgs/libgccjit/template
+++ b/srcpkgs/libgccjit/template
@@ -2,41 +2,43 @@
_majorver=10
_minorver=${_majorver}.2
_patchver=${_minorver}.1
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
pkgname=libgccjit
# we are using a 10-stable git snapshot alpine is using in order
# to get regression fixes not yet incorporate into a stable release
# it should be possible to switch back to stable with 10.3 or 11
version=${_patchver}pre1
+revision=1
wrksrc=gcc-${version/pre/_pre}
-revision=2
short_desc="GNU Compiler Collection"
-maintainer="Enno Boland <gottox@voidlinux.org>"
+maintainer="Lane Biocini <lane@mailbox.org>"
homepage="http://gcc.gnu.org"
license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
-distfiles="https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz"
-checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590"
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ http://isl.gforge.inria.fr/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
nopie=yes
lib32disabled=yes
-
-# MIPS is untested and does not have go in crosstoolchains
-# 32-bit PowerPC seems weirdly broken since the 10.x release
-# 32-bit little endian PowerPC has no support at all (no GOARCH)
-case "$XBPS_TARGET_MACHINE" in
- ppc64*) ;;
- mips*-musl|ppc*) _have_gccgo=no ;;
-esac
-
-if [ "$CHROOT_READY" ]; then
- hostmakedepends="tar texinfo perl flex"
-fi
-
-makedepends="zlib-devel gmp-devel mpfr-devel libmpc-devel
- libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
-depends="gcc>=${_minorver}"
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex" #gmp-devel mpfr-devel libmpc-devel isl-devel libssp-devel"
+depends="gcc"
checkdepends="dejagnu"
+# needed for cross builds
case "$XBPS_TARGET_MACHINE" in
i686) _triplet="i686-pc-linux-gnu";;
i686-musl) _triplet="i686-linux-musl";;
@@ -63,11 +65,17 @@ case "$XBPS_TARGET_MACHINE" in
mipsel-musl) _triplet="mipsel-linux-musl";;
mipselhf-musl) _triplet="mipsel-linux-muslhf";;
esac
-case "$XBPS_TARGET_MACHINE" in
- *-musl) depends+=" musl-devel";;
- *) depends+=" glibc-devel"
- ;;
-esac
+#if [ "$CROSS_BUILD" ]; then
+# hostmakedepends+=" cross-${_triplet}"
+#fi
+
+post_extract() {
+ mkdir -p ${wrksrc}/{gmp,mpfr,mpc,isl}
+ cp -ar ${XBPS_BUILDDIR}/gmp-${_gmp_version}/* ${wrksrc}/gmp/
+ cp -ar ${XBPS_BUILDDIR}/mpfr-${_mpfr_version}/* ${wrksrc}/mpfr/
+ cp -ar ${XBPS_BUILDDIR}/mpc-${_mpc_version}/* ${wrksrc}/mpc/
+ cp -ar ${XBPS_BUILDDIR}/isl-${_isl_version}/* ${wrksrc}/isl/
+}
pre_configure() {
# _FORTIFY_SOURCE needs an optimization level.
@@ -80,7 +88,7 @@ pre_configure() {
*-musl)
patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
patch -p0 -i ${FILESDIR}/libssp-musl.patch
- patch -p0 -i ${FILESDIR}/gccgo-musl.patch
+ patch -p1 -i ${FILESDIR}/libgccjit-musl.patch
;;
esac
}
@@ -107,7 +115,6 @@ do_configure() {
ppc*-musl) _args+=" --disable-decimal-float";;
esac
-
if [ "$CROSS_BUILD" ]; then
export CC_FOR_TARGET="$CC"
export GCC_FOR_TARGET="$CC"
@@ -119,7 +126,6 @@ do_configure() {
export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
_args+=" --build=${_triplet}"
else
- _langs="jit,lto"
_args+=" --build=${_triplet}"
fi
@@ -144,10 +150,15 @@ do_configure() {
export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
export LDFLAGS="${LDFLAGS//-no-pie/}"
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+ export LDFLAGS+=" -fPIC"
+
_args+=" --prefix=/usr"
_args+=" --mandir=/usr/share/man"
_args+=" --infodir=/usr/share/info"
- _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
_args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
_args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
_args+=" --with-system-zlib"
@@ -156,7 +167,7 @@ do_configure() {
_args+=" --enable-threads=posix"
_args+=" --enable-lto"
_args+=" --enable-shared"
- _args+=" --enable-host-shared"
+ _args+=" --enable-host-shared"
_args+=" --enable-checking=release"
_args+=" --enable-plugins"
_args+=" --enable-default-ssp"
@@ -164,13 +175,13 @@ do_configure() {
_args+=" --disable-multilib"
_args+=" --disable-bootstrap"
_args+=" --enable-__cxa_atexit"
- _args+=" --disable-libquadmath"
- _args+=" --disable-libquadmath-support"
- _args+=" --disable-libgomp"
- _args+=" --disable-liboffloadmic"
- _args+=" --disable-libada"
- _args+=" --disable-libvtv"
- _args+=" --disable-libsanitizer"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
_args+=" --disable-werror"
_args+=" --disable-nls"
_args+=" --disable-libstdcxx-pch"
@@ -180,33 +191,32 @@ do_configure() {
mkdir -p build
cd build
- # If we are checking packages, we need to have c++ compiled
- [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
- _args+=" --enable-languages=${_langs}"
- CONFIG_SHELL=/bin/bash \
- ${wrksrc}/configure ${_args}
-
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
}
do_build() {
- if [ -z "$CHROOT_READY" ]; then
- export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
- fi
- cd build
- make ${makejobs}
+# if [ -z "$CHROOT_READY" ]; then
+# export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+# fi
+ cd build
+ make ${makejobs}
}
post_build() {
- # Lets create a staging folder to install into
- mkdir -p "${wrksrc}/install"
- cd "${wrksrc}/build"
- make DESTDIR="${wrksrc}/install" -C gcc install
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
}
do_check() {
- cd "${wrksrc}/build/gcc"
- make check-jit RUNTESTFLAGS="-v -v -v"
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
}
pre_install() {
@@ -219,23 +229,27 @@ pre_install() {
}
do_install() {
- _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
-
- # Get the shlibs over
- cd "${wrksrc}/install"
+ if [ "$CROSS_BUILD" ]; then
+ _includehostdir="usr/lib/gcc/${XBPS_CROSS_TRIPLET}/${_minorver}/include"
+ else
+ _includehostdir="usr/lib/gcc/${_triplet}/${_minorver}/include"
+ fi
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
- vinstall "${wrksrc}/install/usr/lib64/libgccjit.so.0.0.1" 0755 usr/lib
- ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
- ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
+ vinstall "${wrksrc}/install/usr/lib${XBPS_TARGET_WORDSIZE}/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so
- # Get the header files in place
- vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
- vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
- # The most important part, the info file
- vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
}
post_install() {
- vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
}
From a899104c8eaad2d9a08a6494cc70a3430e1d9e13 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Tue, 16 Feb 2021 12:25:37 -0500
Subject: [PATCH 3/3] New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/c89.1 | 80 -------
srcpkgs/libgccjit/files/c89.sh | 2 -
srcpkgs/libgccjit/files/c99.1 | 81 -------
srcpkgs/libgccjit/files/c99.sh | 2 -
srcpkgs/libgccjit/files/gccgo-musl.patch | 222 --------------------
srcpkgs/libgccjit/files/libgnarl-musl.patch | 2 +-
srcpkgs/libgccjit/files/libssp-musl.patch | 2 +-
7 files changed, 2 insertions(+), 389 deletions(-)
delete mode 100644 srcpkgs/libgccjit/files/c89.1
delete mode 100644 srcpkgs/libgccjit/files/c89.sh
delete mode 100644 srcpkgs/libgccjit/files/c99.1
delete mode 100644 srcpkgs/libgccjit/files/c99.sh
delete mode 100644 srcpkgs/libgccjit/files/gccgo-musl.patch
diff --git a/srcpkgs/libgccjit/files/c89.1 b/srcpkgs/libgccjit/files/c89.1
deleted file mode 100644
index 3ed984da33f..00000000000
--- a/srcpkgs/libgccjit/files/c89.1
+++ /dev/null
@@ -1,80 +0,0 @@
-.\" $NetBSD: c89.1,v 1.2 2008/04/30 13:10:50 martin Exp $
-.\"
-.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 5, 1999
-.Dt C89 1
-.Os
-.Sh NAME
-.Nm c89
-.Nd ANSI (1989) C compiler
-.Sh SYNOPSIS
-.Nm
-.Op Fl pedantic
-.Op Fl pedantic-errors
-.Op Fl D_ANSI_SOURCE
-.Op options ...
-.Sh DESCRIPTION
-Calls the C compiler (cc) with the given
-.Ar options ,
-using a C language environment compatible with the
-.St -ansiC
-specification.
-.Pp
-This includes proper handling of trigraphs,
-disabling non-ANSI compiler features (such as
-.Ar asm ,
-.Ar inline ,
-.Ar typeof ,
-and the $ character in identifiers),
-and definition of the preprocessor symbol
-.Ev __STRICT_ANSI__ .
-.Pp
-The following options are available:
-.Bl -tag -width -pedantic-errorsxx
-.It Fl pedantic
-Issue extra warnings defined by ANSI for use of non-ANSI features.
-.It Fl pedantic-errors
-Issue errors instead of warnings that normally would be presented by
-.Fl pedantic .
-.It Fl D_ANSI_SOURCE
-Tell the system header file set to use an ANSI-conformant "clean" namespace.
-.El
-.Sh SEE ALSO
-.Xr cc 1
-.Sh STANDARDS
-.Nm
-conforms to
-.St -p1003.2-92 .
-.Sh HISTORY
-.Nm
-appeared in
-.Nx 1.4 .
-.Sh BUGS
-Since
-.Nm
-is a shell wrapper script to
-.Ar cc ,
-compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c89.sh b/srcpkgs/libgccjit/files/c89.sh
deleted file mode 100644
index 52d6d45431b..00000000000
--- a/srcpkgs/libgccjit/files/c89.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/cc -std=c89 "$@"
diff --git a/srcpkgs/libgccjit/files/c99.1 b/srcpkgs/libgccjit/files/c99.1
deleted file mode 100644
index d368f1a874b..00000000000
--- a/srcpkgs/libgccjit/files/c99.1
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" $NetBSD: c99.1,v 1.3 2010/05/14 01:53:28 joerg Exp $
-.\"
-.\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
-.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
-.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-.\" POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd September 24, 2008
-.Dt C99 1
-.Os
-.Sh NAME
-.Nm c99
-.Nd ANSI (1999) C compiler
-.Sh SYNOPSIS
-.Nm
-.Op Fl pedantic
-.Op Fl pedantic-errors
-.Op Fl D_ANSI_SOURCE
-.Op options ...
-.Sh DESCRIPTION
-Calls the C compiler (cc) with the given
-.Ar options ,
-using a C language environment compatible with the
-.St -isoC-99
-specification.
-.Pp
-This includes
-inline functions, variable-length arrays, support for one-line
-comments beginning with //,
-disabling non-ANSI compiler features (such as
-.Ar asm ,
-.Ar typeof ,
-and the $ character in identifiers),
-and definition of the preprocessor symbol
-.Ev __STRICT_ANSI__ .
-.Pp
-The following options are available:
-.Bl -tag -width -pedantic-errorsxx
-.It Fl pedantic
-Issue extra warnings defined by ANSI for use of non-ANSI features.
-.It Fl pedantic-errors
-Issue errors instead of warnings that normally would be presented by
-.Fl pedantic .
-.It Fl D_ANSI_SOURCE
-Tell the system header file set to use an ANSI-conformant "clean" namespace.
-.El
-.Sh SEE ALSO
-.Xr cc 1
-.Sh STANDARDS
-.Nm
-conforms to
-.St -p1003.2-92 .
-.Sh HISTORY
-.Nm
-first appeared in
-.Nx 5.0 .
-.Sh BUGS
-Since
-.Nm
-is a shell wrapper script to
-.Ar cc ,
-compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c99.sh b/srcpkgs/libgccjit/files/c99.sh
deleted file mode 100644
index 15cab47c748..00000000000
--- a/srcpkgs/libgccjit/files/c99.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/bin/cc -std=c99 "$@"
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
deleted file mode 100644
index a2ce4b2b046..00000000000
--- a/srcpkgs/libgccjit/files/gccgo-musl.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-This is not among the normal patches as these changes are musl specific and
-there is no way to easily conditionalize it in source for some of the changes.
-
-Added by q66: runtime.h now uses libucontext_ prefixed APIs to allow build
-with freestanding versions of libucontext
-
-Souurce: Adélie Linux, q66
-URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
-
---- Makefile.in
-+++ Makefile.in
-@@ -46325,7 +46325,7 @@ configure-target-libgo:
- esac; \
- module_srcdir=libgo; \
- rm -f no-such-file || : ; \
-- CONFIG_SITE=no-such-file $(SHELL) \
-+ CONFIG_SITE=no-such-file LIBS="-lucontext $$LIBS" $(SHELL) \
- $$s/$$module_srcdir/configure \
- --srcdir=$${topdir}/$$module_srcdir \
- $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
---- libgo/mksysinfo.sh
-+++ libgo/mksysinfo.sh
-@@ -379,11 +379,7 @@ fi
- # Some basic types.
- echo 'type Size_t _size_t' >> ${OUT}
- echo "type Ssize_t _ssize_t" >> ${OUT}
--if grep '^const _HAVE_OFF64_T = ' gen-sysinfo.go > /dev/null 2>&1; then
-- echo "type Offset_t _off64_t" >> ${OUT}
--else
-- echo "type Offset_t _off_t" >> ${OUT}
--fi
-+echo "type Offset_t _off_t" >> ${OUT}
- echo "type Mode_t _mode_t" >> ${OUT}
- echo "type Pid_t _pid_t" >> ${OUT}
- echo "type Uid_t _uid_t" >> ${OUT}
---- libgo/go/runtime/mem_gccgo.go
-+++ libgo/go/runtime/mem_gccgo.go
-@@ -16,7 +16,7 @@ import (
- //go:linkname sysFree runtime.sysFree
-
- //extern mmap
--func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) unsafe.Pointer
-+func sysMmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) unsafe.Pointer
-
- //extern munmap
- func munmap(addr unsafe.Pointer, length uintptr) int32
-@@ -38,7 +38,7 @@ func init() {
- }
- }
-
--func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uintptr) (unsafe.Pointer, int) {
-+func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off int64) (unsafe.Pointer, int) {
- p := sysMmap(addr, n, prot, flags, fd, off)
- if uintptr(p) == _MAP_FAILED {
- return nil, errno()
---- libgo/go/runtime/signal_gccgo.go
-+++ libgo/go/runtime/signal_gccgo.go
-@@ -111,7 +111,7 @@ func getsig(i uint32) uintptr {
- if sigaction(i, nil, &sa) < 0 {
- // On GNU/Linux glibc rejects attempts to call
- // sigaction with signal 32 (SIGCANCEL) or 33 (SIGSETXID).
-- if GOOS == "linux" && (i == 32 || i == 33) {
-+ if GOOS == "linux" && (i == 32 || i == 33 || i == 34) {
- return _SIG_DFL
- }
- throw("sigaction read failure")
---- libgo/go/syscall/errstr.go
-+++ libgo/go/syscall/errstr.go
-@@ -5,7 +5,6 @@
- // license that can be found in the LICENSE file.
-
- // +build !hurd
--// +build !linux
-
- package syscall
-
---- libgo/go/syscall/errstr_glibc.go
-+++ /dev/null
-@@ -1,33 +0,0 @@
--// errstr_glibc.go -- GNU/Linux and GNU/Hurd specific error strings.
--
--// Copyright 2010 The Go Authors. All rights reserved.
--// Use of this source code is governed by a BSD-style
--// license that can be found in the LICENSE file.
--
--// We use this rather than errstr.go because on GNU/Linux sterror_r
--// returns a pointer to the error message, and may not use buf at all.
--
--// +build hurd linux
--
--package syscall
--
--import "unsafe"
--
--//sysnb strerror_r(errnum int, b []byte) (errstr *byte)
--//strerror_r(errnum _C_int, b *byte, len Size_t) *byte
--
--func Errstr(errnum int) string {
-- a := make([]byte, 128)
-- p := strerror_r(errnum, a)
-- b := (*[1000]byte)(unsafe.Pointer(p))
-- i := 0
-- for b[i] != 0 {
-- i++
-- }
-- // Lowercase first letter: Bad -> bad, but STREAM -> STREAM.
-- if i > 1 && 'A' <= b[0] && b[0] <= 'Z' && 'a' <= b[1] && b[1] <= 'z' {
-- c := b[0] + 'a' - 'A'
-- return string(c) + string(b[1:i])
-- }
-- return string(b[:i])
--}
---- libgo/go/syscall/libcall_linux.go
-+++ libgo/go/syscall/libcall_linux.go
-@@ -206,19 +206,19 @@ func Gettid() (tid int) {
- //sys Setxattr(path string, attr string, data []byte, flags int) (err error)
- //setxattr(path *byte, name *byte, value *byte, size Size_t, flags _C_int) _C_int
-
--//sys splice(rfd int, roff *_loff_t, wfd int, woff *_loff_t, len int, flags int) (n int64, err error)
--//splice(rfd _C_int, roff *_loff_t, wfd _C_int, woff *_loff_t, len Size_t, flags _C_uint) Ssize_t
-+//sys splice(rfd int, roff *_off_t, wfd int, woff *_off_t, len int, flags int) (n int64, err error)
-+//splice(rfd _C_int, roff *_off_t, wfd _C_int, woff *_off_t, len Size_t, flags _C_uint) Ssize_t
- func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
-- var lroff _loff_t
-- var plroff *_loff_t
-+ var lroff _off_t
-+ var plroff *_off_t
- if roff != nil {
-- lroff = _loff_t(*roff)
-+ lroff = _off_t(*roff)
- plroff = &lroff
- }
-- var lwoff _loff_t
-- var plwoff *_loff_t
-+ var lwoff _off_t
-+ var plwoff *_off_t
- if woff != nil {
-- lwoff = _loff_t(*woff)
-+ lwoff = _off_t(*woff)
- plwoff = &lwoff
- }
- n, err = splice(rfd, plroff, wfd, plwoff, len, flags)
---- libgo/mksigtab.sh
-+++ libgo/mksigtab.sh
-@@ -82,7 +82,7 @@ checksig _SIGPWR '{_SigNotify, "SIGPWR: power failure restart"}'
- checksig _SIGEMT '{_SigThrow, "SIGEMT: emulate instruction executed"}'
- checksig _SIGINFO '{_SigNotify, "SIGINFO: status request from keyboard"}'
- checksig _SIGTHR '{_SigNotify, "SIGTHR: reserved"}'
--checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
-+#checksig _SIGPOLL '{_SigNotify, "SIGPOLL: pollable event occurred"}'
- checksig _SIGWAITING '{_SigNotify, "SIGWAITING: reserved signal no longer used by"}'
- checksig _SIGLWP '{_SigNotify, "SIGLWP: reserved signal no longer used by"}'
- checksig _SIGFREEZE '{_SigNotify, "SIGFREEZE: special signal used by CPR"}'
-@@ -95,10 +95,12 @@ checksig _SIGLOST ' {_SigNotify, "SIGLOST: resource lost (Sun); server died (G
-
- # Special handling of signals 32 and 33 on GNU/Linux systems,
- # because they are special to glibc.
-+# Signal 34 is additionally special to Linux systems with musl.
- if test "${GOOS}" = "linux"; then
-- SIGLIST=$SIGLIST"_32__33_"
-+ SIGLIST=$SIGLIST"_32__33__34_"
- echo ' 32: {_SigSetStack + _SigUnblock, "signal 32"}, /* SIGCANCEL; see issue 6997 */'
- echo ' 33: {_SigSetStack + _SigUnblock, "signal 33"}, /* SIGSETXID; see issues 3871, 9400, 12498 */'
-+ echo ' 34: {_SigSetStack + _SigUnblock, "signal 34"}, /* see issue 30062 */'
- fi
-
- if test "${GOOS}" = "aix"; then
---- libgo/runtime/go-signal.c 2020-07-23 08:35:19.004402840 +0200
-+++ - 2020-08-09 21:35:54.352886232 +0200
-@@ -224,7 +224,11 @@
- #elif defined(__alpha__) && defined(__linux__)
- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.sc_pc;
- #elif defined(__PPC__) && defined(__linux__)
-- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip;
-+ #ifdef __PPC64__
-+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32];
-+ #else
-+ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32];
-+ #endif
- #elif defined(__PPC__) && defined(_AIX)
- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar;
- #elif defined(__aarch64__) && defined(__linux__)
-@@ -333,7 +337,7 @@
- runtime_printf("sp %X\n", m->sc_regs[30]);
- runtime_printf("pc %X\n", m->sc_pc);
- }
--#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__)
-+#elif defined(__PPC__) && defined(__LITTLE_ENDIAN__) && defined(__linux__) && defined(__GLIBC__)
- {
- mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext;
- int i;
---- libgo/runtime/runtime.h
-+++ libgo/runtime/runtime.h
-@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*);
- void __go_makecontext(__go_context_t*, void (*)(), void*, size_t);
- #else
- #define __go_context_t ucontext_t
--#define __go_getcontext(c) getcontext(c)
--#define __go_setcontext(c) setcontext(c)
-+int libucontext_getcontext(__go_context_t *);
-+void libucontext_makecontext(__go_context_t *, void (*)(), int, ...);
-+int libucontext_setcontext(const __go_context_t *);
-+#define __go_getcontext(c) libucontext_getcontext(c)
-+#define __go_setcontext(c) libucontext_setcontext(c)
- #define __go_makecontext(c, fn, sp, size) \
-- ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, makecontext(c, fn, 0))
-+ ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, libucontext_makecontext(c, fn, 0))
- #endif
-
- // Symbols defined by the linker.
---- libgo/sysinfo.c
-+++ libgo/sysinfo.c
-@@ -73,9 +73,6 @@
- #include <sys/times.h>
- #include <sys/wait.h>
- #include <sys/un.h>
--#if defined(HAVE_SYS_USER_H)
--#include <sys/user.h>
--#endif
- #if defined(HAVE_SYS_UTSNAME_H)
- #include <sys/utsname.h>
- #endif
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
index cab291e893c..33ccc9789f9 120000
--- a/srcpkgs/libgccjit/files/libgnarl-musl.patch
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -1 +1 @@
-../gcc/files/libgnarl-musl.patch
\ No newline at end of file
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
index bf43b096e8b..37a7489360f 120000
--- a/srcpkgs/libgccjit/files/libssp-musl.patch
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -1 +1 @@
-../gcc/files/libssp-musl.patch
\ No newline at end of file
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (35 preceding siblings ...)
2021-02-16 17:25 ` lane-brain
@ 2021-02-16 17:39 ` lane-brain
2021-02-16 17:54 ` [PR REVIEW] " lane-brain
` (126 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-780002696
Comment:
@ericonr I have some good news! I've been able to rewrite the template to resolve a lot of the issues. I resolved nearly all of the errors from xlint, the only one is the license issue but afaik I am supposed to include the runtime exception license. I've included a version of the patch you specified, symlinked the directories, and symlinked the individual patches in files/ because I needed to include the musl patch. Additionally I've been able to get successful cross builds for x86_64-musl and armv7l, and I am crossing my fingers for other archs. Runtime tests on emacs-nativecomp confirm that we get working elc compilation.
I apologize for the bad commit @50c7abf, I made a mistake with the relative symlinks.
A crucial change for working cross builds consisted in removing the -devel packages and going to the original distfiles defs that unpacked the source packages directly to the build dir. For whatever reason, the {gmp,mpf,*}-devel packages failed citing an unresolvable shlib at libc.so on cross builds. I worry that this may increase the build times, and am generally curious why this error would occur.
Without these devel packages, the build failed citing an error with these subpackages needing to be compiled with -fPIC. Adding this to the compiler flags made for a working build.
I needed to retain the _triplets var defined in the original gcc package, because XBPS_TARGET_TRIPLET is empty at the do_install phase and it needs to be defined at that stage to set the correct header install paths.
One last thing, the soname needs to be added to shlibs. I was unsure whether it was appropriate to include this modification in the commit or whether this change was to be made by the void team, so let me know what is best. Build tests are in progress, let's see how it pans out.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (36 preceding siblings ...)
2021-02-16 17:39 ` lane-brain
@ 2021-02-16 17:54 ` lane-brain
2021-02-16 17:54 ` lane-brain
` (125 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577022175
Comment:
see comment after my new commit vvv
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (37 preceding siblings ...)
2021-02-16 17:54 ` [PR REVIEW] " lane-brain
@ 2021-02-16 17:54 ` lane-brain
2021-02-16 17:55 ` lane-brain
` (124 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:54 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 170 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577022464
Comment:
deleted this section
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (38 preceding siblings ...)
2021-02-16 17:54 ` lane-brain
@ 2021-02-16 17:55 ` lane-brain
2021-02-16 17:57 ` lane-brain
` (123 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577023192
Comment:
gotcha, thanks @fosslinux. if you want to take a look at my comments below, I had to reduce this list just to include zlib-devel and rely on the original distfiles definition from gcc.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (39 preceding siblings ...)
2021-02-16 17:55 ` lane-brain
@ 2021-02-16 17:57 ` lane-brain
2021-02-16 17:58 ` lane-brain
` (122 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577024722
Comment:
ssp is enabled in this build so at least that ostensibly should be applied. I can move this section if necessary to post_patch. These patches are applied in pre_configure in the gcc template, so that was what I was working off of.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (40 preceding siblings ...)
2021-02-16 17:57 ` lane-brain
@ 2021-02-16 17:58 ` lane-brain
2021-02-16 17:59 ` lane-brain
` (121 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577025380
Comment:
fixed
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (41 preceding siblings ...)
2021-02-16 17:58 ` lane-brain
@ 2021-02-16 17:59 ` lane-brain
2021-02-16 17:59 ` lane-brain
` (120 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577025562
Comment:
fixed
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (42 preceding siblings ...)
2021-02-16 17:59 ` lane-brain
@ 2021-02-16 17:59 ` lane-brain
2021-02-16 18:01 ` lane-brain
` (119 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 17:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577025967
Comment:
all preceding spaces replaced with tabs
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (43 preceding siblings ...)
2021-02-16 17:59 ` lane-brain
@ 2021-02-16 18:01 ` lane-brain
2021-02-16 18:04 ` FollieHiyuki
` (118 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 18:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 257 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577026860
Comment:
the latest commit only commented out this section -_-'. I can remove these lines in a final polished commit
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (44 preceding siblings ...)
2021-02-16 18:01 ` lane-brain
@ 2021-02-16 18:04 ` FollieHiyuki
2021-02-16 18:07 ` [PR REVIEW] " ericonr
` (117 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: FollieHiyuki @ 2021-02-16 18:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
New comment by FollieHiyuki on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-780018223
Comment:
Can you amend all 3 commits into 1?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (45 preceding siblings ...)
2021-02-16 18:04 ` FollieHiyuki
@ 2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
` (116 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577029553
Comment:
That's not a good description
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (47 preceding siblings ...)
2021-02-16 18:07 ` ericonr
@ 2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
` (114 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577030184
Comment:
vsed
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (46 preceding siblings ...)
2021-02-16 18:07 ` [PR REVIEW] " ericonr
@ 2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
` (115 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577030308
Comment:
Again, this should be `post_patch`
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (48 preceding siblings ...)
2021-02-16 18:07 ` ericonr
@ 2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
` (113 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577030087
Comment:
Hm does GCC do `cp` here? It makes more sense to do `mv` directly...
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (49 preceding siblings ...)
2021-02-16 18:07 ` ericonr
@ 2021-02-16 18:07 ` ericonr
2021-02-16 18:10 ` ericonr
` (112 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 220 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577029271
Comment:
`_triplet="$XBPS_TARGET_TRIPLET"`
then use `_target_triplet` in `do_*`
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (50 preceding siblings ...)
2021-02-16 18:07 ` ericonr
@ 2021-02-16 18:10 ` ericonr
2021-02-16 18:12 ` [PR REVIEW] " lane-brain
` (111 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-780021756
Comment:
> One last thing, the soname needs to be added to shlibs. I was unsure whether it was appropriate to include this modification in the commit or whether this change was to be made by the void team, so let me know what is best. Build tests are in progress, let's see how it pans out.
We can skip on adding it to shlibs until something links to it, IMO.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (51 preceding siblings ...)
2021-02-16 18:10 ` ericonr
@ 2021-02-16 18:12 ` lane-brain
2021-02-16 18:13 ` lane-brain
` (110 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 18:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577034209
Comment:
is "Just-In-Time Compilation library for gcc" good?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (52 preceding siblings ...)
2021-02-16 18:12 ` [PR REVIEW] " lane-brain
@ 2021-02-16 18:13 ` lane-brain
2021-02-16 18:13 ` ericonr
` (109 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 18:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577034497
Comment:
verbatim from the gcc template. can change to mv
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (53 preceding siblings ...)
2021-02-16 18:13 ` lane-brain
@ 2021-02-16 18:13 ` ericonr
2021-02-16 18:13 ` ericonr
` (108 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 150 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577034666
Comment:
Yes
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (54 preceding siblings ...)
2021-02-16 18:13 ` ericonr
@ 2021-02-16 18:13 ` ericonr
2021-02-16 18:14 ` lane-brain
` (107 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577034769
Comment:
Though GCC should be in caps.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (55 preceding siblings ...)
2021-02-16 18:13 ` ericonr
@ 2021-02-16 18:14 ` lane-brain
2021-02-16 18:15 ` lane-brain
` (106 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 18:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577035043
Comment:
changing
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (56 preceding siblings ...)
2021-02-16 18:14 ` lane-brain
@ 2021-02-16 18:15 ` lane-brain
2021-02-16 18:16 ` ericonr
` (105 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 18:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577035618
Comment:
to confirm, does this also include the [v]sed lines?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (57 preceding siblings ...)
2021-02-16 18:15 ` lane-brain
@ 2021-02-16 18:16 ` ericonr
2021-02-16 18:17 ` lane-brain
` (104 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 151 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577036510
Comment:
Yes.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (58 preceding siblings ...)
2021-02-16 18:16 ` ericonr
@ 2021-02-16 18:17 ` lane-brain
2021-02-16 18:34 ` ericonr
` (103 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 18:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 215 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577036936
Comment:
to be clear on the last line, change _triplet to _target_triplet?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (59 preceding siblings ...)
2021-02-16 18:17 ` lane-brain
@ 2021-02-16 18:34 ` ericonr
2021-02-16 20:05 ` lane-brain
` (102 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-16 18:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577048334
Comment:
Yes, but only really for clarity.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (60 preceding siblings ...)
2021-02-16 18:34 ` ericonr
@ 2021-02-16 20:05 ` lane-brain
2021-02-16 20:06 ` lane-brain
` (101 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 20:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 165 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577102747
Comment:
got it. s/r-ing
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (61 preceding siblings ...)
2021-02-16 20:05 ` lane-brain
@ 2021-02-16 20:06 ` lane-brain
2021-02-16 20:24 ` lane-brain
` (100 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 20:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 157 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577102861
Comment:
changed
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (62 preceding siblings ...)
2021-02-16 20:06 ` lane-brain
@ 2021-02-16 20:24 ` lane-brain
2021-02-17 0:43 ` [PR PATCH] [Updated] " lane-brain
` (99 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-16 20:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r577113824
Comment:
done
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (63 preceding siblings ...)
2021-02-16 20:24 ` lane-brain
@ 2021-02-17 0:43 ` lane-brain
2021-02-17 18:07 ` lane-brain
` (98 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-17 0:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 11639 bytes --]
From 6a6f6f83171aff58a9fbaa3cc7c78490f7c9b6fb Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Mon, 15 Feb 2021 20:32:51 -0500
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
New package: New package: libgccjit-10.2.1_pre1
New package: libgccjit-10.2.1_pre1
libgccjit: final pr commit
libgccjit: final pr commit
libgccjit: final pr commit
libgccjit: final pr commit
---
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 ++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 225 +++++++++++++++++++
5 files changed, 291 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 00000000000..d2ed16928c8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 00000000000..33ccc9789f9
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 00000000000..37a7489360f
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 00000000000..c42218ef09d
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 00000000000..8b0bc7cd242
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,225 @@
+# Template file for 'libgccjit'
+_majorver=10
+_minorver=${_majorver}.2
+_patchver=${_minorver}.1
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=${_patchver}pre1
+revision=1
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ http://isl.gforge.inria.fr/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+# Needed for cross builds and to define a triplet at do_install
+_target_triplet="$XBPS_TARGET_TRIPLET"
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+post_patch() {
+ # Apply musl patches
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/libssp-musl.patch
+ patch -p1 -i ${FILESDIR}/libgccjit-musl.patch
+ ;;
+ esac
+
+ # _FORTIFY_SOURCE needs an optimization level.
+ vsed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ vsed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+}
+
+do_configure() {
+ local _langs _args _hash
+
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+ export LDFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --with-system-zlib"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --enable-linker-build-id"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-lto"
+ _args+=" --enable-shared"
+ _args+=" --enable-host-shared"
+ _args+=" --enable-checking=release"
+ _args+=" --enable-plugins"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-default-pie"
+ _args+=" --disable-multilib"
+ _args+=" --disable-bootstrap"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ cd build
+ make ${makejobs}
+}
+
+post_build() {
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ # Use cross triplet for header path, for native builds use _target_triplet defined in template header
+ if [ "$CROSS_BUILD" ]; then
+ _includehostdir="usr/lib/gcc/${XBPS_CROSS_TRIPLET}/${_minorver}/include"
+ else
+ _includehostdir="usr/lib/gcc/${_target_triplet}/${_minorver}/include"
+ fi
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
+
+ vinstall "${wrksrc}/install/usr/lib${XBPS_TARGET_WORDSIZE}/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0 "${DESTDIR}"/usr/lib/libgccjit.so
+
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (64 preceding siblings ...)
2021-02-17 0:43 ` [PR PATCH] [Updated] " lane-brain
@ 2021-02-17 18:07 ` lane-brain
2021-02-18 4:03 ` lane-brain
` (97 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-17 18:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 531 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-780744835
Comment:
> Can you amend all 3 commits into 1?
Done as of yesterday. I've integrated all review suggestions into the template, ready for the final review. Build tests pass with the exception for the license linting error. That is due to me including the RUNTIME.EXCEPTION license, which I assume to apply to packages derived from gcc.
Thank you all for the feedback to help me tidy this up!
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (65 preceding siblings ...)
2021-02-17 18:07 ` lane-brain
@ 2021-02-18 4:03 ` lane-brain
2021-02-18 4:04 ` lane-brain
` (96 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-18 4:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-780744835
Comment:
> Can you amend all 3 commits into 1?
Done as of yesterday. I've integrated all review suggestions into the template, ready for the final review. Build tests pass with the exception for the license linting error. That is due to me including the RUNTIME.EXCEPTION license, which I assume to apply to packages derived from gcc.
Thank you all for the feedback to help me tidy this up (especially @ericonr)!
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (66 preceding siblings ...)
2021-02-18 4:03 ` lane-brain
@ 2021-02-18 4:04 ` lane-brain
2021-02-18 18:48 ` [PR PATCH] [Updated] " lane-brain
` (95 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-18 4:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 561 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-780744835
Comment:
> Can you amend all 3 commits into 1?
Done as of yesterday. I've integrated all review suggestions into the template, ready for the final review. Build tests pass with the exception for the license linting error. That is due to me including the RUNTIME.EXCEPTION license, which I assume to apply to packages derived from gcc.
Thank you all for the feedback to help me tidy this up (@ericonr i'm looking at you)!
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (67 preceding siblings ...)
2021-02-18 4:04 ` lane-brain
@ 2021-02-18 18:48 ` lane-brain
2021-02-18 18:56 ` lane-brain
` (94 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-18 18:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 12725 bytes --]
From bf3fd4c27c9fbc819bc76b303d378b8732b0cb7b Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Tue, 16 Feb 2021 19:45:34 -0500
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
libgccjit: fix regression
---
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 +++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 250 +++++++++++++++++++
5 files changed, 316 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 00000000000..d2ed16928c8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 00000000000..33ccc9789f9
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 00000000000..37a7489360f
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 00000000000..c42218ef09d
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 00000000000..458786bcd52
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,250 @@
+# Template file for 'libgccjit'
+_majorver=10
+_minorver=${_majorver}.2
+_patchver=${_minorver}.1
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=${_patchver}pre1
+revision=1
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ http://isl.gforge.inria.fr/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+# Needed for cross builds and to define a triplet at do_install
+case "$XBPS_TARGET_MACHINE" in
+ i686) _target_triplet="i686-pc-linux-gnu";;
+ i686-musl) _target_triplet="i686-linux-musl";;
+ x86_64) _target_triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _target_triplet="x86_64-linux-musl";;
+ armv5tel) _target_triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _target_triplet="arm-linux-musleabi";;
+ armv6l) _target_triplet="arm-linux-gnueabihf";;
+ armv7l) _target_triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _target_triplet="arm-linux-musleabihf";;
+ armv7l-musl) _target_triplet="armv7l-linux-musleabihf";;
+ aarch64) _target_triplet="aarch64-linux-gnu";;
+ aarch64-musl) _target_triplet="aarch64-linux-musl";;
+ ppc) _target_triplet="powerpc-linux-gnu";;
+ ppc-musl) _target_triplet="powerpc-linux-musl";;
+ ppcle) _target_triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _target_triplet="powerpcle-linux-musl";;
+ ppc64le) _target_triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _target_triplet="powerpc64le-linux-musl";;
+ ppc64) _target_triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _target_triplet="powerpc64-linux-musl";;
+ mips-musl) _target_triplet="mips-linux-musl";;
+ mipshf-musl) _target_triplet="mips-linux-muslhf";;
+ mipsel-musl) _target_triplet="mipsel-linux-musl";;
+ mipselhf-musl) _target_triplet="mipsel-linux-muslhf";;
+esac
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+post_patch() {
+ # Apply musl patches
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/libssp-musl.patch
+ patch -p1 -i ${FILESDIR}/libgccjit-musl.patch
+ ;;
+ esac
+
+ # _FORTIFY_SOURCE needs an optimization level.
+ vsed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ vsed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+}
+
+do_configure() {
+ local _langs _args _hash
+
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+ export LDFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --with-system-zlib"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --enable-linker-build-id"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-lto"
+ _args+=" --enable-shared"
+ _args+=" --enable-host-shared"
+ _args+=" --enable-checking=release"
+ _args+=" --enable-plugins"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-default-pie"
+ _args+=" --disable-multilib"
+ _args+=" --disable-bootstrap"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ cd build
+ make ${makejobs}
+}
+
+post_build() {
+ # Lets create a staging folder to install into
+ mkdir -p "${wrksrc}/install"
+ cd "${wrksrc}/build"
+ make DESTDIR="${wrksrc}/install" -C gcc install
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ # Use cross triplet for header path, for native builds use _target_triplet defined in template header
+ if [ "$CROSS_BUILD" ]; then
+ _includehostdir="usr/lib/gcc/${XBPS_CROSS_TRIPLET}/${_minorver}/include"
+ else
+ _includehostdir="usr/lib/gcc/${_target_triplet}/${_minorver}/include"
+ fi
+
+ # Get the shlibs over
+ cd "${wrksrc}/install"
+
+ vinstall "${wrksrc}/install/usr/lib${XBPS_TARGET_WORDSIZE}/libgccjit.so.0.0.1" 0755 usr/lib
+ ln -sf libgccjit.so.0.0.1 "${DESTDIR}"/usr/lib/libgccjit.so.0
+ ln -sf libgccjit.so.0 "${DESTDIR}"/usr/lib/libgccjit.so
+
+ # Get the header files in place
+ vinstall usr/include/libgccjit.h 0644 "${_includehostdir}"
+ vinstall usr/include/libgccjit++.h 0644 "${_includehostdir}"
+
+ # The most important part, the info file
+ vinstall usr/share/info/libgccjit.info 0755 "usr/share/info"
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (68 preceding siblings ...)
2021-02-18 18:48 ` [PR PATCH] [Updated] " lane-brain
@ 2021-02-18 18:56 ` lane-brain
2021-02-18 18:57 ` lane-brain
` (93 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-18 18:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 586 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-781563989
Comment:
@ericonr changing the _target_triplet to XBPS_TARGET_TRIPLET produces a regression, it appears that it's not defined even in the template header, leading to bad install paths for the libgccjit headers. if the case section defining the triplets is too unsightly, I can alternatively refactor the template to use the original make install script and cut away the extraneous files. but as is, I've amended my commit to the working build template
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (69 preceding siblings ...)
2021-02-18 18:56 ` lane-brain
@ 2021-02-18 18:57 ` lane-brain
2021-02-18 19:26 ` ericonr
` (92 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-18 18:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-781563989
Comment:
@ericonr changing the _target_triplet to XBPS_TARGET_TRIPLET produces a regression, it appears that it's not defined even in the template header, leading to bad install paths for the libgccjit headers. if the case section defining the triplets is too unsightly, I can alternatively refactor the template to use the original make install script and cut away the extraneous files. for now, I've amended my commit to a working build template that fixes the regression
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (70 preceding siblings ...)
2021-02-18 18:57 ` lane-brain
@ 2021-02-18 19:26 ` ericonr
2021-02-18 19:26 ` ericonr
` (91 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-18 19:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-781580510
Comment:
Sorry for the confusion, it seems the correct variable is `XBPS_CROSS_TRIPLET`, not `_TARGET_`...
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (71 preceding siblings ...)
2021-02-18 19:26 ` ericonr
@ 2021-02-18 19:26 ` ericonr
2021-02-19 3:31 ` [PR PATCH] [Updated] " lane-brain
` (90 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-18 19:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 214 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-781580891
Comment:
And then you don't need to save it, just use it directly where necessary.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (72 preceding siblings ...)
2021-02-18 19:26 ` ericonr
@ 2021-02-19 3:31 ` lane-brain
2021-02-19 5:13 ` lane-brain
` (89 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-19 3:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 11908 bytes --]
From c03af404bd7fdc4f9b1d95a6b350b5553a8f34ba Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Tue, 16 Feb 2021 19:45:34 -0500
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
libgccjit: fix regression
libgccjit: final pr commit
---
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 ++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 226 +++++++++++++++++++
5 files changed, 292 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 00000000000..d2ed16928c8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 00000000000..33ccc9789f9
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 00000000000..37a7489360f
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 00000000000..c42218ef09d
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 00000000000..d8b1f80f352
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,226 @@
+# Template file for 'libgccjit'
+_majorver=10
+_minorver=${_majorver}.2
+_patchver=${_minorver}.1
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=${_patchver}pre1
+revision=1
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ http://isl.gforge.inria.fr/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+post_patch() {
+ # Apply musl patches
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl)
+ patch -p0 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p0 -i ${FILESDIR}/libssp-musl.patch
+ patch -p1 -i ${FILESDIR}/libgccjit-musl.patch
+ ;;
+ esac
+
+ # _FORTIFY_SOURCE needs an optimization level.
+ vsed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ vsed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+}
+
+do_configure() {
+ # Define triplet for gcc build target
+ case "$XBPS_TARGET_MACHINE" in
+ i686) _target_triplet="i686-pc-linux-gnu";;
+ i686-musl) _target_triplet="i686-linux-musl";;
+ x86_64) _target_triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _target_triplet="x86_64-linux-musl";;
+ armv5tel) _target_triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _target_triplet="arm-linux-musleabi";;
+ armv6l) _target_triplet="arm-linux-gnueabihf";;
+ armv7l) _target_triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _target_triplet="arm-linux-musleabihf";;
+ armv7l-musl) _target_triplet="armv7l-linux-musleabihf";;
+ aarch64) _target_triplet="aarch64-linux-gnu";;
+ aarch64-musl) _target_triplet="aarch64-linux-musl";;
+ ppc) _target_triplet="powerpc-linux-gnu";;
+ ppc-musl) _target_triplet="powerpc-linux-musl";;
+ ppcle) _target_triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _target_triplet="powerpcle-linux-musl";;
+ ppc64le) _target_triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _target_triplet="powerpc64le-linux-musl";;
+ ppc64) _target_triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _target_triplet="powerpc64-linux-musl";;
+ mips-musl) _target_triplet="mips-linux-musl";;
+ mipshf-musl) _target_triplet="mips-linux-muslhf";;
+ mipsel-musl) _target_triplet="mipsel-linux-musl";;
+ mipselhf-musl) _target_triplet="mipsel-linux-muslhf";;
+ esac
+
+ local _langs _args _hash
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'" \
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --with-system-zlib"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --enable-linker-build-id"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-lto"
+ _args+=" --enable-shared"
+ _args+=" --enable-host-shared"
+ _args+=" --enable-checking=release"
+ _args+=" --enable-plugins"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-default-pie"
+ _args+=" --disable-multilib"
+ _args+=" --disable-bootstrap"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ cd build
+ make ${makejobs}
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ cd "${wrksrc}/build"
+ make DESTDIR=${DESTDIR} -C gcc install
+
+ # Remove everything that isn't the soname and header files
+ find "${DESTDIR}/usr" -type f ! -name "libgccjit*" -delete
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (73 preceding siblings ...)
2021-02-19 3:31 ` [PR PATCH] [Updated] " lane-brain
@ 2021-02-19 5:13 ` lane-brain
2021-02-19 18:21 ` lane-brain
` (88 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-19 5:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-781826721
Comment:
will write some notes on this new template, but here is a emacs-nativecomp template for runtime testing
https://paste.sr.ht/~lane/6b0eb9c83e8cff58bb58f32a4c5482ab89f8532e
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (74 preceding siblings ...)
2021-02-19 5:13 ` lane-brain
@ 2021-02-19 18:21 ` lane-brain
2021-02-19 18:44 ` lane-brain
` (87 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-19 18:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-782252147
Comment:
@ericonr good to see that the checks were successful on all the cross builds. some last notes on what I changed:
1. It seems _CROSS_ is only defined for cross builds, so plugging this in everywhere broke the build. I retained the _target_triplet case block but moved it from the template header to do_configure because it's only needed at that build stage.
2. All the files needed for this package start with libgccjit, so I had the make scripts handle the install to DESTDIR and then it was easy to write a line for our crowd favorite `find` to delete all the files that we didn't need. xbps-src takes care of the empty directories. That section is nice and compact now.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (75 preceding siblings ...)
2021-02-19 18:21 ` lane-brain
@ 2021-02-19 18:44 ` lane-brain
2021-02-25 0:13 ` lane-brain
` (86 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-19 18:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-782252147
Comment:
@ericonr good to see that the checks were successful on all the cross builds. some last notes on what I changed:
1. It seems _CROSS_ is only defined for cross builds, so plugging this in everywhere broke native builds. I retained the _target_triplet case block but moved it from the template header to do_configure because it's only needed at that build stage.
2. All the files needed for this package start with libgccjit, so I had the make scripts handle the install to DESTDIR and then it was easy to write a line for our crowd favorite `find` to delete all the files that we didn't need. xbps-src takes care of the empty directories. That section is nice and compact now.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (76 preceding siblings ...)
2021-02-19 18:44 ` lane-brain
@ 2021-02-25 0:13 ` lane-brain
2021-02-25 14:52 ` ericonr
` (85 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-25 0:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-785479091
Comment:
@ericonr is there anything else that I ought to tidy up for this package? to remind, the linting error is only because of the RUNTIME.EXCEPTION license put in with vlicense (the same put in all gcc subpackages). Otherwise it is good to go.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (77 preceding siblings ...)
2021-02-25 0:13 ` lane-brain
@ 2021-02-25 14:52 ` ericonr
2021-02-25 20:24 ` lane-brain
` (84 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-02-25 14:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-785951849
Comment:
Yes. I have some stuff I'm fixing up in the GCC template and this one to try and avoid so much duplication. I will link this PR when I open one for that, will let you know.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (78 preceding siblings ...)
2021-02-25 14:52 ` ericonr
@ 2021-02-25 20:24 ` lane-brain
2021-02-27 0:13 ` xianwenchen
` (83 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-02-25 20:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-786178394
Comment:
> Yes. I have some stuff I'm fixing up in the GCC template and this one to try and avoid so much duplication. I will link this PR when I open one for that, will let you know.
sounds great 👍🏼 thanks again for your help with all this
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (79 preceding siblings ...)
2021-02-25 20:24 ` lane-brain
@ 2021-02-27 0:13 ` xianwenchen
2021-03-15 8:41 ` ramos
` (82 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-02-27 0:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-786960909
Comment:
I look forward to installing libgccjit once it's in the official repository!
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (80 preceding siblings ...)
2021-02-27 0:13 ` xianwenchen
@ 2021-03-15 8:41 ` ramos
2021-03-18 8:28 ` xianwenchen
` (81 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ramos @ 2021-03-15 8:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 369 bytes --]
New comment by ramos on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-799229720
Comment:
Hi,
I am also very interested in a package for libgccjit. Not sure if the package has been added (I cannot find it). Is some additional flag when installing gcc needed?. Maybe this is not merged yet in void-packages?
Thanks,
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (81 preceding siblings ...)
2021-03-15 8:41 ` ramos
@ 2021-03-18 8:28 ` xianwenchen
2021-03-18 23:22 ` lane-brain
` (80 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-03-18 8:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-801730864
Comment:
> Hi,
>
> I am also very interested in a package for libgccjit. Not sure if the package has been added (I cannot find it). Is some additional flag when installing gcc needed?. Maybe this is not merged yet in void-packages?
>
> Thanks,
I don't think it is merged. As you can see, the pull request is still open.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (82 preceding siblings ...)
2021-03-18 8:28 ` xianwenchen
@ 2021-03-18 23:22 ` lane-brain
2021-03-19 13:31 ` xianwenchen
` (79 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-03-18 23:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-802379939
Comment:
@xianwenchen @ramos it is being worked upon in a larger revision of the gcc package. the commit as it stands is quite usable however, it is a daily driver for me and my emacs-nativecomp package. I encourage you to test it out if you want
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (83 preceding siblings ...)
2021-03-18 23:22 ` lane-brain
@ 2021-03-19 13:31 ` xianwenchen
2021-03-21 0:37 ` lane-brain
` (78 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-03-19 13:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-802834986
Comment:
Thanks, @lane-brain. How can I test it out?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (84 preceding siblings ...)
2021-03-19 13:31 ` xianwenchen
@ 2021-03-21 0:37 ` lane-brain
2021-03-24 10:09 ` xianwenchen
` (77 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-03-21 0:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 455 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-803491464
Comment:
> Thanks, @lane-brain. How can I test it out?
If you know your way around git, pull the commit attached to this PR into your clone of the void-packages repo. Install the xtools package, then it's a matter of cd'ing into the root directory of the git repo and running: `xbps-src pkg libgccjit && xi libgccjit`
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (85 preceding siblings ...)
2021-03-21 0:37 ` lane-brain
@ 2021-03-24 10:09 ` xianwenchen
2021-03-30 22:39 ` floyza
` (76 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-03-24 10:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 998 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-805670865
Comment:
Thanks. Somehow my Void x86_64 does not have xbps-src. I could not find
an xbps-src package in the official repository.
On 2021-03-21 00:37, Lane wrote:
>> Thanks, @lane-brain [1]. How can I test it out?
>
> If you know your way around git, pull the commit attached to this PR
> into your clone of the void-packages repo. Install the xtools package,
> then it's a matter of cd'ing into the root directory of the git repo
> and running: xbps-src pkg libgccjit && xi libgccjit
>
> --
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub [2], or unsubscribe
> [3].
Links:
------
[1] https://github.com/lane-brain
[2]
https://github.com/void-linux/void-packages/pull/28785#issuecomment-803491464
[3]
https://github.com/notifications/unsubscribe-auth/ADISACBCPOTWNAMDUTW2UCTTEU5WPANCNFSM4XVS332Q
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (86 preceding siblings ...)
2021-03-24 10:09 ` xianwenchen
@ 2021-03-30 22:39 ` floyza
2021-04-10 9:07 ` xianwenchen
` (75 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: floyza @ 2021-03-30 22:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
New comment by floyza on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-810624962
Comment:
@xianwenchen It's under the xtools package
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (87 preceding siblings ...)
2021-03-30 22:39 ` floyza
@ 2021-04-10 9:07 ` xianwenchen
2021-04-10 14:20 ` ericonr
` (74 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-04-10 9:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-817104944
Comment:
Thank you. I doubled checked. xbps-src is a bash script that is in the directory of void-packages. It wasn't part of xtools.
I tried to run `./xbps-src pkg libgccjit`. I got the following errors:
=> ERROR: libgccjit is not a bootstrap package and cannot be built without it.
=> ERROR: Please install bootstrap packages and try again.
Does it mean that I have to install bootstrap packages before building libgccjit?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (88 preceding siblings ...)
2021-04-10 9:07 ` xianwenchen
@ 2021-04-10 14:20 ` ericonr
2021-04-10 21:33 ` xianwenchen
` (73 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-04-10 14:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-817144058
Comment:
@xianwenchen just take a look at the quick start section of the README.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (89 preceding siblings ...)
2021-04-10 14:20 ` ericonr
@ 2021-04-10 21:33 ` xianwenchen
2021-04-11 1:41 ` floyza
` (72 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-04-10 21:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-817205081
Comment:
Thanks.
I bootstrapped and successfully compiled libgccjit. I'm in the process
of building emacs with native-comp.
-------- Original Message --------
SUBJECT:
Re: [void-linux/void-packages] New package: libgccjit-10.2.1_pre1
(#28785)
DATE:
2021-03-30 22:39
FROM:
floyza ***@***.***>
TO:
void-linux/void-packages ***@***.***>
@xianwenchen [1] It's under the xtools package
--
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [2], or unsubscribe [3].
Links:
------
[1] https://github.com/xianwenchen
[2]
https://github.com/void-linux/void-packages/pull/28785#issuecomment-810624962
[3]
https://github.com/notifications/unsubscribe-auth/ADISACC5ZLSHYWKY6Y2WBKTTGJHJVANCNFSM4XVS332Q
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (90 preceding siblings ...)
2021-04-10 21:33 ` xianwenchen
@ 2021-04-11 1:41 ` floyza
2021-04-12 23:18 ` xianwenchen
` (71 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: floyza @ 2021-04-11 1:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
New comment by floyza on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-810624962
Comment:
~~@xianwenchen It's under the xtools package~~
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (91 preceding siblings ...)
2021-04-11 1:41 ` floyza
@ 2021-04-12 23:18 ` xianwenchen
2021-04-14 22:48 ` lane-brain
` (70 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: xianwenchen @ 2021-04-12 23:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
New comment by xianwenchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-818304378
Comment:
I used libgccjit to compile gccemacs (emacs with nativecomp) and have
been unig gccemacs. I haven't had a problem yet.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (92 preceding siblings ...)
2021-04-12 23:18 ` xianwenchen
@ 2021-04-14 22:48 ` lane-brain
2021-05-14 6:28 ` Sparkenstein
` (69 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-04-14 22:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-819898332
Comment:
@xianwenchen glad that this has been working for you!
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (93 preceding siblings ...)
2021-04-14 22:48 ` lane-brain
@ 2021-05-14 6:28 ` Sparkenstein
2021-07-29 10:16 ` brihadeesh
` (68 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: Sparkenstein @ 2021-05-14 6:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 227 bytes --]
New comment by Sparkenstein on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-841040584
Comment:
When'd this get shipped any rough estimate? is there any current workaround etc?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (94 preceding siblings ...)
2021-05-14 6:28 ` Sparkenstein
@ 2021-07-29 10:16 ` brihadeesh
2021-07-29 12:20 ` FollieHiyuki
` (67 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: brihadeesh @ 2021-07-29 10:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
New comment by brihadeesh on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-888993185
Comment:
Something seems to be off when I try to package libgccjit - I find that xbps-src builds an astounding number of packages, already available in the void repos, from source and then fails at `expat` after trying to fetch an older version. The output says that this is a dependancy of python3 which in turn is required for gcc. Not sure what I'm missing here?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (95 preceding siblings ...)
2021-07-29 10:16 ` brihadeesh
@ 2021-07-29 12:20 ` FollieHiyuki
2021-07-29 12:21 ` FollieHiyuki
` (66 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: FollieHiyuki @ 2021-07-29 12:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
New comment by FollieHiyuki on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-889070692
Comment:
@brihadeesh you should update the branch in which you build the package. A `git pull upstream master --rebase` will do.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (96 preceding siblings ...)
2021-07-29 12:20 ` FollieHiyuki
@ 2021-07-29 12:21 ` FollieHiyuki
2021-07-29 16:36 ` brihadeesh
` (65 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: FollieHiyuki @ 2021-07-29 12:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
New comment by FollieHiyuki on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-889070692
Comment:
@brihadeesh you should update the branch in which you build the package. A `git pull upstream master --rebase` will do (with `upstream` pointed to this repository of course).
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (97 preceding siblings ...)
2021-07-29 12:21 ` FollieHiyuki
@ 2021-07-29 16:36 ` brihadeesh
2021-08-27 17:34 ` ericonr
` (64 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: brihadeesh @ 2021-07-29 16:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 271 bytes --]
New comment by brihadeesh on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-889295644
Comment:
@FollieHiyuki dang thanks! Should've figured this was an issue with versioning when I saw older package versions being fetched.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (98 preceding siblings ...)
2021-07-29 16:36 ` brihadeesh
@ 2021-08-27 17:34 ` ericonr
2021-08-31 6:00 ` lane-brain
` (63 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: ericonr @ 2021-08-27 17:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-907362624
Comment:
I'm looking into updating gcc, so will try to push my fixes there so we can move ahead with this PR.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (99 preceding siblings ...)
2021-08-27 17:34 ` ericonr
@ 2021-08-31 6:00 ` lane-brain
2021-12-25 13:13 ` soanvig
` (62 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2021-08-31 6:00 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-908924866
Comment:
> I'm looking into updating gcc, so will try to push my fixes there so we can move ahead with this PR.
Sounds great! Thank you very much for your work here.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (100 preceding siblings ...)
2021-08-31 6:00 ` lane-brain
@ 2021-12-25 13:13 ` soanvig
2022-01-04 19:57 ` lane-brain
` (61 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: soanvig @ 2021-12-25 13:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 223 bytes --]
New comment by soanvig on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1001016372
Comment:
Hey! How is it going?
I'm loolking into it mostly because of Emacs.
@ericonr
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (101 preceding siblings ...)
2021-12-25 13:13 ` soanvig
@ 2022-01-04 19:57 ` lane-brain
2022-01-17 21:31 ` michaelmrose
` (60 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-01-04 19:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1005127104
Comment:
@soanvig I have maintained the libgccjit package I submitted here in my own fork of void-packages (lane-pkgs branch). I have not pushed to this PR because of @ericonr 's plan to perhaps formulate this into a sub package of the main gcc package. In the meantime, I am using mine successfully, which you can also use with a template for flatwhatson's emacs-pgtk-nativecomp fork included in my repo that tracks the latest commit of their branch. (titled emacs-nativecomp in my repo)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (102 preceding siblings ...)
2022-01-04 19:57 ` lane-brain
@ 2022-01-17 21:31 ` michaelmrose
2022-01-17 22:16 ` lane-brain
` (59 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: michaelmrose @ 2022-01-17 21:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
New comment by michaelmrose on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1014900017
Comment:
@lane-brain trying to build libgccjit with xbps-fails because the location given to get isl from appears to be pulling in both an older version and from a location that doesn't work
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (103 preceding siblings ...)
2022-01-17 21:31 ` michaelmrose
@ 2022-01-17 22:16 ` lane-brain
2022-01-18 7:30 ` michaelmrose
` (58 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-01-17 22:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1014921625
Comment:
@michaelmrose just checking that you are building from my lane-pkgs repo template located [here](https://github.com/lane-brain/void-packages/tree/lane-pkgs/srcpkgs/libgccjit), yes? The version of ISL used in that package is the same as the official gcc package, but I do see that they added a global variable for SOURCEFORGE_SITE instead of the plain url as it used to be, which I have now changed to use in my template as well. Do test and see if it works on your end if you feel so inclined.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (104 preceding siblings ...)
2022-01-17 22:16 ` lane-brain
@ 2022-01-18 7:30 ` michaelmrose
2022-01-18 18:38 ` lane-brain
` (57 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: michaelmrose @ 2022-01-18 7:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
New comment by michaelmrose on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1015139243
Comment:
@lane-brain curl https://downloads.sourceforge.net/sourceforge/isl-0.21.tar.gz = 404
Looks like it ought to be https://sourceforge.net/projects/libisl/files/isl-0.21.tar.bz2
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (105 preceding siblings ...)
2022-01-18 7:30 ` michaelmrose
@ 2022-01-18 18:38 ` lane-brain
2022-03-03 7:47 ` brihadeesh
` (56 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-01-18 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1015702335
Comment:
@michaelmrose it appears that I I should have just yanked the new line directly from the gcc template when I changed it to have the ${SOURCEFORGE_SITE} variable, I was missing a directory in the url. take a look at the new template, I built it and also successfully built it from a new xbps-src environment I setup on a different machine. you should have no problems
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (106 preceding siblings ...)
2022-01-18 18:38 ` lane-brain
@ 2022-03-03 7:47 ` brihadeesh
2022-03-03 8:11 ` brihadeesh
` (55 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: brihadeesh @ 2022-03-03 7:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
New comment by brihadeesh on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1057765916
Comment:
Hey @lane-brain, I wasn't able to locate the emacs-nativecomp template you mentioned
> ... template for flatwhatson's emacs-pgtk-nativecomp fork included in my repo that tracks the latest commit of their branch. (titled emacs-nativecomp in my repo)
Although on looking further in the comments on this thread I found https://paste.sr.ht/~lane/6b0eb9c83e8cff58bb58f32a4c5482ab89f8532e . Was this what you were referring to?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (107 preceding siblings ...)
2022-03-03 7:47 ` brihadeesh
@ 2022-03-03 8:11 ` brihadeesh
2022-03-11 19:52 ` KJ002
` (54 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: brihadeesh @ 2022-03-03 8:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
New comment by brihadeesh on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1057765916
Comment:
Hey @lane-brain, I wasn't able to locate the emacs-nativecomp template you mentioned
> ... template for flatwhatson's emacs-pgtk-nativecomp fork included in my repo that tracks the latest commit of their branch. (titled emacs-nativecomp in my repo)
Although on looking further in the comments on this thread I found https://paste.sr.ht/~lane/6b0eb9c83e8cff58bb58f32a4c5482ab89f8532e . Was this what you were referring to?
Update: I've found it! I think it's called emacs28 (not emacs-nativecomp)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (108 preceding siblings ...)
2022-03-03 8:11 ` brihadeesh
@ 2022-03-11 19:52 ` KJ002
2022-03-12 16:47 ` lane-brain
` (53 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: KJ002 @ 2022-03-11 19:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
New comment by KJ002 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1065440832
Comment:
Just checking how the progress is coming a long, I really need this library soon.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (109 preceding siblings ...)
2022-03-11 19:52 ` KJ002
@ 2022-03-12 16:47 ` lane-brain
2022-03-12 19:04 ` KJ002
` (52 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-12 16:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 481 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1065916659
Comment:
@brihadeesh I was doing some housekeeping and restructured how I made my packages. I originally wanted to see if I could just build emacs28, the problem for me is that I need pure gtk because I use wayland, and that branch didn't make it into 28. So the one I'm currently maintaining for my personal use is emacs29, which tracks master.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (110 preceding siblings ...)
2022-03-12 16:47 ` lane-brain
@ 2022-03-12 19:04 ` KJ002
2022-03-12 19:05 ` KJ002
` (51 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: KJ002 @ 2022-03-12 19:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
New comment by KJ002 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1065944345
Comment:
Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented my from opening a terminal or logging in.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (111 preceding siblings ...)
2022-03-12 19:04 ` KJ002
@ 2022-03-12 19:05 ` KJ002
2022-03-13 6:51 ` brihadeesh
` (50 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: KJ002 @ 2022-03-12 19:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
New comment by KJ002 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1065944345
Comment:
Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented me from opening a terminal or logging in.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (112 preceding siblings ...)
2022-03-12 19:05 ` KJ002
@ 2022-03-13 6:51 ` brihadeesh
2022-03-14 19:49 ` [PR PATCH] [Updated] " lane-brain
` (49 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: brihadeesh @ 2022-03-13 6:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 511 bytes --]
New comment by brihadeesh on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1066038849
Comment:
@lane-brain right, this makes a lot of sense for me too! I was using 29 on FreeBSD just before I switched back and I must say I kinda got used to the pixel scrolling feature too.
Although, I'm curious, Emacs 28 does have the pgtk feature but it's just not enabled by default. There's an option that you can enable in the build options. I might be mistaken though.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (113 preceding siblings ...)
2022-03-13 6:51 ` brihadeesh
@ 2022-03-14 19:49 ` lane-brain
2022-03-14 19:56 ` lane-brain
` (48 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-14 19:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 19483 bytes --]
From 61212d2c6e4b8a0d026bca9bb4596a83302c4ed6 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Mon, 14 Mar 2022 15:48:55 -0400
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/c89.1 | 80 +++++++
srcpkgs/libgccjit/files/c89.sh | 2 +
srcpkgs/libgccjit/files/c99.1 | 81 +++++++
srcpkgs/libgccjit/files/c99.sh | 2 +
srcpkgs/libgccjit/files/gccgo-musl.patch | 1 +
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 +++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 228 +++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
11 files changed, 462 insertions(+)
create mode 100644 srcpkgs/libgccjit/files/c89.1
create mode 100644 srcpkgs/libgccjit/files/c89.sh
create mode 100644 srcpkgs/libgccjit/files/c99.1
create mode 100644 srcpkgs/libgccjit/files/c99.sh
create mode 120000 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/srcpkgs/libgccjit/files/c89.1 b/srcpkgs/libgccjit/files/c89.1
new file mode 100644
index 000000000000..3ed984da33f1
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.1
@@ -0,0 +1,80 @@
+.\" $NetBSD: c89.1,v 1.2 2008/04/30 13:10:50 martin Exp $
+.\"
+.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 5, 1999
+.Dt C89 1
+.Os
+.Sh NAME
+.Nm c89
+.Nd ANSI (1989) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -ansiC
+specification.
+.Pp
+This includes proper handling of trigraphs,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar inline ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+appeared in
+.Nx 1.4 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c89.sh b/srcpkgs/libgccjit/files/c89.sh
new file mode 100644
index 000000000000..52d6d45431b2
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c89.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c89 "$@"
diff --git a/srcpkgs/libgccjit/files/c99.1 b/srcpkgs/libgccjit/files/c99.1
new file mode 100644
index 000000000000..d368f1a874b6
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.1
@@ -0,0 +1,81 @@
+.\" $NetBSD: c99.1,v 1.3 2010/05/14 01:53:28 joerg Exp $
+.\"
+.\" Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd September 24, 2008
+.Dt C99 1
+.Os
+.Sh NAME
+.Nm c99
+.Nd ANSI (1999) C compiler
+.Sh SYNOPSIS
+.Nm
+.Op Fl pedantic
+.Op Fl pedantic-errors
+.Op Fl D_ANSI_SOURCE
+.Op options ...
+.Sh DESCRIPTION
+Calls the C compiler (cc) with the given
+.Ar options ,
+using a C language environment compatible with the
+.St -isoC-99
+specification.
+.Pp
+This includes
+inline functions, variable-length arrays, support for one-line
+comments beginning with //,
+disabling non-ANSI compiler features (such as
+.Ar asm ,
+.Ar typeof ,
+and the $ character in identifiers),
+and definition of the preprocessor symbol
+.Ev __STRICT_ANSI__ .
+.Pp
+The following options are available:
+.Bl -tag -width -pedantic-errorsxx
+.It Fl pedantic
+Issue extra warnings defined by ANSI for use of non-ANSI features.
+.It Fl pedantic-errors
+Issue errors instead of warnings that normally would be presented by
+.Fl pedantic .
+.It Fl D_ANSI_SOURCE
+Tell the system header file set to use an ANSI-conformant "clean" namespace.
+.El
+.Sh SEE ALSO
+.Xr cc 1
+.Sh STANDARDS
+.Nm
+conforms to
+.St -p1003.2-92 .
+.Sh HISTORY
+.Nm
+first appeared in
+.Nx 5.0 .
+.Sh BUGS
+Since
+.Nm
+is a shell wrapper script to
+.Ar cc ,
+compile errors are prefixed by "cc:".
diff --git a/srcpkgs/libgccjit/files/c99.sh b/srcpkgs/libgccjit/files/c99.sh
new file mode 100644
index 000000000000..15cab47c7487
--- /dev/null
+++ b/srcpkgs/libgccjit/files/c99.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/cc -std=c99 "$@"
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 120000
index 000000000000..a093af857738
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 000000000000..d2ed16928c82
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 000000000000..33ccc9789f93
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 000000000000..37a7489360f8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 000000000000..c42218ef09df
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 000000000000..25c1e0bfc3ae
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,228 @@
+# Template file for 'libgccjit'
+# Revbump libtool when updating gcc, since it hardcodes some internal compiler paths
+# which use the version number.
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=10.2.1pre1
+revision=1
+_patchver="${version%pre*}"
+_minorver="${_patchver%.*}"
+_majorver="${_minorver%.*}"
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+pre_configure() {
+ # _FORTIFY_SOURCE needs an optimization level.
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ patch -p1 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p1 -i ${FILESDIR}/libssp-musl.patch
+ patch -p1 -i ${FILESDIR}/gccgo-musl.patch
+ fi
+}
+
+do_configure() {
+ # Define triplet for gcc build target
+ case "$XBPS_TARGET_MACHINE" in
+ i686) _target_triplet="i686-pc-linux-gnu";;
+ i686-musl) _target_triplet="i686-linux-musl";;
+ x86_64) _target_triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _target_triplet="x86_64-linux-musl";;
+ armv5tel) _target_triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _target_triplet="arm-linux-musleabi";;
+ armv6l) _target_triplet="arm-linux-gnueabihf";;
+ armv7l) _target_triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _target_triplet="arm-linux-musleabihf";;
+ armv7l-musl) _target_triplet="armv7l-linux-musleabihf";;
+ aarch64) _target_triplet="aarch64-linux-gnu";;
+ aarch64-musl) _target_triplet="aarch64-linux-musl";;
+ ppc) _target_triplet="powerpc-linux-gnu";;
+ ppc-musl) _target_triplet="powerpc-linux-musl";;
+ ppcle) _target_triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _target_triplet="powerpcle-linux-musl";;
+ ppc64le) _target_triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _target_triplet="powerpc64le-linux-musl";;
+ ppc64) _target_triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _target_triplet="powerpc64-linux-musl";;
+ mips-musl) _target_triplet="mips-linux-musl";;
+ mipshf-musl) _target_triplet="mips-linux-muslhf";;
+ mipsel-musl) _target_triplet="mipsel-linux-musl";;
+ mipselhf-musl) _target_triplet="mipsel-linux-muslhf";;
+ esac
+
+ local _langs _args _hash
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-multilib"
+ _args+=" --with-system-zlib"
+ _args+=" --enable-shared"
+ _args+=" --enable-lto"
+ _args+=" --enable-plugins"
+ _args+=" --enable-linker-build-id"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --enable-default-pie"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-checking=release"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --with-isl"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ # libgccjit compilcation specific
+ _args+=" --enable-host-shared"
+ _args+=" --disable-bootstrap"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --with-bugurl='https://github.com/jashandeep-sohi/libgccjit-pkg/issues'"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ cd build
+ make ${makejobs}
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ cd "${wrksrc}/build"
+ make DESTDIR=${DESTDIR} -C gcc install
+
+ # Remove everything that isn't the soname and header files
+ find "${DESTDIR}/usr" -type f ! -name "libgccjit*" -delete
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 000000000000..fb8dd58f2044
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (114 preceding siblings ...)
2022-03-14 19:49 ` [PR PATCH] [Updated] " lane-brain
@ 2022-03-14 19:56 ` lane-brain
2022-03-14 19:57 ` lane-brain
` (47 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-14 19:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 831 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067226965
Comment:
> Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented me from opening a terminal or logging in.
well this is very serious. I am currently using this template on two machines and have not had this issue, I've force-pushed the one I'm using to this PR. This is the output of xls, which does not contain any libgcc_s.so
`$ xls libgccjit
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/lib/libgccjit.so.0.0.1
/usr/share/info/libgccjit.info
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1`
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (115 preceding siblings ...)
2022-03-14 19:56 ` lane-brain
@ 2022-03-14 19:57 ` lane-brain
2022-03-14 19:58 ` lane-brain
` (46 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-14 19:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 839 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067226965
Comment:
> Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented me from opening a terminal or logging in.
well this is very serious. I am currently using this template on two machines and have not had this issue, I've force-pushed the one I'm using to this PR. This is the output of xls, which does not contain any libgcc_s.so
```
$ xls libgccjit
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/lib/libgccjit.so.0.0.1
/usr/share/info/libgccjit.info
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (116 preceding siblings ...)
2022-03-14 19:57 ` lane-brain
@ 2022-03-14 19:58 ` lane-brain
2022-03-14 20:02 ` lane-brain
` (45 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-14 19:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067226965
Comment:
> Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented me from opening a terminal or logging in.
well this is very serious. I am currently using this template on two machines and have not had this issue, I've force-pushed the one I'm using to this PR; I'm assuming this is the one you used, because according to an older comment the download links were out of date.
This is the output of xls, which does not contain any libgcc_s.so, if you've managed to restore your system, can you post the contents of the package list?
```
$ xls libgccjit
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/lib/libgccjit.so.0.0.1
/usr/share/info/libgccjit.info
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (117 preceding siblings ...)
2022-03-14 19:58 ` lane-brain
@ 2022-03-14 20:02 ` lane-brain
2022-03-14 20:02 ` lane-brain
` (44 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-14 20:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 832 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067231768
Comment:
> @lane-brain right, this makes a lot of sense for me too! I was using 29 on FreeBSD just before I switched back and I must say I kinda got used to the pixel scrolling feature too.
>
> Although, I'm curious, Emacs 28 does have the pgtk feature but it's just not enabled by default. There's an option that you can enable in the build options. I might be mistaken though.
I'm not sure, but from what I recall the flag used to enable pgtk was not recognized by the emacs28 configure file. Also when I built it, the binary wouldn't run, whereas ones built from master are fine. I had surmised that perhaps pgtk was removed from the 28 release schedule and instead was mainlined for 29.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (118 preceding siblings ...)
2022-03-14 20:02 ` lane-brain
@ 2022-03-14 20:02 ` lane-brain
2022-03-14 21:04 ` KJ002
` (43 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-03-14 20:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067226965
Comment:
> Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented me from opening a terminal or logging in.
well this is very serious. I am currently using this template on two machines and have not had this issue, I've force-pushed the one I'm using to this PR; I'm assuming this is the one you used, because according to an older comment the download links were out of date.
This is the output of xls, which does not contain any libgcc_s.so, if you've managed to restore your system, can you post the contents of the package list on your end?
```
$ xls libgccjit
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/lib/libgccjit.so.0.0.1
/usr/share/info/libgccjit.info
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (119 preceding siblings ...)
2022-03-14 20:02 ` lane-brain
@ 2022-03-14 21:04 ` KJ002
2022-03-14 22:04 ` KJ002
` (42 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: KJ002 @ 2022-03-14 21:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]
New comment by KJ002 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067285249
Comment:
> > Installing this packages seems to have destroyed my system, it managed to delete `/usr/lib/libgcc_s.so` which prevented me from opening a terminal or logging in.
>
> well this is very serious. I am currently using this template on two machines and have not had this issue, I've force-pushed the one I'm using to this PR; I'm assuming this is the one you used, because according to an older comment the download links were out of date.
>
> This is the output of xls, which does not contain any libgcc_s.so, if you've managed to restore your system, can you post the contents of the package list on your end?
>
> ```
> $ xls libgccjit
> /usr/include/libgccjit++.h
> /usr/include/libgccjit.h
> /usr/lib/libgccjit.so.0.0.1
> /usr/share/info/libgccjit.info
> /usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
> /usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
> /usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
> ```
I never managed to restore my system, tried chroot'ing in and nothing worked, this is likely due to something I did wrong on my end so allow my to explain the steps I took:
1. Clone https://github.com/lane-brain/void-packages
2. Switch branches to libgccjit-void and copy ./srcpkgs/libgccjit/template to my ~/void-packages/srcpkgs/libgccjit/template
3. Run `cd ~/void-packages` and then `./xbps-src pkg libgccjit`
4. Then I run `sudo xbps-install --repository=hostdir/binpkgs libgccjit`.
5. boom, system gone. I initially notice I can't open a terminal then when I reboot every time I try and log in through the tty it just boots me back out to logic again because fish requires `libgcc_s`
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (120 preceding siblings ...)
2022-03-14 21:04 ` KJ002
@ 2022-03-14 22:04 ` KJ002
2022-03-14 22:05 ` KJ002
` (41 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: KJ002 @ 2022-03-14 22:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
New comment by KJ002 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067347641
Comment:
Just tried it again worked like a charm
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (121 preceding siblings ...)
2022-03-14 22:04 ` KJ002
@ 2022-03-14 22:05 ` KJ002
2022-03-17 19:23 ` jbenden
` (40 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: KJ002 @ 2022-03-14 22:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
New comment by KJ002 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1067347641
Comment:
Just tried it again worked like a charm, I now have libgccjit and I am compiling emacs with native comp
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (122 preceding siblings ...)
2022-03-14 22:05 ` KJ002
@ 2022-03-17 19:23 ` jbenden
2022-03-17 19:25 ` jbenden
` (39 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: jbenden @ 2022-03-17 19:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
New comment by jbenden on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1071244703
Comment:
If anyone needs another example, I've been maintaining one here: https://github.com/jbenden/void-packages/tree/emacs-nativecomp
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (123 preceding siblings ...)
2022-03-17 19:23 ` jbenden
@ 2022-03-17 19:25 ` jbenden
2022-03-25 15:39 ` mustaqimM
` (38 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: jbenden @ 2022-03-17 19:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
New comment by jbenden on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1071244703
Comment:
If anyone needs another example, I've been maintaining one here: https://github.com/jbenden/void-packages/tree/emacs-nativecomp
I've been following the emacs-28 branch.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (124 preceding siblings ...)
2022-03-17 19:25 ` jbenden
@ 2022-03-25 15:39 ` mustaqimM
2022-04-04 16:05 ` leahneukirchen
` (37 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: mustaqimM @ 2022-03-25 15:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
New comment by mustaqimM on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1079151293
Comment:
@jbenden Thanks for this, I just compiled it on my system and I'm currently using it
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (125 preceding siblings ...)
2022-03-25 15:39 ` mustaqimM
@ 2022-04-04 16:05 ` leahneukirchen
2022-04-04 16:09 ` [PR REVIEW] " leahneukirchen
` (36 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-04 16:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 399 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1087741314
Comment:
Just to confirm this is going into the right direction: libgccjit needs to be built as a separate package, and not just another `lang` due to `--enable-host-shared`, right?
Why do we have all the shell stuff in files/ right now? It seems unneeded.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (126 preceding siblings ...)
2022-04-04 16:05 ` leahneukirchen
@ 2022-04-04 16:09 ` leahneukirchen
2022-04-04 16:09 ` leahneukirchen
` (35 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-04 16:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r841914186
Comment:
typo
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (127 preceding siblings ...)
2022-04-04 16:09 ` [PR REVIEW] " leahneukirchen
@ 2022-04-04 16:09 ` leahneukirchen
2022-04-04 16:11 ` leahneukirchen
` (34 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-04 16:09 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r841914498
Comment:
drop this, or set it to https://github.com/void-linux/void-packages/issues
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (128 preceding siblings ...)
2022-04-04 16:09 ` leahneukirchen
@ 2022-04-04 16:11 ` leahneukirchen
2022-04-04 16:21 ` [PR REVIEW] " leahneukirchen
` (33 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-04 16:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 174 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1087748918
Comment:
And please rebase for CI.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (129 preceding siblings ...)
2022-04-04 16:11 ` leahneukirchen
@ 2022-04-04 16:21 ` leahneukirchen
2022-04-14 2:29 ` lane-brain
` (32 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-04 16:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r841925345
Comment:
https://github.com/archlinux/svntogit-packages/blob/packages/gcc/trunk/PKGBUILD#L461 uses
` make -C gcc DESTDIR="$pkgdir" jit.install-common jit.install-info` which seems nicer?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (130 preceding siblings ...)
2022-04-04 16:21 ` [PR REVIEW] " leahneukirchen
@ 2022-04-14 2:29 ` lane-brain
2022-04-14 2:29 ` lane-brain
` (31 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 2:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850033815
Comment:
fixed
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (131 preceding siblings ...)
2022-04-14 2:29 ` lane-brain
@ 2022-04-14 2:29 ` lane-brain
2022-04-14 2:31 ` lane-brain
` (30 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 2:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850033985
Comment:
set to void-packages issues
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (132 preceding siblings ...)
2022-04-14 2:29 ` lane-brain
@ 2022-04-14 2:31 ` lane-brain
2022-04-14 2:45 ` lane-brain
` (29 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 2:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 207 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850034399
Comment:
I will test a package that does install with this process
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (133 preceding siblings ...)
2022-04-14 2:31 ` lane-brain
@ 2022-04-14 2:45 ` lane-brain
2022-04-14 3:03 ` [PR PATCH] [Updated] " lane-brain
` (28 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 2:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1098655307
Comment:
> Just to confirm this is going into the right direction: libgccjit needs to be built as a separate package, and not just another `lang` due to `--enable-host-shared`, right?
Exactly right.
> Why do we have all the shell stuff in files/ right now? It seems unneeded.
Well noted! I'll remove these before I rebase and force push.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (134 preceding siblings ...)
2022-04-14 2:45 ` lane-brain
@ 2022-04-14 3:03 ` lane-brain
2022-04-14 3:04 ` [PR REVIEW] " lane-brain
` (27 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 3:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 12669 bytes --]
From fef4f25299bddbfa7a52a0d3bd98efa2987f725d Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Wed, 13 Apr 2022 23:00:33 -0400
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
---
srcpkgs/libgccjit/files/gccgo-musl.patch | 1 +
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 ++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 225 +++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
7 files changed, 294 insertions(+)
create mode 120000 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 120000
index 000000000000..a093af857738
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 000000000000..d2ed16928c82
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 000000000000..33ccc9789f93
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 000000000000..37a7489360f8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 000000000000..c42218ef09df
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 000000000000..9b8a425fe575
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,225 @@
+# Template file for 'libgccjit'
+# Revbump libtool when updating gcc, since it hardcodes some internal compiler paths
+# which use the version number.
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=10.2.1pre1
+revision=1
+_patchver="${version%pre*}"
+_minorver="${_patchver%.*}"
+_majorver="${_minorver%.*}"
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+pre_configure() {
+ # _FORTIFY_SOURCE needs an optimization level.
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ patch -p1 -i ${FILESDIR}/libgnarl-musl.patch
+ patch -p1 -i ${FILESDIR}/libssp-musl.patch
+ patch -p1 -i ${FILESDIR}/gccgo-musl.patch
+ fi
+}
+
+do_configure() {
+ # Define triplet for gcc build target
+ case "$XBPS_TARGET_MACHINE" in
+ i686) _target_triplet="i686-pc-linux-gnu";;
+ i686-musl) _target_triplet="i686-linux-musl";;
+ x86_64) _target_triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _target_triplet="x86_64-linux-musl";;
+ armv5tel) _target_triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _target_triplet="arm-linux-musleabi";;
+ armv6l) _target_triplet="arm-linux-gnueabihf";;
+ armv7l) _target_triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _target_triplet="arm-linux-musleabihf";;
+ armv7l-musl) _target_triplet="armv7l-linux-musleabihf";;
+ aarch64) _target_triplet="aarch64-linux-gnu";;
+ aarch64-musl) _target_triplet="aarch64-linux-musl";;
+ ppc) _target_triplet="powerpc-linux-gnu";;
+ ppc-musl) _target_triplet="powerpc-linux-musl";;
+ ppcle) _target_triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _target_triplet="powerpcle-linux-musl";;
+ ppc64le) _target_triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _target_triplet="powerpc64le-linux-musl";;
+ ppc64) _target_triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _target_triplet="powerpc64-linux-musl";;
+ mips-musl) _target_triplet="mips-linux-musl";;
+ mipshf-musl) _target_triplet="mips-linux-muslhf";;
+ mipsel-musl) _target_triplet="mipsel-linux-musl";;
+ mipselhf-musl) _target_triplet="mipsel-linux-muslhf";;
+ esac
+
+ local _langs _args _hash
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-multilib"
+ _args+=" --with-system-zlib"
+ _args+=" --enable-shared"
+ _args+=" --enable-lto"
+ _args+=" --enable-plugins"
+ _args+=" --enable-linker-build-id"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --enable-default-pie"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-checking=release"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --with-isl"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ # libgccjit compilation specific
+ _args+=" --enable-host-shared"
+ _args+=" --disable-bootstrap"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --with-bugurl='https://github.com/void-linux/void-packages/issues'"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ cd build
+ make ${makejobs}
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ cd "${wrksrc}/build"
+ make DESTDIR=${DESTDIR} -C gcc jit.install-common jit.install-info
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 000000000000..fb8dd58f2044
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (135 preceding siblings ...)
2022-04-14 3:03 ` [PR PATCH] [Updated] " lane-brain
@ 2022-04-14 3:04 ` lane-brain
2022-04-14 11:30 ` leahneukirchen
` (26 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 3:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
New review comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850045761
Comment:
package list is identical except that make install gzips the info file, a nice treat. marking resolved
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (136 preceding siblings ...)
2022-04-14 3:04 ` [PR REVIEW] " lane-brain
@ 2022-04-14 11:30 ` leahneukirchen
2022-04-14 13:52 ` leahneukirchen
` (25 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 11:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099091851
Comment:
So, idk exactly how libgccjit works, but should we split off a `-devel` package?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (137 preceding siblings ...)
2022-04-14 11:30 ` leahneukirchen
@ 2022-04-14 13:52 ` leahneukirchen
2022-04-14 15:38 ` sofeepokhrel
` (24 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 13:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099210289
Comment:
For some reason I can't push to this branch, but please replace with
[0001-New-package-libgccjit-10.2.1_pre1.txt](https://github.com/void-linux/void-packages/files/8489665/0001-New-package-libgccjit-10.2.1_pre1.txt)
This adds:
- -devel package
- shlibs entry
- actually uses the musl patch you added.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (138 preceding siblings ...)
2022-04-14 13:52 ` leahneukirchen
@ 2022-04-14 15:38 ` sofeepokhrel
2022-04-14 18:11 ` lane-brain
` (23 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: sofeepokhrel @ 2022-04-14 15:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
New comment by sofeepokhrel on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099312169
Comment:
really waiting for it 😭😭😭 , when will be this merged.
Please Merge it ASAP, i want to taste before i become old waiting to merge
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (139 preceding siblings ...)
2022-04-14 15:38 ` sofeepokhrel
@ 2022-04-14 18:11 ` lane-brain
2022-04-14 18:12 ` lane-brain
` (22 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 18:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2346 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099486960
Comment:
> So, idk exactly how libgccjit works, but should we split off a `-devel` package?
In my reasoning, I didn't opt to do a devel package was because the only use for this package, as far as I can tell, is to be able to build software that one is compiling from source on the host machine for direct use (also implied by its status as a JIT compilation library). It seems different than, for example, a package in which you have a split between the users of software and the distributors who build that software from source. The devel package is used by the latter to produce binaries for the former, while the former doesn't need the devel package to use the software. If we were in a situation where Void was making packages that provided native-comp'd lisp packages for the void-package repo, that would be one thing in favor of splitting them off, because we would then tag those packages with a dependency for the main package only, while putting the devel in [host]makedepends.
One problem that then arises is, I don't know if either package is functional without the other. Look at the package list:
```
🖊 xls libgccjit-devel
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/share/info/libgccjit.info.gz
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
🖊 xls libgccjit
/usr/lib/libgccjit.so.0.0.1
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
libgcc, for example, includes all the .so files in the main package, and I believe that would be what's required for binary compatibility for Ahead-Of-Time compiled lisp packages in libgccjit's case. But nativecomp would be broken for JIT until the user installed the headers, and given that the package is called "libgccjit", I see it being a source of more confusion than it's worth to split apart the packages, especially when it seems like a hazy issue to decide whether it is in fact more logically consistent to do so.
I'm ready to commit with your changes, but let me know if you want me to do it with the devel package or not, or whether you want me to move the shared object symlink to the main package if we are keeping it.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (140 preceding siblings ...)
2022-04-14 18:11 ` lane-brain
@ 2022-04-14 18:12 ` lane-brain
2022-04-14 18:15 ` lane-brain
` (21 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 18:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099486960
Comment:
> So, idk exactly how libgccjit works, but should we split off a `-devel` package?
In my reasoning, I didn't opt to do a devel package was because the only use for this package, as far as I can tell, is to be able to build software that one is compiling from source on the host machine for direct use (also implied by its status as a JIT compilation library). It seems different than, for example, a package in which you have a split between the users of software and the distributors who build that software from source. The devel package is used by the latter to produce binaries for the former, while the former doesn't need the devel package to use the software. If we were in a situation where Void was making packages that provided native-comp'd lisp packages for the void-package repo, that would be one thing in favor of splitting them off, because we would then tag those packages with a dependency for the main package only in the template, while putting the devel package in its [host]makedepends.
One problem that then arises is, I don't know if either package is functional without the other. Look at the package list:
```
> xls libgccjit-devel
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/share/info/libgccjit.info.gz
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
> xls libgccjit
/usr/lib/libgccjit.so.0.0.1
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
libgcc, for example, includes all the .so files in the main package, and I believe that would be what's required for binary compatibility for Ahead-Of-Time compiled lisp packages in libgccjit's case. But nativecomp would be broken for JIT until the user installed the headers, and given that the package is called "libgccjit", I see it being a source of more confusion than it's worth to split apart the packages, especially when it seems like a hazy issue to decide whether it is in fact more logically consistent to do so.
I'm ready to commit with your changes, but let me know if you want me to do it with the devel package or not, or whether you want me to move the shared object symlink to the main package if we are keeping it.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (141 preceding siblings ...)
2022-04-14 18:12 ` lane-brain
@ 2022-04-14 18:15 ` lane-brain
2022-04-14 18:20 ` lane-brain
` (20 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 18:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2509 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099486960
Comment:
> So, idk exactly how libgccjit works, but should we split off a `-devel` package?
In my reasoning, I didn't opt to do a devel package was because the only use for this package, as far as I can tell, is to be able to build software that one is compiling from source on the host machine for direct use (also implied by its status as a JIT compilation library). It seems different than, for example, a package in which you have a split between the users of software and the distributors who build that software from source. The devel package is used by the latter to produce binaries for the former, while the former doesn't need the devel package to use the software. If we were in a situation where Void was making packages that provided native-comp'd lisp packages for the void-package repo, that would be one thing in favor of splitting them off, because we would then tag those packages with a dependency for the main package only in the template, while putting the devel package in its [host]makedepends.
One problem that then arises is, I don't know if either package is functional without the other. Look at the package list:
```
> xls libgccjit-devel
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/share/info/libgccjit.info.gz
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
> xls libgccjit
/usr/lib/libgccjit.so.0.0.1
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
libgcc, for example, includes all the .so files in the main package, and I believe that would be what's required for binary compatibility for Ahead-Of-Time compiled lisp packages in libgccjit's case. But nativecomp would be broken for JIT until the user installed the headers; but more than that, I believe you *need* the SOs for gcc to be able to use the lisp JIT frontend, so in the case of a builder, one needs both packages in makedepends. I see it being a source of more confusion and potential headaches than it's worth to split apart the packages, especially when it seems like a hazy issue to decide whether it is in fact more logically consistent to do so.
I'm ready to commit with your changes, but let me know if you want me to do it with the devel package or not, or whether you want me to move the shared object symlink to the main package if we are keeping it.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (142 preceding siblings ...)
2022-04-14 18:15 ` lane-brain
@ 2022-04-14 18:20 ` lane-brain
2022-04-14 18:21 ` lane-brain
` (19 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 18:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2490 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099486960
Comment:
> So, idk exactly how libgccjit works, but should we split off a `-devel` package?
In my reasoning, I didn't opt to do a devel package was because the only use for this package, as far as I can tell, is to be able to build software that one is compiling from source on the host machine for direct use (also implied by its status as a JIT compilation library). It seems different than, for example, a package in which you have a split between the users of software and the distributors who build that software from source. In a typical case, a devel package is used by the distributor to produce binaries for the user, while the user doesn't need that devel package to use the software.
If we were in a situation where Void was making packages that provided native-comp'd lisp packages for the void-package repo, that would be one thing in favor of splitting them off, because we would then tag those packages with a dependency for the main package only in the template, while putting the devel package in its [host]makedepends. But I don't think it's possible to do this for libgccjit. Look at the package list:
```
> xls libgccjit-devel
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/share/info/libgccjit.info.gz
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
> xls libgccjit
/usr/lib/libgccjit.so.0.0.1
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
libgcc, for example, includes all the .so files in the main package, and I believe that would be what's required for binary compatibility for Ahead-Of-Time compiled lisp packages in libgccjit's case. But nativecomp would be broken for JIT until the user installed the headers; but more than that, I believe you *need* the SOs for gcc to be able to use the lisp JIT frontend, so in the case of a builder, one needs both packages in makedepends. I see it being a source of more confusion and potential headaches than it's worth to split apart the packages, especially when it seems like a hazy issue to decide whether it is in fact more logically consistent to do so.
I'm ready to commit with your changes, but let me know if you want me to do it with the devel package or not, or whether you want me to move the shared object symlink to the main package if we are keeping it.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (143 preceding siblings ...)
2022-04-14 18:20 ` lane-brain
@ 2022-04-14 18:21 ` lane-brain
2022-04-14 18:38 ` leahneukirchen
` (18 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 18:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2499 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099486960
Comment:
> So, idk exactly how libgccjit works, but should we split off a `-devel` package?
In my reasoning, I didn't opt to do a devel package was because the only use for this package, as far as I can tell, is to be able to build software that one is compiling from source on the host machine for direct use (also implied by its status as a JIT compilation library). It seems different than, for example, a package in which you have a split between the users of software and the distributors who build that software from source. In a typical case, a devel package is used by the distributor to produce binaries for the user, while the user doesn't need that devel package to use the software.
If we were in a situation where Void was making packages that provided native-comp'd lisp packages for the void-package repo, that would be one thing in favor of splitting them off, because we would then tag those packages with a dependency for the main package only in the template, while putting the devel package in its [host]makedepends. But I don't think it's possible to do this for libgccjit. Look at the package list:
```
> xls libgccjit-devel
/usr/include/libgccjit++.h
/usr/include/libgccjit.h
/usr/share/info/libgccjit.info.gz
/usr/lib/libgccjit.so -> /usr/lib/libgccjit.so.0
> xls libgccjit
/usr/lib/libgccjit.so.0.0.1
/usr/share/licenses/libgccjit/RUNTIME.LIBRARY.EXCEPTION
/usr/lib/libgccjit.so.0 -> /usr/lib/libgccjit.so.0.0.1
```
libgcc, for example, includes all the .so files in the main package, and I believe that would be what's required for binary compatibility for Ahead-Of-Time compiled lisp packages in libgccjit's case. But nativecomp would be broken for JIT until the user installed the headers; but more than that, I believe you *need* the SOs for gcc to be able to use the lisp JIT compiler frontend, so in the case of a builder, one needs both packages in makedepends. I see it being a source of more confusion and potential headaches than it's worth to split apart the packages, especially when it seems like a hazy issue to decide whether it is in fact more logically consistent to do so.
I'm ready to commit with your changes, but let me know if you want me to do it with the devel package or not, or whether you want me to move the shared object symlink to the main package if we are keeping it.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (144 preceding siblings ...)
2022-04-14 18:21 ` lane-brain
@ 2022-04-14 18:38 ` leahneukirchen
2022-04-14 18:40 ` leahneukirchen
` (17 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 18:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
New comment by sofeepokhrel on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099312169
Comment:
really waiting for it 😭😭😭 , when will be this merged.
Please Merge it ASAP, i want to taste before i become old waiting to merge
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (145 preceding siblings ...)
2022-04-14 18:38 ` leahneukirchen
@ 2022-04-14 18:40 ` leahneukirchen
2022-04-14 20:03 ` [PR PATCH] [Updated] " lane-brain
` (16 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 18:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099519116
Comment:
Why, the headers are needed for Emacs to compile against libgccjit, but they are not required to use it from Emacs. (I tested this.)
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (146 preceding siblings ...)
2022-04-14 18:40 ` leahneukirchen
@ 2022-04-14 20:03 ` lane-brain
2022-04-14 20:07 ` lane-brain
` (15 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 20:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]
There is an updated pull request by lane-brain against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 13556 bytes --]
From 5ab9dfbdb1130c255ca46c1bdc5dc3545104513f Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Thu, 14 Apr 2022 13:50:36 -0400
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
---
common/shlibs | 1 +
srcpkgs/libgccjit-devel | 1 +
srcpkgs/libgccjit/files/gccgo-musl.patch | 1 +
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 +++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 235 +++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
9 files changed, 306 insertions(+)
create mode 120000 srcpkgs/libgccjit-devel
create mode 120000 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/common/shlibs b/common/shlibs
index fc5a031056fc..0b6a0ed91f3f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -59,6 +59,7 @@ libitm.so.1 libitm-4.7.3_1
liblto_plugin.so.0 gcc-4.7.3_1
libgcc_s.so.1 libgcc-4.4.0_1
libgo.so.16 libgo-10.2.0_1
+libgccjit.so.0 libgccjit-10.2.1pre1_1
libperl.so.5.34 perl-5.34.0_1
libgmp.so.10 gmp-5.0.1_1
libgmpxx.so.4 gmpxx-6.0.0_2
diff --git a/srcpkgs/libgccjit-devel b/srcpkgs/libgccjit-devel
new file mode 120000
index 000000000000..ad6b9f7639f3
--- /dev/null
+++ b/srcpkgs/libgccjit-devel
@@ -0,0 +1 @@
+libgccjit
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 120000
index 000000000000..a093af857738
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 000000000000..d2ed16928c82
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 000000000000..33ccc9789f93
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 000000000000..37a7489360f8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 000000000000..c42218ef09df
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 000000000000..04bc7135d6de
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,235 @@
+# Template file for 'libgccjit'
+# Revbump libtool when updating gcc, since it hardcodes some internal compiler paths
+# which use the version number.
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=10.2.1pre1
+revision=1
+_patchver="${version%pre*}"
+_minorver="${_patchver%.*}"
+_majorver="${_minorver%.*}"
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="http://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+pre_configure() {
+ # _FORTIFY_SOURCE needs an optimization level.
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {gcc,libiberty}/configure
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ for p in ${FILESDIR}/*-musl.patch; do
+ patch -p1 -i $p
+ done
+ fi
+}
+
+do_configure() {
+ # Define triplet for gcc build target
+ case "$XBPS_TARGET_MACHINE" in
+ i686) _target_triplet="i686-pc-linux-gnu";;
+ i686-musl) _target_triplet="i686-linux-musl";;
+ x86_64) _target_triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _target_triplet="x86_64-linux-musl";;
+ armv5tel) _target_triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _target_triplet="arm-linux-musleabi";;
+ armv6l) _target_triplet="arm-linux-gnueabihf";;
+ armv7l) _target_triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _target_triplet="arm-linux-musleabihf";;
+ armv7l-musl) _target_triplet="armv7l-linux-musleabihf";;
+ aarch64) _target_triplet="aarch64-linux-gnu";;
+ aarch64-musl) _target_triplet="aarch64-linux-musl";;
+ ppc) _target_triplet="powerpc-linux-gnu";;
+ ppc-musl) _target_triplet="powerpc-linux-musl";;
+ ppcle) _target_triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _target_triplet="powerpcle-linux-musl";;
+ ppc64le) _target_triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _target_triplet="powerpc64le-linux-musl";;
+ ppc64) _target_triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _target_triplet="powerpc64-linux-musl";;
+ mips-musl) _target_triplet="mips-linux-musl";;
+ mipshf-musl) _target_triplet="mips-linux-muslhf";;
+ mipsel-musl) _target_triplet="mipsel-linux-musl";;
+ mipselhf-musl) _target_triplet="mipsel-linux-muslhf";;
+ esac
+
+ local _langs _args _hash
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-multilib"
+ _args+=" --with-system-zlib"
+ _args+=" --enable-shared"
+ _args+=" --enable-lto"
+ _args+=" --enable-plugins"
+ _args+=" --enable-linker-build-id"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --enable-default-pie"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-checking=release"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --with-isl"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ # libgccjit compilation specific
+ _args+=" --enable-host-shared"
+ _args+=" --disable-bootstrap"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --with-bugurl='https://github.com/void-linux/void-packages/issues'"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ cd build
+ make ${makejobs}
+}
+
+do_check() {
+ cd "${wrksrc}/build/gcc"
+ make check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+pre_install() {
+ if [ "$CROSS_BUILD" ]; then
+ # XXX otherwise links to host libpthread
+ for f in $(find ${wrksrc}/build/${XBPS_CROSS_TRIPLET} -type f -name libtool); do
+ sed -e "s,add_dir=\"-L\$libdir\",add_dir=\"-L${XBPS_CROSS_BASE}\$libdir\",g" -i $f
+ done
+ fi
+}
+
+do_install() {
+ cd "${wrksrc}/build"
+ make DESTDIR=${DESTDIR} -C gcc jit.install-common jit.install-info
+}
+
+post_install() {
+ vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
+
+libgccjit-devel_package() {
+ short_desc+=" - development files"
+ depends="${sourcepkg}>=${version}_${revision}"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.so
+ vmove usr/share/info
+ }
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 000000000000..fb8dd58f2044
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (147 preceding siblings ...)
2022-04-14 20:03 ` [PR PATCH] [Updated] " lane-brain
@ 2022-04-14 20:07 ` lane-brain
2022-04-14 20:15 ` [PR REVIEW] " paper42
` (14 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: lane-brain @ 2022-04-14 20:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
New comment by lane-brain on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#issuecomment-1099579461
Comment:
> Why, the headers are needed for Emacs to compile against libgccjit, but they are not required to use it from Emacs. (I tested this.)
I misunderstood then if the JIT frontend works in this case (i.e. one can compile ELCs from Emacs). Force-pushed the revised template from your patches.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (150 preceding siblings ...)
2022-04-14 20:15 ` paper42
@ 2022-04-14 20:15 ` paper42
2022-04-14 20:19 ` paper42
` (11 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850772592
Comment:
```suggestion
homepage="https://gcc.gnu.org"
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (148 preceding siblings ...)
2022-04-14 20:07 ` lane-brain
@ 2022-04-14 20:15 ` paper42
2022-04-14 20:15 ` paper42
` (13 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850773096
Comment:
this was reverted, can we use vsed?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (149 preceding siblings ...)
2022-04-14 20:15 ` [PR REVIEW] " paper42
@ 2022-04-14 20:15 ` paper42
2022-04-14 20:15 ` paper42
` (12 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850772709
Comment:
is there a reason this is a separate block?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (155 preceding siblings ...)
2022-04-14 20:19 ` paper42
@ 2022-04-14 20:19 ` paper42
2022-04-14 20:23 ` leahneukirchen
` (6 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850775254
Comment:
```suggestion
make DESTDIR=${DESTDIR} -C build/gcc jit.install-common jit.install-info
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (151 preceding siblings ...)
2022-04-14 20:15 ` paper42
@ 2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
` (10 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 167 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850775538
Comment:
is ${wrksrc} needed?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (152 preceding siblings ...)
2022-04-14 20:19 ` paper42
@ 2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
` (9 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 193 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850774266
Comment:
```suggestion
make -C build ${makejobs}
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (153 preceding siblings ...)
2022-04-14 20:19 ` paper42
@ 2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
` (8 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850774886
Comment:
can this also be vsed?
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (154 preceding siblings ...)
2022-04-14 20:19 ` paper42
@ 2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
` (7 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: paper42 @ 2022-04-14 20:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 221 bytes --]
New review comment by paper42 on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850774670
Comment:
```suggestion
make -C "build/gcc" check-jit RUNTESTFLAGS="-v -v -v"
```
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (156 preceding siblings ...)
2022-04-14 20:19 ` paper42
@ 2022-04-14 20:23 ` leahneukirchen
2022-04-14 20:25 ` leahneukirchen
` (5 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 20:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 205 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850778310
Comment:
Does it matter at all, we're not using any headers.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (157 preceding siblings ...)
2022-04-14 20:23 ` leahneukirchen
@ 2022-04-14 20:25 ` leahneukirchen
2022-04-14 20:25 ` leahneukirchen
` (4 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 20:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850779228
Comment:
This does not seem to do anything for libgccjit.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (158 preceding siblings ...)
2022-04-14 20:25 ` leahneukirchen
@ 2022-04-14 20:25 ` leahneukirchen
2022-04-15 15:27 ` [PR PATCH] [Updated] " leahneukirchen
` (3 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-14 20:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r850779228
Comment:
This does not seem to do anything for libgccjit.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Updated] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (159 preceding siblings ...)
2022-04-14 20:25 ` leahneukirchen
@ 2022-04-15 15:27 ` leahneukirchen
2022-04-15 15:32 ` [PR REVIEW] " leahneukirchen
` (2 subsequent siblings)
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-15 15:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]
There is an updated pull request by leahneukirchen against master on the void-packages repository
https://github.com/lane-brain/void-packages libgccjit-void
https://github.com/void-linux/void-packages/pull/28785
New package: libgccjit-10.2.1_pre1
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/28785.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libgccjit-void-28785.patch --]
[-- Type: text/x-diff, Size: 13026 bytes --]
From 724bf78fb838e509fdd536639e9f0e4afcdb950d Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Wed, 13 Apr 2022 23:00:33 -0400
Subject: [PATCH] New package: libgccjit-10.2.1_pre1
---
common/shlibs | 1 +
srcpkgs/libgccjit-devel | 1 +
srcpkgs/libgccjit/files/gccgo-musl.patch | 1 +
srcpkgs/libgccjit/files/libgccjit-musl.patch | 63 ++++++
srcpkgs/libgccjit/files/libgnarl-musl.patch | 1 +
srcpkgs/libgccjit/files/libssp-musl.patch | 1 +
srcpkgs/libgccjit/patches | 1 +
srcpkgs/libgccjit/template | 216 +++++++++++++++++++
srcpkgs/libgccjit/update | 2 +
9 files changed, 287 insertions(+)
create mode 120000 srcpkgs/libgccjit-devel
create mode 120000 srcpkgs/libgccjit/files/gccgo-musl.patch
create mode 100644 srcpkgs/libgccjit/files/libgccjit-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libgnarl-musl.patch
create mode 120000 srcpkgs/libgccjit/files/libssp-musl.patch
create mode 120000 srcpkgs/libgccjit/patches
create mode 100644 srcpkgs/libgccjit/template
create mode 100644 srcpkgs/libgccjit/update
diff --git a/common/shlibs b/common/shlibs
index fc5a031056fc..0b6a0ed91f3f 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -59,6 +59,7 @@ libitm.so.1 libitm-4.7.3_1
liblto_plugin.so.0 gcc-4.7.3_1
libgcc_s.so.1 libgcc-4.4.0_1
libgo.so.16 libgo-10.2.0_1
+libgccjit.so.0 libgccjit-10.2.1pre1_1
libperl.so.5.34 perl-5.34.0_1
libgmp.so.10 gmp-5.0.1_1
libgmpxx.so.4 gmpxx-6.0.0_2
diff --git a/srcpkgs/libgccjit-devel b/srcpkgs/libgccjit-devel
new file mode 120000
index 000000000000..ad6b9f7639f3
--- /dev/null
+++ b/srcpkgs/libgccjit-devel
@@ -0,0 +1 @@
+libgccjit
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/gccgo-musl.patch b/srcpkgs/libgccjit/files/gccgo-musl.patch
new file mode 120000
index 000000000000..a093af857738
--- /dev/null
+++ b/srcpkgs/libgccjit/files/gccgo-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/gccgo-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libgccjit-musl.patch b/srcpkgs/libgccjit/files/libgccjit-musl.patch
new file mode 100644
index 000000000000..d2ed16928c82
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgccjit-musl.patch
@@ -0,0 +1,63 @@
+diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
+index 5bccf591a..35f5e35ef 100644
+--- a/gcc/jit/jit-playback.c
++++ b/gcc/jit/jit-playback.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -41,8 +43,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "diagnostic.h"
+ #include "stmt.h"
+
+-#include <pthread.h>
+-
+ #include "jit-playback.h"
+ #include "jit-result.h"
+ #include "jit-builtins.h"
+diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c
+index a237d574f..5785e3269 100644
+--- a/gcc/jit/jit-recording.c
++++ b/gcc/jit/jit-recording.c
+@@ -18,6 +18,8 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
++
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -25,8 +27,6 @@ along with GCC; see the file COPYING3. If not see
+ #include "pretty-print.h"
+ #include "toplev.h"
+
+-#include <pthread.h>
+-
+ #include "jit-builtins.h"
+ #include "jit-recording.h"
+ #include "jit-playback.h"
+diff --git a/gcc/jit/libgccjit.c b/gcc/jit/libgccjit.c
+index f9c33c63c..75f21d275 100644
+--- a/gcc/jit/libgccjit.c
++++ b/gcc/jit/libgccjit.c
+@@ -18,13 +18,13 @@ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
++#include <pthread.h>
+ #include "config.h"
+ #include "system.h"
+ #include "coretypes.h"
+ #include "timevar.h"
+ #include "typed-splay-tree.h"
+ #include "cppbuiltin.h"
+-#include <pthread.h>
+
+ #include "libgccjit.h"
+ #include "jit-recording.h"
diff --git a/srcpkgs/libgccjit/files/libgnarl-musl.patch b/srcpkgs/libgccjit/files/libgnarl-musl.patch
new file mode 120000
index 000000000000..33ccc9789f93
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libgnarl-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libgnarl-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/files/libssp-musl.patch b/srcpkgs/libgccjit/files/libssp-musl.patch
new file mode 120000
index 000000000000..37a7489360f8
--- /dev/null
+++ b/srcpkgs/libgccjit/files/libssp-musl.patch
@@ -0,0 +1 @@
+../../gcc/files/libssp-musl.patch
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/patches b/srcpkgs/libgccjit/patches
new file mode 120000
index 000000000000..c42218ef09df
--- /dev/null
+++ b/srcpkgs/libgccjit/patches
@@ -0,0 +1 @@
+../gcc/patches
\ No newline at end of file
diff --git a/srcpkgs/libgccjit/template b/srcpkgs/libgccjit/template
new file mode 100644
index 000000000000..6f1d6256dcd6
--- /dev/null
+++ b/srcpkgs/libgccjit/template
@@ -0,0 +1,216 @@
+# Template file for 'libgccjit'
+# Revbump libtool when updating gcc, since it hardcodes some internal compiler paths
+# which use the version number.
+
+pkgname=libgccjit
+# we are using a 10-stable git snapshot alpine is using in order
+# to get regression fixes not yet incorporate into a stable release
+# it should be possible to switch back to stable with 10.3 or 11
+version=10.2.1pre1
+revision=1
+_patchver="${version%pre*}"
+_minorver="${_patchver%.*}"
+_majorver="${_minorver%.*}"
+_gmp_version=6.2.0
+_mpfr_version=4.1.0
+_mpc_version=1.1.0
+_isl_version=0.21
+wrksrc=gcc-${version/pre/_pre}
+short_desc="Just-In-Time Compilation library for GCC"
+maintainer="Lane Biocini <lane@mailbox.org>"
+homepage="https://gcc.gnu.org"
+license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later"
+# *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+distfiles="
+ https://dev.alpinelinux.org/~nenolod/gcc-${version/pre/_pre}.tar.xz
+ https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
+ ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
+ ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
+ ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2"
+checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590
+ 258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526
+ 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
+ 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e
+ d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859"
+nopie=yes
+lib32disabled=yes
+makedepends="zlib-devel"
+hostmakedepends="tar texinfo perl flex"
+depends="gcc"
+checkdepends="dejagnu"
+
+post_extract() {
+ mv ${XBPS_BUILDDIR}/gmp-${_gmp_version} ${wrksrc}/gmp
+ mv ${XBPS_BUILDDIR}/mpfr-${_mpfr_version} ${wrksrc}/mpfr
+ mv ${XBPS_BUILDDIR}/mpc-${_mpc_version} ${wrksrc}/mpc
+ mv ${XBPS_BUILDDIR}/isl-${_isl_version} ${wrksrc}/isl
+}
+
+pre_configure() {
+ if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ for p in ${FILESDIR}/*-musl.patch; do
+ patch -p1 -i $p
+ done
+ fi
+}
+
+do_configure() {
+ # Define triplet for gcc build target
+ case "$XBPS_TARGET_MACHINE" in
+ i686) _target_triplet="i686-pc-linux-gnu";;
+ i686-musl) _target_triplet="i686-linux-musl";;
+ x86_64) _target_triplet="x86_64-unknown-linux-gnu";;
+ x86_64-musl) _target_triplet="x86_64-linux-musl";;
+ armv5tel) _target_triplet="arm-linux-gnueabi";;
+ armv5tel-musl) _target_triplet="arm-linux-musleabi";;
+ armv6l) _target_triplet="arm-linux-gnueabihf";;
+ armv7l) _target_triplet="armv7l-linux-gnueabihf";;
+ armv6l-musl) _target_triplet="arm-linux-musleabihf";;
+ armv7l-musl) _target_triplet="armv7l-linux-musleabihf";;
+ aarch64) _target_triplet="aarch64-linux-gnu";;
+ aarch64-musl) _target_triplet="aarch64-linux-musl";;
+ ppc) _target_triplet="powerpc-linux-gnu";;
+ ppc-musl) _target_triplet="powerpc-linux-musl";;
+ ppcle) _target_triplet="powerpcle-linux-gnu";;
+ ppcle-musl) _target_triplet="powerpcle-linux-musl";;
+ ppc64le) _target_triplet="powerpc64le-linux-gnu";;
+ ppc64le-musl) _target_triplet="powerpc64le-linux-musl";;
+ ppc64) _target_triplet="powerpc64-linux-gnu";;
+ ppc64-musl) _target_triplet="powerpc64-linux-musl";;
+ mips-musl) _target_triplet="mips-linux-musl";;
+ mipshf-musl) _target_triplet="mips-linux-muslhf";;
+ mipsel-musl) _target_triplet="mipsel-linux-musl";;
+ mipselhf-musl) _target_triplet="mipsel-linux-muslhf";;
+ esac
+
+ local _langs _args _hash
+ _hash=gnu
+ case "$XBPS_TARGET_MACHINE" in
+ mipselhf-musl) _args+=" --with-arch=mips32r2 --with-float=hard"; _hash=sysv;;
+ mipsel-musl) _args+=" --with-arch=mips32r2 --with-float=soft"; _hash=sysv;;
+ mipshf-musl) _args+=" --with-arch=mips32r2 --with-float=hard";;
+ mips-musl) _args+=" --with-arch=mips32r2 --with-float=soft";;
+ armv5*) _args+=" --with-arch=armv5te --with-float=soft";;
+ armv6l*) _args+=" --with-arch=armv6 --with-fpu=vfp --with-float=hard";;
+ armv7l*) _args+=" --with-arch=armv7-a --with-fpu=vfpv3 --with-float=hard";;
+ aarch64*) _args+=" --with-arch=armv8-a";;
+ ppc64le*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpcle-linux";;
+ ppc64*) _args+=" --with-abi=elfv2 --enable-secureplt --enable-targets=powerpc-linux";;
+ ppc*) _args+=" --enable-secureplt";;
+ esac
+
+ # fix: unknown long double size, cannot define BFP_FMT
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*-musl) _args+=" --disable-decimal-float";;
+ esac
+
+ if [ "$CROSS_BUILD" ]; then
+ export CC_FOR_TARGET="$CC"
+ export GCC_FOR_TARGET="$CC"
+ export CXX_FOR_TARGET="$CXX"
+
+ _args+=" --host=$XBPS_CROSS_TRIPLET"
+ _args+=" --with-build-sysroot=${XBPS_CROSS_BASE}"
+ elif [ -z "$CHROOT_READY" ]; then
+ export LD_LIBRARY_PATH="${XBPS_MASTERDIR}/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --build=${_target_triplet}"
+ else
+ _args+=" --build=${_target_triplet}"
+ fi
+
+ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
+ _args+=" --disable-gnu-unique-object"
+ _args+=" --disable-symvers"
+ _args+=" libat_cv_have_ifunc=no"
+ else
+ _args+=" --enable-gnu-unique-object"
+ fi
+
+ case "$XBPS_TARGET_MACHINE" in
+ ppc*) _args+=" --disable-vtable-verify";;
+ *) _args+=" --enable-vtable-verify";;
+ esac
+
+ export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/}"
+ export CXXFLAGS="${CXXFLAGS/-D_FORTIFY_SOURCE=2/}"
+
+ # Disable explicit -fno-PIE, gcc will figure this out itself.
+ export CFLAGS="${CFLAGS//-fno-PIE/}"
+ export CXXFLAGS="${CXXFLAGS//-fno-PIE/}"
+ export LDFLAGS="${LDFLAGS//-no-pie/}"
+
+ # Needs explicit -fPIC
+ export CFLAGS+=" -fPIC"
+ export CXXFLAGS+=" -fPIC"
+
+ _args+=" --prefix=/usr"
+ _args+=" --mandir=/usr/share/man"
+ _args+=" --infodir=/usr/share/info"
+ _args+=" --libexecdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}"
+ _args+=" --enable-threads=posix"
+ _args+=" --enable-__cxa_atexit"
+ _args+=" --disable-multilib"
+ _args+=" --with-system-zlib"
+ _args+=" --enable-shared"
+ _args+=" --enable-lto"
+ _args+=" --enable-plugins"
+ _args+=" --enable-linker-build-id"
+ _args+=" --disable-werror"
+ _args+=" --disable-nls"
+ _args+=" --enable-default-pie"
+ _args+=" --enable-default-ssp"
+ _args+=" --enable-checking=release"
+ _args+=" --disable-libstdcxx-pch"
+ _args+=" --with-isl"
+ _args+=" --with-linker-hash-style=$_hash"
+ _args+=" --disable-sjlj-exceptions"
+ _args+=" --disable-target-libiberty"
+
+ # libgccjit compilation specific
+ _args+=" --enable-host-shared"
+ _args+=" --disable-bootstrap"
+ _args+=" --disable-libquadmath"
+ _args+=" --disable-libquadmath-support"
+ _args+=" --disable-libgomp"
+ _args+=" --disable-liboffloadmic"
+ _args+=" --disable-libada"
+ _args+=" --disable-libvtv"
+ _args+=" --disable-libsanitizer"
+ _args+=" --with-bugurl='https://github.com/void-linux/void-packages/issues'"
+
+ mkdir -p build
+ cd build
+
+ # If we are checking packages, we need to have c++ compiled
+ [ -z "$XBPS_CHECK_PKGS" ] && _langs="jit" || _langs="jit,c++"
+ _args+=" --enable-languages=${_langs}"
+ CONFIG_SHELL=/bin/bash \
+ ${wrksrc}/configure ${_args}
+}
+
+do_build() {
+ make -C build ${makejobs}
+}
+
+do_check() {
+ make -C build/gcc check-jit RUNTESTFLAGS="-v -v -v"
+}
+
+do_install() {
+ make -C build/gcc DESTDIR=${DESTDIR} jit.install-common jit.install-info
+}
+
+post_install() {
+ vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
+}
+
+libgccjit-devel_package() {
+ short_desc+=" - development files"
+ depends="${sourcepkg}>=${version}_${revision}"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/*.so
+ vmove usr/share/info
+ }
+}
diff --git a/srcpkgs/libgccjit/update b/srcpkgs/libgccjit/update
new file mode 100644
index 000000000000..fb8dd58f2044
--- /dev/null
+++ b/srcpkgs/libgccjit/update
@@ -0,0 +1,2 @@
+site="https://gcc.gnu.org/releases.html"
+pattern="GCC \K[\d.]+(?=\<)"
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (160 preceding siblings ...)
2022-04-15 15:27 ` [PR PATCH] [Updated] " leahneukirchen
@ 2022-04-15 15:32 ` leahneukirchen
2022-04-16 11:48 ` [PR PATCH] [Merged]: " leahneukirchen
2022-07-02 1:39 ` [PR REVIEW] " acomeofficial
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-15 15:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
New review comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r851334903
Comment:
removed it, it's unneeded.
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR PATCH] [Merged]: New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (161 preceding siblings ...)
2022-04-15 15:32 ` [PR REVIEW] " leahneukirchen
@ 2022-04-16 11:48 ` leahneukirchen
2022-07-02 1:39 ` [PR REVIEW] " acomeofficial
163 siblings, 0 replies; 165+ messages in thread
From: leahneukirchen @ 2022-04-16 11:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]
There's a merged pull request on the void-packages repository
New package: libgccjit-10.2.1_pre1
https://github.com/void-linux/void-packages/pull/28785
Description:
<!-- Mark items with [x] where applicable -->
#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)
#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR
<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!--
#### Does it build and run successfully?
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (x86_64-glibc)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
- [ ] aarch64-musl
- [ ] armv7l
- [ ] armv6l-musl
-->
^ permalink raw reply [flat|nested] 165+ messages in thread
* Re: [PR REVIEW] New package: libgccjit-10.2.1_pre1
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
` (162 preceding siblings ...)
2022-04-16 11:48 ` [PR PATCH] [Merged]: " leahneukirchen
@ 2022-07-02 1:39 ` acomeofficial
163 siblings, 0 replies; 165+ messages in thread
From: acomeofficial @ 2022-07-02 1:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
New review comment by acomeofficial on void-packages repository
https://github.com/void-linux/void-packages/pull/28785#discussion_r912304694
Comment:
srcpkgs/libgccjit/update
^ permalink raw reply [flat|nested] 165+ messages in thread
end of thread, other threads:[~2022-07-02 1:39 UTC | newest]
Thread overview: 165+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16 1:36 [PR PATCH] New package: libgccjit-10.2.1_pre1 lane-brain
2021-02-16 1:40 ` ericonr
2021-02-16 1:50 ` [PR REVIEW] " ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 1:50 ` ericonr
2021-02-16 6:00 ` lane-brain
2021-02-16 6:00 ` lane-brain
2021-02-16 6:01 ` lane-brain
2021-02-16 6:02 ` lane-brain
2021-02-16 6:05 ` lane-brain
2021-02-16 6:23 ` lane-brain
2021-02-16 6:23 ` lane-brain
2021-02-16 6:28 ` lane-brain
2021-02-16 6:32 ` lane-brain
2021-02-16 6:33 ` lane-brain
2021-02-16 6:33 ` lane-brain
2021-02-16 6:34 ` lane-brain
2021-02-16 6:35 ` lane-brain
2021-02-16 6:35 ` lane-brain
2021-02-16 6:44 ` lane-brain
2021-02-16 6:48 ` ericonr
2021-02-16 10:03 ` [PR REVIEW] " fosslinux
2021-02-16 17:19 ` [PR PATCH] [Updated] " lane-brain
2021-02-16 17:25 ` lane-brain
2021-02-16 17:39 ` lane-brain
2021-02-16 17:54 ` [PR REVIEW] " lane-brain
2021-02-16 17:54 ` lane-brain
2021-02-16 17:55 ` lane-brain
2021-02-16 17:57 ` lane-brain
2021-02-16 17:58 ` lane-brain
2021-02-16 17:59 ` lane-brain
2021-02-16 17:59 ` lane-brain
2021-02-16 18:01 ` lane-brain
2021-02-16 18:04 ` FollieHiyuki
2021-02-16 18:07 ` [PR REVIEW] " ericonr
2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
2021-02-16 18:07 ` ericonr
2021-02-16 18:10 ` ericonr
2021-02-16 18:12 ` [PR REVIEW] " lane-brain
2021-02-16 18:13 ` lane-brain
2021-02-16 18:13 ` ericonr
2021-02-16 18:13 ` ericonr
2021-02-16 18:14 ` lane-brain
2021-02-16 18:15 ` lane-brain
2021-02-16 18:16 ` ericonr
2021-02-16 18:17 ` lane-brain
2021-02-16 18:34 ` ericonr
2021-02-16 20:05 ` lane-brain
2021-02-16 20:06 ` lane-brain
2021-02-16 20:24 ` lane-brain
2021-02-17 0:43 ` [PR PATCH] [Updated] " lane-brain
2021-02-17 18:07 ` lane-brain
2021-02-18 4:03 ` lane-brain
2021-02-18 4:04 ` lane-brain
2021-02-18 18:48 ` [PR PATCH] [Updated] " lane-brain
2021-02-18 18:56 ` lane-brain
2021-02-18 18:57 ` lane-brain
2021-02-18 19:26 ` ericonr
2021-02-18 19:26 ` ericonr
2021-02-19 3:31 ` [PR PATCH] [Updated] " lane-brain
2021-02-19 5:13 ` lane-brain
2021-02-19 18:21 ` lane-brain
2021-02-19 18:44 ` lane-brain
2021-02-25 0:13 ` lane-brain
2021-02-25 14:52 ` ericonr
2021-02-25 20:24 ` lane-brain
2021-02-27 0:13 ` xianwenchen
2021-03-15 8:41 ` ramos
2021-03-18 8:28 ` xianwenchen
2021-03-18 23:22 ` lane-brain
2021-03-19 13:31 ` xianwenchen
2021-03-21 0:37 ` lane-brain
2021-03-24 10:09 ` xianwenchen
2021-03-30 22:39 ` floyza
2021-04-10 9:07 ` xianwenchen
2021-04-10 14:20 ` ericonr
2021-04-10 21:33 ` xianwenchen
2021-04-11 1:41 ` floyza
2021-04-12 23:18 ` xianwenchen
2021-04-14 22:48 ` lane-brain
2021-05-14 6:28 ` Sparkenstein
2021-07-29 10:16 ` brihadeesh
2021-07-29 12:20 ` FollieHiyuki
2021-07-29 12:21 ` FollieHiyuki
2021-07-29 16:36 ` brihadeesh
2021-08-27 17:34 ` ericonr
2021-08-31 6:00 ` lane-brain
2021-12-25 13:13 ` soanvig
2022-01-04 19:57 ` lane-brain
2022-01-17 21:31 ` michaelmrose
2022-01-17 22:16 ` lane-brain
2022-01-18 7:30 ` michaelmrose
2022-01-18 18:38 ` lane-brain
2022-03-03 7:47 ` brihadeesh
2022-03-03 8:11 ` brihadeesh
2022-03-11 19:52 ` KJ002
2022-03-12 16:47 ` lane-brain
2022-03-12 19:04 ` KJ002
2022-03-12 19:05 ` KJ002
2022-03-13 6:51 ` brihadeesh
2022-03-14 19:49 ` [PR PATCH] [Updated] " lane-brain
2022-03-14 19:56 ` lane-brain
2022-03-14 19:57 ` lane-brain
2022-03-14 19:58 ` lane-brain
2022-03-14 20:02 ` lane-brain
2022-03-14 20:02 ` lane-brain
2022-03-14 21:04 ` KJ002
2022-03-14 22:04 ` KJ002
2022-03-14 22:05 ` KJ002
2022-03-17 19:23 ` jbenden
2022-03-17 19:25 ` jbenden
2022-03-25 15:39 ` mustaqimM
2022-04-04 16:05 ` leahneukirchen
2022-04-04 16:09 ` [PR REVIEW] " leahneukirchen
2022-04-04 16:09 ` leahneukirchen
2022-04-04 16:11 ` leahneukirchen
2022-04-04 16:21 ` [PR REVIEW] " leahneukirchen
2022-04-14 2:29 ` lane-brain
2022-04-14 2:29 ` lane-brain
2022-04-14 2:31 ` lane-brain
2022-04-14 2:45 ` lane-brain
2022-04-14 3:03 ` [PR PATCH] [Updated] " lane-brain
2022-04-14 3:04 ` [PR REVIEW] " lane-brain
2022-04-14 11:30 ` leahneukirchen
2022-04-14 13:52 ` leahneukirchen
2022-04-14 15:38 ` sofeepokhrel
2022-04-14 18:11 ` lane-brain
2022-04-14 18:12 ` lane-brain
2022-04-14 18:15 ` lane-brain
2022-04-14 18:20 ` lane-brain
2022-04-14 18:21 ` lane-brain
2022-04-14 18:38 ` leahneukirchen
2022-04-14 18:40 ` leahneukirchen
2022-04-14 20:03 ` [PR PATCH] [Updated] " lane-brain
2022-04-14 20:07 ` lane-brain
2022-04-14 20:15 ` [PR REVIEW] " paper42
2022-04-14 20:15 ` paper42
2022-04-14 20:15 ` paper42
2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
2022-04-14 20:19 ` paper42
2022-04-14 20:23 ` leahneukirchen
2022-04-14 20:25 ` leahneukirchen
2022-04-14 20:25 ` leahneukirchen
2022-04-15 15:27 ` [PR PATCH] [Updated] " leahneukirchen
2022-04-15 15:32 ` [PR REVIEW] " leahneukirchen
2022-04-16 11:48 ` [PR PATCH] [Merged]: " leahneukirchen
2022-07-02 1:39 ` [PR REVIEW] " acomeofficial
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).