gcc: update to 12.2.0.

This commit is contained in:
oreo639 2022-11-05 11:33:11 -07:00 committed by Đoàn Trần Công Danh
parent 865e3713a8
commit eb82e2578b
9 changed files with 102 additions and 139 deletions

View file

@ -60,7 +60,7 @@ libcc1plugin.so.0 gcc-6.2.1_1
libitm.so.1 libitm-4.7.3_1 libitm.so.1 libitm-4.7.3_1
liblto_plugin.so.0 gcc-4.7.3_1 liblto_plugin.so.0 gcc-4.7.3_1
libgcc_s.so.1 libgcc-4.4.0_1 libgcc_s.so.1 libgcc-4.4.0_1
libgo.so.16 libgo-10.2.0_1 libgo.so.21 libgo-12.2.0_1
libgccjit.so.0 libgccjit-10.2.1pre1_1 libgccjit.so.0 libgccjit-10.2.1pre1_1
libperl.so.5.36 perl-5.36.0_1 libperl.so.5.36 perl-5.36.0_1
libgmp.so.10 gmp-5.0.1_1 libgmp.so.10 gmp-5.0.1_1
@ -855,8 +855,8 @@ libgdkmm-2.4.so.1 gtkmm2-2.24.0_1
libgtkmm-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 libquadmath.so.0 libquadmath-4.4.0_1
libgfortran.so.5 libgfortran-8.2.0_1 libgfortran.so.5 libgfortran-8.2.0_1
libgnarl-10.so libada-10.2.0_1 libgnarl-12.so libada-12.2.0_1
libgnat-10.so libada-10.2.0_1 libgnat-12.so libada-12.2.0_1
libwebp.so.7 libwebp-0.6.0_1 libwebp.so.7 libwebp-0.6.0_1
libwebpmux.so.3 libwebp-0.6.0_1 libwebpmux.so.3 libwebp-0.6.0_1
libwebpdemux.so.2 libwebp-0.5.0_1 libwebpdemux.so.2 libwebp-0.5.0_1
@ -1710,8 +1710,8 @@ libextractor.so.3 libextractor-1.1_1
libextractor_common.so.1 libextractor-1.1_1 libextractor_common.so.1 libextractor-1.1_1
libpano13.so.3 libpano13-2.9.19_1 libpano13.so.3 libpano13-2.9.19_1
libubsan.so.1 libsanitizer-8.2.0_1 libubsan.so.1 libsanitizer-8.2.0_1
libtsan.so.0 libsanitizer-6.3.0_1 libtsan.so.2 libsanitizer-12.2.0_1
libasan.so.6 libsanitizer-10.2.0_1 libasan.so.8 libsanitizer-12.2.0_1
liblsan.so.0 libsanitizer-6.3.0_1 liblsan.so.0 libsanitizer-6.3.0_1
libvtv.so.0 libvtv-6.3.0_1 libvtv.so.0 libvtv-6.3.0_1
libatomic.so.1 libatomic-4.9.0_1 libatomic.so.1 libatomic-4.9.0_1

View file

