From 223093d95abfc2b2161105f2ef73a8287c687d95 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 28 Feb 2019 23:20:33 +0000 Subject: system/gcc: bump to 8.3.0 These patches have been forward-ported to 8: 002_all_default-relro.patch 005_all_default-as-needed.patch 011_all_default-warn-format-security.patch 012_all_default-warn-trampolines.patch We are no longer using fortify-headers, so these patches are no longer needed: 003_all_default-fortify-source.patch 050_all_libiberty-asprintf.patch 053_all_libitm-no-fortify-source.patch These patches no longer appear necessary: 067_all_gcc-poison-system-directories.patch 090_all_pr55930-dependency-tracking.patch 201-cilkrts.patch 203-libgcc_s.patch 207-static-pie.patch These patches have already been applied upstream: 204-linux_libc_has_function.patch 332-gccgo-remove-ustat.patch ada-aarch64-multiarch.patch ada-fixes.patch boehm-gc-musl.patch fix-rs6000-pie.patch gcc-4.8-build-args.patch lra-pentium.patch These patches are no longer necessary because GCJ has been removed: 310-build-gcj-s390x.patch fix-gcj-iconv-musl.patch fix-gcj-musl.patch fix-gcj-stdgnu14-link.patch The rest of the changes are updates from nsz's patchset. --- system/gcc/0002-posix_memalign.patch | 42 +++++ system/gcc/0008-s390x-muslldso.patch | 26 +++ system/gcc/0009-microblaze-pr65649.patch | 34 ++++ system/gcc/0010-ldbl128-config.patch | 76 ++++++++ system/gcc/0011-m68k.patch | 40 +++++ system/gcc/0012-static-pie.patch | 138 +++++++++++++++ system/gcc/002_all_default-relro.patch | 2 +- system/gcc/003_all_default-fortify-source.patch | 40 ----- system/gcc/005_all_default-as-needed.patch | 157 +++++++++-------- .../gcc/011_all_default-warn-format-security.patch | 38 +--- system/gcc/012_all_default-warn-trampolines.patch | 2 +- system/gcc/050_all_libiberty-asprintf.patch | 18 -- system/gcc/053_all_libitm-no-fortify-source.patch | 27 --- .../067_all_gcc-poison-system-directories.patch | 194 --------------------- .../gcc/090_all_pr55930-dependency-tracking.patch | 18 -- system/gcc/201-cilkrts.patch | 59 ------- system/gcc/203-libgcc_s.patch | 56 ------ system/gcc/204-linux_libc_has_function.patch | 25 --- system/gcc/207-static-pie.patch | 40 ----- ...00-main-gcc-add-musl-s390x-dynamic-linker.patch | 32 ---- system/gcc/310-build-gcj-s390x.patch | 28 --- system/gcc/332-gccgo-remove-ustat.patch | 190 -------------------- system/gcc/332-gccgo-sysinfo.patch | 12 ++ system/gcc/333-gccgo-signal-ppc64.patch | 11 ++ system/gcc/APKBUILD | 174 ++++-------------- system/gcc/ada-aarch64-multiarch.patch | 16 -- system/gcc/ada-fixes.patch | 35 ---- system/gcc/boehm-gc-musl.patch | 62 ------- system/gcc/fix-gcj-iconv-musl.patch | 120 ------------- system/gcc/fix-gcj-musl.patch | 49 ------ system/gcc/fix-gcj-stdgnu14-link.patch | 35 ---- system/gcc/fix-rs6000-pie.patch | 59 ------- system/gcc/gcc-4.8-build-args.patch | 41 ----- system/gcc/lra-pentium.patch | 48 ----- 34 files changed, 501 insertions(+), 1443 deletions(-) create mode 100644 system/gcc/0002-posix_memalign.patch create mode 100644 system/gcc/0008-s390x-muslldso.patch create mode 100644 system/gcc/0009-microblaze-pr65649.patch create mode 100644 system/gcc/0010-ldbl128-config.patch create mode 100644 system/gcc/0011-m68k.patch create mode 100644 system/gcc/0012-static-pie.patch delete mode 100644 system/gcc/003_all_default-fortify-source.patch delete mode 100644 system/gcc/050_all_libiberty-asprintf.patch delete mode 100644 system/gcc/053_all_libitm-no-fortify-source.patch delete mode 100644 system/gcc/067_all_gcc-poison-system-directories.patch delete mode 100644 system/gcc/090_all_pr55930-dependency-tracking.patch delete mode 100644 system/gcc/201-cilkrts.patch delete mode 100644 system/gcc/203-libgcc_s.patch delete mode 100644 system/gcc/204-linux_libc_has_function.patch delete mode 100644 system/gcc/207-static-pie.patch delete mode 100644 system/gcc/300-main-gcc-add-musl-s390x-dynamic-linker.patch delete mode 100644 system/gcc/310-build-gcj-s390x.patch delete mode 100644 system/gcc/332-gccgo-remove-ustat.patch create mode 100644 system/gcc/332-gccgo-sysinfo.patch create mode 100644 system/gcc/333-gccgo-signal-ppc64.patch delete mode 100644 system/gcc/ada-aarch64-multiarch.patch delete mode 100644 system/gcc/ada-fixes.patch delete mode 100644 system/gcc/boehm-gc-musl.patch delete mode 100644 system/gcc/fix-gcj-iconv-musl.patch delete mode 100644 system/gcc/fix-gcj-musl.patch delete mode 100644 system/gcc/fix-gcj-stdgnu14-link.patch delete mode 100644 system/gcc/fix-rs6000-pie.patch delete mode 100644 system/gcc/gcc-4.8-build-args.patch delete mode 100644 system/gcc/lra-pentium.patch diff --git a/system/gcc/0002-posix_memalign.patch b/system/gcc/0002-posix_memalign.patch new file mode 100644 index 000000000..874f49b9b --- /dev/null +++ b/system/gcc/0002-posix_memalign.patch @@ -0,0 +1,42 @@ +From 65eb86f3e110998d30489df009d44b4bc1043adc Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Fri, 26 Jan 2018 20:32:50 +0000 +Subject: [PATCH 02/12] posix_memalign + +--- + gcc/config/i386/pmm_malloc.h | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h +index ffbb7f82cf5..b0b890d2403 100644 +--- a/gcc/config/i386/pmm_malloc.h ++++ b/gcc/config/i386/pmm_malloc.h +@@ -27,12 +27,13 @@ + #include + + /* We can't depend on since the prototype of posix_memalign +- may not be visible. */ ++ may not be visible and we can't pollute the namespace either. */ + #ifndef __cplusplus +-extern int posix_memalign (void **, size_t, size_t); ++extern int _mm_posix_memalign (void **, size_t, size_t) + #else +-extern "C" int posix_memalign (void **, size_t, size_t) throw (); ++extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw () + #endif ++__asm__("posix_memalign"); + + static __inline void * + _mm_malloc (size_t __size, size_t __alignment) +@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment) + return malloc (__size); + if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4)) + __alignment = sizeof (void *); +- if (posix_memalign (&__ptr, __alignment, __size) == 0) ++ if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0) + return __ptr; + else + return NULL; +-- +2.17.1 + diff --git a/system/gcc/0008-s390x-muslldso.patch b/system/gcc/0008-s390x-muslldso.patch new file mode 100644 index 000000000..64833f308 --- /dev/null +++ b/system/gcc/0008-s390x-muslldso.patch @@ -0,0 +1,26 @@ +From b693804c8dba92fea7beee98f0aa520853a0532b Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Thu, 22 Dec 2016 11:22:28 +0000 +Subject: [PATCH 08/12] s390x muslldso + +--- + gcc/config/s390/linux.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h +index 525c17c2c9f..2d4f4a0654e 100644 +--- a/gcc/config/s390/linux.h ++++ b/gcc/config/s390/linux.h +@@ -76,6 +76,9 @@ along with GCC; see the file COPYING3. If not see + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" + #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" + ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1" ++ + #undef LINK_SPEC + #define LINK_SPEC \ + "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ +-- +2.17.1 + diff --git a/system/gcc/0009-microblaze-pr65649.patch b/system/gcc/0009-microblaze-pr65649.patch new file mode 100644 index 000000000..35bf88d69 --- /dev/null +++ b/system/gcc/0009-microblaze-pr65649.patch @@ -0,0 +1,34 @@ +From a0934d40a8ed3b6e82abb31d2f8d7c60548d4a05 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Fri, 26 Jan 2018 20:25:11 +0000 +Subject: [PATCH 09/12] microblaze-pr65649 + +--- + gcc/config/microblaze/microblaze.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c +index 9a4a287be23..60aadaf51f7 100644 +--- a/gcc/config/microblaze/microblaze.c ++++ b/gcc/config/microblaze/microblaze.c +@@ -2399,7 +2399,7 @@ print_operand (FILE * file, rtx op, int letter) + unsigned long value_long; + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), + value_long); +- fprintf (file, HOST_WIDE_INT_PRINT_HEX, value_long); ++ fprintf (file, "0x%lx", value_long); + } + else + { +@@ -2458,7 +2458,7 @@ print_operand (FILE * file, rtx op, int letter) + print_operand_address (file, XEXP (op, 0)); + } + else if (letter == 'm') +- fprintf (file, HOST_WIDE_INT_PRINT_DEC, (1L << INTVAL (op))); ++ fprintf (file, "%ld", (1L << INTVAL (op))); + else + output_addr_const (file, op); + } +-- +2.17.1 + diff --git a/system/gcc/0010-ldbl128-config.patch b/system/gcc/0010-ldbl128-config.patch new file mode 100644 index 000000000..b5a101052 --- /dev/null +++ b/system/gcc/0010-ldbl128-config.patch @@ -0,0 +1,76 @@ +From 47467f3ab0fb2f2fcede81060fe8bb339d0909eb Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Wed, 28 Feb 2018 00:54:05 +0000 +Subject: [PATCH 10/12] ldbl128 config + +--- + gcc/configure | 13 +++++++++++++ + gcc/configure.ac | 16 ++++++++++++++-- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/gcc/configure b/gcc/configure +index 6121e163259..07ff8597d48 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -29309,6 +29309,15 @@ if test "${with_long_double_128+set}" = set; then : + withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" + else + ++ case "$target" in ++ s390*-*-linux-musl*) ++ gcc_cv_target_ldbl128=yes ++ ;; ++ powerpc*-*-linux-musl*) ++ gcc_cv_target_ldbl128=no ++ ;; ++ *) ++ + if test $glibc_version_major -gt 2 \ + || ( test $glibc_version_major -eq 2 && test $glibc_version_minor -ge 4 ); then : + gcc_cv_target_ldbl128=yes +@@ -29320,6 +29329,10 @@ else + && gcc_cv_target_ldbl128=yes + + fi ++ ++ ;; ++ esac ++ + fi + + ;; +diff --git a/gcc/configure.ac b/gcc/configure.ac +index b066cc609e1..6c15ed898c0 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5971,13 +5971,25 @@ case "$target" in + AC_ARG_WITH(long-double-128, + [AS_HELP_STRING([--with-long-double-128], + [use 128-bit long double by default])], +- gcc_cv_target_ldbl128="$with_long_double_128", ++ gcc_cv_target_ldbl128="$with_long_double_128", [ ++ case "$target" in ++ s390*-*-linux-musl*) ++ gcc_cv_target_ldbl128=yes ++ ;; ++ powerpc*-*-linux-musl*) ++ gcc_cv_target_ldbl128=no ++ ;; ++ *)] + [GCC_GLIBC_VERSION_GTE_IFELSE([2], [4], [gcc_cv_target_ldbl128=yes], [ + [gcc_cv_target_ldbl128=no + grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ + $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \ + && gcc_cv_target_ldbl128=yes +- ]])]) ++ ]])] ++ [ ++ ;; ++ esac ++ ]) + ;; + esac + if test x$gcc_cv_target_ldbl128 = xyes; then +-- +2.17.1 + diff --git a/system/gcc/0011-m68k.patch b/system/gcc/0011-m68k.patch new file mode 100644 index 000000000..74a5a98da --- /dev/null +++ b/system/gcc/0011-m68k.patch @@ -0,0 +1,40 @@ +From cc44e95053140efe41212746882d410052b480a3 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sun, 1 Jul 2018 18:34:01 +0000 +Subject: [PATCH 11/12] m68k + +--- + gcc/config/m68k/linux.h | 3 +++ + libgcc/config/m68k/linux-unwind.h | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h +index f584d19e179..a3c215550fe 100644 +--- a/gcc/config/m68k/linux.h ++++ b/gcc/config/m68k/linux.h +@@ -73,6 +73,9 @@ along with GCC; see the file COPYING3. If not see + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1" ++ + #undef LINK_SPEC + #define LINK_SPEC "-m m68kelf %{shared} \ + %{!shared: \ +diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h +index 395e4b3212a..432b757541c 100644 +--- a/libgcc/config/m68k/linux-unwind.h ++++ b/libgcc/config/m68k/linux-unwind.h +@@ -37,7 +37,7 @@ struct uw_ucontext { + stack_t uc_stack; + mcontext_t uc_mcontext; + unsigned long uc_filler[80]; +- __sigset_t uc_sigmask; ++ sigset_t uc_sigmask; + }; + + #define MD_FALLBACK_FRAME_STATE_FOR m68k_fallback_frame_state +-- +2.17.1 + diff --git a/system/gcc/0012-static-pie.patch b/system/gcc/0012-static-pie.patch new file mode 100644 index 000000000..03a4f68f6 --- /dev/null +++ b/system/gcc/0012-static-pie.patch @@ -0,0 +1,138 @@ +From a4aa319f7c19e564dced3daeb7222c9315af936c Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 18 Aug 2018 23:58:45 +0000 +Subject: [PATCH 12/12] static-pie + +in gcc-8 -static means static non-pie, even if -pie or -static-pie +are specified, -static-pie can be used to build static pie. + +in musl toolchains -static -pie always meant static pie, so this +patch fixes the link specs accordingly, the new -static-pie is just +an alias to -static -pie. +--- + gcc/common.opt | 4 ++-- + gcc/config/gnu-user.h | 12 +++++------- + gcc/config/rs6000/sysv4.h | 11 +++++------ + gcc/gcc.c | 6 +++--- + 4 files changed, 15 insertions(+), 18 deletions(-) + +diff --git a/gcc/common.opt b/gcc/common.opt +index b52ef0b38c8..0ce5857e01d 100644 +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -3197,11 +3197,11 @@ Driver + + no-pie + Driver RejectNegative Negative(shared) +-Don't create a dynamically linked position independent executable. ++Don't create a position independent executable. + + pie + Driver RejectNegative Negative(no-pie) +-Create a dynamically linked position independent executable. ++Create a position independent executable. + + static-pie + Driver RejectNegative Negative(pie) +diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h +index 8620de3e42d..235328a2642 100644 +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -52,13 +52,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{shared:; \ + pg|p|profile:%{static-pie:grcrt1.o%s;:gcrt1.o%s}; \ +- static:crt1.o%s; \ +- static-pie:rcrt1.o%s; \ ++ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ + " PIE_SPEC ":Scrt1.o%s; \ + :crt1.o%s} \ + crti.o%s \ +- %{static:crtbeginT.o%s; \ +- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ ++ %{shared|" PIE_SPEC ":crtbeginS.o%s; \ ++ static:crtbeginT.o%s; \ + :crtbegin.o%s} \ + %{fvtable-verify=none:%s; \ + fvtable-verify=preinit:vtv_start_preinit.o%s; \ +@@ -92,8 +91,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + "%{fvtable-verify=none:%s; \ + fvtable-verify=preinit:vtv_end_preinit.o%s; \ + fvtable-verify=std:vtv_end.o%s} \ +- %{static:crtend.o%s; \ +- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ ++ %{shared|" PIE_SPEC ":crtendS.o%s; \ + :crtend.o%s} \ + crtn.o%s \ + " CRTOFFLOADEND +@@ -133,7 +131,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + #define LIB_SPEC GNU_USER_TARGET_LIB_SPEC + + #if defined(HAVE_LD_EH_FRAME_HDR) +-#define LINK_EH_SPEC "%{!static|static-pie:--eh-frame-hdr} " ++#define LINK_EH_SPEC "%{!static|" PIE_SPEC ":--eh-frame-hdr} " + #endif + + #undef LINK_GCC_C_SEQUENCE_SPEC +diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h +index bb19d0dcd41..bb2a2324eb0 100644 +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -763,12 +763,12 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) + #define STARTFILE_LINUX_SPEC \ + "%{shared:; \ + pg|p|profile:gcrt1.o%s; \ +- static:crt1.o%s; \ +- static-pie|" PIE_SPEC ":Scrt1.o%s; \ ++ static|static-pie:%{" PIE_SPEC ":rcrt1.o%s;:crt1.o%s}; \ ++ " PIE_SPEC ":Scrt1.o%s; \ + :crt1.o%s} \ + %{mnewlib:ecrti.o%s;:crti.o%s} \ +- %{static:crtbeginT.o%s; \ +- shared|static-pie|" PIE_SPEC ":crtbeginS.o%s; \ ++ %{shared|" PIE_SPEC ":crtbeginS.o%s; \ ++ static:crtbeginT.o%s; \ + :crtbegin.o%s} \ + %{fvtable-verify=none:%s; \ + fvtable-verify=preinit:vtv_start_preinit.o%s; \ +@@ -781,8 +781,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) + "%{fvtable-verify=none:%s; \ + fvtable-verify=preinit:vtv_end_preinit.o%s; \ + fvtable-verify=std:vtv_end.o%s} \ +- %{static:crtend.o%s; \ +- shared|static-pie|" PIE_SPEC ":crtendS.o%s; \ ++ %{shared|" PIE_SPEC ":crtendS.o%s; \ + :crtend.o%s} \ + %{mnewlib:ecrtn.o%s;:crtn.o%s} \ + " CRTOFFLOADEND +diff --git a/gcc/gcc.c b/gcc/gcc.c +index eb1610ba8b0..87560afb03c 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -900,7 +900,7 @@ proper position among the other output files. */ + #define NO_FPIE_AND_FPIC_SPEC NO_FPIE_SPEC "|" NO_FPIC_SPEC + #define FPIE_OR_FPIC_SPEC NO_FPIE_AND_FPIC_SPEC ":;" + #else +-#define PIE_SPEC "pie" ++#define PIE_SPEC "pie|static-pie" + #define FPIE1_SPEC "fpie" + #define NO_FPIE1_SPEC FPIE1_SPEC ":;" + #define FPIE2_SPEC "fPIE" +@@ -924,12 +924,12 @@ proper position among the other output files. */ + #ifndef LINK_PIE_SPEC + #ifdef HAVE_LD_PIE + #ifndef LD_PIE_SPEC +-#define LD_PIE_SPEC "-pie" ++#define LD_PIE_SPEC "-pie %{static|static-pie:--no-dynamic-linker -z text -Bsymbolic}" + #endif + #else + #define LD_PIE_SPEC "" + #endif +-#define LINK_PIE_SPEC "%{static|shared|r:;" PIE_SPEC ":" LD_PIE_SPEC "} " ++#define LINK_PIE_SPEC "%{shared|r:;" PIE_SPEC ":" LD_PIE_SPEC "} " + #endif + + #ifndef LINK_BUILDID_SPEC +-- +2.17.1 + diff --git a/system/gcc/002_all_default-relro.patch b/system/gcc/002_all_default-relro.patch index c461017dc..284deef1a 100644 --- a/system/gcc/002_all_default-relro.patch +++ b/system/gcc/002_all_default-relro.patch @@ -13,7 +13,7 @@ Index: b/gcc/doc/invoke.texi linker. When using the GNU linker, you can also get the same effect with @option{-Wl,-Map=output.map}. -+NOTE: In Alpine Linux, for LDFLAGS, the option ++NOTE: In Adelie Linux, for LDFLAGS, the option +@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}. + @item -u @var{symbol} diff --git a/system/gcc/003_all_default-fortify-source.patch b/system/gcc/003_all_default-fortify-source.patch deleted file mode 100644 index 6ca803343..000000000 --- a/system/gcc/003_all_default-fortify-source.patch +++ /dev/null @@ -1,40 +0,0 @@ -# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++, -# DP: if the optimization level is > 0 - ---- - gcc/doc/invoke.texi | 6 ++++++ - gcc/c-family/c-cppbuiltin.c | 3 + - 2 files changed, 9 insertions(+), 0 deletions(-) - -Index: b/gcc/doc/invoke.texi -=================================================================== ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -7840,6 +7840,12 @@ also turns on the following optimization - Please note the warning under @option{-fgcse} about - invoking @option{-O2} on programs that use computed gotos. - -+NOTE: In Alpine Linux, @option{-D_FORTIFY_SOURCE=2} is -+set by default, and is activated when @option{-O} is set to 2 or higher. -+This enables additional compile-time and run-time checks for several libc -+functions. To disable, specify either @option{-U_FORTIFY_SOURCE} or -+@option{-D_FORTIFY_SOURCE=0}. -+ - @item -O3 - @opindex O3 - Optimize yet more. @option{-O3} turns on all optimizations specified -Index: b/gcc/c-family/c-cppbuiltin.c -=================================================================== ---- a/gcc/c-family/c-cppbuiltin.c -+++ b/gcc/c-family/c-cppbuiltin.c -@@ -1176,6 +1176,10 @@ c_cpp_builtins (cpp_reader *pfile) - builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0); - builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0); - -+ /* Fortify Source enabled by default for optimization levels > 0 */ -+ if (optimize) -+ builtin_define_with_int_value ("_FORTIFY_SOURCE", 2); -+ - /* Misc. */ - if (flag_gnu89_inline) - cpp_define (pfile, "__GNUC_GNU_INLINE__"); diff --git a/system/gcc/005_all_default-as-needed.patch b/system/gcc/005_all_default-as-needed.patch index ee4f7962a..00852197f 100644 --- a/system/gcc/005_all_default-as-needed.patch +++ b/system/gcc/005_all_default-as-needed.patch @@ -1,9 +1,25 @@ # DP: On linux targets pass --as-needed by default to the linker, but always # DP: link the sanitizer libraries with --no-as-needed. +Index: b/gcc/gcc.c +=================================================================== --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -568,8 +568,11 @@ proper position among the other output f +@@ -692,8 +692,11 @@ proper position among the other output f + #ifdef LIBASAN_EARLY_SPEC + #define LIBASAN_SPEC STATIC_LIBASAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) +-#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION \ +- "} -lasan %{static-libasan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBASAN_SPEC "%{static-libasan:" LD_STATIC_OPTION "}" \ ++ " %{!static-libasan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ ++ " -lasan " \ ++ " %{static-libasan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-libasan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBASAN_LIBS + #else + #define LIBASAN_SPEC "-lasan" STATIC_LIBASAN_LIBS +@@ -710,8 +713,11 @@ proper position among the other output f #ifdef LIBTSAN_EARLY_SPEC #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS #elif defined(HAVE_LD_STATIC_DYNAMIC) @@ -17,21 +33,53 @@ STATIC_LIBTSAN_LIBS #else #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS +@@ -728,8 +734,11 @@ proper position among the other output f + #ifdef LIBLSAN_EARLY_SPEC + #define LIBLSAN_SPEC STATIC_LIBLSAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) +-#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION \ +- "} -llsan %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBLSAN_SPEC "%{static-liblsan:" LD_STATIC_OPTION "}" \ ++ " %{!static-liblsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ ++ " -llsan " \ ++ " %{static-liblsan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-liblsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBLSAN_LIBS + #else + #define LIBLSAN_SPEC "-llsan" STATIC_LIBLSAN_LIBS +@@ -744,8 +753,11 @@ proper position among the other output f + #define STATIC_LIBUBSAN_LIBS \ + " %{static-libubsan|static:%:include(libsanitizer.spec)%(link_libubsan)}" + #ifdef HAVE_LD_STATIC_DYNAMIC +-#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION \ +- "} -lubsan %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBUBSAN_SPEC "%{static-libubsan:" LD_STATIC_OPTION "}" \ ++ " %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ ++ " -lubsan " \ ++ " %{static-libubsan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBUBSAN_LIBS + #else + #define LIBUBSAN_SPEC "-lubsan" STATIC_LIBUBSAN_LIBS +Index: b/gcc/config/gnu-user.h +=================================================================== --- a/gcc/config/gnu-user.h +++ b/gcc/config/gnu-user.h -@@ -124,13 +124,13 @@ +@@ -161,15 +161,15 @@ see the files COPYING3 and COPYING.RUNTI #define LIBASAN_EARLY_SPEC "%{!shared:libasan_preinit%O%s} " \ "%{static-libasan:%{!shared:" \ LD_STATIC_OPTION " --whole-archive -lasan --no-whole-archive " \ - LD_DYNAMIC_OPTION "}}%{!static-libasan:-lasan}" + LD_DYNAMIC_OPTION "}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}" #undef LIBTSAN_EARLY_SPEC - #define LIBTSAN_EARLY_SPEC "%{static-libtsan:%{!shared:" \ + #define LIBTSAN_EARLY_SPEC "%{!shared:libtsan_preinit%O%s} " \ + "%{static-libtsan:%{!shared:" \ LD_STATIC_OPTION " --whole-archive -ltsan --no-whole-archive " \ - LD_DYNAMIC_OPTION "}}%{!static-libtsan:-ltsan}" + LD_DYNAMIC_OPTION "}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}" #undef LIBLSAN_EARLY_SPEC - #define LIBLSAN_EARLY_SPEC "%{static-liblsan:%{!shared:" \ + #define LIBLSAN_EARLY_SPEC "%{!shared:liblsan_preinit%O%s} " \ + "%{static-liblsan:%{!shared:" \ LD_STATIC_OPTION " --whole-archive -llsan --no-whole-archive " \ - LD_DYNAMIC_OPTION "}}%{!static-liblsan:-llsan}" + LD_DYNAMIC_OPTION "}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}" @@ -40,7 +88,8 @@ Index: b/gcc/config/aarch64/aarch64-linux.h =================================================================== --- a/gcc/config/aarch64/aarch64-linux.h +++ b/gcc/config/aarch64/aarch64-linux.h -@@ -36,5 +36,6 @@ +@@ -35,6 +35,7 @@ + #define CPP_SPEC "%{pthread:-D_REENTRANT}" #define LINUX_TARGET_LINK_SPEC "%{h*} \ + --as-needed \ @@ -77,7 +126,7 @@ Index: b/gcc/config/s390/linux.h =================================================================== --- a/gcc/config/s390/linux.h +++ b/gcc/config/s390/linux.h -@@ -65,7 +65,7 @@ along with GCC; see the file COPYING3. +@@ -78,7 +78,7 @@ along with GCC; see the file COPYING3. #undef LINK_SPEC #define LINK_SPEC \ @@ -90,26 +139,27 @@ Index: b/gcc/config/rs6000/linux64.h =================================================================== --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h -@@ -466,12 +466,12 @@ extern int dot_symbols; +@@ -490,13 +490,13 @@ extern int dot_symbols; " -m elf64ppc") #endif -#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ +#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --as-needed %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \ + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}} \ %(link_os_extra_spec32)" -#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " %{!shared: %{!static: \ +#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --as-needed %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}} \ - %(link_os_extra_spec64)" + %{!static-pie: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}} \ Index: b/gcc/config/rs6000/sysv4.h =================================================================== --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h -@@ -784,7 +784,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF +@@ -811,7 +811,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ MUSL_DYNAMIC_LINKER) @@ -122,7 +172,8 @@ Index: b/gcc/config/i386/gnu-user64.h =================================================================== --- a/gcc/config/i386/gnu-user64.h +++ b/gcc/config/i386/gnu-user64.h -@@ -57,5 +57,6 @@ see the files COPYING3 and COPYING.RUNTI +@@ -56,6 +56,7 @@ + "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ + --as-needed \ @@ -141,7 +192,7 @@ Index: b/gcc/config/i386/gnu-user.h +#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --as-needed %{shared:-shared} \ %{!shared: \ %{!static: \ - %{rdynamic:-export-dynamic} \ + %{!static-pie: \ Index: b/gcc/config/alpha/linux-elf.h =================================================================== --- a/gcc/config/alpha/linux-elf.h @@ -151,7 +202,7 @@ Index: b/gcc/config/alpha/linux-elf.h #define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER -#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ -+#define LINK_SPEC "-m elf64alpha --as-needed %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --as-needed %{G*} %{relax:-relax} \ %{O*:-O3} %{!O*:-O1} \ %{shared:-shared} \ %{!shared: \ @@ -159,7 +210,8 @@ Index: b/gcc/config/arm/linux-elf.h =================================================================== --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h -@@ -73,5 +73,6 @@ +@@ -70,6 +70,7 @@ + %{rdynamic:-export-dynamic} \ %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ -X \ + --as-needed \ @@ -178,64 +230,15 @@ Index: b/gcc/config/mips/gnu-user.h %{!shared: \ %{!static: \ %{rdynamic:-export-dynamic} \ -Index: b/libjava/Makefile.am -=================================================================== ---- a/libjava/Makefile.am -+++ b/libjava/Makefile.am -@@ -627,14 +631,14 @@ - rm .libs/libgcj_bc.so; \ - mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \ - $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ -- -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \ -+ -o .libs/libgcj_bc.so.1.0.0 -Wl,--no-as-needed -lgcj || exit; \ - rm .libs/libgcj_bc.so.1; \ - $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1 - - ## This rule creates the libgcj_bc library that is actually installed. - install/libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES) install/$(am__dirstamp) - $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \ -- $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) -+ $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) -Wl,--no-as-needed -lgcj - - ## Note that property_files is defined in sources.am. - propertyo_files = $(patsubst classpath/resource/%,%,$(addsuffix .lo,$(property_files))) -@@ -762,7 +766,7 @@ - rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ - mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ - $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ -- -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \ -+ -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -Wl,--no-as-needed -lgcj || exit; \ - rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \ - $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \ - rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la; - -Index: b/libjava/Makefile.in +Index: b/gcc/config/riscv/linux.h =================================================================== ---- a/libjava/Makefile.in -+++ b/libjava/Makefile.in -@@ -10644,13 +10648,13 @@ - rm .libs/libgcj_bc.so; \ - mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \ - $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ -- -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \ -+ -o .libs/libgcj_bc.so.1.0.0 -Wl,--no-as-needed -lgcj || exit; \ - rm .libs/libgcj_bc.so.1; \ - $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1 - - install/libgcj_bc.la: $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_DEPENDENCIES) install/$(am__dirstamp) - $(libgcj_bc_la_LINK) $(am_libgcj_bc_la_rpath) $(libgcj_bc_la_LDFLAGS) \ -- $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) -+ $(libgcj_bc_la_OBJECTS) $(libgcj_bc_la_LIBADD) $(LIBS) -Wl,--no-as-needed -lgcj - - $(propertyo_files): %.lo: classpath/resource/% - $(mkinstalldirs) `dirname $@`; \ -@@ -12494,7 +12498,7 @@ - @USE_LIBGCJ_BC_TRUE@ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ - @USE_LIBGCJ_BC_TRUE@ mv $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so; \ - @USE_LIBGCJ_BC_TRUE@ $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ --@USE_LIBGCJ_BC_TRUE@ -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -lgcj || exit; \ -+@USE_LIBGCJ_BC_TRUE@ -o $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1.0.0 -Wl,--no-as-needed -lgcj || exit; \ - @USE_LIBGCJ_BC_TRUE@ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \ - @USE_LIBGCJ_BC_TRUE@ $(LN_S) libgcj_bc.so.1.0.0 $(DESTDIR)$(toolexeclibdir)/libgcj_bc.so.1; \ - @USE_LIBGCJ_BC_TRUE@ rm $(DESTDIR)$(toolexeclibdir)/libgcj_bc.la; - +--- a/gcc/config/riscv/linux.h ++++ b/gcc/config/riscv/linux.h +@@ -50,6 +50,7 @@ + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + + #define LINK_SPEC "\ ++-as-needed \ + -melf" XLEN_SPEC "lriscv \ + %{mno-relax:--no-relax} \ + %{shared} \ diff --git a/system/gcc/011_all_default-warn-format-security.patch b/system/gcc/011_all_default-warn-format-security.patch index a58383a8e..1f400d026 100644 --- a/system/gcc/011_all_default-warn-format-security.patch +++ b/system/gcc/011_all_default-warn-format-security.patch @@ -3,41 +3,21 @@ Enable -Wformat and -Wformat-security by default. --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -412,7 +412,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O - Warn about format strings that are not literals +@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O + Warn about format strings that are not literals. Wformat-security -C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) +C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) - Warn about possible security problems with format functions + Warn about possible security problems with format functions. - Wformat-y2k -@@ -424,7 +424,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ - Warn about zero-length formats + Wformat-signedness +@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ + Warn about zero-length formats. Wformat= --C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) -+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) - Warn about printf/scanf/strftime/strfmon format string anomalies +-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) ++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2) + Warn about printf/scanf/strftime/strfmon format string anomalies. Wignored-qualifiers ---- a/gcc/doc/gcc.info -+++ b/gcc/doc/gcc.info -@@ -3451,6 +3451,8 @@ compiler warns that an unrecognized option is present. - '-Wno-format-contains-nul', '-Wno-format-extra-args', and - '-Wno-format-zero-length'. '-Wformat' is enabled by '-Wall'. - -+ This option is enabled by default in Alpine Linux. -+ - '-Wno-format-contains-nul' - If '-Wformat' is specified, do not warn about format strings - that contain NUL bytes. -@@ -3496,6 +3498,8 @@ compiler warns that an unrecognized option is present. - future warnings may be added to '-Wformat-security' that are - not included in '-Wformat-nonliteral'.) - -+ This option is enabled by default in Alpine Linux. -+ - '-Wformat-y2k' - If '-Wformat' is specified, also warn about 'strftime' formats - that may yield only a two-digit year. diff --git a/system/gcc/012_all_default-warn-trampolines.patch b/system/gcc/012_all_default-warn-trampolines.patch index 9ab4378d4..89ebfaccd 100644 --- a/system/gcc/012_all_default-warn-trampolines.patch +++ b/system/gcc/012_all_default-warn-trampolines.patch @@ -18,7 +18,7 @@ Enable -Wtrampolines by default. and thus requires the stack to be made executable in order for the program to work properly. -+ This warning is enabled by default in Gentoo. ++ This warning is enabled by default in Gentoo, Alpine, and Adelie Linux. + '-Wfloat-equal' Warn if floating-point values are used in equality comparisons. diff --git a/system/gcc/050_all_libiberty-asprintf.patch b/system/gcc/050_all_libiberty-asprintf.patch deleted file mode 100644 index bee0c4c23..000000000 --- a/system/gcc/050_all_libiberty-asprintf.patch +++ /dev/null @@ -1,18 +0,0 @@ -2008-07-25 Magnus Granberg - - * include/libiberty.h (asprintf): Don't declare if defined as a macro - ---- a/include/libiberty.h -+++ b/include/libiberty.h -@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); - /* Like sprintf but provides a pointer to malloc'd storage, which must - be freed by the caller. */ - -+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ -+#ifndef asprintf - extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; - #endif -+#endif - - #if !HAVE_DECL_VASPRINTF - /* Like vsprintf but provides a pointer to malloc'd storage, which diff --git a/system/gcc/053_all_libitm-no-fortify-source.patch b/system/gcc/053_all_libitm-no-fortify-source.patch deleted file mode 100644 index 5ab15afc3..000000000 --- a/system/gcc/053_all_libitm-no-fortify-source.patch +++ /dev/null @@ -1,27 +0,0 @@ -https://bugs.gentoo.org/508852 -https://gcc.gnu.org/PR61164 - -2014-04-27 Magnus Granberg - - #508852 - * libitm/configure.tgt: Disable FORTIFY - ---- a/libitm/configure.tgt -+++ b/libitm/configure.tgt -@@ -43,6 +43,16 @@ if test "$gcc_cv_have_tls" = yes ; then - esac - fi - -+# FIXME: error: inlining failed in call to always_inline -+# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’ -+# : function body can be overwritten at link time -+# Disable Fortify in libitm for now. #508852 -+case "${target}" in -+ *-*-linux*) -+ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE" -+ ;; -+esac -+ - # Map the target cpu to an ARCH sub-directory. At the same time, - # work out any special compilation flags as necessary. - case "${target_cpu}" in diff --git a/system/gcc/067_all_gcc-poison-system-directories.patch b/system/gcc/067_all_gcc-poison-system-directories.patch deleted file mode 100644 index 103671617..000000000 --- a/system/gcc/067_all_gcc-poison-system-directories.patch +++ /dev/null @@ -1,194 +0,0 @@ -http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/gcc/gcc-6.1/0010-gcc-poison-system-directories.patch - -From d76250323dad69212c958e4857a98d99ab51a39e Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 29 Mar 2013 08:59:00 +0400 -Subject: [PATCH 10/46] gcc: poison-system-directories - -Signed-off-by: Khem Raj - -Upstream-Status: Inappropriate [distribution: codesourcery] ---- - gcc/common.opt | 4 ++++ - gcc/config.in | 6 ++++++ - gcc/configure | 16 ++++++++++++++++ - gcc/configure.ac | 10 ++++++++++ - gcc/doc/invoke.texi | 9 +++++++++ - gcc/gcc.c | 2 ++ - gcc/incpath.c | 19 +++++++++++++++++++ - 7 files changed, 66 insertions(+) - -diff --git a/gcc/common.opt b/gcc/common.opt -index 67048db..733185c 100644 ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -659,6 +659,10 @@ Wreturn-local-addr - Common Var(warn_return_local_addr) Init(1) Warning - Warn about returning a pointer/reference to a local or temporary variable. - -+Wpoison-system-directories -+Common Var(flag_poison_system_directories) Init(1) Warning -+Warn for -I and -L options using system directories if cross compiling -+ - Wshadow - Common Var(warn_shadow) Warning - Warn when one local variable shadows another. -diff --git a/gcc/config.in b/gcc/config.in -index 115cb61..105b30f 100644 ---- a/gcc/config.in -+++ b/gcc/config.in -@@ -187,6 +187,12 @@ - #endif - - -+/* Define to warn for use of native system header directories */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+#endif -+ -+ - /* Define if you want all operations on RTL (the basic data structure of the - optimizer and back end) to be checked for dynamic type safety at runtime. - This is quite expensive. */ -diff --git a/gcc/configure b/gcc/configure -index 1c6e340..8f83152 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -942,6 +942,7 @@ with_system_zlib - enable_maintainer_mode - enable_link_mutex - enable_version_specific_runtime_libs -+enable_poison_system_directories - enable_plugin - enable_host_shared - enable_libquadmath_support -@@ -1681,6 +1682,8 @@ Optional Features: - --enable-version-specific-runtime-libs - specify that runtime libraries should be installed - in a compiler-specific directory -+ --enable-poison-system-directories -+ warn for use of native system header directories - --enable-plugin enable plugin support - --enable-host-shared build host code as shared libraries - --disable-libquadmath-support -@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : - fi - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi -+ - # Substitute configuration variables - - -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 6c1dcd9..0fccaef 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5861,6 +5861,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs, - [specify that runtime libraries should be - installed in a compiler-specific directory])]) - -+AC_ARG_ENABLE([poison-system-directories], -+ AS_HELP_STRING([--enable-poison-system-directories], -+ [warn for use of native system header directories]),, -+ [enable_poison_system_directories=no]) -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], -+ [1], -+ [Define to warn for use of native system header directories]) -+fi -+ - # Substitute configuration variables - AC_SUBST(subdirs) - AC_SUBST(srcdir) -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 821f8fd..8bb49e7 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -284,6 +284,7 @@ Objective-C and Objective-C++ Dialects}. - -Wparentheses -Wno-pedantic-ms-format @gol - -Wplacement-new -Wplacement-new=@var{n} @gol - -Wpointer-arith -Wno-pointer-to-int-cast @gol -+-Wno-poison-system-directories @gol - -Wno-pragmas -Wredundant-decls -Wno-return-local-addr @gol - -Wreturn-type -Wsequence-point -Wshadow -Wno-shadow-ivar @gol - -Wshift-overflow -Wshift-overflow=@var{n} @gol -@@ -4723,6 +4724,14 @@ made up of data only and thus requires no special treatment. But, for - most targets, it is made up of code and thus requires the stack to be - made executable in order for the program to work properly. - -+@item -Wno-poison-system-directories -+@opindex Wno-poison-system-directories -+Do not warn for @option{-I} or @option{-L} options using system -+directories such as @file{/usr/include} when cross compiling. This -+option is intended for use in chroot environments when such -+directories contain the correct headers and libraries for the target -+system rather than the host. -+ - @item -Wfloat-equal - @opindex Wfloat-equal - @opindex Wno-float-equal -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 1af5920..4cfef7f 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -1017,6 +1017,8 @@ proper position among the other output files. */ - "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ - "%X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ -+ %{Wno-poison-system-directories:--no-poison-system-directories} \ -+ %{Werror=poison-system-directories:--error-poison-system-directories} \ - %{static:} %{L*} %(mfwrap) %(link_libgcc) " \ - VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ - %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ -diff --git a/gcc/incpath.c b/gcc/incpath.c -index ea40f4a..856da41 100644 ---- a/gcc/incpath.c -+++ b/gcc/incpath.c -@@ -26,6 +26,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "diagnostic-core.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) - } - fprintf (stderr, _("End of search list.\n")); - } -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (flag_poison_system_directories) -+ { -+ struct cpp_dir *p; -+ -+ for (p = heads[QUOTE]; p; p = p->next) -+ { -+ if ((!strncmp (p->name, "/usr/include", 12)) -+ || (!strncmp (p->name, "/usr/local/include", 18)) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18))) -+ warning (OPT_Wpoison_system_directories, -+ "include location \"%s\" is unsafe for " -+ "cross-compilation", -+ p->name); -+ } -+ } -+#endif - } - - /* Use given -I paths for #include "..." but not #include <...>, and --- -2.8.2 - diff --git a/system/gcc/090_all_pr55930-dependency-tracking.patch b/system/gcc/090_all_pr55930-dependency-tracking.patch deleted file mode 100644 index a8743e08c..000000000 --- a/system/gcc/090_all_pr55930-dependency-tracking.patch +++ /dev/null @@ -1,18 +0,0 @@ -libatomic build failure if configured with --disable-dependency-tracking -load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory - -https://bugs.gentoo.org/463463 -http://gcc.gnu.org/PR55930 - ---- a/libatomic/Makefile.in -+++ b/libatomic/Makefile.in -@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) - PAT_S = $(word 3,$(PAT_SPLIT)) - IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) - IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) --M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo -+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo -+@AMDEP_FALSE@M_DEPS = - M_SIZE = -DN=$(PAT_N) - M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) - M_FILE = $(PAT_BASE)_n.c diff --git a/system/gcc/201-cilkrts.patch b/system/gcc/201-cilkrts.patch deleted file mode 100644 index 4aac10d6d..000000000 --- a/system/gcc/201-cilkrts.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 594e3c1ab576daddeb86015efc8b1677020b1878 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy -Date: Sat, 24 Oct 2015 20:39:30 +0000 -Subject: [PATCH 1/6] cilkrts - ---- - libcilkrts/runtime/os-unix.c | 22 +++++++--------------- - 1 file changed, 7 insertions(+), 15 deletions(-) - -diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c -index cb582dd..e43d7d5 100644 ---- a/libcilkrts/runtime/os-unix.c -+++ b/libcilkrts/runtime/os-unix.c -@@ -51,6 +51,7 @@ - #if defined __linux__ - # include - # include -+# include - #elif defined __APPLE__ - # include - // Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output -@@ -400,28 +401,19 @@ COMMON_SYSDEP void __cilkrts_sleep(void) - - COMMON_SYSDEP void __cilkrts_yield(void) - { --#if __APPLE__ || __FreeBSD__ || __VXWORKS__ -- // On MacOS, call sched_yield to yield quantum. I'm not sure why we -- // don't do this on Linux also. -- sched_yield(); --#elif defined(__DragonFly__) -- // On DragonFly BSD, call sched_yield to yield quantum. -- sched_yield(); --#elif defined(__MIC__) -+#if defined(__MIC__) - // On MIC, pthread_yield() really trashes things. Arch's measurements - // showed that calling _mm_delay_32() (or doing nothing) was a better - // option. Delaying 1024 clock cycles is a reasonable compromise between - // giving up the processor and latency starting up when work becomes - // available - _mm_delay_32(1024); --#elif defined(__ANDROID__) || (defined(__sun__) && defined(__svr4__)) -- // On Android and Solaris, call sched_yield to yield quantum. I'm not -- // sure why we don't do this on Linux also. -- sched_yield(); --#else -- // On Linux, call pthread_yield (which in turn will call sched_yield) -- // to yield quantum. -+#elif defined(__sun__) && !defined(__svr4__) -+ // On old SunOS call pthread_yield to yield a quantum. - pthread_yield(); -+#else -+ // On other platforms call sched_yield to yield a quantum. -+ sched_yield(); - #endif - } - --- -2.8.1 - diff --git a/system/gcc/203-libgcc_s.patch b/system/gcc/203-libgcc_s.patch deleted file mode 100644 index c74351c71..000000000 --- a/system/gcc/203-libgcc_s.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 9e3eab51e518018d9d99b3123598b1e2322a6af3 Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy -Date: Sat, 24 Oct 2015 20:09:53 +0000 -Subject: [PATCH 3/6] libgcc_s - ---- - gcc/config/i386/i386.c | 4 ++-- - libgcc/config/i386/cpuinfo.c | 6 +++--- - libgcc/config/i386/t-linux | 2 +- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c -index 3d044e8..82523e1 100644 ---- a/gcc/config/i386/i386.c -+++ b/gcc/config/i386/i386.c -@@ -40269,10 +40269,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, - { - case IX86_BUILTIN_CPU_INIT: - { -- /* Make it call __cpu_indicator_init in libgcc. */ -+ /* Make it call __cpu_indicator_init_local in libgcc.a. */ - tree call_expr, fndecl, type; - type = build_function_type_list (integer_type_node, NULL_TREE); -- fndecl = build_fn_decl ("__cpu_indicator_init", type); -+ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); - call_expr = build_call_expr (fndecl, 0); - return expand_expr (call_expr, target, mode, EXPAND_NORMAL); - } -diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c -index 8c2248d..6c82f15 100644 ---- a/libgcc/config/i386/cpuinfo.c -+++ b/libgcc/config/i386/cpuinfo.c -@@ -485,7 +485,7 @@ __cpu_indicator_init (void) - return 0; - } - --#if defined SHARED && defined USE_ELF_SYMVER --__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); --__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); -+#ifndef SHARED -+int __cpu_indicator_init_local (void) -+ __attribute__ ((weak, alias ("__cpu_indicator_init"))); - #endif -diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux -index 11bb46e..4f47f7b 100644 ---- a/libgcc/config/i386/t-linux -+++ b/libgcc/config/i386/t-linux -@@ -3,4 +3,4 @@ - # t-slibgcc-elf-ver and t-linux - SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver - --HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER -+HOST_LIBGCC2_CFLAGS += -mlong-double-80 --- -2.8.1 - diff --git a/system/gcc/204-linux_libc_has_function.patch b/system/gcc/204-linux_libc_has_function.patch deleted file mode 100644 index 2dcedc3a7..000000000 --- a/system/gcc/204-linux_libc_has_function.patch +++ /dev/null @@ -1,25 +0,0 @@ -From edec78452d693fb524daa9a6efd45c850b27b25c Mon Sep 17 00:00:00 2001 -From: Szabolcs Nagy -Date: Fri, 6 Nov 2015 23:59:20 +0000 -Subject: [PATCH 4/6] linux_libc_has_function - ---- - gcc/config/linux.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gcc/config/linux.c b/gcc/config/linux.c -index 250296b..16c3768 100644 ---- a/gcc/config/linux.c -+++ b/gcc/config/linux.c -@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see - bool - linux_libc_has_function (enum function_class fn_class) - { -- if (OPTION_GLIBC) -+ if (OPTION_GLIBC || OPTION_MUSL) - return true; - if (OPTION_BIONIC) - if (fn_class == function_c94 --- -2.8.1 - diff --git a/system/gcc/207-static-pie.patch b/system/gcc/207-static-pie.patch deleted file mode 100644 index 9355c584b..000000000 --- a/system/gcc/207-static-pie.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h -index b0bf40a..d4b56fe 100644 ---- a/gcc/config/gnu-user.h -+++ b/gcc/config/gnu-user.h -@@ -51,10 +51,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #if defined HAVE_LD_PIE - #define GNU_USER_TARGET_STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;: \ -- %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \ -- crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \ -+ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \ -+ crti.o%s %{shared:crtbeginS.o%s;: \ - %{" PIE_SPEC ":crtbeginS.o%s} \ -- %{" NO_PIE_SPEC ":crtbegin.o%s}} \ -+ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \ - %{fvtable-verify=none:%s; \ - fvtable-verify=preinit:vtv_start_preinit.o%s; \ - fvtable-verify=std:vtv_start.o%s} \ -diff --git a/gcc/gcc.c b/gcc/gcc.c -index 0208d61..731564e 100644 ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -870,7 +870,7 @@ proper position among the other output files. */ - #endif - - #ifdef ENABLE_DEFAULT_PIE --#define NO_PIE_SPEC "no-pie|static" -+#define NO_PIE_SPEC "no-pie" - #define PIE_SPEC NO_PIE_SPEC "|r|shared:;" - #define NO_FPIE1_SPEC "fno-pie" - #define FPIE1_SPEC NO_FPIE1_SPEC ":;" -@@ -916,7 +916,7 @@ proper position among the other output files. */ - #ifndef LINK_PIE_SPEC - #ifdef HAVE_LD_PIE - #ifndef LD_PIE_SPEC --#define LD_PIE_SPEC "-pie" -+#define LD_PIE_SPEC "-pie %{static:--no-dynamic-linker -Bsymbolic}" - #endif - #else - #define LD_PIE_SPEC "" diff --git a/system/gcc/300-main-gcc-add-musl-s390x-dynamic-linker.patch b/system/gcc/300-main-gcc-add-musl-s390x-dynamic-linker.patch deleted file mode 100644 index 241957871..000000000 --- a/system/gcc/300-main-gcc-add-musl-s390x-dynamic-linker.patch +++ /dev/null @@ -1,32 +0,0 @@ -From be841c16dd544553c67faac79bd4cc3cd10a1dc0 Mon Sep 17 00:00:00 2001 -From: "Tuan M. Hoang" -Date: Mon, 21 Nov 2016 01:42:16 +0700 -Subject: [PATCH] main/gcc: add musl s390x dynamic linker - ---- - gcc/config/s390/linux.h | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h -index 1e3ed35..a244214 100644 ---- a/gcc/config/s390/linux.h -+++ b/gcc/config/s390/linux.h -@@ -63,6 +63,15 @@ along with GCC; see the file COPYING3. If not see - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" - #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" - -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-s390x.so.1" -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390x.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-s390x.so.1" -+ - #undef LINK_SPEC - #define LINK_SPEC \ - "%{m31:-m elf_s390}%{m64:-m elf64_s390} --as-needed \ --- -2.10.2 - diff --git a/system/gcc/310-build-gcj-s390x.patch b/system/gcc/310-build-gcj-s390x.patch deleted file mode 100644 index 1e522ee15..000000000 --- a/system/gcc/310-build-gcj-s390x.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 697a7ba791fce2ffab2ed723d909a89684019e3d Mon Sep 17 00:00:00 2001 -From: "Tuan M. Hoang" -Date: Sun, 19 Feb 2017 17:03:33 +0000 -Subject: [PATCH] main/gcc : when building gcc-java on s390x, libgcj.so - complains about undefined reference to __data_start. Using - SEARCH_FOR_DATA_START instead solved it. Credit to Andrew Haley at RedHat. - ---- - boehm-gc/include/private/gcconfig.h | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h -index 4ca6a80..a15fff6 100644 ---- a/boehm-gc/include/private/gcconfig.h -+++ b/boehm-gc/include/private/gcconfig.h -@@ -1837,8 +1837,7 @@ - # define OS_TYPE "LINUX" - # define LINUX_STACKBOTTOM - # define DYNAMIC_LOADING -- extern int __data_start[]; --# define DATASTART ((ptr_t)(__data_start)) -+# define SEARCH_FOR_DATA_START - extern int _end[]; - # define DATAEND (_end) - # define CACHE_LINE_SIZE 256 --- -2.11.1 - diff --git a/system/gcc/332-gccgo-remove-ustat.patch b/system/gcc/332-gccgo-remove-ustat.patch deleted file mode 100644 index 90aa65ad7..000000000 --- a/system/gcc/332-gccgo-remove-ustat.patch +++ /dev/null @@ -1,190 +0,0 @@ -From bdead75ea02fa852a559f35b41453df0c47c9a66 Mon Sep 17 00:00:00 2001 -From: Ian Lance Taylor -Date: Fri, 22 Jun 2018 06:24:48 -0700 -Subject: [PATCH] syscall: remove Ustat - -glibc 2.28 removes ustat.h and the ustat function entirely, which -breaks syscall.Ustat. - -Updates golang/go#25990 - -Change-Id: I430802c86389a02cb4a0cd6caff36fa542d98f2f -Reviewed-on: https://go-review.googlesource.com/120535 -Reviewed-by: Than McIntosh ---- - libgo/config.h.in | 3 --- - libgo/configure | 33 --------------------------------- - libgo/configure.ac | 18 ------------------ - libgo/go/syscall/libcall_linux_ustat.go | 12 ------------ - libgo/mksysinfo.sh | 14 -------------- - libgo/sysinfo.c | 3 --- - 6 files changed, 83 deletions(-) - delete mode 100644 libgo/go/syscall/libcall_linux_ustat.go - -diff --git a/libgo/config.h.in b/libgo/config.h.in -index 57560cd0..de57d0cc 100644 ---- a/libgo/config.h.in -+++ b/libgo/config.h.in -@@ -343,9 +343,6 @@ - /* Define to 1 if you have the `unshare' function. */ - #undef HAVE_UNSHARE - --/* Define to 1 if you have the header file and it works. */ --#undef HAVE_USTAT_H -- - /* Define to 1 if you have the `utimensat' function. */ - #undef HAVE_UTIMENSAT - -diff --git a/libgo/configure b/libgo/configure -index 66942eda..7166f940 100755 ---- a/libgo/configure -+++ b/libgo/configure -@@ -14760,39 +14760,6 @@ fi - done - - --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether can be used" >&5 --$as_echo_n "checking whether can be used... " >&6; } --if test "${libgo_cv_c_ustat_h+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- CFLAGS_hold=$CFLAGS --CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#include --#ifdef HAVE_LINUX_FILTER_H --#include --#endif --#include -- --_ACEOF --if ac_fn_c_try_compile "$LINENO"; then : -- libgo_cv_c_ustat_h=yes --else -- libgo_cv_c_ustat_h=no --fi --rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext --CFLAGS=$CFLAGS_hold --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_c_ustat_h" >&5 --$as_echo "$libgo_cv_c_ustat_h" >&6; } --if test $libgo_cv_c_ustat_h = yes; then -- --$as_echo "#define HAVE_USTAT_H 1" >>confdefs.h -- --fi -- - if test "$ac_cv_header_sys_mman_h" = yes; then - HAVE_SYS_MMAN_H_TRUE= - HAVE_SYS_MMAN_H_FALSE='#' -diff --git a/libgo/configure.ac b/libgo/configure.ac -index 3cee2c0f..1c192752 100644 ---- a/libgo/configure.ac -+++ b/libgo/configure.ac -@@ -537,24 +537,6 @@ AC_CHECK_HEADERS([linux/filter.h linux/if_addr.h linux/if_ether.h linux/if_tun.h - #endif - ]) - --AC_CACHE_CHECK([whether can be used], --[libgo_cv_c_ustat_h], --[CFLAGS_hold=$CFLAGS --CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE $OSCFLAGS" --AC_COMPILE_IFELSE( --[AC_LANG_SOURCE([ --#include --#ifdef HAVE_LINUX_FILTER_H --#include --#endif --#include --])], [libgo_cv_c_ustat_h=yes], [libgo_cv_c_ustat_h=no]) --CFLAGS=$CFLAGS_hold]) --if test $libgo_cv_c_ustat_h = yes; then -- AC_DEFINE(HAVE_USTAT_H, 1, -- [Define to 1 if you have the header file and it works.]) --fi -- - AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes) - - AC_CHECK_FUNCS(strerror_r strsignal wait4 mincore setenv unsetenv dl_iterate_phdr) -diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh -index 92ecb479..48bc71db 100755 ---- a/libgo/mksysinfo.sh -+++ b/libgo/mksysinfo.sh -@@ -1164,20 +1164,6 @@ grep '^type _sysinfo ' gen-sysinfo.go | \ - -e 's/mem_unit/Unit/' \ - >> ${OUT} - --# The ustat struct. --grep '^type _ustat ' gen-sysinfo.go | \ -- sed -e 's/_ustat/Ustat_t/' \ -- -e 's/f_tfree/Tfree/' \ -- -e 's/f_tinode/Tinoe/' \ -- -e 's/f_fname/Fname/' \ -- -e 's/f_fpack/Fpack/' \ -- >> ${OUT} --# Force it to be defined, as on some older GNU/Linux systems the --# header file fails when using with . --if ! grep 'type _ustat ' gen-sysinfo.go >/dev/null 2>&1; then -- echo 'type Ustat_t struct { Tfree int32; Tinoe uint64; Fname [5+1]int8; Fpack [5+1]int8; }' >> ${OUT} --fi -- - # The utimbuf struct. - grep '^type _utimbuf ' gen-sysinfo.go | \ - sed -e 's/_utimbuf/Utimbuf/' \ ---- gcc-6.4.0/libgo/Makefile.am.old 2016-02-03 15:58:02.419872000 -0600 -+++ gcc-6.4.0/libgo/Makefile.am 2018-06-23 02:55:45.772611885 -0500 -@@ -1,4 +1,3 @@ --# Makefile.am -- Go library Makefile. - - # Copyright 2009 The Go Authors. All rights reserved. - # Use of this source code is governed by a BSD-style -@@ -1989,17 +1988,6 @@ - syscall_lsf_file = - endif - --# GNU/Linux specific ustat support. --if LIBGO_IS_LINUX --if LIBGO_IS_ARM64 --syscall_ustat_file = --else --syscall_ustat_file = go/syscall/libcall_linux_ustat.go --endif --else --syscall_ustat_file = --endif -- - # GNU/Linux specific utimesnano support. - if LIBGO_IS_LINUX - syscall_utimesnano_file = go/syscall/libcall_linux_utimesnano.go -@@ -2051,7 +2039,6 @@ - $(syscall_uname_file) \ - $(syscall_netlink_file) \ - $(syscall_lsf_file) \ -- $(syscall_ustat_file) \ - $(syscall_utimesnano_file) \ - $(GO_LIBCALL_OS_FILE) \ - $(GO_LIBCALL_OS_ARCH_FILE) \ ---- gcc-6.4.0/libgo/Makefile.in.old 2016-02-03 15:58:02.419872000 -0600 -+++ gcc-6.4.0/libgo/Makefile.in 2018-06-23 02:56:04.842611681 -0500 -@@ -2080,11 +2080,6 @@ - - # GNU/Linux specific socket filters. - @LIBGO_IS_LINUX_TRUE@syscall_lsf_file = go/syscall/lsf_linux.go --@LIBGO_IS_ARM64_FALSE@@LIBGO_IS_LINUX_TRUE@syscall_ustat_file = go/syscall/libcall_linux_ustat.go -- --# GNU/Linux specific ustat support. --@LIBGO_IS_ARM64_TRUE@@LIBGO_IS_LINUX_TRUE@syscall_ustat_file = --@LIBGO_IS_LINUX_FALSE@syscall_ustat_file = - @LIBGO_IS_LINUX_FALSE@syscall_utimesnano_file = go/syscall/libcall_posix_utimesnano.go - - # GNU/Linux specific utimesnano support. -@@ -2122,7 +2117,6 @@ - $(syscall_uname_file) \ - $(syscall_netlink_file) \ - $(syscall_lsf_file) \ -- $(syscall_ustat_file) \ - $(syscall_utimesnano_file) \ - $(GO_LIBCALL_OS_FILE) \ - $(GO_LIBCALL_OS_ARCH_FILE) \ diff --git a/system/gcc/332-gccgo-sysinfo.patch b/system/gcc/332-gccgo-sysinfo.patch new file mode 100644 index 000000000..822bc53c9 --- /dev/null +++ b/system/gcc/332-gccgo-sysinfo.patch @@ -0,0 +1,12 @@ +--- gcc-8.3.0/libgo/sysinfo.c.old 2018-06-22 14:25:34.000000000 +0000 ++++ gcc-8.3.0/libgo/sysinfo.c 2019-02-27 20:18:38.740000000 +0000 +@@ -73,9 +73,6 @@ + #include + #include + #include +-#if defined(HAVE_SYS_USER_H) +-#include +-#endif + #if defined(HAVE_SYS_UTSNAME_H) + #include + #endif diff --git a/system/gcc/333-gccgo-signal-ppc64.patch b/system/gcc/333-gccgo-signal-ppc64.patch new file mode 100644 index 000000000..304b71733 --- /dev/null +++ b/system/gcc/333-gccgo-signal-ppc64.patch @@ -0,0 +1,11 @@ +--- gcc-8.3.0/libgo/runtime/go-signal.c.old 2017-08-18 20:17:26.000000000 +0000 ++++ gcc-8.3.0/libgo/runtime/go-signal.c 2019-02-27 20:25:02.560000000 +0000 +@@ -222,7 +222,7 @@ + #endif + #ifdef __PPC__ + #ifdef __linux__ +- ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; ++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; + #endif + #ifdef _AIX + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD index 7da594e20..e831d2604 100644 --- a/system/gcc/APKBUILD +++ b/system/gcc/APKBUILD @@ -1,21 +1,22 @@ # Maintainer: Adelie Platform Group pkgname=gcc -pkgver=6.4.0 -_ecjver=4.9 +pkgver=8.3.0 [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname="$pkgname$_target" -pkgrel=10 +pkgrel=0 pkgdesc="The GNU Compiler Collection" url="https://gcc.gnu.org" arch="all" license="GPL-3.0+ AND LGPL-2.1+" _gccrel=$pkgver-r$pkgrel depends="binutils$_target isl" -makedepends_build="gcc$_cross g++$_cross paxmark bison flex texinfo zip gmp-dev mpfr-dev mpc1-dev zlib-dev" -makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev libucontext-dev" +makedepends_build="gcc$_cross g++$_cross bison flex texinfo zip gmp-dev + mpfr-dev mpc1-dev zlib-dev" +makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev + libucontext-dev" subpackages=" " [ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target gcc-lang$_target" replaces="libstdc++ binutils" @@ -23,7 +24,6 @@ options="$options !check !dbg strip toolchain" : ${LANG_CXX:=true} : ${LANG_OBJC:=true} -: ${LANG_JAVA:=true} : ${LANG_GO:=true} : ${LANG_FORTRAN:=true} : ${LANG_ADA:=false} @@ -43,7 +43,6 @@ if [ "$CHOST" != "$CTARGET" ]; then _builddir="$srcdir/build-cross-final" fi LANG_OBJC=false - LANG_JAVA=false LANG_GO=false LANG_FORTRAN=false LIBGOMP=false @@ -80,7 +79,6 @@ elif [ "$CBUILD" != "$CHOST" ]; then # Languages that do not need bootstrapping LANG_OBJC=false - LANG_JAVA=false LANG_GO=false LANG_FORTRAN=false @@ -124,10 +122,6 @@ if $LANG_OBJC; then subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc" _languages="$_languages,objc" fi -if $LANG_JAVA; then - subpackages="$subpackages libgcj::$CTARGET_ARCH gcc-java$_target:java" - _languages="$_languages,java" -fi if $LANG_GO; then subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_target:go" _languages="$_languages,go" @@ -144,54 +138,40 @@ fi makedepends="$makedepends_build $makedepends_host" source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz - https://sourceware.org/pub/java/ecj-$_ecjver.jar + + 0002-posix_memalign.patch + 0008-s390x-muslldso.patch + 0009-microblaze-pr65649.patch + 0010-ldbl128-config.patch + 0011-m68k.patch + 0012-static-pie.patch 001_all_default-ssp-strong.patch 002_all_default-relro.patch - 003_all_default-fortify-source.patch 005_all_default-as-needed.patch 011_all_default-warn-format-security.patch 012_all_default-warn-trampolines.patch 020_all_msgfmt-libstdc++-link.patch - 050_all_libiberty-asprintf.patch 051_all_libiberty-pic.patch - 053_all_libitm-no-fortify-source.patch - 067_all_gcc-poison-system-directories.patch - 090_all_pr55930-dependency-tracking.patch - 201-cilkrts.patch - 203-libgcc_s.patch - 204-linux_libc_has_function.patch 205-nopie.patch - 207-static-pie.patch libgcc-always-build-gcceh.a.patch gcc-4.9-musl-fortify.patch gcc-6.1-musl-libssp.patch - boehm-gc-musl.patch gcc-pure64.patch - fix-gcj-stdgnu14-link.patch - fix-gcj-musl.patch - fix-gcj-iconv-musl.patch - gcc-4.8-build-args.patch fix-cxxflags-passing.patch - ada-fixes.patch ada-shared.patch ada-musl.patch - ada-aarch64-multiarch.patch - 300-main-gcc-add-musl-s390x-dynamic-linker.patch - 310-build-gcj-s390x.patch 320-libffi-gnulinux.patch 330-gccgo-link-to-ucontext.patch 331-gccgo-use-real-off_t-type.patch - 332-gccgo-remove-ustat.patch + 332-gccgo-sysinfo.patch + 333-gccgo-signal-ppc64.patch - fix-rs6000-pie.patch add-classic_table-support.patch - lra-pentium.patch - gcc-5.4.0-locale.patch " @@ -221,12 +201,7 @@ prepare() { return 1 fi - # see http://gcc.gnu.org/ml/java/2008-04/msg00027.html - mv "$srcdir"/ecj-*.jar ecj.jar - echo ${pkgver} > gcc/BASE-VER - echo "UNSUPPORTED=1" > libcilkrts/configure.tgt - rm libgo/go/syscall/libcall_linux_ustat.go } build() { @@ -336,14 +311,6 @@ package() { ln -s gcc "$pkgdir"/usr/bin/cc - # we dont support gcj -static - # and saving 35MB is not bad. - find "$pkgdir" -name libgcj.a -o -name libgtkpeer.a \ - -o -name libgjsmalsa.a -o -name libgcj-tools.a \ - -o -name libjvm.a -o -name libgij.a -o -name libgcj_bc.a \ - -o -name libjavamath.a \ - | xargs rm -f - # strip debug info from some static libs ${STRIP_FOR_TARGET} -g `find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \ -o -name libmudflap.a -o -name libmudflapth.a \ @@ -352,11 +319,6 @@ package() { -o -name libatomic.a -o -name libasan.a -o -name libtsan.a \) \ -a -type f` - if $LANG_JAVA; then - sed -i -e 's/lib: /&%{static:%eJava programs cannot be linked statically}/' \ - "$pkgdir"/usr/lib/libgcj.spec - fi - if $LIBGOMP; then mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir fi @@ -374,8 +336,6 @@ package() { mv "$i" "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib/ done - paxmark -pmrs "$pkgdir"/$_gcclibexec/cc1 - # move ada runtime libs if $LANG_ADA; then for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do @@ -429,7 +389,6 @@ gpp() { "$subpkgdir"/usr/${_target:+$CTARGET/}lib \ mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/" - paxmark -pmrs "$subpkgdir/$_gcclibexec/cc1plus" mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/*++* "$subpkgdir"/usr/${_target:+$CTARGET/}lib/ mv "$pkgdir"/usr/${_target:+$CTARGET/}include/c++ "$subpkgdir"/usr/${_target:+$CTARGET/}include/ @@ -473,65 +432,6 @@ libgomp() { mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/ } -java() { - pkgdesc="Java support for GCC" - depends="zlib-dev gcc=$_gccrel libgcj=$_gccrel" - - paxmark -pm "$pkgdir"/$_gcclibexec/ecj1 - mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib "$subpkgdir"/$_gcclibdir/ - cd "$pkgdir"/usr/bin - mv *gcj *gcj-dbtool *gjavah *gcjh *jcf-dump "$subpkgdir"/usr/bin/ - cd "$pkgdir" - for i in $(find usr/ -name ecj1 -o -name jc1 -o -name jvgenmain); do - mkdir -p "$subpkgdir"/${i%/*} - mv "$pkgdir"/$i "$subpkgdir"/$i - done - for i in "$pkgdir"/usr/lib/libgcj*.so; do - if [ -L "$i" ]; then - mv "$i" "$subpkgdir"/usr/lib/ - fi - done - mkdir -p "$subpkgdir"/usr/share/gcc-6.4.0/python - mv "$pkgdir"/usr/share/gcc-6.4.0/python/libjava \ - "$subpkgdir"/usr/share/gcc-6.4.0/python - mv "$pkgdir"/usr/lib/libgij.so "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/lib/libgcj.spec "$subpkgdir"/$_gcclibdir/ -} - -libgcj() { - pkgdesc="Java runtime library for gcc" - # libgcj_bc.so moved from gcc-java to libgcj - replaces="gcc-java" - depends= - - mkdir -p "$subpkgdir"/usr/bin - cd "$pkgdir"/usr/bin - paxmark -pmse "$pkgdir"/usr/bin/gij - mv aot-compile gappletviewer gc-analyze gij gjar gjarsigner gkeytool\ - gnative2ascii gorbd grmic grmid grmiregistry gserialver \ - gtnameserv jv-convert rebuild-gcj-db \ - "$subpkgdir"/usr/bin/ - cd "$pkgdir" - for i in $(find usr/lib -name jc1 -o -name jvgenmain); do - mkdir -p "$subpkgdir"/${i%/*} - mv "$pkgdir"/$i "$subpkgdir"/$i - done - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/gcj-* \ - "$pkgdir"/usr/lib/libgcj_bc.so \ - "$pkgdir"/usr/lib/libgcj*.so.* \ - "$pkgdir"/usr/lib/libgij.so.* \ - "$pkgdir"/usr/lib/logging.properties \ - "$pkgdir"/usr/lib/security \ - "$subpkgdir"/usr/lib/ - - mkdir -p "$subpkgdir"/usr/lib/pkgconfig - mv "$pkgdir"/usr/lib/pkgconfig/libgcj* "$subpkgdir"/usr/lib/pkgconfig/ - - mkdir -p "$subpkgdir"/usr/share/ - mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/ -} - libgo() { pkgdesc="Go runtime library for GCC" depends= @@ -553,11 +453,13 @@ go() { mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/ + mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/ + mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/ + mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/usr/lib/libgo.a \ "$pkgdir"/usr/lib/libgo.so \ "$pkgdir"/usr/lib/libgobegin.a \ "$pkgdir"/usr/lib/libgolibbegin.a \ - "$pkgdir"/usr/lib/libnetgo.a \ "$subpkgdir"/usr/lib/ } @@ -622,46 +524,32 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ } -sha512sums="02c60e54527c7adf584798d5251f8a0b80c93d5deafce82501b2c28e6692e0bd783927bbfc4bc527a863c0cccc025150a34740a9e29badb02d4b48e56a8aba90 gcc-6.4.0.tar.xz -28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar +sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 gcc-8.3.0.tar.xz +6d84354e6df96d5ea244eb3bb5f044781796b88040b11c78fb6ee509e5aac19d46e0e92ca836e98e6495d9751f52439833b748efc419e4f5d5301fb549c4dcc9 0002-posix_memalign.patch +7f434a7350c9b06d0ae7cc18a569d813238483afa34b0801d112844a0dfe6164ae36b0416955fd4da7a8caa54672247f319a8ec7ce4b6a97a5f4e17ec083112a 0008-s390x-muslldso.patch +b8207c1be82b20fdad2596bb0a60469db52257456d0925bacf48b44899f4c6ece93c501347e1ffe92fd372c30f90d05a6d8d8078876abf4cf2deae3dbb1a1f58 0009-microblaze-pr65649.patch +66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch +cd3ba928121e8578ba9f73215e4d81ee3ebbab33e00b04cdfd62b46d21f9536297ae12dc021aad6e56f3b28d9d544727331bbe6db1e3438d7b9545b2c3250906 0011-m68k.patch +45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch -e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch -f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch -51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch -3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch -9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch +625c02e03c2f1db04da12cc6a086ec85790a031a13df36486243fd9569cd17f7c8ebeec91ac16cc1f87c3ec1ffe4c421153e98a9aeb5eea35943a6f015d81f50 002_all_default-relro.patch +02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch +622fdbcbbf2feb86bd839af627ec3613c6d2c77b14d37d31165b19f73f45b3663a203efff5d224f194edb15eb62d3d5885e32f85d1b584f071e580fea4e12664 011_all_default-warn-format-security.patch +03cddde56b2a355f08716c8efcd5616606d42946c87831d77d55570636c46e351e81a04c7dabd3466d9406c40476bead857cfe1eceaf7f0d86dd2757c8cf4a9e 012_all_default-warn-trampolines.patch d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef96432a6f57598e223381d4286e8fb8baaa25906707f29fbd 020_all_msgfmt-libstdc++-link.patch -840070a3c423e6206aaa6e63e1d9a0fcd6efd53626cd1240a193f0b60aa5d84216acc4a2a4fa8bce74549b07e6a316b01d638f20cea13dc62473491a302fb3d6 050_all_libiberty-asprintf.patch 0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch -e7a2eb1b1870e199d6fd753d065781575656fa12baa264f96c5d179689d88c31b8a3f92a5dae96088c05e96aa2bda138364ad7dbcc79e1819a102f192cbb7bab 053_all_libitm-no-fortify-source.patch -e87da18aa7ab92b02b06168658c63b42a6c73a08fad2a30f81ef6296100fdbe3c3a91548fd0cb24eaf591e862bb08e4b67249bc4b977b07da33523aee0c686bc 067_all_gcc-poison-system-directories.patch -4a328d1e1a56c20166307edcfa322068915784d9c08025b7f81cf69714da48fc266b6d34f77b9135c2f10da830d9df408276a1b78d1fd218637c2823506593c2 090_all_pr55930-dependency-tracking.patch -ef052d0c3c9642fcb5ed570069c5a49c8ef523c47ac8ce3f201a801766f72ae4ff7c3725a70ee66e52c0fb559621e35fe0cf5b88b901d71ceadd381f49653a08 201-cilkrts.patch -808e206f5e107084156fba333d4e091dcbd62f5d7756142bc292d4b0a52619f8c2aaca3617defc2f5b6552ba0439aebd33f4141329d88eab6ddf2dd637d92c08 203-libgcc_s.patch -fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b9940669ef89269c44c46d17ca5bcd54b5cd1176e5eaf2992c1 204-linux_libc_has_function.patch 98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch -3287d5b443bea8ec64132bcabe869c738ae98ea8f1a86df1c5d18c927f8816edbfcefeefc47792dbbb2bcacf50319af00e01b3735d34525913b64350770ad453 207-static-pie.patch d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch -bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch -2253941f3d19b6d08801d3782f5f5ed56c3b73fbc9d3561a8f01c702963ac4fab91599c686076e7081eb6a80c37ccd33591ae978996d6eee1dc0ce0f1c50259a fix-gcj-stdgnu14-link.patch -f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d452e9579924a523bc75da6e0648c1c976d42e40af48b10343b fix-gcj-musl.patch -54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch -abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch -9016b257abd8fa981de44a49512e35db814d1cbb47c1a87cd31c12d4ae20b13e9e149fe41691a7ec3c95bbcfde8a79194a8d2eaf547ceade3a246fad67c47dd8 ada-fixes.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch 631d4bdef6d8bde34df7978bb53ec28c3c909cf1f87139e5f148138d0f09adc58b41ecf0148bbf50fb4bc916c411e9bf8a2b6c046c75c0e77d754d8c35bcd4d7 ada-musl.patch -fa44c8158111627aa0e91c43e7cc3aa38642c2041c96532dd4f0932dae4d6f92ea2850b683abcf10e7e120299d42ea6b69adc00002a514c76be8e39e99fa052b ada-aarch64-multiarch.patch -4b4a0ff306a8ef34ff6e3284fbfca869012164a47ba7cb099085c1dd03e6ca0cdd462f82710e08c9a02895adc7484e4c5eef17b5aa264cf5d978fe8ad78eea93 300-main-gcc-add-musl-s390x-dynamic-linker.patch -385bc2fa50204f678964e5148c6170f572701dab920fbec8301f505bda34d182cde0adb7da042fee71719e12fb59f59181897f9b1bb4f4716ff59aad46ca1998 310-build-gcj-s390x.patch f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch 8efd028febb962ae100be32f72f7450c4f77d67ad96a5f47072136cdf47043f9d54835a87c7ab5aaa0fa0108c4c7a97ba2d7732d5aaf2efce70fe1f7e1c39d6e 330-gccgo-link-to-ucontext.patch 24c8708f64b9b7945b3f07e9bbecf17ab8bcde2524f49cbd694ca2f6146ccc3f13bb027db282f326525ea79d50a2868fa3fa2b0d688a914b5ea77bbfd7e5cbe4 331-gccgo-use-real-off_t-type.patch -cf19fcc6abee70210a9061e5385fe361a5eb59a74f7d34297420a53e351400da23a060164bef5b322daba4be90019481731acf93c45fb5a93430018f1aa7ce35 332-gccgo-remove-ustat.patch -01c71cd5881fc07ea3b9b980697e89b3ca0fe98502958ceafc3fca18b2604c844e2f457feab711baf8e03f00a5383b0e38aac7eb954034e306f43d4a37f165ed fix-rs6000-pie.patch +31f9d85faa8648d140834646fc2bc7733eb362bfb87d696c5f375f9c0a3e4c3df41708a9a37c49bc0757513a7704976b9a5e21aa5c2de4b380d47d7e2cbde214 332-gccgo-sysinfo.patch +ef6ff46d571814ce2f6db549bfb9b9f5cc55d46085b197c36627a72e4f355fcbeb41d04fabd3029f3bc536fc48155fe3feab58a7a6ece9dcd19409ea44c17b0b 333-gccgo-signal-ppc64.patch 1860593584f629d24d5b6db14b0a3412e9f93449b663aaa4981301a0923db0159314905e694f27366fbfef72dce06636ab6df86862b7e9e9564847e03bee82c1 add-classic_table-support.patch -4e1b421ed72668b66ecbcb0a34afa99d2a34cb2ea9ee51c4aad605fc8a0e94e3bfbabae4ebe236efc5ec86fc01a472cbe93f36fe25cf579714939d8102a9b84a lra-pentium.patch 67a75a94fdba69de96b98dbc2978a50cb197857c464b81f7c956176da7066b3be937e40cb15e0870fc1e7382d662c5101bcd18cf457fc4112de41802042b51c4 gcc-5.4.0-locale.patch" diff --git a/system/gcc/ada-aarch64-multiarch.patch b/system/gcc/ada-aarch64-multiarch.patch deleted file mode 100644 index ac60b6f6a..000000000 --- a/system/gcc/ada-aarch64-multiarch.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- gcc-6.4.0/gcc/ada/gcc-interface/Makefile.in.orig -+++ gcc-6.4.0/gcc/ada/gcc-interface/Makefile.in -@@ -2042,13 +2042,8 @@ - system.ads - #else - #include -+#include - #endif - - #ifdef __MINGW32__ ---- gcc-6.1.0.orig/gcc/ada/terminals.c -+++ gcc-6.1.0/gcc/ada/terminals.c -@@ -1068,13 +1068,6 @@ - #include - #include - --/* On some system termio is either absent or including it will disable termios -- (HP-UX) */ --#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \ -- && !defined (__rtems__) --# include --#endif -- - #include - #include - #include -@@ -1169,7 +1162,7 @@ - char *slave_name = NULL; - - #ifdef USE_GETPT -- master_fd = getpt (); -+ master_fd = posix_openpt (O_RDWR); - #elif defined (USE_OPENPTY) - status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); - #elif defined (USE_CLONE_DEVICE) diff --git a/system/gcc/boehm-gc-musl.patch b/system/gcc/boehm-gc-musl.patch deleted file mode 100644 index 2f106cba1..000000000 --- a/system/gcc/boehm-gc-musl.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- gcc-4.8.1/boehm-gc/os_dep.c.orig 2013-09-17 07:46:00.969884340 +0000 -+++ gcc-4.8.1/boehm-gc/os_dep.c 2013-09-17 06:53:53.629884946 +0000 -@@ -26,7 +26,7 @@ - # define __KERNEL__ - # include - # undef __KERNEL__ --# else -+# elif defined(__GLIBC__) - /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */ - /* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */ - /* prototypes, so we have to include the top-level sigcontext.h to */ ---- gcc-4.8.2/boehm-gc/dyn_load.c.orig 2014-02-17 14:13:09.519850231 +0200 -+++ gcc-4.8.2/boehm-gc/dyn_load.c 2014-02-17 14:14:27.906093514 +0200 -@@ -459,9 +459,7 @@ - /* For glibc 2.2.4+. Unfortunately, it doesn't work for older */ - /* versions. Thanks to Jakub Jelinek for most of the code. */ - --# if (defined(LINUX) || defined (__GLIBC__)) /* Are others OK here, too? */ \ -- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ -- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) -+# if (defined(LINUX) || defined (__GLIBC__)) - - /* We have the header files for a glibc that includes dl_iterate_phdr. */ - /* It may still not be available in the library on the target system. */ ---- gcc-4.8.2/boehm-gc/include/private/gcconfig.h.orig 2014-02-17 14:14:36.026049422 +0200 -+++ gcc-4.8.2/boehm-gc/include/private/gcconfig.h 2014-02-17 14:17:11.345207887 +0200 -@@ -684,7 +684,7 @@ - # ifdef __ELF__ - # define DYNAMIC_LOADING - # include --# if defined(__GLIBC__)&& __GLIBC__>=2 -+# if 1 - # define SEARCH_FOR_DATA_START - # else /* !GLIBC2 */ - extern char **__environ; -@@ -1147,7 +1147,7 @@ - # define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff)) - # endif - # include --# if defined(__GLIBC__) && __GLIBC__ >= 2 -+# if 1 - # define SEARCH_FOR_DATA_START - # else - extern char **__environ; -@@ -1367,7 +1367,7 @@ - # define HBLKSIZE 4096 - # endif - # define USE_GENERIC_PUSH_REGS --# if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2 || __GLIBC__ > 2 -+# if 1 - # define LINUX_STACKBOTTOM - # else - # define STACKBOTTOM 0x80000000 -@@ -1858,7 +1858,7 @@ - # ifdef __ELF__ - # define DYNAMIC_LOADING - # include --# if defined(__GLIBC__) && __GLIBC__ >= 2 -+# if 1 - # define SEARCH_FOR_DATA_START - # else - extern char **__environ; diff --git a/system/gcc/fix-gcj-iconv-musl.patch b/system/gcc/fix-gcj-iconv-musl.patch deleted file mode 100644 index b0015751e..000000000 --- a/system/gcc/fix-gcj-iconv-musl.patch +++ /dev/null @@ -1,120 +0,0 @@ ---- gcc-4.8.2/libjava/gnu/gcj/convert/natIconv.cc.orig 2014-02-18 18:46:14.897880526 +0200 -+++ gcc-4.8.2/libjava/gnu/gcj/convert/natIconv.cc 2014-02-18 18:50:08.766613550 +0200 -@@ -24,6 +24,13 @@ - - #ifdef HAVE_ICONV - #include -+#include -+ -+#if __BYTE_ORDER == __BIG_ENDIAN -+#define UCS2_CHARSET "UCS-2BE" -+#else -+#define UCS2_CHARSET "UCS-2LE" -+#endif - - template - static inline size_t -@@ -45,7 +52,7 @@ - _Jv_GetStringUTFRegion (encoding, 0, encoding->length(), buffer); - buffer[len] = '\0'; - -- iconv_t h = iconv_open ("UCS-2", buffer); -+ iconv_t h = iconv_open (UCS2_CHARSET, buffer); - if (h == (iconv_t) -1) - throw new ::java::io::UnsupportedEncodingException (encoding); - -@@ -99,18 +106,6 @@ - throw new ::java::io::CharConversionException (); - } - -- if (iconv_byte_swap) -- { -- size_t max = (old_out - outavail) / sizeof (jchar); -- for (size_t i = 0; i < max; ++i) -- { -- // Byte swap. -- jchar c = (((out[outpos + i] & 0xff) << 8) -- | ((out[outpos + i] >> 8) & 0xff)); -- outbuf[i] = c; -- } -- } -- - inpos += old_in - inavail; - return (old_out - outavail) / sizeof (jchar); - #else /* HAVE_ICONV */ -@@ -145,7 +140,7 @@ - _Jv_GetStringUTFRegion (encoding, 0, encoding->length(), buffer); - buffer[len] = '\0'; - -- iconv_t h = iconv_open (buffer, "UCS-2"); -+ iconv_t h = iconv_open (buffer, UCS2_CHARSET); - if (h == (iconv_t) -1) - throw new ::java::io::UnsupportedEncodingException (encoding); - -@@ -187,20 +182,6 @@ - char *inbuf = (char *) &chars[inpos]; - char *outbuf = (char *) &out[count]; - -- if (iconv_byte_swap) -- { -- // Ugly performance penalty -- don't use losing systems! -- temp_buffer = (jchar *) _Jv_Malloc (inlength * sizeof (jchar)); -- for (int i = 0; i < inlength; ++i) -- { -- // Byte swap. -- jchar c = (((chars[inpos + i] & 0xff) << 8) -- | ((chars[inpos + i] >> 8) & 0xff)); -- temp_buffer[i] = c; -- } -- inbuf = (char *) temp_buffer; -- } -- - size_t loop_old_in = old_in; - while (1) - { -@@ -252,44 +233,7 @@ - jboolean - gnu::gcj::convert::IOConverter::iconv_init (void) - { -- // Some versions of iconv() always return their UCS-2 results in -- // big-endian order, and they also require UCS-2 inputs to be in -- // big-endian order. For instance, glibc 2.1.3 does this. If the -- // UTF-8=>UCS-2 iconv converter has this feature, then we assume -- // that all UCS-2 converters do. (This might not be the best -- // heuristic, but is is all we've got.) -- jboolean result = false; --#ifdef HAVE_ICONV -- iconv_t handle = iconv_open ("UCS-2", "UTF-8"); -- if (handle != (iconv_t) -1) -- { -- jchar c; -- unsigned char in[4]; -- char *inp, *outp; -- size_t inc, outc, r; -- -- // This is the UTF-8 encoding of \ufeff. At least Tru64 UNIX libiconv -- // needs the trailing NUL byte, otherwise iconv fails with EINVAL. -- in[0] = 0xef; -- in[1] = 0xbb; -- in[2] = 0xbf; -- in[3] = 0x00; -- -- inp = (char *) in; -- inc = 4; -- outp = (char *) &c; -- outc = 2; -- -- r = iconv_adapter (iconv, handle, &inp, &inc, &outp, &outc); -- // Conversion must be complete for us to use the result. -- if (r != (size_t) -1 && inc == 0 && outc == 0) -- result = (c != 0xfeff); -- -- // Release iconv handle. -- iconv_close (handle); -- } --#endif /* HAVE_ICONV */ -- return result; -+ return false; - } - - void diff --git a/system/gcc/fix-gcj-musl.patch b/system/gcc/fix-gcj-musl.patch deleted file mode 100644 index d26f510c0..000000000 --- a/system/gcc/fix-gcj-musl.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- gcc-4.8.2/libjava/gnu/classpath/natSystemProperties.cc.orig 2014-02-18 10:55:08.617678779 +0200 -+++ gcc-4.8.2/libjava/gnu/classpath/natSystemProperties.cc 2014-02-18 10:56:31.927227453 +0200 -@@ -289,7 +289,7 @@ - // just default to `en_US'. - setlocale (LC_ALL, ""); - char *locale = setlocale (LC_MESSAGES, ""); -- if (locale && strlen (locale) >= 2) -+ if (locale && strlen (locale) >= 2 && (locale[2] == '\0' || locale[2] == '_')) - { - char buf[3]; - buf[2] = '\0'; ---- gcc-4.8.2/libjava/posix-threads.cc.orig 2014-02-18 13:22:01.789933726 +0200 -+++ gcc-4.8.2/libjava/posix-threads.cc 2014-02-18 13:29:50.924058875 +0200 -@@ -657,6 +657,7 @@ - struct sched_param param; - pthread_attr_t attr; - struct starter *info; -+ size_t ss; - - if (data->flags & FLAG_START) - return; -@@ -675,8 +676,25 @@ - // Set stack size if -Xss option was given. - if (gcj::stack_size > 0) - { -- int e = pthread_attr_setstacksize (&attr, gcj::stack_size); -+ ss = gcj::stack_size; -+ } -+ else -+ { -+ int e = pthread_attr_getstacksize (&attr, &ss); -+ if (e != 0) -+ JvFail (strerror (e)); -+ -+ // Request at least 1meg of stack -+ if (ss >= 1024 * 1024) -+ ss = 0; -+ else -+ ss = 1024 * 1024; -+ } -+ -+ if (ss) -+ { -+ int e = pthread_attr_setstacksize (&attr, ss); - if (e != 0) - JvFail (strerror (e)); - } - - info = (struct starter *) _Jv_AllocBytes (sizeof (struct starter)); diff --git a/system/gcc/fix-gcj-stdgnu14-link.patch b/system/gcc/fix-gcj-stdgnu14-link.patch deleted file mode 100644 index 2b2ce0fa5..000000000 --- a/system/gcc/fix-gcj-stdgnu14-link.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- gcc-6.1.0/libjava/Makefile.am -+++ gcc-6.1.0/libjava/Makefile.am -@@ -488,10 +488,14 @@ - nat_files = $(nat_source_files:.cc=.lo) - xlib_nat_files = $(xlib_nat_source_files:.cc=.lo) - -+libgcj_la_CPPFLAGS = \ -+ $(AM_CPPFLAGS) \ -+ $(LIBSTDCXX_RAW_CXX_CXXFLAGS) -+ - # Include THREADLIBS here to ensure that the correct version of - # certain linuxthread functions get linked: - ## The mysterious backslash in the grep pattern is consumed by make. --libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ -+libgcj_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDFLAGS) -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ - $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \ - -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ - $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL) ---- gcc-6.1.0/libjava/Makefile.in -+++ gcc-6.1.0/libjava/Makefile.in -@@ -1103,9 +1103,13 @@ - nat_files = $(nat_source_files:.cc=.lo) - xlib_nat_files = $(xlib_nat_source_files:.cc=.lo) - -+libgcj_la_CPPFLAGS = \ -+ $(AM_CPPFLAGS) \ -+ $(LIBSTDCXX_RAW_CXX_CXXFLAGS) -+ - # Include THREADLIBS here to ensure that the correct version of - # certain linuxthread functions get linked: --libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ -+libgcj_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDFLAGS) -rpath $(toolexeclibdir) $(THREADLDFLAGS) $(extra_ldflags) $(THREADLIBS) \ - $(LIBLTDL) $(SYS_ZLIBS) $(LIBJAVA_LDFLAGS_NOUNDEF) \ - -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ - $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) $(LIBGCJ_LD_EXPORT_ALL) diff --git a/system/gcc/fix-rs6000-pie.patch b/system/gcc/fix-rs6000-pie.patch deleted file mode 100644 index 1fbc31a56..000000000 --- a/system/gcc/fix-rs6000-pie.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- gcc-6.3.0.orig/gcc/config/rs6000/sysv4.h -+++ gcc-6.3.0/gcc/config/rs6000/sysv4.h -@@ -753,23 +753,42 @@ - #endif - - #ifdef HAVE_LD_PIE --#define STARTFILE_LINUX_SPEC "\ --%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ --%{mnewlib:ecrti.o%s;:crti.o%s} \ --%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ --" CRTOFFLOADBEGIN -+#define STARTFILE_LINUX_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;: \ -+ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \ -+ crti.o%s %{shared:crtbeginS.o%s;: \ -+ %{" PIE_SPEC ":crtbeginS.o%s} \ -+ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \ -+ %{fvtable-verify=none:%s; \ -+ fvtable-verify=preinit:vtv_start_preinit.o%s; \ -+ fvtable-verify=std:vtv_start.o%s} \ -+ " CRTOFFLOADBEGIN - #else --#define STARTFILE_LINUX_SPEC "\ --%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ --%{mnewlib:ecrti.o%s;:crti.o%s} \ --%{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ --" CRTOFFLOADBEGIN -+#define STARTFILE_LINUX_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ -+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ -+ %{fvtable-verify=none:%s; \ -+ fvtable-verify=preinit:vtv_start_preinit.o%s; \ -+ fvtable-verify=std:vtv_start.o%s} \ -+ " CRTOFFLOADBEGIN - #endif - --#define ENDFILE_LINUX_SPEC "\ --%{shared|pie:crtendS.o%s;:crtend.o%s} \ --%{mnewlib:ecrtn.o%s;:crtn.o%s} \ --" CRTOFFLOADEND -+#ifdef HAVE_LD_PIE -+#define ENDFILE_LINUX_SPEC \ -+ "%{fvtable-verify=none:%s; \ -+ fvtable-verify=preinit:vtv_end_preinit.o%s; \ -+ fvtable-verify=std:vtv_end.o%s} \ -+ %{shared:crtendS.o%s;: %{" PIE_SPEC ":crtendS.o%s} \ -+ %{" NO_PIE_SPEC ":crtend.o%s}} crtn.o%s \ -+ " CRTOFFLOADEND -+#else -+#define ENDFILE_LINUX_SPEC \ -+ "%{fvtable-verify=none:%s; \ -+ fvtable-verify=preinit:vtv_end_preinit.o%s; \ -+ fvtable-verify=std:vtv_end.o%s} \ -+ %{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s \ -+ " CRTOFFLOADEND -+#endif - - #define LINK_START_LINUX_SPEC "" - diff --git a/system/gcc/gcc-4.8-build-args.patch b/system/gcc/gcc-4.8-build-args.patch deleted file mode 100644 index c27e00961..000000000 --- a/system/gcc/gcc-4.8-build-args.patch +++ /dev/null @@ -1,41 +0,0 @@ -When cross compiling a target gcc, target flags may be used on the host - -Configure identifies a number of warning flags (WARN_CFLAGS and -WARN_CXXFLAGS) from the $CC value. The cross compiler may be different -from the host compiler and may not support the same set of flags. This -leads to problems such as: - -cc1plus: error: unrecognized command line option "-Wno-narrowing" -cc1plus: error: unrecognized command line option "-Wno-overlength-strings" - -Work around this problem by removing the warning flags from the -BUILD_CXXFLAGS value, in a way similar to the BUILD_CFLAGS. - -Upstream-Status: Pending - -Signed-off-by: Mark Hatle - -Index: gcc-4.8.0/gcc/configure -=================================================================== ---- gcc-4.8.0.orig/gcc/configure -+++ gcc-4.8.0/gcc/configure -@@ -11720,6 +10581,7 @@ STMP_FIXINC=stmp-fixinc - if test x$build != x$host || test "x$coverage_flags" != x - then - BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' -+ BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' - BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' - fi - -Index: gcc-4.8.0/gcc/configure.ac -=================================================================== ---- gcc-4.8.0.orig/gcc/configure.ac -+++ gcc-4.8.0/gcc/configure.ac -@@ -1901,6 +1901,7 @@ STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_F - if test x$build != x$host || test "x$coverage_flags" != x - then - BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' -+ BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' - BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' - fi - diff --git a/system/gcc/lra-pentium.patch b/system/gcc/lra-pentium.patch deleted file mode 100644 index e876bcc39..000000000 --- a/system/gcc/lra-pentium.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- trunk/gcc/lra-assigns.c 2017/03/10 20:53:18 246058 -+++ trunk/gcc/lra-assigns.c 2017/03/10 21:17:13 246059 -@@ -889,6 +889,30 @@ - live_pseudos_reg_renumber[regno] = hard_regno; - } - -+/* Return true iff there is a reason why pseudo SPILL_REGNO should not -+ be spilled. */ -+static bool -+must_not_spill_p (unsigned spill_regno) -+{ -+ if ((pic_offset_table_rtx != NULL -+ && spill_regno == REGNO (pic_offset_table_rtx)) -+ || ((int) spill_regno >= lra_constraint_new_regno_start -+ && ! bitmap_bit_p (&lra_inheritance_pseudos, spill_regno) -+ && ! bitmap_bit_p (&lra_split_regs, spill_regno) -+ && ! bitmap_bit_p (&lra_subreg_reload_pseudos, spill_regno) -+ && ! bitmap_bit_p (&lra_optional_reload_pseudos, spill_regno))) -+ return true; -+ /* A reload pseudo that requires a singleton register class should -+ not be spilled. -+ FIXME: this mitigates the issue on certain i386 patterns, but -+ does not solve the general case where existing reloads fully -+ cover a limited register class. */ -+ if (!bitmap_bit_p (&non_reload_pseudos, spill_regno) -+ && reg_class_size [reg_preferred_class (spill_regno)] == 1) -+ return true; -+ return false; -+} -+ - /* Array used for sorting reload pseudos for subsequent allocation - after spilling some pseudo. */ - static int *sorted_reload_pseudos; -@@ -960,13 +984,7 @@ - /* Spill pseudos. */ - static_p = false; - EXECUTE_IF_SET_IN_BITMAP (&spill_pseudos_bitmap, 0, spill_regno, bi) -- if ((pic_offset_table_rtx != NULL -- && spill_regno == REGNO (pic_offset_table_rtx)) -- || ((int) spill_regno >= lra_constraint_new_regno_start -- && ! bitmap_bit_p (&lra_inheritance_pseudos, spill_regno) -- && ! bitmap_bit_p (&lra_split_regs, spill_regno) -- && ! bitmap_bit_p (&lra_subreg_reload_pseudos, spill_regno) -- && ! bitmap_bit_p (&lra_optional_reload_pseudos, spill_regno))) -+ if (must_not_spill_p (spill_regno)) - goto fail; - else if (non_spilled_static_chain_regno_p (spill_regno)) - static_p = true; -- cgit v1.2.3-70-g09d2 From 766e1ed1810c11b9f62a2b74e224420695e54b57 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 28 Feb 2019 23:23:41 +0000 Subject: system/binutils: bump to 2.32 --- system/binutils/APKBUILD | 12 ++----- system/binutils/CVE-2018-19931.patch | 31 ---------------- system/binutils/CVE-2018-19932.patch | 47 ------------------------- system/binutils/remove-no-static-plt-test.patch | 21 ----------- 4 files changed, 3 insertions(+), 108 deletions(-) delete mode 100644 system/binutils/CVE-2018-19931.patch delete mode 100644 system/binutils/CVE-2018-19932.patch delete mode 100644 system/binutils/remove-no-static-plt-test.patch diff --git a/system/binutils/APKBUILD b/system/binutils/APKBUILD index 67f81db9d..de15c9457 100644 --- a/system/binutils/APKBUILD +++ b/system/binutils/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Adelie Platform Group pkgname=binutils -pkgver=2.31.1 -pkgrel=2 +pkgver=2.32 +pkgrel=0 pkgdesc="Tools necessary to build programs" url="http://www.gnu.org/software/binutils/" depends="" @@ -16,12 +16,9 @@ subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-libs" [ "${CARCH}" != "ppc" ] || options='!check' source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz binutils-ld-fix-static-linking.patch - CVE-2018-19931.patch - CVE-2018-19932.patch disable-gnu-mbind.patch disable-ifunc-tests.patch disable-preinit-array-tests.patch - remove-no-static-plt-test.patch remove-pr2404-tests.patch remove-pr19719-test.patch remove-pr19553c-test.patch @@ -117,14 +114,11 @@ libs() { mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/ } -sha512sums="0fca326feb1d5f5fe505a827b20237fe3ec9c13eaf7ec7e35847fd71184f605ba1cefe1314b1b8f8a29c0aa9d88162849ee1c1a3e70c2f7407d88339b17edb30 binutils-2.31.1.tar.xz +sha512sums="d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a binutils-2.32.tar.xz ecee33b0e435aa704af1c334e560f201638ff79e199aa11ed78a72f7c9b46f85fbb227af5748e735fd681d1965fcc42ac81b0c8824e540430ce0c706c81e8b49 binutils-ld-fix-static-linking.patch -4cfece75605ea17df676692e9ed2a5f8b3221fdb93fca9655f67260a9f4fd4f9e5a62141f51ba9bb7819f4628cdda4fd3f2f82e947ba197980f2b0c2c58a147c CVE-2018-19931.patch -68d1699d66aeb9dabb76d2e56e881fe73e55cc9594741107bf9f1a23fd2c1dc4421d02317bfc0218b02ad1372d3a8a577044578fffbfd8504ca238be835c5ff0 CVE-2018-19932.patch d378fdf1964f8f2bd0b1e62827ac5884bdf943aa435ec89c29fc84bb045d406b733fffaff8fdd8bd1cba8ddea7701c4cf6ccf3ed76a8a3df9c72b447737575a6 disable-gnu-mbind.patch 474ab24097bbb5b24433620549e5234fe65c547824c1342f693c718ffbc81e2d968259cce2d650b55200dd1ec89da207ea2db10c551cd9941285c4600b4297b2 disable-ifunc-tests.patch 3537752e63cef0b5ef136d003ff7e814ba66b12624d817430112d0f291a792e8960fa69a78036f526af835441b3ee483d6a53d55c7b3dd8ee96f0399682dbcbe disable-preinit-array-tests.patch -b40f9a3841a7af8fc12e8a4044cd672df5614bfda8461b0ca45efa57a42c3bc8490e491ea490c6c05d319a52d69993c4fca33a0aeb044090e7b7f4e4e30c6517 remove-no-static-plt-test.patch 32ab4215669c728648179c124632467573a3d4675e79f0f0d221c22eb2ec1ca5488b79910bd09142f90a1e0d0b81d99ca4846297f4f9561f158db63745facb66 remove-pr2404-tests.patch a193d1fa7f42d91915960460a15e4d24e0df529d81e23014bcf45d283fae76bb7b300fdcb0d0a9d521cdb9137322efa1dc357112596d6ae7a7fd05988ac359b9 remove-pr19719-test.patch 39ef9c76dd5db6b15f11ffa8061f7ca844fb79c3fb9879c3b1466eef332a28b833597c87003ab9f260b1b85023fae264659088aee27cad7e5aa77b2d58b9a3f6 remove-pr19553c-test.patch" diff --git a/system/binutils/CVE-2018-19931.patch b/system/binutils/CVE-2018-19931.patch deleted file mode 100644 index 99a9797e3..000000000 --- a/system/binutils/CVE-2018-19931.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 5f60af5d24d181371d67534fa273dd221df20c07 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 30 Nov 2018 11:45:33 +0000 -Subject: [PATCH] Fix a memory exhaustion bug when attempting to allocate room - for an impossible number of program headers. - - * elfcode.h (elf_object_p): Check for corrupt input files with - more program headers than can actually fit in the file. ---- - bfd/elfcode.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/bfd/elfcode.h b/bfd/elfcode.h -index f224c8b..16ed8e5 100644 ---- a/bfd/elfcode.h -+++ b/bfd/elfcode.h -@@ -784,6 +784,11 @@ elf_object_p (bfd *abfd) - if (i_ehdrp->e_phnum > ((bfd_size_type) -1) / sizeof (*i_phdr)) - goto got_wrong_format_error; - #endif -+ /* Check for a corrupt input file with an impossibly large number -+ of program headers. */ -+ if (bfd_get_file_size (abfd) > 0 -+ && i_ehdrp->e_phnum > bfd_get_file_size (abfd)) -+ goto got_no_match; - amt = (bfd_size_type) i_ehdrp->e_phnum * sizeof (*i_phdr); - elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt); - if (elf_tdata (abfd)->phdr == NULL) --- -2.9.3 - diff --git a/system/binutils/CVE-2018-19932.patch b/system/binutils/CVE-2018-19932.patch deleted file mode 100644 index 383aae70f..000000000 --- a/system/binutils/CVE-2018-19932.patch +++ /dev/null @@ -1,47 +0,0 @@ -From beab453223769279cc1cef68a1622ab8978641f7 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Fri, 30 Nov 2018 11:43:12 +0000 -Subject: [PATCH] Remove an abort in the bfd library and add a check for an - integer overflow when mapping sections to segments. - - PR 23932 - * elf.c (IS_CONTAINED_BY_LMA): Add a check for a negative section - size. - (rewrite_elf_program_header): If no sections are mapped into a - segment return an error. ---- - bfd/elf.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/bfd/elf.c b/bfd/elf.c -index 604971d..79a76be 100644 ---- a/bfd/elf.c -+++ b/bfd/elf.c -@@ -6644,6 +6644,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) - the given segment. LMA addresses are compared. */ - #define IS_CONTAINED_BY_LMA(section, segment, base) \ - (section->lma >= base \ -+ && (section->lma + SECTION_SIZE (section, segment) >= section->lma) \ - && (section->lma + SECTION_SIZE (section, segment) \ - <= SEGMENT_END (segment, base))) - -@@ -7167,7 +7168,15 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) - suggested_lma = output_section; - } - -- BFD_ASSERT (map->count > 0); -+ /* PR 23932. A corrupt input file may contain sections that cannot -+ be assigned to any segment - because for example they have a -+ negative size - or segments that do not contain any sections. */ -+ if (map->count == 0) -+ { -+ bfd_set_error (bfd_error_bad_value); -+ free (sections); -+ return FALSE; -+ } - - /* Add the current segment to the list of built segments. */ - *pointer_to_map = map; --- -2.9.3 - diff --git a/system/binutils/remove-no-static-plt-test.patch b/system/binutils/remove-no-static-plt-test.patch deleted file mode 100644 index ab6bc02e6..000000000 --- a/system/binutils/remove-no-static-plt-test.patch +++ /dev/null @@ -1,21 +0,0 @@ -The compiler generates relative addresses instead of absolute, confusing the -regex used. Disable this test since it would pass anyway. - ---- binutils-2.29/ld/testsuite/ld-x86-64/no-plt.exp.old 2017-07-04 08:43:21.000000000 +0000 -+++ binutils-2.29/ld/testsuite/ld-x86-64/no-plt.exp 2017-08-19 18:13:48.566481023 +0000 -@@ -100,15 +100,6 @@ - "no-plt-1c" \ - ] \ - [list \ -- "No PLT (static 1d)" \ -- "-static tmpdir/no-plt-check1.o tmpdir/no-plt-main1.o \ -- tmpdir/no-plt-func1.o tmpdir/no-plt-extern1.o" \ -- "" \ -- {dummy.s} \ -- {{readelf -Wr no-plt-1d.rd} {objdump -dwrj.text no-plt-1d.dd}} \ -- "no-plt-1d" \ -- ] \ -- [list \ - "No PLT (PIE 1e)" \ - "-pie tmpdir/no-plt-check1.o tmpdir/no-plt-main1.o \ - tmpdir/no-plt-func1.o tmpdir/no-plt-extern1.o" \ -- cgit v1.2.3-70-g09d2 From 1986226438581150c70592abbba6ba49e4c47931 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 28 Feb 2019 23:23:55 +0000 Subject: system/libaio: Fix build for GCC 8 --- system/libaio/APKBUILD | 12 +++++++----- system/libaio/improper-strncpy-usage.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 system/libaio/improper-strncpy-usage.patch diff --git a/system/libaio/APKBUILD b/system/libaio/APKBUILD index b40b031aa..79ff0f628 100644 --- a/system/libaio/APKBUILD +++ b/system/libaio/APKBUILD @@ -2,16 +2,17 @@ # Maintainer: Dan Theisen pkgname="libaio" pkgver=0.3.111 -pkgrel=0 +pkgrel=1 pkgdesc="Asynchronous input/output library" url="http://lse.sourceforge.net/io/aio.html" arch="all" license="LGPL-2.1+" -depends= +depends="" makedepends="linux-headers" -install= subpackages="$pkgname-dev" -source="http://ftp.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver}.orig.tar.gz" +source="http://ftp.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver}.orig.tar.gz + improper-strncpy-usage.patch + " build() { cd "$builddir" @@ -29,4 +30,5 @@ package() { make prefix="$pkgdir/usr" install } -sha512sums="440f2b62f99ca2e72ffc8c2c04b4779a1a7cf24a8ba2a30b34d18b4ee77630a2078610fe8c435559f81a5c3bfa93049bd53d77464a0da8267833fbde3f40ceeb libaio_0.3.111.orig.tar.gz" +sha512sums="440f2b62f99ca2e72ffc8c2c04b4779a1a7cf24a8ba2a30b34d18b4ee77630a2078610fe8c435559f81a5c3bfa93049bd53d77464a0da8267833fbde3f40ceeb libaio_0.3.111.orig.tar.gz +8294a17b60676838375b3f17b84af19f3f3224788bdc944eda6b235305f48b6b292899f9d528be7b4b87305e7beac409afc0f250d052454b2a739bd990104b83 improper-strncpy-usage.patch" diff --git a/system/libaio/improper-strncpy-usage.patch b/system/libaio/improper-strncpy-usage.patch new file mode 100644 index 000000000..b2f6b86a4 --- /dev/null +++ b/system/libaio/improper-strncpy-usage.patch @@ -0,0 +1,26 @@ +It is invalid to use the src size as the strncpy size parameter. + +Found by GCC 8.3, fixed by awilfox. + +--- libaio-0.3.111/harness/cases/19.t.old 2018-03-06 22:24:47.000000000 +0000 ++++ libaio-0.3.111/harness/cases/19.t 2019-02-28 22:20:03.170000000 +0000 +@@ -41,7 +41,7 @@ + int fd; + char template[sizeof(TEMPLATE)]; + +- strncpy(template, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(template, TEMPLATE, sizeof(template)); + fd = mkostemp(template, O_DIRECT); + if (fd < 0) { + perror("mkstemp"); +--- libaio-0.3.111/harness/cases/21.t.old 2018-03-06 22:24:47.000000000 +0000 ++++ libaio-0.3.111/harness/cases/21.t 2019-02-28 22:20:13.120000000 +0000 +@@ -43,7 +43,7 @@ + int fd; + char temp_file[sizeof(TEMPLATE)]; + +- strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(temp_file, TEMPLATE, sizeof(temp_file)); + fd = mkstemp(temp_file); + if (fd < 0) { + perror("mkstemp"); -- cgit v1.2.3-70-g09d2 From 6b29bc81c698ab1fb182269901864747c6be368b Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 28 Feb 2019 23:26:05 +0000 Subject: system/easy-kernel*: Fix build for powerpc64 with GCC 8 --- system/easy-kernel-power8-64k/APKBUILD | 5 +- .../easy-kernel-power8-64k/ppc64-epapr-gcc8.patch | 84 ++++++++++++++++++++++ system/easy-kernel-power8/APKBUILD | 5 +- system/easy-kernel-power8/ppc64-epapr-gcc8.patch | 84 ++++++++++++++++++++++ system/easy-kernel/APKBUILD | 3 +- system/easy-kernel/ppc64-epapr-gcc8.patch | 84 ++++++++++++++++++++++ 6 files changed, 260 insertions(+), 5 deletions(-) create mode 100644 system/easy-kernel-power8-64k/ppc64-epapr-gcc8.patch create mode 100644 system/easy-kernel-power8/ppc64-epapr-gcc8.patch create mode 100644 system/easy-kernel/ppc64-epapr-gcc8.patch diff --git a/system/easy-kernel-power8-64k/APKBUILD b/system/easy-kernel-power8-64k/APKBUILD index 4ccc016fe..fb2fcda0b 100644 --- a/system/easy-kernel-power8-64k/APKBUILD +++ b/system/easy-kernel-power8-64k/APKBUILD @@ -13,7 +13,6 @@ options="!check !dbg !strip !tracedeps" license="GPL-2.0-only" depends="" makedepends="bc gzip kmod lzop openssl-dev xz" -install="" provides="easy-kernel$_kflavour=$pkgver-r$pkgrel" subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules $_pkgname-src-$pkgver-mc$pkgrel:src @@ -25,6 +24,7 @@ source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgmin ast-endianness.patch config-ppc64 futex-cmpxchg.patch + ppc64-epapr-gcc8.patch " builddir="$srcdir/linux-${_pkgminver}" @@ -94,4 +94,5 @@ sha512sums="77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8 bfe606f208894cc572fb98f323e26956c69b4f75febd4a9b500514cbb2aa70bddb2aba05b3f16a5fe52535236b215335f73974324065f80643265f17f281faa6 linux-4.14-mc13.patch.xz e41d9111219342ad13367902242444ecdd847a93575c3f9709d6c6a075bc650f4a15be9db1a8798435fc0a0b56d41705829bfe0d2c2d88f8d1c28931e27ef5be ast-endianness.patch 6e155f1109666ee907baf7f586d856366ba8afb6f008d48489c0bc269438a8280534266d3e37b449e44ce964688ea48f041bb36214eb495d59b84e55cdf49c19 config-ppc64 -64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch" +64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch +0df4e823e19e8fc379b5ad66192eb3e890daa3dac8d7a9ebbab4cf3c60ce9f15fcc25a54b86b341db53db3d78c928ca5f55933e12eee75680e705cca8a7bdff4 ppc64-epapr-gcc8.patch" diff --git a/system/easy-kernel-power8-64k/ppc64-epapr-gcc8.patch b/system/easy-kernel-power8-64k/ppc64-epapr-gcc8.patch new file mode 100644 index 000000000..192e83845 --- /dev/null +++ b/system/easy-kernel-power8-64k/ppc64-epapr-gcc8.patch @@ -0,0 +1,84 @@ +From 186b8f1587c79c2fa04bfa392fdf084443e398c1 Mon Sep 17 00:00:00 2001 +From: Seth Forshee +Date: Thu, 28 Sep 2017 09:33:39 -0400 +Subject: powerpc: Always initialize input array when calling epapr_hypercall() + +Several callers to epapr_hypercall() pass an uninitialized stack +allocated array for the input arguments, presumably because they +have no input arguments. However this can produce errors like +this one + + arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized] + unsigned long register r3 asm("r3") = in[0]; + ~~^~~ + +Fix callers to this function to always zero-initialize the input +arguments array to prevent this. + +Signed-off-by: Seth Forshee +Signed-off-by: Michael Ellerman +--- + arch/powerpc/include/asm/epapr_hcalls.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h +index 334459ad145b..90863245df53 100644 +--- a/arch/powerpc/include/asm/epapr_hcalls.h ++++ b/arch/powerpc/include/asm/epapr_hcalls.h +@@ -508,7 +508,7 @@ static unsigned long epapr_hypercall(unsigned long *in, + + static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + unsigned long r; + +@@ -520,7 +520,7 @@ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) + + static inline long epapr_hypercall0(unsigned int nr) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + return epapr_hypercall(in, out, nr); +@@ -528,7 +528,7 @@ static inline long epapr_hypercall0(unsigned int nr) + + static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -538,7 +538,7 @@ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) + static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, + unsigned long p2) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -549,7 +549,7 @@ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, + static inline long epapr_hypercall3(unsigned int nr, unsigned long p1, + unsigned long p2, unsigned long p3) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -562,7 +562,7 @@ static inline long epapr_hypercall4(unsigned int nr, unsigned long p1, + unsigned long p2, unsigned long p3, + unsigned long p4) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +-- +cgit 1.2-0.3.lf.el7 + diff --git a/system/easy-kernel-power8/APKBUILD b/system/easy-kernel-power8/APKBUILD index 34f8faddd..f06424d1a 100644 --- a/system/easy-kernel-power8/APKBUILD +++ b/system/easy-kernel-power8/APKBUILD @@ -13,7 +13,6 @@ options="!check !dbg !strip !tracedeps" license="GPL-2.0-only" depends="" makedepends="bc gzip kmod lzop openssl-dev xz" -install="" provides="easy-kernel$_kflavour=$pkgver-r$pkgrel" subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules $_pkgname-src-$pkgver-mc$pkgrel:src @@ -25,6 +24,7 @@ source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgmin ast-endianness.patch config-ppc64 futex-cmpxchg.patch + ppc64-epapr-gcc8.patch " builddir="$srcdir/linux-${_pkgminver}" @@ -94,4 +94,5 @@ sha512sums="77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8 bfe606f208894cc572fb98f323e26956c69b4f75febd4a9b500514cbb2aa70bddb2aba05b3f16a5fe52535236b215335f73974324065f80643265f17f281faa6 linux-4.14-mc13.patch.xz e41d9111219342ad13367902242444ecdd847a93575c3f9709d6c6a075bc650f4a15be9db1a8798435fc0a0b56d41705829bfe0d2c2d88f8d1c28931e27ef5be ast-endianness.patch 70c09aaa7e75ef04389d69768874bc243f351a63f481b191d5708f74f1ceccf32dbbc286415aff4eaf44040a0fd75e90487a50f0c53a32f6d1c0dc779cb56fec config-ppc64 -64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch" +64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch +0df4e823e19e8fc379b5ad66192eb3e890daa3dac8d7a9ebbab4cf3c60ce9f15fcc25a54b86b341db53db3d78c928ca5f55933e12eee75680e705cca8a7bdff4 ppc64-epapr-gcc8.patch" diff --git a/system/easy-kernel-power8/ppc64-epapr-gcc8.patch b/system/easy-kernel-power8/ppc64-epapr-gcc8.patch new file mode 100644 index 000000000..192e83845 --- /dev/null +++ b/system/easy-kernel-power8/ppc64-epapr-gcc8.patch @@ -0,0 +1,84 @@ +From 186b8f1587c79c2fa04bfa392fdf084443e398c1 Mon Sep 17 00:00:00 2001 +From: Seth Forshee +Date: Thu, 28 Sep 2017 09:33:39 -0400 +Subject: powerpc: Always initialize input array when calling epapr_hypercall() + +Several callers to epapr_hypercall() pass an uninitialized stack +allocated array for the input arguments, presumably because they +have no input arguments. However this can produce errors like +this one + + arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized] + unsigned long register r3 asm("r3") = in[0]; + ~~^~~ + +Fix callers to this function to always zero-initialize the input +arguments array to prevent this. + +Signed-off-by: Seth Forshee +Signed-off-by: Michael Ellerman +--- + arch/powerpc/include/asm/epapr_hcalls.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h +index 334459ad145b..90863245df53 100644 +--- a/arch/powerpc/include/asm/epapr_hcalls.h ++++ b/arch/powerpc/include/asm/epapr_hcalls.h +@@ -508,7 +508,7 @@ static unsigned long epapr_hypercall(unsigned long *in, + + static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + unsigned long r; + +@@ -520,7 +520,7 @@ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) + + static inline long epapr_hypercall0(unsigned int nr) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + return epapr_hypercall(in, out, nr); +@@ -528,7 +528,7 @@ static inline long epapr_hypercall0(unsigned int nr) + + static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -538,7 +538,7 @@ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) + static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, + unsigned long p2) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -549,7 +549,7 @@ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, + static inline long epapr_hypercall3(unsigned int nr, unsigned long p1, + unsigned long p2, unsigned long p3) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -562,7 +562,7 @@ static inline long epapr_hypercall4(unsigned int nr, unsigned long p1, + unsigned long p2, unsigned long p3, + unsigned long p4) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +-- +cgit 1.2-0.3.lf.el7 + diff --git a/system/easy-kernel/APKBUILD b/system/easy-kernel/APKBUILD index 17e3fe45e..983506858 100644 --- a/system/easy-kernel/APKBUILD +++ b/system/easy-kernel/APKBUILD @@ -13,7 +13,6 @@ options="!check !dbg !strip !tracedeps" license="GPL-2.0-only" depends="" makedepends="bc gzip kmod lzop openssl-dev xz" -install="" provides="easy-kernel$_kflavour=$pkgver-r$pkgrel" subpackages="$_pkgname-modules-$pkgver-mc$pkgrel:modules $_pkgname-src-$pkgver-mc$pkgrel:src @@ -31,6 +30,7 @@ source="https://cdn.kernel.org/pub/linux/kernel/v${_pkgmajver}.x/linux-${_pkgmin config-aarch64 futex-cmpxchg.patch kernel.h + ppc64-epapr-gcc8.patch uapi-ether.patch " builddir="$srcdir/linux-${_pkgminver}" @@ -141,4 +141,5 @@ cfa1c2b523875967c42bfd8fcfeeb80b1c4c9887c4399b4767f0ac0525769a9e8c5cddaec831e1ad c7573068450aff89101ef5aec683f4fee34476f072f9f7debcdc7398c646194b63e3d2fb63742631cdbff0d77d9fabf8d151cc260d80297d00b57c800c60ef6c config-aarch64 64486a4f53046a69f727cecd8c39400b50c2d2b15e3b5ca8c18b8249d25990f3a872ec064800ba3d190f9d25b4518899b9ea3675920f487108102856d6beb51e futex-cmpxchg.patch fdd94b9de7b374f1812dec0f9971c05f5e52177ca4a16c8071daa620c18265b38f656f528e7045a24f30af01f05e53e54546fb0a9e93773cf191866e87de505d kernel.h +0df4e823e19e8fc379b5ad66192eb3e890daa3dac8d7a9ebbab4cf3c60ce9f15fcc25a54b86b341db53db3d78c928ca5f55933e12eee75680e705cca8a7bdff4 ppc64-epapr-gcc8.patch af093e91e8c8371629948e2e574f8764078564bc027ba5b2f87886f8827d9a63ba7a43717552fe7e3cc9212b2fd55b8633b12900c3d8cdc6c035d52b389c39e5 uapi-ether.patch" diff --git a/system/easy-kernel/ppc64-epapr-gcc8.patch b/system/easy-kernel/ppc64-epapr-gcc8.patch new file mode 100644 index 000000000..192e83845 --- /dev/null +++ b/system/easy-kernel/ppc64-epapr-gcc8.patch @@ -0,0 +1,84 @@ +From 186b8f1587c79c2fa04bfa392fdf084443e398c1 Mon Sep 17 00:00:00 2001 +From: Seth Forshee +Date: Thu, 28 Sep 2017 09:33:39 -0400 +Subject: powerpc: Always initialize input array when calling epapr_hypercall() + +Several callers to epapr_hypercall() pass an uninitialized stack +allocated array for the input arguments, presumably because they +have no input arguments. However this can produce errors like +this one + + arch/powerpc/include/asm/epapr_hcalls.h:470:42: error: 'in' may be used uninitialized in this function [-Werror=maybe-uninitialized] + unsigned long register r3 asm("r3") = in[0]; + ~~^~~ + +Fix callers to this function to always zero-initialize the input +arguments array to prevent this. + +Signed-off-by: Seth Forshee +Signed-off-by: Michael Ellerman +--- + arch/powerpc/include/asm/epapr_hcalls.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h +index 334459ad145b..90863245df53 100644 +--- a/arch/powerpc/include/asm/epapr_hcalls.h ++++ b/arch/powerpc/include/asm/epapr_hcalls.h +@@ -508,7 +508,7 @@ static unsigned long epapr_hypercall(unsigned long *in, + + static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + unsigned long r; + +@@ -520,7 +520,7 @@ static inline long epapr_hypercall0_1(unsigned int nr, unsigned long *r2) + + static inline long epapr_hypercall0(unsigned int nr) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + return epapr_hypercall(in, out, nr); +@@ -528,7 +528,7 @@ static inline long epapr_hypercall0(unsigned int nr) + + static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -538,7 +538,7 @@ static inline long epapr_hypercall1(unsigned int nr, unsigned long p1) + static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, + unsigned long p2) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -549,7 +549,7 @@ static inline long epapr_hypercall2(unsigned int nr, unsigned long p1, + static inline long epapr_hypercall3(unsigned int nr, unsigned long p1, + unsigned long p2, unsigned long p3) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +@@ -562,7 +562,7 @@ static inline long epapr_hypercall4(unsigned int nr, unsigned long p1, + unsigned long p2, unsigned long p3, + unsigned long p4) + { +- unsigned long in[8]; ++ unsigned long in[8] = {0}; + unsigned long out[8]; + + in[0] = p1; +-- +cgit 1.2-0.3.lf.el7 + -- cgit v1.2.3-70-g09d2 From c5dd651dc5c76ef68aafb5c3be0bb56be5822e94 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 28 Feb 2019 23:26:17 +0000 Subject: system/bzip2: fix download URL --- system/bzip2/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/bzip2/APKBUILD b/system/bzip2/APKBUILD index c28a598fe..54b3e4d66 100644 --- a/system/bzip2/APKBUILD +++ b/system/bzip2/APKBUILD @@ -8,7 +8,7 @@ arch="all" license="BSD-4-Clause" depends="" subpackages="$pkgname-dev $pkgname-doc libbz2" -source="http://www.bzip.org/$pkgver/$pkgname-$pkgver.tar.gz +source="https://downloads.sourceforge.net/bzip2/$pkgname-$pkgver.tar.gz bzip2-1.0.4-makefile-CFLAGS.patch bzip2-1.0.6-saneso.patch bzip2-1.0.4-man-links.patch -- cgit v1.2.3-70-g09d2 From bd7fa43957597d7a9edaf552f9eeeb0900a1a9d8 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 28 Feb 2019 23:26:42 +0000 Subject: system/flex: Build against byacc instead of bison This breaks a circular dependency where flex needs bison and bison needs flex. --- system/flex/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/flex/APKBUILD b/system/flex/APKBUILD index 808020cbf..f900c0a75 100644 --- a/system/flex/APKBUILD +++ b/system/flex/APKBUILD @@ -9,7 +9,7 @@ arch="all" license="BSD-2-Clause AND LGPL-2.0+" depends="m4" depends_dev="flex" -makedepends="$depends_dev m4 bison help2man" +makedepends="$depends_dev m4 byacc help2man" subpackages="$pkgname-doc $pkgname-lang $pkgname-libs $pkgname-dev" source="https://github.com/westes/$pkgname/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz" -- cgit v1.2.3-70-g09d2 From 06e6a1b6719186473668e15a7f601988e55d2c95 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 1 Mar 2019 03:20:29 +0000 Subject: system/libelf: fix URLs --- system/libelf/APKBUILD | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/system/libelf/APKBUILD b/system/libelf/APKBUILD index 7ba1a6cc0..5ddc8884a 100644 --- a/system/libelf/APKBUILD +++ b/system/libelf/APKBUILD @@ -4,13 +4,13 @@ pkgname=libelf pkgver=0.8.13 pkgrel=4 pkgdesc="ELF object file access library" -url="http://www.mr511.de/software/" +url=" " # Dead upstream: http://www.mr511.de/software/ arch="all" license="LGPL-2.0+" -depends= -makedepends= +depends="" +makedepends="" subpackages="$pkgname-dev" -source="http://www.mr511.de/software/$pkgname-$pkgver.tar.gz" +source="https://distfiles.adelielinux.org/source/$pkgname-$pkgver.tar.gz" prepare() { cd "$builddir" @@ -39,4 +39,5 @@ package() { cd "$builddir" make install prefix="$pkgdir"/usr } + sha512sums="d2a4ea8ccc0bbfecac38fa20fbd96aefa8e86f8af38691fb6991cd9c5a03f587475ecc2365fc89a4954c11a679d93460ee9a5890693112f6133719af3e6582fe libelf-0.8.13.tar.gz" -- cgit v1.2.3-70-g09d2 From d91b4d0f4400289df54d611bd6a5cf95afb18412 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 1 Mar 2019 03:20:51 +0000 Subject: system/git: disable stupid broken py2 test --- system/git/APKBUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/system/git/APKBUILD b/system/git/APKBUILD index b642f8137..84f3196c7 100644 --- a/system/git/APKBUILD +++ b/system/git/APKBUILD @@ -61,6 +61,7 @@ build() { check() { cd "$builddir" + rm t/t9020-remote-svn.sh # Requires /usr/bin/python / python-compat. make prefix=/usr DESTDIR="$pkgdir" -j1 test } -- cgit v1.2.3-70-g09d2 From d82043346979aa9e68e269b2ab52dfc039e3b3bb Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 1 Mar 2019 03:21:13 +0000 Subject: system/linenoise: allow stricter SONAME preference of GCC 8 --- system/linenoise/APKBUILD | 8 +++----- system/linenoise/build-shared-lib.patch | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/system/linenoise/APKBUILD b/system/linenoise/APKBUILD index 48012cda9..5e95f3927 100644 --- a/system/linenoise/APKBUILD +++ b/system/linenoise/APKBUILD @@ -2,16 +2,14 @@ # Maintainer: pkgname=linenoise pkgver=1.0 -pkgrel=1 +pkgrel=2 pkgdesc="Minimal replacement for readline" url="https://github.com/antirez/linenoise" arch="all" options="!check" # No test suite. license="BSD-2-Clause-NetBSD" depends="" -depends_dev="" -makedepends="$depends_dev" -install="" +makedepends="" subpackages="$pkgname-dev" source="linenoise-$pkgver.tar.gz::https://github.com/antirez/linenoise/archive/$pkgver.tar.gz build-shared-lib.patch @@ -28,4 +26,4 @@ package() { } sha512sums="9e68fade8d64d7ba8d5d681e74d0ca6c4ebd9576249bb0e885b1aa708a9af77a43ea6264307ae46fb74e52219387a2c831b570f9601e331837f35294af9883e3 linenoise-1.0.tar.gz -e37fe58f414f48a6a6fcab9925881131d2dbca0c54fe2b17a359d0b5c58ce1e29dad92baa8dc7f7d390af1edace2a75091f20bed5aa381ff2599e734616b2418 build-shared-lib.patch" +4f38ffc191c69e6a60fd064929ad0d442700a2928cd2de04e52c12e3ce67c8f1d49e993782d764fe8c59165eed20fb7725ea9147942a7e0e26ff1a8ebb145e9a build-shared-lib.patch" diff --git a/system/linenoise/build-shared-lib.patch b/system/linenoise/build-shared-lib.patch index 2f9542dcf..b94d6ab4c 100644 --- a/system/linenoise/build-shared-lib.patch +++ b/system/linenoise/build-shared-lib.patch @@ -1,6 +1,6 @@ --- ./Makefile.orig +++ ./Makefile -@@ -1,7 +1,33 @@ +@@ -1,7 +1,34 @@ +MAJOR_VERSION = 0 +EXTRA_VERSION = .0.0 +SONAME = liblinenoise.so.$(MAJOR_VERSION) @@ -34,4 +34,5 @@ + install -m 0755 -d $(DESTDIR)$(LIBDIR) + install -m 0755 $(LIB) $(DESTDIR)$(LIBDIR) + ldconfig -n $(DESTDIR)$(LIBDIR) -+ ln -s $(LIB) $(DESTDIR)$(LIBDIR)/liblinenoise.so ++ ln -s $(LIB) $(DESTDIR)$(LIBDIR)/$(SONAME) ++ ln -s $(SONAME) $(DESTDIR)$(LIBDIR)/liblinenoise.so -- cgit v1.2.3-70-g09d2 From 0e79f212e27b081516054ddac8f54bb28d5c8973 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 1 Mar 2019 03:22:54 +0000 Subject: system/{atf,kyua,libucontext,lutok,openrc}: m-n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit William is no longer contributing to Adélie. --- system/atf/APKBUILD | 3 +-- system/kyua/APKBUILD | 3 +-- system/libucontext/APKBUILD | 2 +- system/lutok/APKBUILD | 2 +- system/openrc/APKBUILD | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/system/atf/APKBUILD b/system/atf/APKBUILD index 921ddf4a2..5b4f82a92 100644 --- a/system/atf/APKBUILD +++ b/system/atf/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: William Pitcock +# Maintainer: pkgname=atf pkgver=0.21 pkgrel=1 @@ -8,7 +8,6 @@ arch="all" license="BSD-2-Clause AND BSD-3-Clause" depends="" makedepends="" -install="" subpackages="$pkgname-dev $pkgname-doc" source="https://github.com/jmmv/atf/releases/download/atf-$pkgver/atf-$pkgver.tar.gz" builddir="$srcdir/atf-$pkgver" diff --git a/system/kyua/APKBUILD b/system/kyua/APKBUILD index 6a1be176d..bb83158a1 100644 --- a/system/kyua/APKBUILD +++ b/system/kyua/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: William Pitcock +# Maintainer: pkgname=kyua pkgver=0.13 pkgrel=1 @@ -8,7 +8,6 @@ arch="all" license="BSD-3-Clause" depends="" makedepends="atf-dev lutok-dev sqlite-dev" -install="" options="!check" # doesn't pass without sysctl tweaking. subpackages="$pkgname-doc" source="https://github.com/jmmv/kyua/releases/download/kyua-$pkgver/kyua-$pkgver.tar.gz" diff --git a/system/libucontext/APKBUILD b/system/libucontext/APKBUILD index f6b020858..f152933a5 100644 --- a/system/libucontext/APKBUILD +++ b/system/libucontext/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: William Pitcock +# Maintainer: pkgname=libucontext pkgver=0.1.3 pkgrel=1 diff --git a/system/lutok/APKBUILD b/system/lutok/APKBUILD index 5e84fd867..103688367 100644 --- a/system/lutok/APKBUILD +++ b/system/lutok/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: William Pitcock +# Maintainer: pkgname=lutok pkgver=0.4 pkgrel=2 diff --git a/system/openrc/APKBUILD b/system/openrc/APKBUILD index dac0cec8d..53098c24a 100644 --- a/system/openrc/APKBUILD +++ b/system/openrc/APKBUILD @@ -1,4 +1,4 @@ -# Maintainer: William Pitcock +# Maintainer: pkgname=openrc pkgver=0.24.1 _ver=${pkgver/_git*/} -- cgit v1.2.3-70-g09d2 From 97aec267e0f0c6a4b3d2e88abc05eb36b4b6e2e2 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 2 Mar 2019 04:04:35 +0000 Subject: system/openrc: disable tests due to Gentoo #575958 --- system/openrc/APKBUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/system/openrc/APKBUILD b/system/openrc/APKBUILD index 53098c24a..d48ee52f6 100644 --- a/system/openrc/APKBUILD +++ b/system/openrc/APKBUILD @@ -6,6 +6,7 @@ pkgrel=6 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="https://github.com/OpenRC/openrc" arch="all" +options="!check" # https://bugs.gentoo.org/575958 license="BSD-2-Clause" depends="psmisc /sbin/init" makedepends="bsd-compat-headers" -- cgit v1.2.3-70-g09d2 From 63b5fb12c3d75e460799c672bbbdd5d29c3cc33c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 4 Mar 2019 00:59:59 +0000 Subject: system/gcc: More Go fixes (build and runtime) --- system/gcc/334-gccgo-signal-shell.patch | 25 +++++++++++++++++++++++++ system/gcc/335-gccgo-signal-ppc32.patch | 14 ++++++++++++++ system/gcc/336-gccgo-mmap64.patch | 29 +++++++++++++++++++++++++++++ system/gcc/337-gccgo-signal-sig34.patch | 11 +++++++++++ system/gcc/APKBUILD | 8 ++++++++ 5 files changed, 87 insertions(+) create mode 100644 system/gcc/334-gccgo-signal-shell.patch create mode 100644 system/gcc/335-gccgo-signal-ppc32.patch create mode 100644 system/gcc/336-gccgo-mmap64.patch create mode 100644 system/gcc/337-gccgo-signal-sig34.patch diff --git a/system/gcc/334-gccgo-signal-shell.patch b/system/gcc/334-gccgo-signal-shell.patch new file mode 100644 index 000000000..5c7405c4f --- /dev/null +++ b/system/gcc/334-gccgo-signal-shell.patch @@ -0,0 +1,25 @@ +--- gcc-8.3.0/libgo/mksigtab.sh.old 2017-11-22 00:27:29.000000000 +0000 ++++ gcc-8.3.0/libgo/mksigtab.sh 2019-03-02 22:01:17.530000000 +0000 +@@ -82,7 +82,7 @@ + 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"}' +@@ -94,10 +94,12 @@ + + # 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 diff --git a/system/gcc/335-gccgo-signal-ppc32.patch b/system/gcc/335-gccgo-signal-ppc32.patch new file mode 100644 index 000000000..f44444948 --- /dev/null +++ b/system/gcc/335-gccgo-signal-ppc32.patch @@ -0,0 +1,14 @@ +--- gcc-8.3.0/libgo/runtime/go-signal.c.old 2019-03-02 22:02:02.250000000 +0000 ++++ gcc-8.3.0/libgo/runtime/go-signal.c 2019-03-03 02:04:13.220000000 +0000 +@@ -222,7 +222,11 @@ + #endif + #ifdef __PPC__ + #ifdef __linux__ ++ #ifdef __PPC64__ + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gp_regs[32]; ++ #else ++ ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.gregs[32]; ++ #endif + #endif + #ifdef _AIX + ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.jmp_context.iar; diff --git a/system/gcc/336-gccgo-mmap64.patch b/system/gcc/336-gccgo-mmap64.patch new file mode 100644 index 000000000..23b4cebc8 --- /dev/null +++ b/system/gcc/336-gccgo-mmap64.patch @@ -0,0 +1,29 @@ +--- gcc-8.3.0/libgo/go/runtime/mem_gccgo.go.old 2018-01-09 01:23:08.000000000 +0000 ++++ gcc-8.3.0/libgo/go/runtime/mem_gccgo.go 2019-03-03 05:15:33.010000000 +0000 +@@ -16,7 +16,7 @@ + //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 +@@ -41,7 +41,7 @@ + } + } + +-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() +@@ -84,7 +84,7 @@ + return true + } + +-func mmap_fixed(v unsafe.Pointer, n uintptr, prot, flags, fd int32, offset uintptr) (unsafe.Pointer, int) { ++func mmap_fixed(v unsafe.Pointer, n uintptr, prot, flags, fd int32, offset int64) (unsafe.Pointer, int) { + p, err := mmap(v, n, prot, flags, fd, offset) + // On some systems, mmap ignores v without + // MAP_FIXED, so retry if the address space is free. diff --git a/system/gcc/337-gccgo-signal-sig34.patch b/system/gcc/337-gccgo-signal-sig34.patch new file mode 100644 index 000000000..757d2f216 --- /dev/null +++ b/system/gcc/337-gccgo-signal-sig34.patch @@ -0,0 +1,11 @@ +--- gcc-8.3.0/libgo/go/runtime/signal_gccgo.go.old 2018-01-10 05:15:52.000000000 +0000 ++++ gcc-8.3.0/libgo/go/runtime/signal_gccgo.go 2019-03-03 05:19:28.000000000 +0000 +@@ -111,7 +111,7 @@ + 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") diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD index e831d2604..f95655eb6 100644 --- a/system/gcc/APKBUILD +++ b/system/gcc/APKBUILD @@ -170,6 +170,10 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz 331-gccgo-use-real-off_t-type.patch 332-gccgo-sysinfo.patch 333-gccgo-signal-ppc64.patch + 334-gccgo-signal-shell.patch + 335-gccgo-signal-ppc32.patch + 336-gccgo-mmap64.patch + 337-gccgo-signal-sig34.patch add-classic_table-support.patch gcc-5.4.0-locale.patch @@ -551,5 +555,9 @@ f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45 24c8708f64b9b7945b3f07e9bbecf17ab8bcde2524f49cbd694ca2f6146ccc3f13bb027db282f326525ea79d50a2868fa3fa2b0d688a914b5ea77bbfd7e5cbe4 331-gccgo-use-real-off_t-type.patch 31f9d85faa8648d140834646fc2bc7733eb362bfb87d696c5f375f9c0a3e4c3df41708a9a37c49bc0757513a7704976b9a5e21aa5c2de4b380d47d7e2cbde214 332-gccgo-sysinfo.patch ef6ff46d571814ce2f6db549bfb9b9f5cc55d46085b197c36627a72e4f355fcbeb41d04fabd3029f3bc536fc48155fe3feab58a7a6ece9dcd19409ea44c17b0b 333-gccgo-signal-ppc64.patch +ab7a19d2702d232c9c1242fbdf9bd782e195d94104c0278e3b9ce435060a169094525ca53b615b3a9e62786db77bba836ecd495d58b544df474b13348432c200 334-gccgo-signal-shell.patch +e755072a3c71ada6cde354dd258fae029919e1116048068368d38411ca28a6ad8856702498d6667b0dcbb1d09fcb3fd66669aa79739a5e574a9cd490bd92ce90 335-gccgo-signal-ppc32.patch +de0cc0f9356c9ee5ea7b0f954441b59115f4a8f8f63573d0c17b6537e6f37641cf137531b496fc192d38035c2c4ba8175d36cbd7da15cbfcf8dc18c049c0f111 336-gccgo-mmap64.patch +c2916948b028e1e990e1953875b884561c0f8dd105c1ec03073795df9a47ec2c627cbc95ca0ec98ab9177bf2b7c8458bf3fd09f780fa6c301995846f6317e366 337-gccgo-signal-sig34.patch 1860593584f629d24d5b6db14b0a3412e9f93449b663aaa4981301a0923db0159314905e694f27366fbfef72dce06636ab6df86862b7e9e9564847e03bee82c1 add-classic_table-support.patch 67a75a94fdba69de96b98dbc2978a50cb197857c464b81f7c956176da7066b3be937e40cb15e0870fc1e7382d662c5101bcd18cf457fc4112de41802042b51c4 gcc-5.4.0-locale.patch" -- cgit v1.2.3-70-g09d2 From 99fdf2492680b0f36d96835f590a01a36b81b14d Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 4 Mar 2019 22:16:15 +0000 Subject: user/{lzo,lzop}: move to system/ --- system/lzo/APKBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ system/lzop/APKBUILD | 38 ++++++++++++++++++++++++++++++++++++++ user/lzo/APKBUILD | 41 ----------------------------------------- user/lzop/APKBUILD | 38 -------------------------------------- 4 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 system/lzo/APKBUILD create mode 100644 system/lzop/APKBUILD delete mode 100644 user/lzo/APKBUILD delete mode 100644 user/lzop/APKBUILD diff --git a/system/lzo/APKBUILD b/system/lzo/APKBUILD new file mode 100644 index 000000000..1707525e0 --- /dev/null +++ b/system/lzo/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: Valery Kartel +# Contributor: Michael Mason +# Maintainer: Dan Theisen +pkgname=lzo +pkgver=2.10 +pkgrel=3 +pkgdesc="Portable lossless real-time data compression library" +url="http://www.oberhumer.com/opensource/lzo" +arch="all" +license="GPL-2.0+" +depends="" +makedepends="" +install= +subpackages="$pkgname-dev $pkgname-doc" +source="http://www.oberhumer.com/opensource/lzo/download/$pkgname-$pkgver.tar.gz" + +build() { + cd "$builddir" + CFLAGS="$CFLAGS -DLZO_CFG_NO_SYSCALL=1" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-shared + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4 lzo-2.10.tar.gz" diff --git a/system/lzop/APKBUILD b/system/lzop/APKBUILD new file mode 100644 index 000000000..030364595 --- /dev/null +++ b/system/lzop/APKBUILD @@ -0,0 +1,38 @@ +# Contributor: A. Wilcox +# Maintainer: A. Wilcox +pkgname=lzop +pkgver=1.04 +pkgrel=0 +pkgdesc="A very fast file compressor and decompressor" +url="http://www.lzop.org/" +arch="all" +license="GPL-2.0+" +depends="" +makedepends="lzo-dev" +install="" +subpackages="$pkgname-doc" +source="http://www.lzop.org/download/lzop-$pkgver.tar.gz" + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="5829b4495ffefab549aa697a05c536ce593c572c9eee6004460583a0090abcd317c6074c4f981dfee6be61ac8d127f02dd37053b6cb782af64db41586a8bbb6e lzop-1.04.tar.gz" diff --git a/user/lzo/APKBUILD b/user/lzo/APKBUILD deleted file mode 100644 index 1707525e0..000000000 --- a/user/lzo/APKBUILD +++ /dev/null @@ -1,41 +0,0 @@ -# Contributor: Valery Kartel -# Contributor: Michael Mason -# Maintainer: Dan Theisen -pkgname=lzo -pkgver=2.10 -pkgrel=3 -pkgdesc="Portable lossless real-time data compression library" -url="http://www.oberhumer.com/opensource/lzo" -arch="all" -license="GPL-2.0+" -depends="" -makedepends="" -install= -subpackages="$pkgname-dev $pkgname-doc" -source="http://www.oberhumer.com/opensource/lzo/download/$pkgname-$pkgver.tar.gz" - -build() { - cd "$builddir" - CFLAGS="$CFLAGS -DLZO_CFG_NO_SYSCALL=1" \ - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --enable-shared - make -} - -check() { - cd "$builddir" - make check -} - -package() { - cd "$builddir" - make DESTDIR="$pkgdir" install -} - -sha512sums="a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4 lzo-2.10.tar.gz" diff --git a/user/lzop/APKBUILD b/user/lzop/APKBUILD deleted file mode 100644 index 030364595..000000000 --- a/user/lzop/APKBUILD +++ /dev/null @@ -1,38 +0,0 @@ -# Contributor: A. Wilcox -# Maintainer: A. Wilcox -pkgname=lzop -pkgver=1.04 -pkgrel=0 -pkgdesc="A very fast file compressor and decompressor" -url="http://www.lzop.org/" -arch="all" -license="GPL-2.0+" -depends="" -makedepends="lzo-dev" -install="" -subpackages="$pkgname-doc" -source="http://www.lzop.org/download/lzop-$pkgver.tar.gz" - -build() { - cd "$builddir" - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --localstatedir=/var - make -} - -check() { - cd "$builddir" - make check -} - -package() { - cd "$builddir" - make DESTDIR="$pkgdir" install -} - -sha512sums="5829b4495ffefab549aa697a05c536ce593c572c9eee6004460583a0090abcd317c6074c4f981dfee6be61ac8d127f02dd37053b6cb782af64db41586a8bbb6e lzop-1.04.tar.gz" -- cgit v1.2.3-70-g09d2 From 7bbcd1b84372873ca05e6d97a7849767ef7449db Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 4 Mar 2019 22:23:17 +0000 Subject: system/db: fix FTBFS on pmmx --- system/db/APKBUILD | 6 ++++-- system/db/atomics.patch | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 system/db/atomics.patch diff --git a/system/db/APKBUILD b/system/db/APKBUILD index bf920315f..dabaa80cd 100644 --- a/system/db/APKBUILD +++ b/system/db/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: pkgname=db pkgver=5.3.28 -pkgrel=0 +pkgrel=1 pkgdesc="The Berkeley DB embedded database system" url="https://www.oracle.com/technology/software/products/berkeley-db/index.html" arch="all" @@ -11,6 +11,7 @@ depends= makedepends= subpackages="$pkgname-dev $pkgname-doc $pkgname-utils $pkgname-c++:cxx" source="http://download.oracle.com/berkeley-db/db-$pkgver.tar.gz + atomics.patch " prepare() { @@ -57,4 +58,5 @@ cxx() { mv "$pkgdir"/usr/lib/libdb_cxx*.so "$subpkgdir"/usr/lib/ } -sha512sums="e91bbe550fc147a8be7e69ade86fdb7066453814971b2b0223f7d17712bd029a8eff5b2b6b238042ff6ec1ffa6879d44cb95c5645a922fee305c26c3eeaee090 db-5.3.28.tar.gz" +sha512sums="e91bbe550fc147a8be7e69ade86fdb7066453814971b2b0223f7d17712bd029a8eff5b2b6b238042ff6ec1ffa6879d44cb95c5645a922fee305c26c3eeaee090 db-5.3.28.tar.gz +8ba96cfc3e484a839b8651214f0769b35273c6235de7e53d5118eb0347f5a477f75e3336a12f1399b7748c6b6ab95aec39c8b813d7b227dd61f37ed4ab52f7d5 atomics.patch" diff --git a/system/db/atomics.patch b/system/db/atomics.patch new file mode 100644 index 000000000..ad3da2786 --- /dev/null +++ b/system/db/atomics.patch @@ -0,0 +1,22 @@ +diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h +index 0034dcc..fa7ba93 100644 +--- a/src/dbinc/atomic.h ++++ b/src/dbinc/atomic.h +@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; + #define atomic_inc(env, p) __atomic_inc(p) + #define atomic_dec(env, p) __atomic_dec(p) + #define atomic_compare_exchange(env, p, o, n) \ +- __atomic_compare_exchange((p), (o), (n)) ++ __db_atomic_compare_exchange((p), (o), (n)) + static inline int __atomic_inc(db_atomic_t *p) + { + int temp; +@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p) + * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html + * which configure could be changed to use. + */ +-static inline int __atomic_compare_exchange( ++static inline int __db_atomic_compare_exchange( + db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) + { + atomic_value_t was; -- cgit v1.2.3-70-g09d2 From f28470e1713bdf103a0ba1bfc45066c16e6a4df6 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 4 Mar 2019 22:23:32 +0000 Subject: system/asciidoctor: fix RubyGems URL; old one is dead --- system/asciidoctor/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/asciidoctor/APKBUILD b/system/asciidoctor/APKBUILD index 16e257f54..3b05ab44d 100644 --- a/system/asciidoctor/APKBUILD +++ b/system/asciidoctor/APKBUILD @@ -9,7 +9,7 @@ arch="noarch" options="!check" # can't test in this packaging format; package differently license="MIT" depends="ruby" -source="http://gems.rubyforge.org/gems/$pkgname-$pkgver.gem" +source="https://rubygems.org/downloads/$pkgname-$pkgver.gem" package() { local gemdir="$(ruby -e 'puts Gem.default_dir')" -- cgit v1.2.3-70-g09d2 From ca1238c16d9009387066123f02f8dc0e8b4624d2 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 4 Mar 2019 22:23:53 +0000 Subject: system/gcc: GCC 8 introduces --enable-default-ssp, kill patch --- system/gcc/001_all_default-ssp-strong.patch | 215 ---------------------------- system/gcc/APKBUILD | 4 +- 2 files changed, 2 insertions(+), 217 deletions(-) delete mode 100644 system/gcc/001_all_default-ssp-strong.patch diff --git a/system/gcc/001_all_default-ssp-strong.patch b/system/gcc/001_all_default-ssp-strong.patch deleted file mode 100644 index 95949eb00..000000000 --- a/system/gcc/001_all_default-ssp-strong.patch +++ /dev/null @@ -1,215 +0,0 @@ -# DP: Turn on -fstack-protector by default for C, C++, ObjC, ObjC++. -# DP: Build libgcc using -fno-stack-protector. - ---- - gcc/Makefile.in | 2 ++ - gcc/cp/lang-specs.h | 6 +++--- - gcc/doc/invoke.texi | 4 ++++ - gcc/gcc.c | 18 ++++++++++++++---- - gcc/objc/lang-specs.h | 10 +++++----- - gcc/objcp/lang-specs.h | 8 ++++---- - 6 files changed, 32 insertions(+), 16 deletions(-) - -Index: b/gcc/gcc.c -=================================================================== ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -858,6 +858,14 @@ proper position among the other output f - #define LINK_GCC_C_SEQUENCE_SPEC "%G %L %G" - #endif - -+#ifndef SSP_DEFAULT_SPEC -+#ifdef TARGET_LIBC_PROVIDES_SSP -+#define SSP_DEFAULT_SPEC "%{!fno-stack-protector:%{!fstack-protector-all:%{!ffreestanding:%{!nostdlib:%{!fstack-protector:-fstack-protector-strong}}}}}" -+#else -+#define SSP_DEFAULT_SPEC "" -+#endif -+#endif -+ - #ifndef LINK_SSP_SPEC - #ifdef TARGET_LIBC_PROVIDES_SSP - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ -@@ -1057,6 +1065,7 @@ static const char *cc1_spec = CC1_SPEC; - static const char *cc1plus_spec = CC1PLUS_SPEC; - static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; - static const char *link_ssp_spec = LINK_SSP_SPEC; -+static const char *ssp_default_spec = SSP_DEFAULT_SPEC; - static const char *asm_spec = ASM_SPEC; - static const char *asm_final_spec = ASM_FINAL_SPEC; - static const char *link_spec = LINK_SPEC; -@@ -1112,7 +1121,7 @@ static const char *cpp_unique_options = - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ - %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ -- %{undef} %{save-temps*:-fpch-preprocess}"; -+ %{undef} %{save-temps*:-fpch-preprocess} %(ssp_default)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -1301,9 +1310,9 @@ static const struct compiler default_com - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ - cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ -- %(cc1_options)}\ -+ %(cc1_options) %(ssp_default)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1328,7 +1337,7 @@ static const struct compiler default_com - %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 0, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(ssp_default) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".s", "@assembler", 0, 0, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, -@@ -1560,6 +1569,7 @@ static struct spec_list static_specs[] = - INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec), - INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec), - INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec), -+ INIT_STATIC_SPEC ("ssp_default", &ssp_default_spec), - INIT_STATIC_SPEC ("endfile", &endfile_spec), - INIT_STATIC_SPEC ("link", &link_spec), - INIT_STATIC_SPEC ("lib", &lib_spec), -Index: b/gcc/cp/lang-specs.h -=================================================================== ---- a/gcc/cp/lang-specs.h -+++ b/gcc/cp/lang-specs.h -@@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. - %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ - cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:-o %g.s \ - %{!fdump-ada-spec*:%{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}}%V}}}}", -@@ -58,11 +58,11 @@ along with GCC; see the file COPYING3. - %(cpp_options) %2 -o %{save-temps*:%b.ii} %{!save-temps*:%g.ii} \n}\ - cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2\ -+ cc1plus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -Index: b/gcc/params.def -=================================================================== ---- a/gcc/params.def -+++ b/gcc/params.def -@@ -673,7 +673,7 @@ DEFPARAM (PARAM_INTEGER_SHARE_LIMIT, - DEFPARAM (PARAM_SSP_BUFFER_SIZE, - "ssp-buffer-size", - "The lower bound for a buffer to be considered for stack smashing protection.", -- 8, 1, 0) -+ 4, 1, 0) - - DEFPARAM (PARAM_MIN_SIZE_FOR_STACK_SHARING, - "min-size-for-stack-sharing", -Index: b/gcc/objc/lang-specs.h -=================================================================== ---- a/gcc/objc/lang-specs.h -+++ b/gcc/objc/lang-specs.h -@@ -29,9 +29,9 @@ along with GCC; see the file COPYING3. - %{traditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ -- cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ -+ cc1obj -fpreprocessed %{save-temps*:%b.mi} %{!save-temps*:%g.mi} %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}\ - %{!save-temps*:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|traditional-cpp:-traditional-cpp}\ -@@ -40,18 +40,18 @@ along with GCC; see the file COPYING3. - %{traditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps*|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps*:%b.mi} %{!save-temps*:%g.mi} \n\ -- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj -fpreprocessed %b.mi %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}\ - %{!save-temps*:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, - {".mi", "@objective-c-cpp-output", 0, 0, 0}, - {"@objective-c-cpp-output", -- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc-cpp-output", - "%nobjc-cpp-output is deprecated; please use objective-c-cpp-output instead\n\ -- %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ %{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -Index: b/gcc/objcp/lang-specs.h -=================================================================== ---- a/gcc/objcp/lang-specs.h -+++ b/gcc/objcp/lang-specs.h -@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. - %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ - cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(ssp_default) %2\ - -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@objective-c++", -@@ -46,16 +46,16 @@ along with GCC; see the file COPYING3. - %(cpp_options) %2 -o %{save-temps*:%b.mii} %{!save-temps*:%g.mii} \n}\ - cc1objplus %{save-temps*|no-integrated-cpp:-fpreprocessed %{save-temps*:%b.mii} %{!save-temps*:%g.mii}}\ - %{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2\ -+ %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".mii", "@objective-c++-cpp-output", 0, 0, 0}, - {"@objective-c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc++-cpp-output", - "%nobjc++-cpp-output is deprecated; please use objective-c++-cpp-output instead\n\ - %{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -Index: b/gcc/doc/invoke.texi -=================================================================== ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -9247,6 +9247,9 @@ - The minimum size of variables taking part in stack slot sharing when not - optimizing. The default value is 32. - -+The Alpine Linux default is "4", to increase -+the number of functions protected by the stack protector. -+ - @item max-jump-thread-duplication-stmts - Maximum number of statements allowed in a block that needs to be - duplicated when threading jumps. -@@ -10185,6 +10188,11 @@ - Like @option{-fstack-protector} but includes additional functions to - be protected --- those that have local array definitions, or have - references to local frame addresses. -+ -+NOTE: In Alpine Linux, -+@option{-fstack-protector-strong} is enabled by default for C, -+C++, ObjC, ObjC++, if none of @option{-fno-stack-protector}, -+@option{-nostdlib}, nor @option{-ffreestanding} are found. - - @item -fstack-protector-explicit - @opindex fstack-protector-explicit diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD index f95655eb6..fdac8dbf6 100644 --- a/system/gcc/APKBUILD +++ b/system/gcc/APKBUILD @@ -146,7 +146,6 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz 0011-m68k.patch 0012-static-pie.patch - 001_all_default-ssp-strong.patch 002_all_default-relro.patch 005_all_default-as-needed.patch 011_all_default-warn-format-security.patch @@ -288,11 +287,13 @@ build() { --enable-checking=release \ --disable-fixed-point \ --disable-libstdcxx-pch \ + --disable-multiarch \ --disable-multilib \ --disable-werror \ $_symvers \ --enable-__cxa_atexit \ --enable-default-pie \ + --enable-default-ssp \ --enable-cloog-backend \ --enable-languages=$_languages \ $_arch_configure \ @@ -535,7 +536,6 @@ b8207c1be82b20fdad2596bb0a60469db52257456d0925bacf48b44899f4c6ece93c501347e1ffe9 66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch cd3ba928121e8578ba9f73215e4d81ee3ebbab33e00b04cdfd62b46d21f9536297ae12dc021aad6e56f3b28d9d544727331bbe6db1e3438d7b9545b2c3250906 0011-m68k.patch 45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch -a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch 625c02e03c2f1db04da12cc6a086ec85790a031a13df36486243fd9569cd17f7c8ebeec91ac16cc1f87c3ec1ffe4c421153e98a9aeb5eea35943a6f015d81f50 002_all_default-relro.patch 02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch 622fdbcbbf2feb86bd839af627ec3613c6d2c77b14d37d31165b19f73f45b3663a203efff5d224f194edb15eb62d3d5885e32f85d1b584f071e580fea4e12664 011_all_default-warn-format-security.patch -- cgit v1.2.3-70-g09d2 From d9b28767785c07ec37d1f7ad880b5a1df2932042 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 5 Mar 2019 03:49:21 +0000 Subject: system/gcc: fix 32-bit PowerPC issue --- system/gcc/APKBUILD | 2 ++ system/gcc/disable-multiarch-ppc32.patch | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 system/gcc/disable-multiarch-ppc32.patch diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD index fdac8dbf6..a8ac557b5 100644 --- a/system/gcc/APKBUILD +++ b/system/gcc/APKBUILD @@ -175,6 +175,7 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz 337-gccgo-signal-sig34.patch add-classic_table-support.patch + disable-multiarch-ppc32.patch gcc-5.4.0-locale.patch " @@ -560,4 +561,5 @@ e755072a3c71ada6cde354dd258fae029919e1116048068368d38411ca28a6ad8856702498d6667b de0cc0f9356c9ee5ea7b0f954441b59115f4a8f8f63573d0c17b6537e6f37641cf137531b496fc192d38035c2c4ba8175d36cbd7da15cbfcf8dc18c049c0f111 336-gccgo-mmap64.patch c2916948b028e1e990e1953875b884561c0f8dd105c1ec03073795df9a47ec2c627cbc95ca0ec98ab9177bf2b7c8458bf3fd09f780fa6c301995846f6317e366 337-gccgo-signal-sig34.patch 1860593584f629d24d5b6db14b0a3412e9f93449b663aaa4981301a0923db0159314905e694f27366fbfef72dce06636ab6df86862b7e9e9564847e03bee82c1 add-classic_table-support.patch +db8c4ab3eae7c01943a61e9e3e20af45d4f6d196184eee5b94068b212900ccdeecaf4fb4145983226954f64e7c989fcd13e0b506176d2b3e781c2e9dc8b5a5a8 disable-multiarch-ppc32.patch 67a75a94fdba69de96b98dbc2978a50cb197857c464b81f7c956176da7066b3be937e40cb15e0870fc1e7382d662c5101bcd18cf457fc4112de41802042b51c4 gcc-5.4.0-locale.patch" diff --git a/system/gcc/disable-multiarch-ppc32.patch b/system/gcc/disable-multiarch-ppc32.patch new file mode 100644 index 000000000..5ca9a1d0d --- /dev/null +++ b/system/gcc/disable-multiarch-ppc32.patch @@ -0,0 +1,15 @@ +--- gcc-8.3.0/gcc/config/rs6000/t-linux.old 2019-03-04 07:18:12.770000000 +0000 ++++ gcc-8.3.0/gcc/config/rs6000/t-linux 2019-03-05 03:22:15.030000000 +0000 +@@ -5,10 +5,10 @@ + MULTILIB_OSDIRNAMES := m64=../lib + MULTILIB_OSDIRNAMES += m32=../lib32 + else +-MULTIARCH_DIRNAME := powerpc-linux-gnu ++MULTIARCH_DIRNAME = $(call if_multiarch,powerpc-linux-gnu) + endif + ifneq (,$(findstring powerpcle,$(target))) +-MULTIARCH_DIRNAME := $(subst -linux,le-linux,$(MULTIARCH_DIRNAME)) ++MULTIARCH_DIRNAME := $(call if_multiarch,$(subst -linux,le-linux,$(MULTIARCH_DIRNAME))) + endif + ifneq (,$(findstring powerpc64le,$(target))) + MULTILIB_OSDIRNAMES := m64=../lib -- cgit v1.2.3-70-g09d2 From 6d2b1f8a85010de9dc6dae6510b2eaff08e37c77 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 6 Mar 2019 23:15:12 +0000 Subject: system/heirloom-devtools: fix URL --- system/heirloom-devtools/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/heirloom-devtools/APKBUILD b/system/heirloom-devtools/APKBUILD index 974afd1e0..ddd99793c 100644 --- a/system/heirloom-devtools/APKBUILD +++ b/system/heirloom-devtools/APKBUILD @@ -11,7 +11,7 @@ license="CDDL-1.0" depends="" makedepends="" subpackages="$pkgname-dev" -source="https://superb-sea2.dl.sourceforge.net/project/heirloom/heirloom-devtools/$pkgver/heirloom-devtools-$pkgver.tar.bz2 +source="https://downloads.sourceforge.net/heirloom/heirloom-devtools/$pkgver/heirloom-devtools-$pkgver.tar.bz2 configure.patch deauto.patch lex-compiler.patch -- cgit v1.2.3-70-g09d2 From 13681fb4e751a04a9c4ffa6c0eccfa089c50e235 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 6 Mar 2019 23:15:24 +0000 Subject: system/libaio: fix build on 32-bit PowerPC --- system/libaio/APKBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libaio/APKBUILD b/system/libaio/APKBUILD index 79ff0f628..7423a10d7 100644 --- a/system/libaio/APKBUILD +++ b/system/libaio/APKBUILD @@ -16,7 +16,7 @@ source="http://ftp.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver build() { cd "$builddir" - make + make LDFLAGS="$LDFLAGS -lssp_nonshared" } check() { -- cgit v1.2.3-70-g09d2 From 89573ea3c2e8ec27ad4433a00fa238f7be475c54 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 6 Mar 2019 23:16:01 +0000 Subject: system/gcc: Fix ppc32 kernel build; POSIXise builtin snprintf --- system/gcc/APKBUILD | 7 +- ...ackport-r267157-posix-conformant-snprintf.patch | 80 ++++++++++++++++++++++ system/gcc/backport-r268048-memcpy-bounds.patch | 21 ++++++ 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 system/gcc/backport-r267157-posix-conformant-snprintf.patch create mode 100644 system/gcc/backport-r268048-memcpy-bounds.patch diff --git a/system/gcc/APKBUILD b/system/gcc/APKBUILD index a8ac557b5..96bd3f8df 100644 --- a/system/gcc/APKBUILD +++ b/system/gcc/APKBUILD @@ -177,6 +177,9 @@ source="https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz add-classic_table-support.patch disable-multiarch-ppc32.patch gcc-5.4.0-locale.patch + + backport-r267157-posix-conformant-snprintf.patch + backport-r268048-memcpy-bounds.patch " # we build out-of-tree @@ -562,4 +565,6 @@ de0cc0f9356c9ee5ea7b0f954441b59115f4a8f8f63573d0c17b6537e6f37641cf137531b496fc19 c2916948b028e1e990e1953875b884561c0f8dd105c1ec03073795df9a47ec2c627cbc95ca0ec98ab9177bf2b7c8458bf3fd09f780fa6c301995846f6317e366 337-gccgo-signal-sig34.patch 1860593584f629d24d5b6db14b0a3412e9f93449b663aaa4981301a0923db0159314905e694f27366fbfef72dce06636ab6df86862b7e9e9564847e03bee82c1 add-classic_table-support.patch db8c4ab3eae7c01943a61e9e3e20af45d4f6d196184eee5b94068b212900ccdeecaf4fb4145983226954f64e7c989fcd13e0b506176d2b3e781c2e9dc8b5a5a8 disable-multiarch-ppc32.patch -67a75a94fdba69de96b98dbc2978a50cb197857c464b81f7c956176da7066b3be937e40cb15e0870fc1e7382d662c5101bcd18cf457fc4112de41802042b51c4 gcc-5.4.0-locale.patch" +67a75a94fdba69de96b98dbc2978a50cb197857c464b81f7c956176da7066b3be937e40cb15e0870fc1e7382d662c5101bcd18cf457fc4112de41802042b51c4 gcc-5.4.0-locale.patch +65a4d8bf9cefcbc79e86015ef4376b2794492d6cae77065359b35bb4ed630dde6256982cd5e43ed837cbbdab366ea376da9f1c83f80ddf6dc53ab017b378c3cd backport-r267157-posix-conformant-snprintf.patch +23c20f258d1a21d0d706945376df8b93c0277a8dcd5183cc0b15c9f22250ef179833c725f877279f74e89364d772148526af5544ab7758172bfb758618554ad3 backport-r268048-memcpy-bounds.patch" diff --git a/system/gcc/backport-r267157-posix-conformant-snprintf.patch b/system/gcc/backport-r267157-posix-conformant-snprintf.patch new file mode 100644 index 000000000..adedf0ce9 --- /dev/null +++ b/system/gcc/backport-r267157-posix-conformant-snprintf.patch @@ -0,0 +1,80 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87096 + +GCC's "optimised" snprintf is not POSIX conformant + +--- trunk/gcc/gimple-ssa-sprintf.c 2018/12/07 17:02:11 266897 ++++ trunk/gcc/gimple-ssa-sprintf.c 2018/12/14 22:38:08 267157 +@@ -3899,6 +3899,7 @@ + /* True when the destination size is constant as opposed to the lower + or upper bound of a range. */ + bool dstsize_cst_p = true; ++ bool posunder4k = true; + + if (idx_dstsize == HOST_WIDE_INT_M1U) + { +@@ -3931,11 +3932,20 @@ + "specified bound %wu exceeds maximum object size " + "%wu", + dstsize, target_size_max () / 2); ++ /* POSIX requires snprintf to fail if DSTSIZE is greater ++ than INT_MAX. Even though not all POSIX implementations ++ conform to the requirement, avoid folding in this case. */ ++ posunder4k = false; + } + else if (dstsize > target_int_max ()) +- warning_at (gimple_location (info.callstmt), info.warnopt (), +- "specified bound %wu exceeds %", +- dstsize); ++ { ++ warning_at (gimple_location (info.callstmt), info.warnopt (), ++ "specified bound %wu exceeds %", ++ dstsize); ++ /* POSIX requires snprintf to fail if DSTSIZE is greater ++ than INT_MAX. Avoid folding in that case. */ ++ posunder4k = false; ++ } + } + else if (TREE_CODE (size) == SSA_NAME) + { +@@ -3944,9 +3954,29 @@ + if (vr->type == VR_RANGE + && TREE_CODE (vr->min) == INTEGER_CST + && TREE_CODE (vr->max) == INTEGER_CST) +- dstsize = (warn_level < 2 +- ? TREE_INT_CST_LOW (vr->max) +- : TREE_INT_CST_LOW (vr->min)); ++ { ++ unsigned HOST_WIDE_INT minsize = TREE_INT_CST_LOW (vr->min); ++ unsigned HOST_WIDE_INT maxsize = TREE_INT_CST_LOW (vr->max); ++ dstsize = warn_level < 2 ? maxsize : minsize; ++ ++ if (minsize > target_int_max ()) ++ warning_at (gimple_location (info.callstmt), info.warnopt (), ++ "specified bound range [%wu, %wu] exceeds " ++ "%", ++ minsize, maxsize); ++ ++ /* POSIX requires snprintf to fail if DSTSIZE is greater ++ than INT_MAX. Avoid folding if that's possible. */ ++ if (maxsize > target_int_max ()) ++ posunder4k = false; ++ } ++ else if (vr->type == VR_VARYING) ++ { ++ /* POSIX requires snprintf to fail if DSTSIZE is greater ++ than INT_MAX. Since SIZE's range is unknown, avoid ++ folding. */ ++ posunder4k = false; ++ } + + /* The destination size is not constant. If the function is + bounded (e.g., snprintf) a lower bound of zero doesn't +@@ -4033,7 +4073,7 @@ + the call. Avoid this optimization when -frounding-math is in effect + and the format string contains a floating point directive. */ + bool call_removed = false; +- if (success && optimize > 0) ++ if (!posunder4k && success && optimize > 0) + { + /* Save a copy of the iterator pointing at the call. The iterator + may change to point past the call in try_substitute_return_value diff --git a/system/gcc/backport-r268048-memcpy-bounds.patch b/system/gcc/backport-r268048-memcpy-bounds.patch new file mode 100644 index 000000000..eebecd832 --- /dev/null +++ b/system/gcc/backport-r268048-memcpy-bounds.patch @@ -0,0 +1,21 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88273 + +GCC 8.2+ fails to build 32-bit PowerPC kernel due to this. + +--- trunk/gcc/gimple-ssa-warn-restrict.c 2019/01/17 16:33:55 268037 ++++ trunk/gcc/gimple-ssa-warn-restrict.c 2019/01/17 22:52:47 268048 +@@ -319,13 +319,9 @@ + offrange[0] += offset_int::from (min, SIGNED); + offrange[1] += offset_int::from (max, SIGNED); + } +- else if (rng == VR_ANTI_RANGE) +- { +- offrange[0] += offset_int::from (max + 1, SIGNED); +- offrange[1] += offset_int::from (min - 1, SIGNED); +- } + else + { ++ /* Handle an anti-range the same as no range at all. */ + gimple *stmt = SSA_NAME_DEF_STMT (offset); + tree type; + if (is_gimple_assign (stmt) -- cgit v1.2.3-70-g09d2