diff --git a/common/shlibs b/common/shlibs index 61924610cc5273..c6400b5669665c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -60,7 +60,7 @@ libcc1plugin.so.0 gcc-6.2.1_1 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 +libgo.so.21 libgo-12.1.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 @@ -849,8 +849,8 @@ libgdkmm-2.4.so.1 gtkmm2-2.24.0_1 libgtkmm-2.4.so.1 gtkmm2-2.24.0_1 libquadmath.so.0 libquadmath-4.4.0_1 libgfortran.so.5 libgfortran-8.2.0_1 -libgnarl-10.so libada-10.2.0_1 -libgnat-10.so libada-10.2.0_1 +libgnarl-12.so libada-12.1.0_1 +libgnat-12.so libada-12.1.0_1 libwebp.so.7 libwebp-0.6.0_1 libwebpmux.so.3 libwebp-0.6.0_1 libwebpdemux.so.2 libwebp-0.5.0_1 @@ -1701,8 +1701,8 @@ libextractor.so.3 libextractor-1.1_1 libextractor_common.so.1 libextractor-1.1_1 libpano13.so.3 libpano13-2.9.19_1 libubsan.so.1 libsanitizer-8.2.0_1 -libtsan.so.0 libsanitizer-6.3.0_1 -libasan.so.6 libsanitizer-10.2.0_1 +libtsan.so.2 libsanitizer-12.1.0_1 +libasan.so.8 libsanitizer-12.1.0_1 liblsan.so.0 libsanitizer-6.3.0_1 libvtv.so.0 libvtv-6.3.0_1 libatomic.so.1 libatomic-4.9.0_1 diff --git a/srcpkgs/gcc/files/gccgo-musl.patch b/srcpkgs/gcc/files/gccgo-musl.patch index 9762739615af31..632ef951097b1a 100644 --- a/srcpkgs/gcc/files/gccgo-musl.patch +++ b/srcpkgs/gcc/files/gccgo-musl.patch @@ -53,17 +53,6 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc p := sysMmap(addr, n, prot, flags, fd, off) if uintptr(p) == _MAP_FAILED { return nil, errno() ---- a/libgo/go/runtime/signal_gccgo.go -+++ b/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") --- a/libgo/go/syscall/errstr.go +++ b/libgo/go/syscall/errstr.go @@ -5,7 +5,6 @@ @@ -140,55 +129,6 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc plwoff = &lwoff } n, err = splice(rfd, plroff, wfd, plwoff, len, flags) ---- a/libgo/mksigtab.sh -+++ b/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 ---- a/libgo/runtime/go-signal.c 2020-07-23 08:35:19.004402840 +0200 -+++ b/libgo/runtime/go-signal.c 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; --- a/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h @@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*); @@ -220,3 +160,17 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc #if defined(HAVE_SYS_UTSNAME_H) #include #endif +--- a/libgo/go/runtime/os_linux.go ++++ a/libgo/go/runtime/os_linux.go +@@ -363,9 +363,9 @@ + + var timerid int32 + var sevp _sigevent +- sevp.sigev_notify = _SIGEV_THREAD_ID ++ sevp.sigev_notify = 4 + sevp.sigev_signo = _SIGPROF +- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid) ++ *((*int32)(unsafe.Pointer(&sevp.sigev_notify_function))) = int32(mp.procid) + ret := timer_create(_CLOCK_THREAD_CPUTIME_ID, &sevp, &timerid) + if ret != 0 { + // If we cannot create a timer for this M, leave profileTimerValid false diff --git a/srcpkgs/gcc/files/libgnarl-musl.patch b/srcpkgs/gcc/files/libgnarl-musl.patch index 99a734c42c90de..91c95949e0e910 100644 --- a/srcpkgs/gcc/files/libgnarl-musl.patch +++ b/srcpkgs/gcc/files/libgnarl-musl.patch @@ -5,7 +5,7 @@ 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 --- a/gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800 +++ b/gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700 -@@ -394,12 +394,6 @@ package System.OS_Interface is +@@ -403,12 +403,6 @@ package System.OS_Interface is PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1; PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2; @@ -18,7 +18,7 @@ diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/l 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 +@@ -470,11 +464,6 @@ package System.OS_Interface is protocol : int) return int; pragma Import (C, pthread_mutexattr_setprotocol); @@ -33,7 +33,7 @@ diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/l 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 --- a/gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800 +++ b/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 +@@ -198,9 +198,6 @@ package body System.Task_Primitives.Oper pragma Import (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup"); @@ -43,7 +43,7 @@ diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/l -- 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 +@@ -210,38 +207,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. @@ -76,13 +76,13 @@ diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/l - return Ceiling_Support; - end Get_Ceiling_Support; - -- pragma Warnings (Off, "non-static call not allowed in preelaborated unit"); +- pragma Warnings (Off, "non-preelaborable call not allowed*"); - Ceiling_Support : constant Boolean := Get_Ceiling_Support; -- pragma Warnings (On, "non-static call not allowed in preelaborated unit"); +- pragma Warnings (On, "non-preelaborable call not allowed*"); -- 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 +@@ -344,7 +309,9 @@ package body System.Task_Primitives.Oper -- Init_Mutex -- ---------------- @@ -92,7 +92,7 @@ diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/l Mutex_Attr : aliased pthread_mutexattr_t; Result, Result_2 : C.int; -@@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper +@@ -356,16 +323,7 @@ package body System.Task_Primitives.Oper return Result; end if; @@ -110,7 +110,7 @@ diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/l Result := pthread_mutexattr_setprotocol (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT); pragma Assert (Result = 0); -@@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper +@@ -405,11 +363,6 @@ package body System.Task_Primitives.Oper Result := pthread_rwlockattr_init (RWlock_Attr'Access); pragma Assert (Result = 0); diff --git a/srcpkgs/gcc/files/libssp-musl.patch b/srcpkgs/gcc/files/libssp-musl.patch index b21a2c29e57c7f..99f248401a1ccc 100644 --- a/srcpkgs/gcc/files/libssp-musl.patch +++ b/srcpkgs/gcc/files/libssp-musl.patch @@ -2,9 +2,9 @@ First part taken from Alpine. Second part added to prevent gccgo from thinking it can -fsplit-stack on musl. ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -874,10 +874,15 @@ proper position among the other output files. */ +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -984,10 +984,15 @@ proper position among the other output f #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" #endif @@ -22,10 +22,10 @@ Second part added to prevent gccgo from thinking it can -fsplit-stack on musl. #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 = +@@ -1280,7 +1285,7 @@ static const char *cc1_options = %{-version:--version}\ %{-help=*:--help=%*}\ - %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\ + %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %w%b.s}}}\ - %{fsyntax-only:-o %j} %{-param*}\ + %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\ %{coverage:-fprofile-arcs -ftest-coverage}\ diff --git a/srcpkgs/gcc/patches/3b21c21f3f5726823e19728fdd1571a14aae0fb3.patch b/srcpkgs/gcc/patches/3b21c21f3f5726823e19728fdd1571a14aae0fb3.patch new file mode 100644 index 00000000000000..00929202a50384 --- /dev/null +++ b/srcpkgs/gcc/patches/3b21c21f3f5726823e19728fdd1571a14aae0fb3.patch @@ -0,0 +1,105 @@ +From 3b21c21f3f5726823e19728fdd1571a14aae0fb3 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 27 Jun 2022 13:27:24 +0100 +Subject: [PATCH] c++: avoid poisoning on musl [PR106102] + +On musl uses calloc() (via ). includes +it indirectly and exposes use of poisoned calloc() when module code +is built: + + /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc + In file included from /<>/musl-1.2.3-dev/include/pthread.h:30, + from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/x86_64-unknown-linux-musl/bits/gthr-default.h:35, + .... + from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/memory:77, + from ../../gcc-13-20220626/gcc/../libcody/cody.hh:24, + from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.h:25, + from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.cc:23, + from ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc:32: + /<>/musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc" + 84 | void *calloc(size_t, size_t); + | ^ + /<>/musl-1.2.3-dev/include/sched.h:124:36: error: attempt to use poisoned "calloc" + 124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n))) + | ^ + +gcc/cp/ + + PR c++/106102 + * mapper-client.cc: Include via "system.h". + * mapper-resolver.cc: Ditto. + * module.cc: Ditto. + +libcc1/ + + PR c++/106102 + * libcc1plugin.cc: Include via "system.h". + * libcp1plugin.cc: Ditto. +--- + gcc/cp/mapper-client.cc | 1 + + gcc/cp/mapper-resolver.cc | 1 + + gcc/cp/module.cc | 1 + + libcc1/libcc1plugin.cc | 1 + + libcc1/libcp1plugin.cc | 1 + + 5 files changed, 5 insertions(+) + +diff --git a/gcc/cp/mapper-client.cc b/gcc/cp/mapper-client.cc +index 8603a886a099..fe9544b5ba43 100644 +--- a/gcc/cp/mapper-client.cc ++++ b/gcc/cp/mapper-client.cc +@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see + #define INCLUDE_STRING + #define INCLUDE_VECTOR + #define INCLUDE_MAP ++#define INCLUDE_MEMORY + #include "system.h" + + #include "line-map.h" +diff --git a/gcc/cp/mapper-resolver.cc b/gcc/cp/mapper-resolver.cc +index e3d29fb5ada1..e70d1b4ae2ca 100644 +--- a/gcc/cp/mapper-resolver.cc ++++ b/gcc/cp/mapper-resolver.cc +@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see + #define INCLUDE_VECTOR + #define INCLUDE_ALGORITHM + #define INCLUDE_MAP ++#define INCLUDE_MEMORY + #include "system.h" + + // We don't want or need to be aware of networking +diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc +index 753963a4b246..8bb22c2b305a 100644 +--- a/gcc/cp/module.cc ++++ b/gcc/cp/module.cc +@@ -206,6 +206,7 @@ Classes used: + + #define _DEFAULT_SOURCE 1 /* To get TZ field of struct tm, if available. */ + #include "config.h" ++#define INCLUDE_MEMORY + #define INCLUDE_STRING + #define INCLUDE_VECTOR + #include "system.h" +diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc +index 12ab5a57c8dd..bdd0bdabe77f 100644 +--- a/libcc1/libcc1plugin.cc ++++ b/libcc1/libcc1plugin.cc +@@ -31,6 +31,7 @@ + #undef PACKAGE_TARNAME + #undef PACKAGE_VERSION + ++#define INCLUDE_MEMORY + #include "gcc-plugin.h" + #include "system.h" + #include "coretypes.h" +diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc +index 83dab7f58b11..e2d5039a0a1f 100644 +--- a/libcc1/libcp1plugin.cc ++++ b/libcc1/libcp1plugin.cc +@@ -32,6 +32,7 @@ + #undef PACKAGE_TARNAME + #undef PACKAGE_VERSION + ++#define INCLUDE_MEMORY + #include "gcc-plugin.h" + #include "system.h" + #include "coretypes.h" diff --git a/srcpkgs/gcc/patches/49d508065bdd36fb1a9b6aad9666b1edb5e06474.patch b/srcpkgs/gcc/patches/49d508065bdd36fb1a9b6aad9666b1edb5e06474.patch new file mode 100644 index 00000000000000..89bd053d6d0432 --- /dev/null +++ b/srcpkgs/gcc/patches/49d508065bdd36fb1a9b6aad9666b1edb5e06474.patch @@ -0,0 +1,115 @@ +From 49d508065bdd36fb1a9b6aad9666b1edb5e06474 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Mon, 27 Jun 2022 23:42:44 +0100 +Subject: [PATCH] jit: avoid calloc() poisoning on musl [PR106102] + +On musl uses calloc() (via ). jit/ includes +it directly and exposes use of poisoned calloc(): + + /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/jit/jit-playback.cc + make[3]: *** [Makefile:1143: jit/libgccjit.o] Error 1 + make[3]: *** Waiting for unfinished jobs.... + In file included from /<>/musl-1.2.3-dev/include/pthread.h:30, + from ../../gcc-13-20220626/gcc/jit/jit-playback.cc:44: + /<>/musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc" + 84 | void *calloc(size_t, size_t); + | ^ + /<>/musl-1.2.3-dev/include/sched.h:124:36: error: attempt to use poisoned "calloc" + 124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n))) + | ^ + +The change moves inclusion to "system.h" under new +INCLUDE_PTHREAD_H guard and uses this mechanism in libgccjit. + +gcc/ + + PR c++/106102 + * system.h: Introduce INCLUDE_PTHREAD_H macros to include . + +gcc/jit/ + + PR c++/106102 + * jit-playback.cc: Include via "system.h" to avoid calloc() + poisoning. + * jit-recording.cc: Ditto. + * libgccjit.cc: Ditto. +--- + gcc/jit/jit-playback.cc | 3 +-- + gcc/jit/jit-recording.cc | 2 +- + gcc/jit/libgccjit.cc | 2 +- + gcc/system.h | 4 ++++ + 4 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc +index 6be6bdf8dea5..79714132b91a 100644 +--- a/gcc/jit/jit-playback.cc ++++ b/gcc/jit/jit-playback.cc +@@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see + . */ + + #include "config.h" ++#define INCLUDE_PTHREAD_H + #include "system.h" + #include "coretypes.h" + #include "target.h" +@@ -41,8 +42,6 @@ along with GCC; see the file COPYING3. If not see + #include "diagnostic.h" + #include "stmt.h" + +-#include +- + #include "jit-playback.h" + #include "jit-result.h" + #include "jit-builtins.h" +diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc +index 697dee66e733..f78daed2d71a 100644 +--- a/gcc/jit/jit-recording.cc ++++ b/gcc/jit/jit-recording.cc +@@ -19,13 +19,13 @@ along with GCC; see the file COPYING3. If not see + . */ + + #include "config.h" ++#define INCLUDE_PTHREAD_H + #include "system.h" + #include "coretypes.h" + #include "tm.h" + #include "pretty-print.h" + #include "toplev.h" + +-#include + + #include "jit-builtins.h" + #include "jit-recording.h" +diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc +index 0e76097b4bac..ca862662777e 100644 +--- a/gcc/jit/libgccjit.cc ++++ b/gcc/jit/libgccjit.cc +@@ -19,12 +19,12 @@ along with GCC; see the file COPYING3. If not see + . */ + + #include "config.h" ++#define INCLUDE_PTHREAD_H + #include "system.h" + #include "coretypes.h" + #include "timevar.h" + #include "typed-splay-tree.h" + #include "cppbuiltin.h" +-#include + + #include "libgccjit.h" + #include "jit-recording.h" +diff --git a/gcc/system.h b/gcc/system.h +index 67158b70c789..f8d42ff68150 100644 +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -753,6 +753,10 @@ extern int vsnprintf (char *, size_t, const char *, va_list); + #endif + #endif + ++#ifdef INCLUDE_PTHREAD_H ++#include ++#endif ++ + #ifdef INCLUDE_ISL + #ifdef HAVE_isl + #include diff --git a/srcpkgs/gcc/patches/libffi_gnulinux.patch b/srcpkgs/gcc/patches/libffi_gnulinux.patch deleted file mode 100644 index 98245bd5be1a33..00000000000000 --- a/srcpkgs/gcc/patches/libffi_gnulinux.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libffi/src/closures.c -+++ b/libffi/src/closures.c -@@ -34,7 +34,7 @@ - #include - - #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/gcc/patches/libgcc-ibm128-no-tag.patch b/srcpkgs/gcc/patches/libgcc-ibm128-no-tag.patch index bdf5c75d917d73..26d80356ad0d83 100644 --- a/srcpkgs/gcc/patches/libgcc-ibm128-no-tag.patch +++ b/srcpkgs/gcc/patches/libgcc-ibm128-no-tag.patch @@ -29,10 +29,14 @@ diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux index 4f6d4c4..fa93bb6 100644 --- a/libgcc/config/rs6000/t-linux +++ b/libgcc/config/rs6000/t-linux -@@ -1,3 +1,3 @@ +@@ -1,6 +1,6 @@ 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 +-HOST_LIBGCC2_CFLAGS += -mlong-double-128 ++HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute + + # This is a way of selecting -mcmodel=small for ppc64, which gives + # smaller and faster libgcc code. Directly specifying -mcmodel=small + -- 2.24.0 diff --git a/srcpkgs/gcc/patches/mips-sgidefs_h.patch b/srcpkgs/gcc/patches/mips-sgidefs_h.patch index dddfe10e8c06ad..78a2ce35875de8 100644 --- a/srcpkgs/gcc/patches/mips-sgidefs_h.patch +++ b/srcpkgs/gcc/patches/mips-sgidefs_h.patch @@ -3,9 +3,10 @@ @@ -42,7 +42,7 @@ #define _MIPS_SIM_NABI32 2 #define _MIPS_SIM_ABI64 3 - #elif !defined(__OpenBSD__) + #elif !defined(__OpenBSD__) && !defined(__FreeBSD__) -# include +# include #endif # ifndef _ABIN32 + diff --git a/srcpkgs/gcc/template b/srcpkgs/gcc/template index 09727ef34fb253..32ee79e32f0d1a 100644 --- a/srcpkgs/gcc/template +++ b/srcpkgs/gcc/template @@ -3,18 +3,15 @@ # which use the version number. pkgname=gcc -# 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=3 +version=12.1.0 +revision=1 _patchver="${version%pre*}" _minorver="${_patchver%.*}" _majorver="${_minorver%.*}" -_gmp_version=6.2.0 +_gmp_version=6.2.1 _mpfr_version=4.1.0 -_mpc_version=1.1.0 -_isl_version=0.21 +_mpc_version=1.2.1 +_isl_version=0.24 wrksrc=gcc-${version/pre/_pre} short_desc="GNU Compiler Collection" maintainer="Enno Boland " @@ -22,16 +19,16 @@ 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 + ${GNU_SITE}/gcc/gcc-${version}/gcc-${version}.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 +checksum="62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b + fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f - 6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e - d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859" + 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459 + fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0" nopie=yes lib32disabled=yes @@ -396,7 +393,7 @@ gcc-ada_package() { depends="gcc>=${_minorver} libada-devel>=${_minorver}" short_desc+=" - Ada compiler frontend" pkg_install() { - for f in gnat{,bind,chop,clean,find,kr,link,ls,make,name,prep,xref}; do + for f in gnat{,bind,chop,clean,kr,link,ls,make,name,prep}; do vmove usr/bin/${f} done }