@ -53,17 +53,6 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
p := sysMmap(addr, n, prot, flags, fd, off) p := sysMmap(addr, n, prot, flags, fd, off)
if uintptr(p) == _MAP_FAILED { if uintptr(p) == _MAP_FAILED {
return nil, errno() 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 --- a/libgo/go/syscall/errstr.go
+++ b/libgo/go/syscall/errstr.go +++ b/libgo/go/syscall/errstr.go
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
@ -140,55 +129,6 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
plwoff = &lwoff plwoff = &lwoff
} }
n, err = splice(rfd, plroff, wfd, plwoff, len, flags) 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 --- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h +++ b/libgo/runtime/runtime.h
@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*); @@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*);
@ -220,3 +160,14 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc
#if defined(HAVE_SYS_UTSNAME_H) #if defined(HAVE_SYS_UTSNAME_H)
#include <sys/utsname.h> #include <sys/utsname.h>
#endif #endif
--- a/libgo/go/runtime/os_linux.go
+++ b/libgo/go/runtime/os_linux.go
@@ -365,7 +365,7 @@ func setThreadCPUProfiler(hz int32) {
var sevp _sigevent
sevp.sigev_notify = _SIGEV_THREAD_ID
sevp.sigev_signo = _SIGPROF
- *((*int32)(unsafe.Pointer(&sevp._sigev_un))) = int32(mp.procid)
+ *((*int32)(unsafe.Pointer(&sevp.__sev_fields))) = 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

View file

@ -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 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 --- 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 +++ 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_NP : constant := 1;
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2; 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 function pthread_rwlock_init
(mutex : access pthread_rwlock_t; (mutex : access pthread_rwlock_t;
attr : access pthread_rwlockattr_t) return int; 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; protocol : int) return int;
pragma Import (C, pthread_mutexattr_setprotocol); 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 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 --- 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 +++ 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 pragma Import
(C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup"); (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 -- We do not have pragma Linker_Options ("-lcap"); here, because this
-- library is not present on many Linux systems. 'libcap' is the Linux -- library is not present on many Linux systems. 'libcap' is the Linux
-- "capabilities" library, called by __gnat_has_cap_sys_nice. -- "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 -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
-- GNU/Linux, so we map 0 .. 98 to 1 .. 99. -- 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; - return Ceiling_Support;
- end Get_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; - 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 -- 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 -- 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, -- 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 -- -- 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; Mutex_Attr : aliased pthread_mutexattr_t;
Result, Result_2 : C.int; 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; return Result;
end if; 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 Result := pthread_mutexattr_setprotocol
(Mutex_Attr'Access, PTHREAD_PRIO_INHERIT); (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
pragma Assert (Result = 0); 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); Result := pthread_rwlockattr_init (RWlock_Attr'Access);
pragma Assert (Result = 0); pragma Assert (Result = 0);

View file

@ -2,9 +2,9 @@ First part taken from Alpine.
Second part added to prevent gccgo from thinking it can -fsplit-stack on musl. Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
--- a/gcc/gcc.c --- a/gcc/gcc.cc
+++ b/gcc/gcc.c +++ b/gcc/gcc.cc
@@ -874,10 +874,15 @@ proper position among the other output files. */ @@ -984,10 +984,15 @@ proper position among the other output f
#define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}" #define LINK_GCC_C_SEQUENCE_SPEC "%G %{!nolibc:%L %G}"
#endif #endif
@ -22,10 +22,10 @@ Second part added to prevent gccgo from thinking it can -fsplit-stack on musl.
#else #else
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
"|fstack-protector-strong|fstack-protector-explicit" \ "|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}\ %{-version:--version}\
%{-help=*:--help=%*}\ %{-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*}\
+ %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\ + %{fsyntax-only:-o %j} %{-param*} " NO_SSP_SPEC "\
%{coverage:-fprofile-arcs -ftest-coverage}\ %{coverage:-fprofile-arcs -ftest-coverage}\

View file

@ -0,0 +1,21 @@
This is necessary when building a gnu cross compiler for a musl target.
Otherwise, even if clocale manually is set to gnu, it will be reset to generic
when the test is performed using AC_EGREP_CPP().
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -16493,6 +16493,7 @@ fi
# Sanity check model, and test for special functionality.
if test $enable_clocale_flag = gnu; then
+ if test $enable_clocale = auto; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -16509,6 +16510,7 @@ else
enable_clocale_flag=generic
fi
rm -f conftest*
+ fi
# Set it to scream when it hurts.

View file

@ -1,11 +0,0 @@
--- a/libffi/src/closures.c
+++ b/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

View file

@ -29,10 +29,14 @@ diff --git a/libgcc/config/rs6000/t-linux b/libgcc/config/rs6000/t-linux
index 4f6d4c4..fa93bb6 100644 index 4f6d4c4..fa93bb6 100644
--- a/libgcc/config/rs6000/t-linux --- a/libgcc/config/rs6000/t-linux
+++ b/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 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-glibc.ver
-HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-minimal-toc -HOST_LIBGCC2_CFLAGS += -mlong-double-128
+HOST_LIBGCC2_CFLAGS += -mlong-double-128 -mno-gnu-attribute -mno-minimal-toc +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 2.24.0

View file

@ -3,7 +3,7 @@
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
#define _MIPS_SIM_NABI32 2 #define _MIPS_SIM_NABI32 2
#define _MIPS_SIM_ABI64 3 #define _MIPS_SIM_ABI64 3
#elif !defined(__OpenBSD__) #elif !defined(__OpenBSD__) && !defined(__FreeBSD__)
-# include <sgidefs.h> -# include <sgidefs.h>
+# include <asm/sgidefs.h> +# include <asm/sgidefs.h>
#endif #endif

View file

@ -3,18 +3,14 @@
# which use the version number. # which use the version number.
pkgname=gcc pkgname=gcc
# we are using a 10-stable git snapshot alpine is using in order version=12.2.0
# to get regression fixes not yet incorporate into a stable release revision=1
# it should be possible to switch back to stable with 10.3 or 11 _minorver="${version%.*}"
version=10.2.1pre1
revision=3
_patchver="${version%pre*}"
_minorver="${_patchver%.*}"
_majorver="${_minorver%.*}" _majorver="${_minorver%.*}"
_gmp_version=6.2.0 _gmp_version=6.2.1
_mpfr_version=4.1.0 _mpfr_version=4.1.0
_mpc_version=1.1.0 _mpc_version=1.2.1
_isl_version=0.21 _isl_version=0.24
create_wrksrc=yes create_wrksrc=yes
short_desc="GNU Compiler Collection" short_desc="GNU Compiler Collection"
maintainer="Enno Boland <gottox@voidlinux.org>" maintainer="Enno Boland <gottox@voidlinux.org>"
@ -22,17 +18,18 @@ homepage="http://gcc.gnu.org"
license="GFDL-1.2-or-later, GPL-3.0-or-later, LGPL-2.1-or-later" 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 # *-musl builders have issues fetching https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
distfiles=" 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 https://gmplib.org/download/gmp/gmp-${_gmp_version}.tar.xz
${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz ${GNU_SITE}/mpfr/mpfr-${_mpfr_version}.tar.xz
${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz ${GNU_SITE}/mpc/mpc-${_mpc_version}.tar.gz
${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2" ${SOURCEFORGE_SITE}/libisl/isl-${_isl_version}.tar.bz2"
checksum="772cfd5d30eb9cc5a996fec9ba8cdcb45d37df1c9b5770610103b814b732c590 checksum="e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff
258e6cd51b3fbdfc185c716d55f82c08aff57df0c6fbd143cf6ed561267a1526 fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f 0c98a3f1732ff6ca4ea690552079da9c597872d30e96ec28414ee23c95558a7f
6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e 17503d2c395dfcf106b622dc142683c1199431d095367c6aacba6eec30340459
d18ca11f8ad1a39ab6d03d3dcb3365ab416720fcb65b42d69f34f51bf0a0e859" fcf78dd9656c10eb8cf9fbd5f59a0b6b01386205fe1934b3b287a0a1898145c0"
nocross=temporarily
nopie=yes nopie=yes
lib32disabled=yes lib32disabled=yes
bootstrap=yes bootstrap=yes
@ -52,8 +49,11 @@ if [ "$CHROOT_READY" ]; then
hostmakedepends="tar texinfo perl flex" hostmakedepends="tar texinfo perl flex"
else else
_have_gccgo=no _have_gccgo=no
# libzstd fails to link in bootstrap with glibc 2.36
# when zlib has been compiled with glibc 2.32.
LDFLAGS="-lzstd -pthread"
fi fi
makedepends="zlib-devel" makedepends="zlib-devel libzstd-devel"
depends="binutils libgcc-devel-${version}_${revision} depends="binutils libgcc-devel-${version}_${revision}
libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}" libstdc++-devel-${version}_${revision} libssp-devel-${version}_${revision}"
checkdepends="dejagnu" checkdepends="dejagnu"
@ -70,13 +70,13 @@ if [ "$build_option_gnatboot" ]; then
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
x86_64) x86_64)
_gnat_tarball="gnat-gpl-2017-x86_64-linux-bin.tar.gz" _gnat_tarball="gnat-gpl-2017-x86_64-linux-bin.tar.gz"
distfiles+=" http://mirrors.cdn.adacore.com/art/591c6d80c7a447af2deed1d7>$_gnat_tarball" distfiles+=" https://community.download.adacore.com/v1/9682e2e1f2f232ce03fe21d77b14c37a0de5649b?filename=$_gnat_tarball>$_gnat_tarball"
checksum+=" b942bcac20dea39748b39f8b624d9619f60a8dee2e8195dbe3829c835b0956e6" checksum+=" b942bcac20dea39748b39f8b624d9619f60a8dee2e8195dbe3829c835b0956e6"
build_options_default="gnatboot" build_options_default="gnatboot"
;; ;;
i686) i686)
_gnat_tarball="gnat-gpl-2014-x86-linux-bin.tar.gz" _gnat_tarball="gnat-gpl-2014-x86-linux-bin.tar.gz"
distfiles+=" http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248>$_gnat_tarball" distfiles+=" https://community.download.adacore.com/v1/c5e9e6fdff5cb77ed90cf8c62536653e27c0bed6?filename=$_gnat_tarball>$_gnat_tarball"
checksum+=" 3b693510f5d22a240abb3034934c1adbd80ccd6e4f61a4f491cc408fdfd9c042" checksum+=" 3b693510f5d22a240abb3034934c1adbd80ccd6e4f61a4f491cc408fdfd9c042"
build_options_default="gnatboot" build_options_default="gnatboot"
;; ;;
@ -155,8 +155,8 @@ if [ "$CROSS_BUILD" ]; then
fi fi
post_extract() { post_extract() {
mv gcc-${version/pre/_pre}/* gcc-${version/pre/_pre}/.??* . mv gcc-${version}/* gcc-${version}/.??* .
rmdir gcc-${version/pre/_pre} rmdir gcc-${version}
mv gmp-${_gmp_version} gmp mv gmp-${_gmp_version} gmp
mv mpfr-${_mpfr_version} mpfr mv mpfr-${_mpfr_version} mpfr
mv mpc-${_mpc_version} mpc mv mpc-${_mpc_version} mpc
@ -186,9 +186,9 @@ pre_configure() {
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
if [ "$XBPS_TARGET_LIBC" = musl ]; then if [ "$XBPS_TARGET_LIBC" = musl ]; then
patch -p1 -i ${FILESDIR}/libgnarl-musl.patch for p in ${FILESDIR}/*-musl.patch; do
patch -p1 -i ${FILESDIR}/libssp-musl.patch patch -p1 -i $p
patch -p1 -i ${FILESDIR}/gccgo-musl.patch done
fi fi
} }
do_configure() { do_configure() {
@ -343,16 +343,16 @@ do_install() {
# Make version a symlink of major version to make all versions # Make version a symlink of major version to make all versions
# from the same series work automagically. # from the same series work automagically.
mv ${DESTDIR}/usr/lib/gcc/${_triplet}/${_patchver} \ mv ${DESTDIR}/usr/lib/gcc/${_triplet}/${version} \
${DESTDIR}/usr/lib/gcc/${_triplet}/${_minorver} ${DESTDIR}/usr/lib/gcc/${_triplet}/${_minorver}
ln -sfr ${DESTDIR}/usr/lib/gcc/${_triplet}/${_minorver} \ ln -sfr ${DESTDIR}/usr/lib/gcc/${_triplet}/${_minorver} \
${DESTDIR}/usr/lib/gcc/${_triplet}/${_patchver} ${DESTDIR}/usr/lib/gcc/${_triplet}/${version}
# Ditto for c++ headers. # Ditto for c++ headers.
mv ${DESTDIR}/usr/include/c++/${_patchver} \ mv ${DESTDIR}/usr/include/c++/${version} \
${DESTDIR}/usr/include/c++/${_minorver} ${DESTDIR}/usr/include/c++/${_minorver}
ln -sfr ${DESTDIR}/usr/include/c++/${_minorver} \ ln -sfr ${DESTDIR}/usr/include/c++/${_minorver} \
${DESTDIR}/usr/include/c++/${_patchver} ${DESTDIR}/usr/include/c++/${version}
# cc symlink # cc symlink
ln -sfr ${DESTDIR}/usr/bin/gcc ${DESTDIR}/usr/bin/cc ln -sfr ${DESTDIR}/usr/bin/gcc ${DESTDIR}/usr/bin/cc
@ -361,7 +361,7 @@ do_install() {
# lto plugin symlink # lto plugin symlink
vmkdir usr/lib/bfd-plugins vmkdir usr/lib/bfd-plugins
ln -sfr ${DESTDIR}/usr/lib/gcc/${_triplet}/${_patchver}/liblto_plugin.so \ ln -sfr ${DESTDIR}/usr/lib/gcc/${_triplet}/${version}/liblto_plugin.so \
${DESTDIR}/usr/lib/bfd-plugins ${DESTDIR}/usr/lib/bfd-plugins
# Remove "fixed" header # Remove "fixed" header
@ -372,13 +372,9 @@ do_install() {
rm -f ${DESTDIR}/usr/lib/libffi* rm -f ${DESTDIR}/usr/lib/libffi*
rm -f ${DESTDIR}/usr/share/man/man3/ffi* rm -f ${DESTDIR}/usr/share/man/man3/ffi*
# Remove all python scripts in libdir. # Move libstdc++ gdb helpers to location where gdb can autoload them
rm -f ${DESTDIR}/usr/lib/*.py mkdir -p ${DESTDIR}/usr/share/gdb/auto-load/usr/lib
mv ${DESTDIR}/usr/lib/*.py ${DESTDIR}/usr/share/gdb/auto-load/usr/lib
# Remove more python stuff.
if [ -d ${DESTDIR}/usr/share/gcc-${_patchver}/python ]; then
rm -rf ${DESTDIR}/usr/share/gcc-${_patchver}/python
fi
# Install c89 and c99 wrappers and its manpages, from NetBSD. # Install c89 and c99 wrappers and its manpages, from NetBSD.
for f in c89 c99; do for f in c89 c99; do
@ -397,7 +393,7 @@ gcc-ada_package() {
depends="gcc>=${_minorver} libada-devel>=${_minorver}" depends="gcc>=${_minorver} libada-devel>=${_minorver}"
short_desc+=" - Ada compiler frontend" short_desc+=" - Ada compiler frontend"
pkg_install() { 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} vmove usr/bin/${f}
done done
} }
@ -450,7 +446,7 @@ gcc-fortran_package() {
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
# A number of OMP modules are not built when cross # A number of OMP modules are not built when cross
# compiling gcc. Copy them from the cross compiler. # compiling gcc. Copy them from the cross compiler.
local src="/usr/lib/gcc/${_triplet}/${_patchver}/finclude" local src="/usr/lib/gcc/${_triplet}/${version}/finclude"
local dst="usr/lib/gcc/${_triplet}/${_minorver}/finclude" local dst="usr/lib/gcc/${_triplet}/${_minorver}/finclude"
for f in omp_lib.f90 omp_lib.h omp_lib.mod omp_lib_kinds.mod \ for f in omp_lib.f90 omp_lib.h omp_lib.mod omp_lib_kinds.mod \
openacc.f90 openacc.mod openacc_kinds.mod openacc_lib.h; do openacc.f90 openacc.mod openacc_kinds.mod openacc_lib.h; do
@ -517,7 +513,7 @@ libgfortran_package() {
short_desc+=" - Fortran library" short_desc+=" - Fortran library"
pkg_install() { pkg_install() {
vmove "usr/lib/libgfortran.so*" vmove "usr/lib/libgfortran.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -538,7 +534,7 @@ libgo_package() {
nostrip=yes nostrip=yes
pkg_install() { pkg_install() {
vmove "usr/lib/libgo.so*" vmove "usr/lib/libgo.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -554,7 +550,7 @@ libobjc_package() {
short_desc+=" - Objective-C library" short_desc+=" - Objective-C library"
pkg_install() { pkg_install() {
vmove "usr/lib/libobjc.so*" vmove "usr/lib/libobjc.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -573,7 +569,7 @@ libquadmath_package() {
short_desc+=" - quadmath library" short_desc+=" - quadmath library"
pkg_install() { pkg_install() {
vmove "usr/lib/libquadmath.so*" vmove "usr/lib/libquadmath.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -615,7 +611,7 @@ libgcc_package() {
noverifyrdeps=yes noverifyrdeps=yes
pkg_install() { pkg_install() {
vmove "usr/lib/libgcc_s.so*" vmove "usr/lib/libgcc_s.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -646,7 +642,7 @@ libgomp_package() {
short_desc+=" - OpenMP v4.0 library" short_desc+=" - OpenMP v4.0 library"
pkg_install() { pkg_install() {
vmove "usr/lib/libgomp*.so.*" vmove "usr/lib/libgomp*.so.*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -701,7 +697,7 @@ libssp_package() {
short_desc+=" - SSP (StackSmashingProtection) library" short_desc+=" - SSP (StackSmashingProtection) library"
pkg_install() { pkg_install() {
vmove "usr/lib/libssp.so*" vmove "usr/lib/libssp.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }
@ -718,7 +714,9 @@ libstdc++-devel_package() {
libstdc++_package() { libstdc++_package() {
short_desc+=" - Standard C++ Library" short_desc+=" - Standard C++ Library"
pkg_install() { pkg_install() {
vmove usr/share/gdb
vmove usr/share/gcc-${version}/python
vmove "usr/lib/libstdc++.so*" vmove "usr/lib/libstdc++.so*"
vlicense ${wrksrc}/COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION vlicense COPYING.RUNTIME RUNTIME.LIBRARY.EXCEPTION
} }
} }