From 5b7befa1b989315a57f4fb49b8381ce06ded96c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 1 Jul 2016 12:28:16 +0000 Subject: main/gcc: upgrade to 6.1.0 - use --enable-default-pie - patch bind now, ssp-strong, fortify and as-needed to be defaults - remove gentoo esp patches as unneeded (deprecated by the above) - update ecj - remove upstreamed musl patches, add current musl patches - support musl's static pie - fix some bootstrapping related issues --- main/gcc/001_all_default-ssp-strong.patch | 215 ++++++++ main/gcc/002_all_default-relro.patch | 33 ++ main/gcc/003_all_default-fortify-source.patch | 40 ++ main/gcc/004_all_default-hash-gnu.patch | 169 ++++++ main/gcc/005_all_default-as-needed.patch | 244 +++++++++ main/gcc/005_all_gcc-spec-env.patch | 87 --- main/gcc/010_all_default-fortify-source.patch | 29 - .../gcc/011_all_default-warn-format-security.patch | 4 +- .../067_all_gcc-poison-system-directories.patch | 198 +++---- main/gcc/074_all_gcc5_isl-dl.patch | 596 --------------------- main/gcc/074_all_gcc6_isl-dl.patch | 590 ++++++++++++++++++++ main/gcc/101_all_gcc49_configure.patch | 156 ------ main/gcc/102_all_gcc48_config.in.patch | 32 -- main/gcc/103_all_gcc49_Makefile.in.patch | 106 ---- main/gcc/105_all_gcc48_gcc.c.patch | 25 - main/gcc/116_all_gcc47_nopie_option.patch | 16 - main/gcc/120_all_gcc49_config_crtbeginp.patch | 40 -- main/gcc/124_all_gcc49_invoke.texi.patch | 44 -- main/gcc/134_all_gcc48_config_i386.patch | 56 -- main/gcc/135_all_gcc48_config_arm.patch | 35 -- main/gcc/140_all_gcc49_config_esp.patch | 135 ----- main/gcc/141_all_gcc49_config_esp_alpine.patch | 67 --- main/gcc/201-cilkrts.patch | 59 ++ main/gcc/201-libitm.patch | 46 -- main/gcc/202-musl-config-v3.patch | 294 ---------- main/gcc/202-posix_memalign.patch | 42 ++ main/gcc/203-libgcc_s.patch | 56 ++ main/gcc/204-arm.patch | 28 - main/gcc/204-linux_libc_has_function.patch | 25 + main/gcc/205-nopie.patch | 75 +++ main/gcc/206-ssp_nonshared.patch | 26 + main/gcc/207-static-pie.patch | 40 ++ main/gcc/209-x86-v3.patch | 26 - main/gcc/210-fixincludes.patch | 14 - main/gcc/211-unwind.patch | 17 - main/gcc/212-gthr.patch | 54 -- main/gcc/213-posix_memalign.patch | 30 -- main/gcc/214-stdint.patch | 109 ---- main/gcc/APKBUILD | 245 +++------ main/gcc/ada-fixes.patch | 32 +- main/gcc/ada-no-pie.patch | 66 --- main/gcc/arm-pr65932.patch | 19 - main/gcc/fix-gcj-stdgnu14-link.patch | 35 ++ main/gcc/gcc-4.8-musl-libssp.patch | 21 - main/gcc/hardenednopie.specs | 12 - main/gcc/hardenednopiessp.specs | 4 - main/gcc/hardenednossp.specs | 6 - main/gcc/pr70839.patch | 42 ++ main/gcc/vanilla.specs | 11 - 49 files changed, 1903 insertions(+), 2448 deletions(-) create mode 100644 main/gcc/001_all_default-ssp-strong.patch create mode 100644 main/gcc/002_all_default-relro.patch create mode 100644 main/gcc/003_all_default-fortify-source.patch create mode 100644 main/gcc/004_all_default-hash-gnu.patch create mode 100644 main/gcc/005_all_default-as-needed.patch delete mode 100644 main/gcc/005_all_gcc-spec-env.patch delete mode 100644 main/gcc/010_all_default-fortify-source.patch delete mode 100644 main/gcc/074_all_gcc5_isl-dl.patch create mode 100644 main/gcc/074_all_gcc6_isl-dl.patch delete mode 100644 main/gcc/101_all_gcc49_configure.patch delete mode 100644 main/gcc/102_all_gcc48_config.in.patch delete mode 100644 main/gcc/103_all_gcc49_Makefile.in.patch delete mode 100644 main/gcc/105_all_gcc48_gcc.c.patch delete mode 100644 main/gcc/116_all_gcc47_nopie_option.patch delete mode 100644 main/gcc/120_all_gcc49_config_crtbeginp.patch delete mode 100644 main/gcc/124_all_gcc49_invoke.texi.patch delete mode 100644 main/gcc/134_all_gcc48_config_i386.patch delete mode 100644 main/gcc/135_all_gcc48_config_arm.patch delete mode 100644 main/gcc/140_all_gcc49_config_esp.patch delete mode 100644 main/gcc/141_all_gcc49_config_esp_alpine.patch create mode 100644 main/gcc/201-cilkrts.patch delete mode 100644 main/gcc/201-libitm.patch delete mode 100644 main/gcc/202-musl-config-v3.patch create mode 100644 main/gcc/202-posix_memalign.patch create mode 100644 main/gcc/203-libgcc_s.patch delete mode 100644 main/gcc/204-arm.patch create mode 100644 main/gcc/204-linux_libc_has_function.patch create mode 100644 main/gcc/205-nopie.patch create mode 100644 main/gcc/206-ssp_nonshared.patch create mode 100644 main/gcc/207-static-pie.patch delete mode 100644 main/gcc/209-x86-v3.patch delete mode 100644 main/gcc/210-fixincludes.patch delete mode 100644 main/gcc/211-unwind.patch delete mode 100644 main/gcc/212-gthr.patch delete mode 100644 main/gcc/213-posix_memalign.patch delete mode 100644 main/gcc/214-stdint.patch delete mode 100644 main/gcc/ada-no-pie.patch delete mode 100644 main/gcc/arm-pr65932.patch create mode 100644 main/gcc/fix-gcj-stdgnu14-link.patch delete mode 100644 main/gcc/gcc-4.8-musl-libssp.patch delete mode 100644 main/gcc/hardenednopie.specs delete mode 100644 main/gcc/hardenednopiessp.specs delete mode 100644 main/gcc/hardenednossp.specs create mode 100644 main/gcc/pr70839.patch delete mode 100644 main/gcc/vanilla.specs (limited to 'main') diff --git a/main/gcc/001_all_default-ssp-strong.patch b/main/gcc/001_all_default-ssp-strong.patch new file mode 100644 index 0000000000..95949eb00f --- /dev/null +++ b/main/gcc/001_all_default-ssp-strong.patch @@ -0,0 +1,215 @@ +# 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/main/gcc/002_all_default-relro.patch b/main/gcc/002_all_default-relro.patch new file mode 100644 index 0000000000..c461017dc6 --- /dev/null +++ b/main/gcc/002_all_default-relro.patch @@ -0,0 +1,33 @@ +# Turn on -Wl,-z,relro,-z,now by default. + +--- + gcc/doc/invoke.texi | 3 +++ + gcc/gcc.c | 1 + + 2 files changed, 4 insertions(+), 0 deletions(-) + +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -11424,6 +11424,9 @@ For example, @option{-Wl,-Map,output.map + 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 ++@option{-Wl,-z,relro,now} is used. To disable, use @option{-Wl,-z,norelro}. ++ + @item -u @var{symbol} + @opindex u + Pretend the symbol @var{symbol} is undefined, to force linking of +Index: b/gcc/gcc.c +=================================================================== +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -890,6 +890,7 @@ proper position among the other output f + "%{flto|flto=*:% 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/main/gcc/004_all_default-hash-gnu.patch b/main/gcc/004_all_default-hash-gnu.patch new file mode 100644 index 0000000000..dbe5440df7 --- /dev/null +++ b/main/gcc/004_all_default-hash-gnu.patch @@ -0,0 +1,169 @@ +# DP: Link using --hash-style=gnu (aarch64, alpha, amd64, armel, armhf, ia64, +# DP: i386, powerpc, ppc64, s390, sparc) + +2006-07-11 Jakub Jelinek + + * config/i386/linux.h (LINK_SPEC): Add --hash-style=gnu. + * config/i386/linux64.h (LINK_SPEC): Likewise. + * config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise. + * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32, + LINK_OS_LINUX_SPEC64): Likewise. + * config/s390/linux.h (LINK_SPEC): Likewise. + * config/ia64/linux.h (LINK_SPEC): Likewise. + * config/sparc/linux.h (LINK_SPEC): Likewise. + * config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC, + LINK_ARCH64_SPEC): Likewise. + * config/alpha/linux-elf.h (LINK_SPEC): Likewise. + +2009-12-21 Matthias Klose + + * config/arm/linux-elf.h (LINK_SPEC): Add --hash-style=gnu. + +2012-11-17 Matthias Klose + + * config/aarch64/aarch64-linux.h (LINK_SPEC): Add --hash-style=gnu. + +--- + gcc/config/alpha/linux-elf.h | 2 +- + gcc/config/i386/linux.h | 2 +- + gcc/config/i386/linux64.h | 2 +- + gcc/config/ia64/linux.h | 2 +- + gcc/config/rs6000/linux64.h | 4 ++-- + gcc/config/rs6000/sysv4.h | 2 +- + gcc/config/s390/linux.h | 2 +- + gcc/config/sparc/linux.h | 2 +- + 8 files changed, 9 insertions(+), 9 deletions(-) + +Index: b/gcc/config/alpha/linux-elf.h +=================================================================== +--- a/gcc/config/alpha/linux-elf.h ++++ b/gcc/config/alpha/linux-elf.h +@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. + + #define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER + +-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ +Index: b/gcc/config/ia64/linux.h +=================================================================== +--- a/gcc/config/ia64/linux.h ++++ b/gcc/config/ia64/linux.h +@@ -58,7 +58,7 @@ do { \ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "\ ++#define LINK_SPEC " --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -469,12 +469,12 @@ 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 " --hash-style=gnu %{!shared: %{!static: \ + %{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 " --hash-style=gnu %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}} \ + %(link_os_extra_spec64)" +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 + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ + MUSL_DYNAMIC_LINKER) + +-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" + +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. + + #undef LINK_SPEC + #define LINK_SPEC \ +- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ ++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{static:-static} \ +Index: b/gcc/config/sparc/linux.h +=================================================================== +--- a/gcc/config/sparc/linux.h ++++ b/gcc/config/sparc/linux.h +@@ -86,7 +86,7 @@ extern const char *host_detect_local_cpu + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ ++#define LINK_SPEC "-m elf32_sparc --hash-style=gnu %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ + %{!shared: \ + %{!static: \ +Index: b/gcc/config/arm/linux-elf.h +=================================================================== +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -72,6 +72,7 @@ + %{rdynamic:-export-dynamic} \ + %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + -X \ ++ --hash-style=gnu \ + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + +Index: b/gcc/config/i386/gnu-user.h +=================================================================== +--- a/gcc/config/i386/gnu-user.h ++++ b/gcc/config/i386/gnu-user.h +@@ -74,7 +74,7 @@ along with GCC; see the file COPYING3. + { "link_emulation", GNU_USER_LINK_EMULATION },\ + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } + +-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ ++#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +Index: b/gcc/config/i386/gnu-user64.h +=================================================================== +--- a/gcc/config/i386/gnu-user64.h ++++ b/gcc/config/i386/gnu-user64.h +@@ -56,6 +56,7 @@ see the files COPYING3 and COPYING.RUNTI + "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \ + %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ + %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ ++ --hash-style=gnu \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -35,6 +35,7 @@ + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ ++ --hash-style=gnu \ + %{static:-Bstatic} \ + %{shared:-shared} \ + %{symbolic:-Bsymbolic} \ diff --git a/main/gcc/005_all_default-as-needed.patch b/main/gcc/005_all_default-as-needed.patch new file mode 100644 index 0000000000..c57e1605dd --- /dev/null +++ b/main/gcc/005_all_default-as-needed.patch @@ -0,0 +1,244 @@ +# DP: On linux targets pass --as-needed by default to the linker, but always +# DP: link the sanitizer libraries with --no-as-needed. + +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -568,8 +568,11 @@ proper position among the other output f + #ifdef LIBTSAN_EARLY_SPEC + #define LIBTSAN_SPEC STATIC_LIBTSAN_LIBS + #elif defined(HAVE_LD_STATIC_DYNAMIC) +-#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION \ +- "} -ltsan %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ ++#define LIBTSAN_SPEC "%{static-libtsan:" LD_STATIC_OPTION "}" \ ++ " %{!static-libtsan:%{!fuse-ld=gold:--push-state }--no-as-needed}" \ ++ " -ltsan " \ ++ " %{static-libtsan:" LD_DYNAMIC_OPTION "}" \ ++ " %{!static-libtsan:%{fuse-ld=gold:--as-needed;:--pop-state}}" \ + STATIC_LIBTSAN_LIBS + #else + #define LIBTSAN_SPEC "-ltsan" STATIC_LIBTSAN_LIBS +--- a/gcc/config/gnu-user.h ++++ b/gcc/config/gnu-user.h +@@ -124,13 +124,13 @@ + #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:" \ + 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:" \ + 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}}" + #endif +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -36,6 +36,7 @@ + + #define LINUX_TARGET_LINK_SPEC "%{h*} \ + --hash-style=gnu \ ++ --as-needed \ + %{static:-Bstatic} \ + %{shared:-shared} \ + %{symbolic:-Bsymbolic} \ +Index: b/gcc/config/ia64/linux.h +=================================================================== +--- a/gcc/config/ia64/linux.h ++++ b/gcc/config/ia64/linux.h +@@ -58,7 +58,7 @@ do { \ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC " --hash-style=gnu \ ++#define LINK_SPEC " --hash-style=gnu --as-needed \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +Index: b/gcc/config/sparc/linux.h +=================================================================== +--- a/gcc/config/sparc/linux.h ++++ b/gcc/config/sparc/linux.h +@@ -86,7 +86,7 @@ extern const char *host_detect_local_cpu + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf32_sparc --hash-style=gnu %{shared:-shared} \ ++#define LINK_SPEC "-m elf32_sparc --hash-style=gnu --as-needed %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ + %{!shared: \ + %{!static: \ +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. + + #undef LINK_SPEC + #define LINK_SPEC \ +- "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \ ++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu --as-needed \ + %{shared:-shared} \ + %{!shared: \ + %{static:-static} \ +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; + " -m elf64ppc") + #endif + +-#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --hash-style=gnu %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " --hash-style=gnu --as-needed %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}} \ + %(link_os_extra_spec32)" + +-#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --hash-style=gnu %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC64 LINK_OS_LINUX_EMUL64 " --hash-style=gnu --as-needed %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}} \ + %(link_os_extra_spec64)" +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 + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ + MUSL_DYNAMIC_LINKER) + +-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu --as-needed %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " GNU_USER_DYNAMIC_LINKER "}}" + +Index: b/gcc/config/i386/gnu-user64.h +=================================================================== +--- a/gcc/config/i386/gnu-user64.h ++++ b/gcc/config/i386/gnu-user64.h +@@ -57,6 +57,7 @@ see the files COPYING3 and COPYING.RUNTI + %{" SPEC_32 ":-m " GNU_USER_LINK_EMULATION32 "} \ + %{" SPEC_X32 ":-m " GNU_USER_LINK_EMULATIONX32 "} \ + --hash-style=gnu \ ++ --as-needed \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +Index: b/gcc/config/i386/gnu-user.h +=================================================================== +--- a/gcc/config/i386/gnu-user.h ++++ b/gcc/config/i386/gnu-user.h +@@ -74,7 +74,7 @@ along with GCC; see the file COPYING3. + { "link_emulation", GNU_USER_LINK_EMULATION },\ + { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } + +-#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \ ++#define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) --hash-style=gnu --as-needed %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +Index: b/gcc/config/alpha/linux-elf.h +=================================================================== +--- a/gcc/config/alpha/linux-elf.h ++++ b/gcc/config/alpha/linux-elf.h +@@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. + + #define ELF_DYNAMIC_LINKER GNU_USER_DYNAMIC_LINKER + +-#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --hash-style=gnu --as-needed %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ +Index: b/gcc/config/arm/linux-elf.h +=================================================================== +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -73,6 +73,7 @@ + %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ + -X \ + --hash-style=gnu \ ++ --as-needed \ + %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ + SUBTARGET_EXTRA_LINK_SPEC + +Index: b/gcc/config/mips/gnu-user.h +=================================================================== +--- a/gcc/config/mips/gnu-user.h ++++ b/gcc/config/mips/gnu-user.h +@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. + #undef GNU_USER_TARGET_LINK_SPEC + #define GNU_USER_TARGET_LINK_SPEC "\ + %{G*} %{EB} %{EL} %{mips*} %{shared} \ ++ -as-needed \ + %{!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 +=================================================================== +--- 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; + diff --git a/main/gcc/005_all_gcc-spec-env.patch b/main/gcc/005_all_gcc-spec-env.patch deleted file mode 100644 index 214638e1fe..0000000000 --- a/main/gcc/005_all_gcc-spec-env.patch +++ /dev/null @@ -1,87 +0,0 @@ -2013-08-22 Magnus Granberg - - * gcc/gcc.c (main): Add support for external spec file via the GCC_SPECS env var - and move the process of the user specifed specs. - - This allows us to easily control pie/ssp defaults with gcc-config profiles. - Original patch by Rob Holland - Extended to support multiple entries separated by ':' by Kevin F. Quinn - Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill - Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by Magnus Granberg - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -6427,6 +6428,48 @@ main (int argc, char **argv) - do_option_spec (option_default_specs[i].name, - option_default_specs[i].spec); - -+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined (WIN32)) -+ /* Add specs listed in GCC_SPECS. Note; in the process of separating -+ * each spec listed, the string is overwritten at token boundaries -+ * (':') with '\0', an effect of strtok_r(). -+ */ -+ specs_file = getenv ("GCC_SPECS"); -+ if (specs_file && (strlen(specs_file) > 0)) -+ { -+ char *spec, *saveptr; -+ for (spec=strtok_r(specs_file,":",&saveptr); -+ spec!=NULL; -+ spec=strtok_r(NULL,":",&saveptr)) -+ { -+ struct user_specs *user = (struct user_specs *) -+ xmalloc (sizeof (struct user_specs)); -+ user->next = (struct user_specs *) 0; -+ user->filename = spec; -+ if (user_specs_tail) -+ user_specs_tail->next = user; -+ else -+ user_specs_head = user; -+ user_specs_tail = user; -+ } -+ } -+#endif -+ /* Process any user specified specs in the order given on the command -+ * line. */ -+ for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next) -+ { -+ char *filename = find_a_file (&startfile_prefixes, uptr->filename, -+ R_OK, true); -+ read_specs (filename ? filename : uptr->filename, false, true); -+ } -+ /* Process any user self specs. */ -+ { -+ struct spec_list *sl; -+ for (sl = specs; sl; sl = sl->next) -+ if (sl->name_len == sizeof "self_spec" - 1 -+ && !strcmp (sl->name, "self_spec")) -+ do_self_spec (*sl->ptr_spec); -+ } -+ - /* Process DRIVER_SELF_SPECS, adding any new options to the end - of the command line. */ - -@@ -6535,24 +6578,6 @@ main (int argc, char **argv) - PREFIX_PRIORITY_LAST, 0, 1); - } - -- /* Process any user specified specs in the order given on the command -- line. */ -- for (struct user_specs *uptr = user_specs_head; uptr; uptr = uptr->next) -- { -- char *filename = find_a_file (&startfile_prefixes, uptr->filename, -- R_OK, true); -- read_specs (filename ? filename : uptr->filename, false, true); -- } -- -- /* Process any user self specs. */ -- { -- struct spec_list *sl; -- for (sl = specs; sl; sl = sl->next) -- if (sl->name_len == sizeof "self_spec" - 1 -- && !strcmp (sl->name, "self_spec")) -- do_self_spec (*sl->ptr_spec); -- } -- - if (compare_debug) - { - enum save_temps save; diff --git a/main/gcc/010_all_default-fortify-source.patch b/main/gcc/010_all_default-fortify-source.patch deleted file mode 100644 index ad2f2b1c26..0000000000 --- a/main/gcc/010_all_default-fortify-source.patch +++ /dev/null @@ -1,29 +0,0 @@ -Enable -D_FORTIFY_SOURCE=2 by default. - - ---- a/gcc/c-family/c-cppbuiltin.c -+++ b/gcc/c-family/c-cppbuiltin.c -@@ -951,6 +951,9 @@ 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 w/optimization. */ -+ cpp_define (pfile, "_FORTIFY_SOURCE=((defined __OPTIMIZE__ && __OPTIMIZE__ > 0) ? 2 : 0)"); -+ - /* Misc. */ - if (flag_gnu89_inline) - cpp_define (pfile, "__GNUC_GNU_INLINE__"); ---- a/gcc/doc/gcc.info -+++ b/gcc/doc/gcc.info -@@ -6255,6 +6255,11 @@ find out the exact set of optimizations that are enabled at each level. - Please note the warning under '-fgcse' about invoking '-O2' on - programs that use computed gotos. - -+ NOTE: In Gentoo, `-D_FORTIFY_SOURCE=2' is set by default, and is -+ activated when `-O' is set to 2 or higher. This enables additional -+ compile-time and run-time checks for several libc functions. To disable, -+ specify either `-U_FORTIFY_SOURCE' or `-D_FORTIFY_SOURCE=0'. -+ - '-O3' - Optimize yet more. '-O3' turns on all optimizations specified by - '-O2' and also turns on the '-finline-functions', diff --git a/main/gcc/011_all_default-warn-format-security.patch b/main/gcc/011_all_default-warn-format-security.patch index ee6c7c4392..a58383a8ec 100644 --- a/main/gcc/011_all_default-warn-format-security.patch +++ b/main/gcc/011_all_default-warn-format-security.patch @@ -27,7 +27,7 @@ Enable -Wformat and -Wformat-security by default. '-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 Gentoo. ++ This option is enabled by default in Alpine Linux. + '-Wno-format-contains-nul' If '-Wformat' is specified, do not warn about format strings @@ -36,7 +36,7 @@ Enable -Wformat and -Wformat-security by default. future warnings may be added to '-Wformat-security' that are not included in '-Wformat-nonliteral'.) -+ This option is enabled by default in Gentoo. ++ This option is enabled by default in Alpine Linux. + '-Wformat-y2k' If '-Wformat' is specified, also warn about 'strftime' formats diff --git a/main/gcc/067_all_gcc-poison-system-directories.patch b/main/gcc/067_all_gcc-poison-system-directories.patch index d8b812b6e4..1036716175 100644 --- a/main/gcc/067_all_gcc-poison-system-directories.patch +++ b/main/gcc/067_all_gcc-poison-system-directories.patch @@ -1,28 +1,30 @@ -http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch +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 16/35] gcc: poison-system-directories +Subject: [PATCH 10/46] gcc: poison-system-directories Signed-off-by: Khem Raj Upstream-Status: Inappropriate [distribution: codesourcery] --- - gcc/Makefile.in | 2 +- - gcc/common.opt | 4 ++++ - gcc/config.in | 6 ++++++ - gcc/configure | 20 ++++++++++++++++++-- - gcc/configure.ac | 10 ++++++++++ - gcc/doc/invoke.texi | 9 +++++++++ - gcc/gcc.c | 2 ++ - gcc/incpath.c | 19 +++++++++++++++++++ - 8 files changed, 69 insertions(+), 3 deletions(-) + 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(+) ---- gcc-4.9-20140316.orig/gcc/common.opt -+++ gcc-4.9-20140316/gcc/common.opt -@@ -603,6 +603,10 @@ Wpedantic - Common Var(pedantic) Warning - Issue warnings needed for strict compliance to the standard +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 @@ -30,29 +32,29 @@ Upstream-Status: Inappropriate [distribution: codesourcery] + Wshadow Common Var(warn_shadow) Warning - Warn when one local variable shadows another ---- gcc-4.9-20140316.orig/gcc/configure.ac -+++ gcc-4.9-20140316/gcc/configure.ac -@@ -5366,6 +5366,16 @@ AC_ARG_ENABLE(version-specific-runtime-l - [specify that runtime libraries should be - installed in a compiler-specific directory])]) + 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 -+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 + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif + - # Substitute configuration variables - AC_SUBST(subdirs) - AC_SUBST(srcdir) ---- gcc-4.9-20140316.orig/gcc/configure -+++ gcc-4.9-20140316/gcc/configure -@@ -928,6 +928,7 @@ with_system_zlib ++ + /* 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 @@ -60,7 +62,7 @@ Upstream-Status: Inappropriate [distribution: codesourcery] enable_plugin enable_host_shared enable_libquadmath_support -@@ -1648,6 +1649,8 @@ Optional Features: +@@ -1681,6 +1682,8 @@ Optional Features: --enable-version-specific-runtime-libs specify that runtime libraries should be installed in a compiler-specific directory @@ -69,7 +71,7 @@ Upstream-Status: Inappropriate [distribution: codesourcery] --enable-plugin enable plugin support --enable-host-shared build host code as shared libraries --disable-libquadmath-support -@@ -27702,6 +27705,19 @@ if test "${enable_version_specific_runti +@@ -28908,6 +28911,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : fi @@ -89,35 +91,72 @@ Upstream-Status: Inappropriate [distribution: codesourcery] # Substitute configuration variables ---- gcc-4.9-20140316.orig/gcc/config.in -+++ gcc-4.9-20140316/gcc/config.in -@@ -138,6 +138,12 @@ - #endif - +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])]) -+/* Define to warn for use of native system header directories */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+#endif ++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. + - /* 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. */ ---- gcc-4.9-20140316.orig/gcc/gcc.c -+++ gcc-4.9-20140316/gcc/gcc.c -@@ -764,6 +764,8 @@ proper position among the other output f - "%{fuse-ld=*:-fuse-ld=%*}\ - %X %{o*} %{e*} %{N} %{n} %{r}\ - %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \ -+ %{Wno-poison-system-directories:--no-poison-system-directories}\ -+ %{Werror=poison-system-directories:--error-poison-system-directories}\ - %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\ - %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\ - %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\ ---- gcc-4.9-20140316.orig/gcc/incpath.c -+++ gcc-4.9-20140316/gcc/incpath.c -@@ -28,6 +28,7 @@ + @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" @@ -125,7 +164,7 @@ Upstream-Status: Inappropriate [distribution: codesourcery] /* Microsoft Windows does not natively support inodes. VMS has non-numeric inodes. */ -@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo +@@ -381,6 +382,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) } fprintf (stderr, _("End of search list.\n")); } @@ -150,27 +189,6 @@ Upstream-Status: Inappropriate [distribution: codesourcery] } /* Use given -I paths for #include "..." but not #include <...>, and ---- a/gcc/doc/gcc.info -+++ b/gcc/doc/gcc.info -@@ -558,6 +558,7 @@ _Warning Options_ - -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded - -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format - -Wpointer-arith -Wno-pointer-to-int-cast -+ -Wno-poison-system-directories - -Wredundant-decls -Wno-return-local-addr - -Wreturn-type -Wsequence-point -Wshadow - -Wsign-compare -Wsign-conversion -Wfloat-conversion -@@ -4010,6 +4011,13 @@ compiler warns that an unrecognized option is present. - pragmas in system headers--for that, '-Wunknown-pragmas' must also - be used. - -+'-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. -+ - '-Wtrampolines' - Warn about trampolines generated for pointers to nested functions. - +-- +2.8.2 + diff --git a/main/gcc/074_all_gcc5_isl-dl.patch b/main/gcc/074_all_gcc5_isl-dl.patch deleted file mode 100644 index 052d30516b..0000000000 --- a/main/gcc/074_all_gcc5_isl-dl.patch +++ /dev/null @@ -1,596 +0,0 @@ -dlopen cloog-isl library rather than link to it directly. This prevents -cloog upgrades that change the soname from breaking the compiler. - -http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc5-isl-dl.patch - - -In FreeBSD dlopen is part of libc so we can't just hardcode -ldl. -We abuse the existing plugin check logic to pull out that info. - ---- a/gcc/Makefile.in.jj 2012-12-13 17:09:20.000000000 +0100 -+++ b/gcc/Makefile.in 2012-12-14 11:45:22.585670055 +0100 -@@ -1006,7 +1006,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) - # and the system's installed libraries. - LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ - $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) --BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ -+BACKENDLIBS = $(if $(ISLLIBS),@DL_LIB@) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ - $(ZLIB) - # Any system libraries needed just for GNAT. - SYSLIBS = @GNAT_LIBEXC@ -@@ -2050,6 +2050,15 @@ $(out_object_file): $(out_file) - $(common_out_object_file): $(common_out_file) - $(COMPILE) $< - $(POSTCOMPILE) -+ -+graphite%.o : \ -+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) -+graphite.o : \ -+ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) -+graphite%.o : \ -+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) -+graphite.o : \ -+ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) - # - # Generate header and source files from the machine description, - # and compile them. ---- a/gcc/configure -+++ b/gcc/configure -@@ -604,6 +604,7 @@ PICFLAG - enable_host_shared - enable_plugin - pluginlibs -+DL_LIB - ISLINC - ISLLIBS - GMPINC -@@ -28285,6 +28286,7 @@ $as_echo "unable to check" >&6; } - fi - - # Check -ldl -+ DL_LIB= - saved_LIBS="$LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 - $as_echo_n "checking for library containing dlopen... " >&6; } -@@ -28344,6 +28346,7 @@ fi - - if test x"$ac_cv_search_dlopen" = x"-ldl"; then - pluginlibs="$pluginlibs -ldl" -+ DL_LIB=$ac_cv_search_dlopen - fi - LIBS="$saved_LIBS" - ---- a/gcc/graphite-poly.h.jj 2012-12-13 11:31:27.000000000 +0100 -+++ b/gcc/graphite-poly.h 2012-12-14 13:41:41.970800726 +0100 -@@ -22,6 +22,478 @@ along with GCC; see the file COPYING3. - #ifndef GCC_GRAPHITE_POLY_H - #define GCC_GRAPHITE_POLY_H - -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE -+#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_coincident) -+#else -+#define DYNSYM_ZERO_DISTANCE DYNSYM (isl_band_member_is_zero_distance) -+#endif -+#define DYNSYMS \ -+ DYNSYM (isl_aff_add_coefficient_si); \ -+ DYNSYM (isl_aff_free); \ -+ DYNSYM (isl_aff_get_space); \ -+ DYNSYM (isl_aff_set_coefficient_si); \ -+ DYNSYM (isl_aff_set_constant_si); \ -+ DYNSYM (isl_aff_zero_on_domain); \ -+ DYNSYM (isl_band_free); \ -+ DYNSYM (isl_band_get_children); \ -+ DYNSYM (isl_band_get_partial_schedule); \ -+ DYNSYM (isl_band_has_children); \ -+ DYNSYM (isl_band_list_free); \ -+ DYNSYM (isl_band_list_get_band); \ -+ DYNSYM (isl_band_list_get_ctx); \ -+ DYNSYM (isl_band_list_n_band); \ -+ DYNSYM_ZERO_DISTANCE; \ -+ DYNSYM (isl_band_n_member); \ -+ DYNSYM (isl_basic_map_add_constraint); \ -+ DYNSYM (isl_basic_map_project_out); \ -+ DYNSYM (isl_basic_map_universe); \ -+ DYNSYM (isl_constraint_set_coefficient_si); \ -+ DYNSYM (isl_constraint_set_constant_si); \ -+ DYNSYM (isl_ctx_alloc); \ -+ DYNSYM (isl_ctx_free); \ -+ DYNSYM (isl_equality_alloc); \ -+ DYNSYM (isl_id_alloc); \ -+ DYNSYM (isl_id_copy); \ -+ DYNSYM (isl_id_free); \ -+ DYNSYM (isl_inequality_alloc); \ -+ DYNSYM (isl_local_space_copy); \ -+ DYNSYM (isl_local_space_free); \ -+ DYNSYM (isl_local_space_from_space); \ -+ DYNSYM (isl_local_space_range); \ -+ DYNSYM (isl_map_add_constraint); \ -+ DYNSYM (isl_map_add_dims); \ -+ DYNSYM (isl_map_align_params); \ -+ DYNSYM (isl_map_apply_range); \ -+ DYNSYM (isl_map_copy); \ -+ DYNSYM (isl_map_dim); \ -+ DYNSYM (isl_map_dump); \ -+ DYNSYM (isl_map_equate); \ -+ DYNSYM (isl_map_fix_si); \ -+ DYNSYM (isl_map_flat_product); \ -+ DYNSYM (isl_map_flat_range_product); \ -+ DYNSYM (isl_map_free); \ -+ DYNSYM (isl_map_from_basic_map); \ -+ DYNSYM (isl_map_from_pw_aff); \ -+ DYNSYM (isl_map_from_union_map); \ -+ DYNSYM (isl_map_get_ctx); \ -+ DYNSYM (isl_map_get_space); \ -+ DYNSYM (isl_map_get_tuple_id); \ -+ DYNSYM (isl_map_insert_dims); \ -+ DYNSYM (isl_map_intersect); \ -+ DYNSYM (isl_map_intersect_domain); \ -+ DYNSYM (isl_map_intersect_range); \ -+ DYNSYM (isl_map_is_empty); \ -+ DYNSYM (isl_map_lex_ge); \ -+ DYNSYM (isl_map_lex_le); \ -+ DYNSYM (isl_map_n_out); \ -+ DYNSYM (isl_map_range); \ -+ DYNSYM (isl_map_set_tuple_id); \ -+ DYNSYM (isl_map_universe); \ -+ DYNSYM (isl_options_set_on_error); \ -+ DYNSYM (isl_options_set_schedule_fuse); \ -+ DYNSYM (isl_options_set_schedule_max_constant_term); \ -+ DYNSYM (isl_options_set_schedule_maximize_band_depth); \ -+ DYNSYM (isl_printer_free); \ -+ DYNSYM (isl_printer_print_aff); \ -+ DYNSYM (isl_printer_print_constraint); \ -+ DYNSYM (isl_printer_print_map); \ -+ DYNSYM (isl_printer_print_set); \ -+ DYNSYM (isl_printer_to_file); \ -+ DYNSYM (isl_pw_aff_add); \ -+ DYNSYM (isl_pw_aff_alloc); \ -+ DYNSYM (isl_pw_aff_copy); \ -+ DYNSYM (isl_pw_aff_eq_set); \ -+ DYNSYM (isl_pw_aff_free); \ -+ DYNSYM (isl_pw_aff_from_aff); \ -+ DYNSYM (isl_pw_aff_ge_set); \ -+ DYNSYM (isl_pw_aff_gt_set); \ -+ DYNSYM (isl_pw_aff_is_cst); \ -+ DYNSYM (isl_pw_aff_le_set); \ -+ DYNSYM (isl_pw_aff_lt_set); \ -+ DYNSYM (isl_pw_aff_mul); \ -+ DYNSYM (isl_pw_aff_ne_set); \ -+ DYNSYM (isl_pw_aff_nonneg_set); \ -+ DYNSYM (isl_pw_aff_set_tuple_id); \ -+ DYNSYM (isl_pw_aff_sub); \ -+ DYNSYM (isl_pw_aff_zero_set); \ -+ DYNSYM (isl_schedule_free); \ -+ DYNSYM (isl_schedule_get_band_forest); \ -+ DYNSYM (isl_set_add_constraint); \ -+ DYNSYM (isl_set_add_dims); \ -+ DYNSYM (isl_set_apply); \ -+ DYNSYM (isl_set_coalesce); \ -+ DYNSYM (isl_set_copy); \ -+ DYNSYM (isl_set_dim); \ -+ DYNSYM (isl_set_fix_si); \ -+ DYNSYM (isl_set_free); \ -+ DYNSYM (isl_set_get_space); \ -+ DYNSYM (isl_set_get_tuple_id); \ -+ DYNSYM (isl_set_intersect); \ -+ DYNSYM (isl_set_is_empty); \ -+ DYNSYM (isl_set_n_dim); \ -+ DYNSYM (isl_set_nat_universe); \ -+ DYNSYM (isl_set_project_out); \ -+ DYNSYM (isl_set_set_tuple_id); \ -+ DYNSYM (isl_set_universe); \ -+ DYNSYM (isl_space_add_dims); \ -+ DYNSYM (isl_space_alloc); \ -+ DYNSYM (isl_space_copy); \ -+ DYNSYM (isl_space_dim); \ -+ DYNSYM (isl_space_domain); \ -+ DYNSYM (isl_space_find_dim_by_id); \ -+ DYNSYM (isl_space_free); \ -+ DYNSYM (isl_space_from_domain); \ -+ DYNSYM (isl_space_get_tuple_id); \ -+ DYNSYM (isl_space_params_alloc); \ -+ DYNSYM (isl_space_range); \ -+ DYNSYM (isl_space_set_alloc); \ -+ DYNSYM (isl_space_set_dim_id); \ -+ DYNSYM (isl_space_set_tuple_id); \ -+ DYNSYM (isl_union_map_add_map); \ -+ DYNSYM (isl_union_map_align_params); \ -+ DYNSYM (isl_union_map_apply_domain); \ -+ DYNSYM (isl_union_map_apply_range); \ -+ DYNSYM (isl_union_map_compute_flow); \ -+ DYNSYM (isl_union_map_copy); \ -+ DYNSYM (isl_union_map_empty); \ -+ DYNSYM (isl_union_map_flat_range_product); \ -+ DYNSYM (isl_union_map_foreach_map); \ -+ DYNSYM (isl_union_map_free); \ -+ DYNSYM (isl_union_map_from_map); \ -+ DYNSYM (isl_union_map_get_ctx); \ -+ DYNSYM (isl_union_map_get_space); \ -+ DYNSYM (isl_union_map_gist_domain); \ -+ DYNSYM (isl_union_map_gist_range); \ -+ DYNSYM (isl_union_map_intersect_domain); \ -+ DYNSYM (isl_union_map_is_empty); \ -+ DYNSYM (isl_union_map_subtract); \ -+ DYNSYM (isl_union_map_union); \ -+ DYNSYM (isl_union_set_add_set); \ -+ DYNSYM (isl_union_set_compute_schedule); \ -+ DYNSYM (isl_union_set_copy); \ -+ DYNSYM (isl_union_set_empty); \ -+ DYNSYM (isl_union_set_from_set); \ -+ DYNSYM (isl_aff_add_constant_val); \ -+ DYNSYM (isl_aff_get_coefficient_val); \ -+ DYNSYM (isl_aff_get_ctx); \ -+ DYNSYM (isl_aff_mod_val); \ -+ DYNSYM (isl_ast_build_ast_from_schedule); \ -+ DYNSYM (isl_ast_build_free); \ -+ DYNSYM (isl_ast_build_from_context); \ -+ DYNSYM (isl_ast_build_get_ctx); \ -+ DYNSYM (isl_ast_build_get_schedule); \ -+ DYNSYM (isl_ast_build_get_schedule_space); \ -+ DYNSYM (isl_ast_build_set_before_each_for); \ -+ DYNSYM (isl_ast_build_set_options); \ -+ DYNSYM (isl_ast_expr_free); \ -+ DYNSYM (isl_ast_expr_from_val); \ -+ DYNSYM (isl_ast_expr_get_ctx); \ -+ DYNSYM (isl_ast_expr_get_id); \ -+ DYNSYM (isl_ast_expr_get_op_arg); \ -+ DYNSYM (isl_ast_expr_get_op_n_arg); \ -+ DYNSYM (isl_ast_expr_get_op_type); \ -+ DYNSYM (isl_ast_expr_get_type); \ -+ DYNSYM (isl_ast_expr_get_val); \ -+ DYNSYM (isl_ast_expr_sub); \ -+ DYNSYM (isl_ast_node_block_get_children); \ -+ DYNSYM (isl_ast_node_for_get_body); \ -+ DYNSYM (isl_ast_node_for_get_cond); \ -+ DYNSYM (isl_ast_node_for_get_inc); \ -+ DYNSYM (isl_ast_node_for_get_init); \ -+ DYNSYM (isl_ast_node_for_get_iterator); \ -+ DYNSYM (isl_ast_node_free); \ -+ DYNSYM (isl_ast_node_get_annotation); \ -+ DYNSYM (isl_ast_node_get_type); \ -+ DYNSYM (isl_ast_node_if_get_cond); \ -+ DYNSYM (isl_ast_node_if_get_else); \ -+ DYNSYM (isl_ast_node_if_get_then); \ -+ DYNSYM (isl_ast_node_list_free); \ -+ DYNSYM (isl_ast_node_list_get_ast_node); \ -+ DYNSYM (isl_ast_node_list_n_ast_node); \ -+ DYNSYM (isl_ast_node_user_get_expr); \ -+ DYNSYM (isl_constraint_set_coefficient_val); \ -+ DYNSYM (isl_constraint_set_constant_val); \ -+ DYNSYM (isl_id_get_user); \ -+ DYNSYM (isl_local_space_get_ctx); \ -+ DYNSYM (isl_map_fix_val); \ -+ DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \ -+ DYNSYM (isl_printer_print_ast_node); \ -+ DYNSYM (isl_printer_print_str); \ -+ DYNSYM (isl_printer_set_output_format); \ -+ DYNSYM (isl_pw_aff_mod_val); \ -+ DYNSYM (isl_schedule_constraints_compute_schedule); \ -+ DYNSYM (isl_schedule_constraints_on_domain); \ -+ DYNSYM (isl_schedule_constraints_set_coincidence); \ -+ DYNSYM (isl_schedule_constraints_set_proximity); \ -+ DYNSYM (isl_schedule_constraints_set_validity); \ -+ DYNSYM (isl_set_get_dim_id); \ -+ DYNSYM (isl_set_max_val); \ -+ DYNSYM (isl_set_min_val); \ -+ DYNSYM (isl_set_params); \ -+ DYNSYM (isl_space_align_params); \ -+ DYNSYM (isl_space_map_from_domain_and_range); \ -+ DYNSYM (isl_space_set_tuple_name); \ -+ DYNSYM (isl_space_wrap); \ -+ DYNSYM (isl_union_map_from_domain_and_range); \ -+ DYNSYM (isl_union_map_range); \ -+ DYNSYM (isl_union_set_union); \ -+ DYNSYM (isl_union_set_universe); \ -+ DYNSYM (isl_val_2exp); \ -+ DYNSYM (isl_val_add_ui); \ -+ DYNSYM (isl_val_copy); \ -+ DYNSYM (isl_val_free); \ -+ DYNSYM (isl_val_get_num_gmp); \ -+ DYNSYM (isl_val_int_from_gmp); \ -+ DYNSYM (isl_val_int_from_si); \ -+ DYNSYM (isl_val_int_from_ui); \ -+ DYNSYM (isl_val_mul); \ -+ DYNSYM (isl_val_neg); \ -+ DYNSYM (isl_val_sub); -+ -+extern struct isl_pointers_s__ -+{ -+ bool inited; -+ void *h; -+#define DYNSYM(x) __typeof (x) *p_##x -+ DYNSYMS -+#undef DYNSYM -+} isl_pointers__; -+ -+#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si) -+#define isl_aff_free (*isl_pointers__.p_isl_aff_free) -+#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space) -+#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si) -+#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si) -+#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain) -+#define isl_band_free (*isl_pointers__.p_isl_band_free) -+#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children) -+#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule) -+#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children) -+#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free) -+#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band) -+#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx) -+#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band) -+#ifdef HAVE_ISL_SCHED_CONSTRAINTS_COMPUTE_SCHEDULE -+#define isl_band_member_is_coincident (*isl_pointers__.p_isl_band_member_is_coincident) -+#else -+#define isl_band_member_is_zero_distance (*isl_pointers__.p_isl_band_member_is_zero_distance) -+#endif -+#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member) -+#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint) -+#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out) -+#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe) -+#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si) -+#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si) -+#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc) -+#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free) -+#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc) -+#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc) -+#define isl_id_copy (*isl_pointers__.p_isl_id_copy) -+#define isl_id_free (*isl_pointers__.p_isl_id_free) -+#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc) -+#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy) -+#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free) -+#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space) -+#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range) -+#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint) -+#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims) -+#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params) -+#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range) -+#define isl_map_copy (*isl_pointers__.p_isl_map_copy) -+#define isl_map_dim (*isl_pointers__.p_isl_map_dim) -+#define isl_map_dump (*isl_pointers__.p_isl_map_dump) -+#define isl_map_equate (*isl_pointers__.p_isl_map_equate) -+#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si) -+#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product) -+#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product) -+#define isl_map_free (*isl_pointers__.p_isl_map_free) -+#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map) -+#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff) -+#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map) -+#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx) -+#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space) -+#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id) -+#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims) -+#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect) -+#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain) -+#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range) -+#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty) -+#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge) -+#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le) -+#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out) -+#define isl_map_range (*isl_pointers__.p_isl_map_range) -+#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id) -+#define isl_map_universe (*isl_pointers__.p_isl_map_universe) -+#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error) -+#define isl_options_set_schedule_fuse (*isl_pointers__.p_isl_options_set_schedule_fuse) -+#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term) -+#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth) -+#define isl_printer_free (*isl_pointers__.p_isl_printer_free) -+#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff) -+#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint) -+#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map) -+#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set) -+#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file) -+#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add) -+#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc) -+#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy) -+#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set) -+#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free) -+#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff) -+#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set) -+#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set) -+#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst) -+#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set) -+#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set) -+#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul) -+#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set) -+#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set) -+#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id) -+#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub) -+#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set) -+#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free) -+#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest) -+#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint) -+#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims) -+#define isl_set_apply (*isl_pointers__.p_isl_set_apply) -+#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce) -+#define isl_set_copy (*isl_pointers__.p_isl_set_copy) -+#define isl_set_dim (*isl_pointers__.p_isl_set_dim) -+#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si) -+#define isl_set_free (*isl_pointers__.p_isl_set_free) -+#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space) -+#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id) -+#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect) -+#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty) -+#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim) -+#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe) -+#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out) -+#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id) -+#define isl_set_universe (*isl_pointers__.p_isl_set_universe) -+#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims) -+#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc) -+#define isl_space_copy (*isl_pointers__.p_isl_space_copy) -+#define isl_space_dim (*isl_pointers__.p_isl_space_dim) -+#define isl_space_domain (*isl_pointers__.p_isl_space_domain) -+#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id) -+#define isl_space_free (*isl_pointers__.p_isl_space_free) -+#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain) -+#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id) -+#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc) -+#define isl_space_range (*isl_pointers__.p_isl_space_range) -+#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc) -+#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id) -+#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id) -+#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map) -+#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params) -+#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain) -+#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range) -+#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow) -+#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy) -+#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty) -+#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product) -+#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map) -+#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free) -+#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map) -+#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx) -+#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space) -+#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain) -+#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range) -+#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain) -+#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty) -+#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract) -+#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union) -+#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set) -+#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule) -+#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy) -+#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty) -+#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set) -+#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val) -+#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val) -+#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx) -+#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val) -+#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule) -+#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free) -+#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context) -+#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx) -+#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule) -+#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space) -+#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for) -+#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options) -+#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free) -+#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val) -+#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx) -+#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id) -+#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg) -+#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg) -+#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type) -+#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type) -+#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val) -+#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub) -+#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children) -+#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body) -+#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond) -+#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc) -+#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init) -+#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator) -+#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free) -+#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation) -+#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type) -+#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond) -+#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else) -+#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then) -+#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free) -+#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node) -+#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node) -+#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr) -+#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val) -+#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val) -+#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user) -+#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx) -+#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val) -+#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound) -+#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node) -+#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str) -+#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format) -+#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val) -+#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule) -+#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain) -+#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence) -+#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity) -+#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity) -+#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id) -+#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val) -+#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val) -+#define isl_set_params (*isl_pointers__.p_isl_set_params) -+#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params) -+#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range) -+#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name) -+#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap) -+#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range) -+#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range) -+#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union) -+#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe) -+#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp) -+#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui) -+#define isl_val_copy (*isl_pointers__.p_isl_val_copy) -+#define isl_val_free (*isl_pointers__.p_isl_val_free) -+#define isl_val_get_num_gmp (*isl_pointers__.p_isl_val_get_num_gmp) -+#define isl_val_int_from_gmp (*isl_pointers__.p_isl_val_int_from_gmp) -+#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si) -+#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui) -+#define isl_val_mul (*isl_pointers__.p_isl_val_mul) -+#define isl_val_neg (*isl_pointers__.p_isl_val_neg) -+#define isl_val_sub (*isl_pointers__.p_isl_val_sub) -+ - typedef struct poly_dr *poly_dr_p; - - typedef struct poly_bb *poly_bb_p; ---- a/gcc/graphite.c.jj 2012-12-13 11:31:00.000000000 +0100 -+++ b/gcc/graphite.c 2012-12-14 13:40:44.155136961 +0100 -@@ -90,6 +90,34 @@ along with GCC; see the file COPYING3. - #include "graphite-isl-ast-to-gimple.h" - #include "graphite-sese-to-poly.h" - -+__typeof (isl_pointers__) isl_pointers__; -+ -+static bool -+init_isl_pointers (void) -+{ -+ void *h; -+ -+ if (isl_pointers__.inited) -+ return isl_pointers__.h != NULL; -+ h = dlopen ("libisl.so.13", RTLD_LAZY); -+ isl_pointers__.h = h; -+ if (h == NULL) -+ return false; -+#define DYNSYM(x) \ -+ do \ -+ { \ -+ union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \ -+ u.q = dlsym (h, #x); \ -+ if (u.q == NULL) \ -+ return false; \ -+ isl_pointers__.p_##x = u.p; \ -+ } \ -+ while (0) -+ DYNSYMS -+#undef DYNSYM -+ return true; -+} -+ - /* Print global statistics to FILE. */ - - static void -@@ -285,6 +313,15 @@ graphite_transform_loops (void) - if (parallelized_function_p (cfun->decl)) - return; - -+ if (number_of_loops (cfun) <= 1) -+ return; -+ -+ if (!init_isl_pointers ()) -+ { -+ sorry ("Graphite loop optimizations cannot be used"); -+ return; -+ } -+ - ctx = isl_ctx_alloc (); - isl_options_set_on_error (ctx, ISL_ON_ERROR_ABORT); - if (!graphite_initialize (ctx)) diff --git a/main/gcc/074_all_gcc6_isl-dl.patch b/main/gcc/074_all_gcc6_isl-dl.patch new file mode 100644 index 0000000000..50f7c803bc --- /dev/null +++ b/main/gcc/074_all_gcc6_isl-dl.patch @@ -0,0 +1,590 @@ +dlopen cloog-isl library rather than link to it directly. This prevents +cloog upgrades that change the soname from breaking the compiler. + +http://pkgs.fedoraproject.org/cgit/rpms/gcc.git/plain/gcc6-isl-dl.patch + +--- a/gcc/Makefile.in.jj 2015-06-06 10:00:25.000000000 +0200 ++++ b/gcc/Makefile.in 2015-11-04 14:56:02.643536437 +0100 +@@ -1013,7 +1013,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) + # and the system's installed libraries. + LIBS = @LIBS@ libcommon.a $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBBACKTRACE) \ + $(LIBIBERTY) $(LIBDECNUMBER) $(HOST_LIBS) +-BACKENDLIBS = $(ISLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ ++BACKENDLIBS = $(if $(ISLLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ + $(ZLIB) + # Any system libraries needed just for GNAT. + SYSLIBS = @GNAT_LIBEXC@ +@@ -2058,6 +2058,15 @@ $(out_object_file): $(out_file) + $(common_out_object_file): $(common_out_file) + $(COMPILE) $< + $(POSTCOMPILE) ++ ++graphite%.o : \ ++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) ++graphite.o : \ ++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS)) ++graphite%.o : \ ++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) ++graphite.o : \ ++ ALL_CXXFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CXXFLAGS)) + # + # Generate header and source files from the machine description, + # and compile them. +--- a/gcc/graphite.h.jj 2016-01-27 12:44:06.000000000 +0100 ++++ b/gcc/graphite.h 2016-01-27 13:26:38.309876856 +0100 +@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. + #include + #include + #include ++#include + + #ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS + /* isl 0.15 or later. */ +@@ -47,6 +48,494 @@ along with GCC; see the file COPYING3. + # define isl_stat_ok 0 + #endif + ++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS ++#define DYNSYM_SCHEDULE_FUSE DYNSYM (isl_options_set_schedule_serialize_sccs) ++#define DYNSYM_SET_YAML_STYLE DYNSYM (isl_printer_set_yaml_style); ++#else ++#define DYNSYM_SCHEDULE_FUSE DYNSYM (isl_options_set_schedule_fuse) ++#define DYNSYM_SET_YAML_STYLE ++#endif ++ ++#define DYNSYMS \ ++ DYNSYM (isl_aff_add_coefficient_si); \ ++ DYNSYM (isl_aff_free); \ ++ DYNSYM (isl_aff_get_space); \ ++ DYNSYM (isl_aff_set_coefficient_si); \ ++ DYNSYM (isl_aff_set_constant_si); \ ++ DYNSYM (isl_aff_zero_on_domain); \ ++ DYNSYM (isl_band_free); \ ++ DYNSYM (isl_band_get_children); \ ++ DYNSYM (isl_band_get_partial_schedule); \ ++ DYNSYM (isl_band_has_children); \ ++ DYNSYM (isl_band_list_free); \ ++ DYNSYM (isl_band_list_get_band); \ ++ DYNSYM (isl_band_list_get_ctx); \ ++ DYNSYM (isl_band_list_n_band); \ ++ DYNSYM (isl_band_n_member); \ ++ DYNSYM (isl_basic_map_add_constraint); \ ++ DYNSYM (isl_basic_map_project_out); \ ++ DYNSYM (isl_basic_map_universe); \ ++ DYNSYM (isl_constraint_set_coefficient_si); \ ++ DYNSYM (isl_constraint_set_constant_si); \ ++ DYNSYM (isl_ctx_alloc); \ ++ DYNSYM (isl_ctx_free); \ ++ DYNSYM (isl_equality_alloc); \ ++ DYNSYM (isl_id_alloc); \ ++ DYNSYM (isl_id_copy); \ ++ DYNSYM (isl_id_free); \ ++ DYNSYM (isl_inequality_alloc); \ ++ DYNSYM (isl_local_space_copy); \ ++ DYNSYM (isl_local_space_free); \ ++ DYNSYM (isl_local_space_from_space); \ ++ DYNSYM (isl_local_space_range); \ ++ DYNSYM (isl_map_add_constraint); \ ++ DYNSYM (isl_map_add_dims); \ ++ DYNSYM (isl_map_align_params); \ ++ DYNSYM (isl_map_apply_range); \ ++ DYNSYM (isl_map_copy); \ ++ DYNSYM (isl_map_dim); \ ++ DYNSYM (isl_map_dump); \ ++ DYNSYM (isl_map_equate); \ ++ DYNSYM (isl_map_fix_si); \ ++ DYNSYM (isl_map_flat_product); \ ++ DYNSYM (isl_map_flat_range_product); \ ++ DYNSYM (isl_map_free); \ ++ DYNSYM (isl_map_from_basic_map); \ ++ DYNSYM (isl_map_from_pw_aff); \ ++ DYNSYM (isl_map_from_union_map); \ ++ DYNSYM (isl_map_get_ctx); \ ++ DYNSYM (isl_map_get_space); \ ++ DYNSYM (isl_map_get_tuple_id); \ ++ DYNSYM (isl_map_insert_dims); \ ++ DYNSYM (isl_map_intersect); \ ++ DYNSYM (isl_map_intersect_domain); \ ++ DYNSYM (isl_map_intersect_range); \ ++ DYNSYM (isl_map_is_empty); \ ++ DYNSYM (isl_map_lex_ge); \ ++ DYNSYM (isl_map_lex_le); \ ++ DYNSYM (isl_map_n_out); \ ++ DYNSYM (isl_map_range); \ ++ DYNSYM (isl_map_set_tuple_id); \ ++ DYNSYM (isl_map_universe); \ ++ DYNSYM (isl_options_set_on_error); \ ++ DYNSYM_SCHEDULE_FUSE; \ ++ DYNSYM_SET_YAML_STYLE \ ++ DYNSYM (isl_options_set_schedule_max_constant_term); \ ++ DYNSYM (isl_options_set_schedule_maximize_band_depth); \ ++ DYNSYM (isl_printer_free); \ ++ DYNSYM (isl_printer_print_aff); \ ++ DYNSYM (isl_printer_print_constraint); \ ++ DYNSYM (isl_printer_print_map); \ ++ DYNSYM (isl_printer_print_set); \ ++ DYNSYM (isl_printer_to_file); \ ++ DYNSYM (isl_pw_aff_add); \ ++ DYNSYM (isl_pw_aff_alloc); \ ++ DYNSYM (isl_pw_aff_copy); \ ++ DYNSYM (isl_pw_aff_eq_set); \ ++ DYNSYM (isl_pw_aff_free); \ ++ DYNSYM (isl_pw_aff_from_aff); \ ++ DYNSYM (isl_pw_aff_ge_set); \ ++ DYNSYM (isl_pw_aff_gt_set); \ ++ DYNSYM (isl_pw_aff_is_cst); \ ++ DYNSYM (isl_pw_aff_le_set); \ ++ DYNSYM (isl_pw_aff_lt_set); \ ++ DYNSYM (isl_pw_aff_mul); \ ++ DYNSYM (isl_pw_aff_ne_set); \ ++ DYNSYM (isl_pw_aff_nonneg_set); \ ++ DYNSYM (isl_pw_aff_set_tuple_id); \ ++ DYNSYM (isl_pw_aff_sub); \ ++ DYNSYM (isl_pw_aff_zero_set); \ ++ DYNSYM (isl_schedule_free); \ ++ DYNSYM (isl_schedule_get_band_forest); \ ++ DYNSYM (isl_set_add_constraint); \ ++ DYNSYM (isl_set_add_dims); \ ++ DYNSYM (isl_set_apply); \ ++ DYNSYM (isl_set_coalesce); \ ++ DYNSYM (isl_set_copy); \ ++ DYNSYM (isl_set_dim); \ ++ DYNSYM (isl_set_fix_si); \ ++ DYNSYM (isl_set_free); \ ++ DYNSYM (isl_set_get_space); \ ++ DYNSYM (isl_set_get_tuple_id); \ ++ DYNSYM (isl_set_intersect); \ ++ DYNSYM (isl_set_is_empty); \ ++ DYNSYM (isl_set_n_dim); \ ++ DYNSYM (isl_set_nat_universe); \ ++ DYNSYM (isl_set_project_out); \ ++ DYNSYM (isl_set_set_tuple_id); \ ++ DYNSYM (isl_set_universe); \ ++ DYNSYM (isl_space_add_dims); \ ++ DYNSYM (isl_space_alloc); \ ++ DYNSYM (isl_space_copy); \ ++ DYNSYM (isl_space_dim); \ ++ DYNSYM (isl_space_domain); \ ++ DYNSYM (isl_space_find_dim_by_id); \ ++ DYNSYM (isl_space_free); \ ++ DYNSYM (isl_space_from_domain); \ ++ DYNSYM (isl_space_get_tuple_id); \ ++ DYNSYM (isl_space_params_alloc); \ ++ DYNSYM (isl_space_range); \ ++ DYNSYM (isl_space_set_alloc); \ ++ DYNSYM (isl_space_set_dim_id); \ ++ DYNSYM (isl_space_set_tuple_id); \ ++ DYNSYM (isl_union_map_add_map); \ ++ DYNSYM (isl_union_map_align_params); \ ++ DYNSYM (isl_union_map_apply_domain); \ ++ DYNSYM (isl_union_map_apply_range); \ ++ DYNSYM (isl_union_map_compute_flow); \ ++ DYNSYM (isl_union_map_copy); \ ++ DYNSYM (isl_union_map_empty); \ ++ DYNSYM (isl_union_map_flat_range_product); \ ++ DYNSYM (isl_union_map_foreach_map); \ ++ DYNSYM (isl_union_map_free); \ ++ DYNSYM (isl_union_map_from_map); \ ++ DYNSYM (isl_union_map_get_ctx); \ ++ DYNSYM (isl_union_map_get_space); \ ++ DYNSYM (isl_union_map_gist_domain); \ ++ DYNSYM (isl_union_map_gist_range); \ ++ DYNSYM (isl_union_map_intersect_domain); \ ++ DYNSYM (isl_union_map_is_empty); \ ++ DYNSYM (isl_union_map_subtract); \ ++ DYNSYM (isl_union_map_union); \ ++ DYNSYM (isl_union_set_add_set); \ ++ DYNSYM (isl_union_set_compute_schedule); \ ++ DYNSYM (isl_union_set_copy); \ ++ DYNSYM (isl_union_set_empty); \ ++ DYNSYM (isl_union_set_from_set); \ ++ DYNSYM (isl_aff_add_constant_val); \ ++ DYNSYM (isl_aff_get_coefficient_val); \ ++ DYNSYM (isl_aff_get_ctx); \ ++ DYNSYM (isl_aff_mod_val); \ ++ DYNSYM (isl_ast_build_ast_from_schedule); \ ++ DYNSYM (isl_ast_build_free); \ ++ DYNSYM (isl_ast_build_from_context); \ ++ DYNSYM (isl_ast_build_get_ctx); \ ++ DYNSYM (isl_ast_build_get_schedule); \ ++ DYNSYM (isl_ast_build_get_schedule_space); \ ++ DYNSYM (isl_ast_build_set_before_each_for); \ ++ DYNSYM (isl_ast_build_set_options); \ ++ DYNSYM (isl_ast_expr_free); \ ++ DYNSYM (isl_ast_expr_from_val); \ ++ DYNSYM (isl_ast_expr_get_ctx); \ ++ DYNSYM (isl_ast_expr_get_id); \ ++ DYNSYM (isl_ast_expr_get_op_arg); \ ++ DYNSYM (isl_ast_expr_get_op_n_arg); \ ++ DYNSYM (isl_ast_expr_get_op_type); \ ++ DYNSYM (isl_ast_expr_get_type); \ ++ DYNSYM (isl_ast_expr_get_val); \ ++ DYNSYM (isl_ast_expr_sub); \ ++ DYNSYM (isl_ast_node_block_get_children); \ ++ DYNSYM (isl_ast_node_for_get_body); \ ++ DYNSYM (isl_ast_node_for_get_cond); \ ++ DYNSYM (isl_ast_node_for_get_inc); \ ++ DYNSYM (isl_ast_node_for_get_init); \ ++ DYNSYM (isl_ast_node_for_get_iterator); \ ++ DYNSYM (isl_ast_node_free); \ ++ DYNSYM (isl_ast_node_get_annotation); \ ++ DYNSYM (isl_ast_node_get_type); \ ++ DYNSYM (isl_ast_node_if_get_cond); \ ++ DYNSYM (isl_ast_node_if_get_else); \ ++ DYNSYM (isl_ast_node_if_get_then); \ ++ DYNSYM (isl_ast_node_list_free); \ ++ DYNSYM (isl_ast_node_list_get_ast_node); \ ++ DYNSYM (isl_ast_node_list_n_ast_node); \ ++ DYNSYM (isl_ast_node_user_get_expr); \ ++ DYNSYM (isl_constraint_set_coefficient_val); \ ++ DYNSYM (isl_constraint_set_constant_val); \ ++ DYNSYM (isl_id_get_user); \ ++ DYNSYM (isl_local_space_get_ctx); \ ++ DYNSYM (isl_map_fix_val); \ ++ DYNSYM (isl_options_set_ast_build_atomic_upper_bound); \ ++ DYNSYM (isl_printer_print_ast_node); \ ++ DYNSYM (isl_printer_print_str); \ ++ DYNSYM (isl_printer_set_output_format); \ ++ DYNSYM (isl_pw_aff_mod_val); \ ++ DYNSYM (isl_schedule_constraints_compute_schedule); \ ++ DYNSYM (isl_schedule_constraints_on_domain); \ ++ DYNSYM (isl_schedule_constraints_set_coincidence); \ ++ DYNSYM (isl_schedule_constraints_set_proximity); \ ++ DYNSYM (isl_schedule_constraints_set_validity); \ ++ DYNSYM (isl_set_get_dim_id); \ ++ DYNSYM (isl_set_max_val); \ ++ DYNSYM (isl_set_min_val); \ ++ DYNSYM (isl_set_params); \ ++ DYNSYM (isl_space_align_params); \ ++ DYNSYM (isl_space_map_from_domain_and_range); \ ++ DYNSYM (isl_space_set_tuple_name); \ ++ DYNSYM (isl_space_wrap); \ ++ DYNSYM (isl_union_map_from_domain_and_range); \ ++ DYNSYM (isl_union_map_range); \ ++ DYNSYM (isl_union_set_union); \ ++ DYNSYM (isl_union_set_universe); \ ++ DYNSYM (isl_val_2exp); \ ++ DYNSYM (isl_val_add_ui); \ ++ DYNSYM (isl_val_copy); \ ++ DYNSYM (isl_val_free); \ ++ DYNSYM (isl_val_get_num_gmp); \ ++ DYNSYM (isl_val_int_from_gmp); \ ++ DYNSYM (isl_val_int_from_si); \ ++ DYNSYM (isl_val_int_from_ui); \ ++ DYNSYM (isl_val_mul); \ ++ DYNSYM (isl_val_neg); \ ++ DYNSYM (isl_val_sub); \ ++ DYNSYM (isl_printer_print_union_map); \ ++ DYNSYM (isl_pw_aff_get_ctx); \ ++ DYNSYM (isl_val_is_int); \ ++ DYNSYM (isl_ctx_get_max_operations); \ ++ DYNSYM (isl_ctx_set_max_operations); \ ++ DYNSYM (isl_ctx_last_error); \ ++ DYNSYM (isl_ctx_reset_operations); \ ++ DYNSYM (isl_map_coalesce); \ ++ DYNSYM (isl_printer_print_schedule); \ ++ DYNSYM (isl_set_set_dim_id); \ ++ DYNSYM (isl_union_map_coalesce); ++ ++extern struct isl_pointers_s__ ++{ ++ bool inited; ++ void *h; ++#define DYNSYM(x) __typeof (x) *p_##x ++ DYNSYMS ++#undef DYNSYM ++} isl_pointers__; ++ ++#define isl_aff_add_coefficient_si (*isl_pointers__.p_isl_aff_add_coefficient_si) ++#define isl_aff_free (*isl_pointers__.p_isl_aff_free) ++#define isl_aff_get_space (*isl_pointers__.p_isl_aff_get_space) ++#define isl_aff_set_coefficient_si (*isl_pointers__.p_isl_aff_set_coefficient_si) ++#define isl_aff_set_constant_si (*isl_pointers__.p_isl_aff_set_constant_si) ++#define isl_aff_zero_on_domain (*isl_pointers__.p_isl_aff_zero_on_domain) ++#define isl_band_free (*isl_pointers__.p_isl_band_free) ++#define isl_band_get_children (*isl_pointers__.p_isl_band_get_children) ++#define isl_band_get_partial_schedule (*isl_pointers__.p_isl_band_get_partial_schedule) ++#define isl_band_has_children (*isl_pointers__.p_isl_band_has_children) ++#define isl_band_list_free (*isl_pointers__.p_isl_band_list_free) ++#define isl_band_list_get_band (*isl_pointers__.p_isl_band_list_get_band) ++#define isl_band_list_get_ctx (*isl_pointers__.p_isl_band_list_get_ctx) ++#define isl_band_list_n_band (*isl_pointers__.p_isl_band_list_n_band) ++#define isl_band_n_member (*isl_pointers__.p_isl_band_n_member) ++#define isl_basic_map_add_constraint (*isl_pointers__.p_isl_basic_map_add_constraint) ++#define isl_basic_map_project_out (*isl_pointers__.p_isl_basic_map_project_out) ++#define isl_basic_map_universe (*isl_pointers__.p_isl_basic_map_universe) ++#define isl_constraint_set_coefficient_si (*isl_pointers__.p_isl_constraint_set_coefficient_si) ++#define isl_constraint_set_constant_si (*isl_pointers__.p_isl_constraint_set_constant_si) ++#define isl_ctx_alloc (*isl_pointers__.p_isl_ctx_alloc) ++#define isl_ctx_free (*isl_pointers__.p_isl_ctx_free) ++#define isl_equality_alloc (*isl_pointers__.p_isl_equality_alloc) ++#define isl_id_alloc (*isl_pointers__.p_isl_id_alloc) ++#define isl_id_copy (*isl_pointers__.p_isl_id_copy) ++#define isl_id_free (*isl_pointers__.p_isl_id_free) ++#define isl_inequality_alloc (*isl_pointers__.p_isl_inequality_alloc) ++#define isl_local_space_copy (*isl_pointers__.p_isl_local_space_copy) ++#define isl_local_space_free (*isl_pointers__.p_isl_local_space_free) ++#define isl_local_space_from_space (*isl_pointers__.p_isl_local_space_from_space) ++#define isl_local_space_range (*isl_pointers__.p_isl_local_space_range) ++#define isl_map_add_constraint (*isl_pointers__.p_isl_map_add_constraint) ++#define isl_map_add_dims (*isl_pointers__.p_isl_map_add_dims) ++#define isl_map_align_params (*isl_pointers__.p_isl_map_align_params) ++#define isl_map_apply_range (*isl_pointers__.p_isl_map_apply_range) ++#define isl_map_copy (*isl_pointers__.p_isl_map_copy) ++#define isl_map_dim (*isl_pointers__.p_isl_map_dim) ++#define isl_map_dump (*isl_pointers__.p_isl_map_dump) ++#define isl_map_equate (*isl_pointers__.p_isl_map_equate) ++#define isl_map_fix_si (*isl_pointers__.p_isl_map_fix_si) ++#define isl_map_flat_product (*isl_pointers__.p_isl_map_flat_product) ++#define isl_map_flat_range_product (*isl_pointers__.p_isl_map_flat_range_product) ++#define isl_map_free (*isl_pointers__.p_isl_map_free) ++#define isl_map_from_basic_map (*isl_pointers__.p_isl_map_from_basic_map) ++#define isl_map_from_pw_aff (*isl_pointers__.p_isl_map_from_pw_aff) ++#define isl_map_from_union_map (*isl_pointers__.p_isl_map_from_union_map) ++#define isl_map_get_ctx (*isl_pointers__.p_isl_map_get_ctx) ++#define isl_map_get_space (*isl_pointers__.p_isl_map_get_space) ++#define isl_map_get_tuple_id (*isl_pointers__.p_isl_map_get_tuple_id) ++#define isl_map_insert_dims (*isl_pointers__.p_isl_map_insert_dims) ++#define isl_map_intersect (*isl_pointers__.p_isl_map_intersect) ++#define isl_map_intersect_domain (*isl_pointers__.p_isl_map_intersect_domain) ++#define isl_map_intersect_range (*isl_pointers__.p_isl_map_intersect_range) ++#define isl_map_is_empty (*isl_pointers__.p_isl_map_is_empty) ++#define isl_map_lex_ge (*isl_pointers__.p_isl_map_lex_ge) ++#define isl_map_lex_le (*isl_pointers__.p_isl_map_lex_le) ++#define isl_map_n_out (*isl_pointers__.p_isl_map_n_out) ++#define isl_map_range (*isl_pointers__.p_isl_map_range) ++#define isl_map_set_tuple_id (*isl_pointers__.p_isl_map_set_tuple_id) ++#define isl_map_universe (*isl_pointers__.p_isl_map_universe) ++#define isl_options_set_on_error (*isl_pointers__.p_isl_options_set_on_error) ++#ifdef HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS ++#define isl_options_set_schedule_serialize_sccs (*isl_pointers__.p_isl_options_set_schedule_serialize_sccs) ++#define isl_printer_set_yaml_style (*isl_pointers__.p_isl_printer_set_yaml_style) ++#else ++#define isl_options_set_schedule_fuse (*isl_pointers__.p_isl_options_set_schedule_fuse) ++#endif ++#define isl_options_set_schedule_max_constant_term (*isl_pointers__.p_isl_options_set_schedule_max_constant_term) ++#define isl_options_set_schedule_maximize_band_depth (*isl_pointers__.p_isl_options_set_schedule_maximize_band_depth) ++#define isl_printer_free (*isl_pointers__.p_isl_printer_free) ++#define isl_printer_print_aff (*isl_pointers__.p_isl_printer_print_aff) ++#define isl_printer_print_constraint (*isl_pointers__.p_isl_printer_print_constraint) ++#define isl_printer_print_map (*isl_pointers__.p_isl_printer_print_map) ++#define isl_printer_print_set (*isl_pointers__.p_isl_printer_print_set) ++#define isl_printer_to_file (*isl_pointers__.p_isl_printer_to_file) ++#define isl_pw_aff_add (*isl_pointers__.p_isl_pw_aff_add) ++#define isl_pw_aff_alloc (*isl_pointers__.p_isl_pw_aff_alloc) ++#define isl_pw_aff_copy (*isl_pointers__.p_isl_pw_aff_copy) ++#define isl_pw_aff_eq_set (*isl_pointers__.p_isl_pw_aff_eq_set) ++#define isl_pw_aff_free (*isl_pointers__.p_isl_pw_aff_free) ++#define isl_pw_aff_from_aff (*isl_pointers__.p_isl_pw_aff_from_aff) ++#define isl_pw_aff_ge_set (*isl_pointers__.p_isl_pw_aff_ge_set) ++#define isl_pw_aff_gt_set (*isl_pointers__.p_isl_pw_aff_gt_set) ++#define isl_pw_aff_is_cst (*isl_pointers__.p_isl_pw_aff_is_cst) ++#define isl_pw_aff_le_set (*isl_pointers__.p_isl_pw_aff_le_set) ++#define isl_pw_aff_lt_set (*isl_pointers__.p_isl_pw_aff_lt_set) ++#define isl_pw_aff_mul (*isl_pointers__.p_isl_pw_aff_mul) ++#define isl_pw_aff_ne_set (*isl_pointers__.p_isl_pw_aff_ne_set) ++#define isl_pw_aff_nonneg_set (*isl_pointers__.p_isl_pw_aff_nonneg_set) ++#define isl_pw_aff_set_tuple_id (*isl_pointers__.p_isl_pw_aff_set_tuple_id) ++#define isl_pw_aff_sub (*isl_pointers__.p_isl_pw_aff_sub) ++#define isl_pw_aff_zero_set (*isl_pointers__.p_isl_pw_aff_zero_set) ++#define isl_schedule_free (*isl_pointers__.p_isl_schedule_free) ++#define isl_schedule_get_band_forest (*isl_pointers__.p_isl_schedule_get_band_forest) ++#define isl_set_add_constraint (*isl_pointers__.p_isl_set_add_constraint) ++#define isl_set_add_dims (*isl_pointers__.p_isl_set_add_dims) ++#define isl_set_apply (*isl_pointers__.p_isl_set_apply) ++#define isl_set_coalesce (*isl_pointers__.p_isl_set_coalesce) ++#define isl_set_copy (*isl_pointers__.p_isl_set_copy) ++#define isl_set_dim (*isl_pointers__.p_isl_set_dim) ++#define isl_set_fix_si (*isl_pointers__.p_isl_set_fix_si) ++#define isl_set_free (*isl_pointers__.p_isl_set_free) ++#define isl_set_get_space (*isl_pointers__.p_isl_set_get_space) ++#define isl_set_get_tuple_id (*isl_pointers__.p_isl_set_get_tuple_id) ++#define isl_set_intersect (*isl_pointers__.p_isl_set_intersect) ++#define isl_set_is_empty (*isl_pointers__.p_isl_set_is_empty) ++#define isl_set_n_dim (*isl_pointers__.p_isl_set_n_dim) ++#define isl_set_nat_universe (*isl_pointers__.p_isl_set_nat_universe) ++#define isl_set_project_out (*isl_pointers__.p_isl_set_project_out) ++#define isl_set_set_tuple_id (*isl_pointers__.p_isl_set_set_tuple_id) ++#define isl_set_universe (*isl_pointers__.p_isl_set_universe) ++#define isl_space_add_dims (*isl_pointers__.p_isl_space_add_dims) ++#define isl_space_alloc (*isl_pointers__.p_isl_space_alloc) ++#define isl_space_copy (*isl_pointers__.p_isl_space_copy) ++#define isl_space_dim (*isl_pointers__.p_isl_space_dim) ++#define isl_space_domain (*isl_pointers__.p_isl_space_domain) ++#define isl_space_find_dim_by_id (*isl_pointers__.p_isl_space_find_dim_by_id) ++#define isl_space_free (*isl_pointers__.p_isl_space_free) ++#define isl_space_from_domain (*isl_pointers__.p_isl_space_from_domain) ++#define isl_space_get_tuple_id (*isl_pointers__.p_isl_space_get_tuple_id) ++#define isl_space_params_alloc (*isl_pointers__.p_isl_space_params_alloc) ++#define isl_space_range (*isl_pointers__.p_isl_space_range) ++#define isl_space_set_alloc (*isl_pointers__.p_isl_space_set_alloc) ++#define isl_space_set_dim_id (*isl_pointers__.p_isl_space_set_dim_id) ++#define isl_space_set_tuple_id (*isl_pointers__.p_isl_space_set_tuple_id) ++#define isl_union_map_add_map (*isl_pointers__.p_isl_union_map_add_map) ++#define isl_union_map_align_params (*isl_pointers__.p_isl_union_map_align_params) ++#define isl_union_map_apply_domain (*isl_pointers__.p_isl_union_map_apply_domain) ++#define isl_union_map_apply_range (*isl_pointers__.p_isl_union_map_apply_range) ++#define isl_union_map_compute_flow (*isl_pointers__.p_isl_union_map_compute_flow) ++#define isl_union_map_copy (*isl_pointers__.p_isl_union_map_copy) ++#define isl_union_map_empty (*isl_pointers__.p_isl_union_map_empty) ++#define isl_union_map_flat_range_product (*isl_pointers__.p_isl_union_map_flat_range_product) ++#define isl_union_map_foreach_map (*isl_pointers__.p_isl_union_map_foreach_map) ++#define isl_union_map_free (*isl_pointers__.p_isl_union_map_free) ++#define isl_union_map_from_map (*isl_pointers__.p_isl_union_map_from_map) ++#define isl_union_map_get_ctx (*isl_pointers__.p_isl_union_map_get_ctx) ++#define isl_union_map_get_space (*isl_pointers__.p_isl_union_map_get_space) ++#define isl_union_map_gist_domain (*isl_pointers__.p_isl_union_map_gist_domain) ++#define isl_union_map_gist_range (*isl_pointers__.p_isl_union_map_gist_range) ++#define isl_union_map_intersect_domain (*isl_pointers__.p_isl_union_map_intersect_domain) ++#define isl_union_map_is_empty (*isl_pointers__.p_isl_union_map_is_empty) ++#define isl_union_map_subtract (*isl_pointers__.p_isl_union_map_subtract) ++#define isl_union_map_union (*isl_pointers__.p_isl_union_map_union) ++#define isl_union_set_add_set (*isl_pointers__.p_isl_union_set_add_set) ++#define isl_union_set_compute_schedule (*isl_pointers__.p_isl_union_set_compute_schedule) ++#define isl_union_set_copy (*isl_pointers__.p_isl_union_set_copy) ++#define isl_union_set_empty (*isl_pointers__.p_isl_union_set_empty) ++#define isl_union_set_from_set (*isl_pointers__.p_isl_union_set_from_set) ++#define isl_aff_add_constant_val (*isl_pointers__.p_isl_aff_add_constant_val) ++#define isl_aff_get_coefficient_val (*isl_pointers__.p_isl_aff_get_coefficient_val) ++#define isl_aff_get_ctx (*isl_pointers__.p_isl_aff_get_ctx) ++#define isl_aff_mod_val (*isl_pointers__.p_isl_aff_mod_val) ++#define isl_ast_build_ast_from_schedule (*isl_pointers__.p_isl_ast_build_ast_from_schedule) ++#define isl_ast_build_free (*isl_pointers__.p_isl_ast_build_free) ++#define isl_ast_build_from_context (*isl_pointers__.p_isl_ast_build_from_context) ++#define isl_ast_build_get_ctx (*isl_pointers__.p_isl_ast_build_get_ctx) ++#define isl_ast_build_get_schedule (*isl_pointers__.p_isl_ast_build_get_schedule) ++#define isl_ast_build_get_schedule_space (*isl_pointers__.p_isl_ast_build_get_schedule_space) ++#define isl_ast_build_set_before_each_for (*isl_pointers__.p_isl_ast_build_set_before_each_for) ++#define isl_ast_build_set_options (*isl_pointers__.p_isl_ast_build_set_options) ++#define isl_ast_expr_free (*isl_pointers__.p_isl_ast_expr_free) ++#define isl_ast_expr_from_val (*isl_pointers__.p_isl_ast_expr_from_val) ++#define isl_ast_expr_get_ctx (*isl_pointers__.p_isl_ast_expr_get_ctx) ++#define isl_ast_expr_get_id (*isl_pointers__.p_isl_ast_expr_get_id) ++#define isl_ast_expr_get_op_arg (*isl_pointers__.p_isl_ast_expr_get_op_arg) ++#define isl_ast_expr_get_op_n_arg (*isl_pointers__.p_isl_ast_expr_get_op_n_arg) ++#define isl_ast_expr_get_op_type (*isl_pointers__.p_isl_ast_expr_get_op_type) ++#define isl_ast_expr_get_type (*isl_pointers__.p_isl_ast_expr_get_type) ++#define isl_ast_expr_get_val (*isl_pointers__.p_isl_ast_expr_get_val) ++#define isl_ast_expr_sub (*isl_pointers__.p_isl_ast_expr_sub) ++#define isl_ast_node_block_get_children (*isl_pointers__.p_isl_ast_node_block_get_children) ++#define isl_ast_node_for_get_body (*isl_pointers__.p_isl_ast_node_for_get_body) ++#define isl_ast_node_for_get_cond (*isl_pointers__.p_isl_ast_node_for_get_cond) ++#define isl_ast_node_for_get_inc (*isl_pointers__.p_isl_ast_node_for_get_inc) ++#define isl_ast_node_for_get_init (*isl_pointers__.p_isl_ast_node_for_get_init) ++#define isl_ast_node_for_get_iterator (*isl_pointers__.p_isl_ast_node_for_get_iterator) ++#define isl_ast_node_free (*isl_pointers__.p_isl_ast_node_free) ++#define isl_ast_node_get_annotation (*isl_pointers__.p_isl_ast_node_get_annotation) ++#define isl_ast_node_get_type (*isl_pointers__.p_isl_ast_node_get_type) ++#define isl_ast_node_if_get_cond (*isl_pointers__.p_isl_ast_node_if_get_cond) ++#define isl_ast_node_if_get_else (*isl_pointers__.p_isl_ast_node_if_get_else) ++#define isl_ast_node_if_get_then (*isl_pointers__.p_isl_ast_node_if_get_then) ++#define isl_ast_node_list_free (*isl_pointers__.p_isl_ast_node_list_free) ++#define isl_ast_node_list_get_ast_node (*isl_pointers__.p_isl_ast_node_list_get_ast_node) ++#define isl_ast_node_list_n_ast_node (*isl_pointers__.p_isl_ast_node_list_n_ast_node) ++#define isl_ast_node_user_get_expr (*isl_pointers__.p_isl_ast_node_user_get_expr) ++#define isl_constraint_set_coefficient_val (*isl_pointers__.p_isl_constraint_set_coefficient_val) ++#define isl_constraint_set_constant_val (*isl_pointers__.p_isl_constraint_set_constant_val) ++#define isl_id_get_user (*isl_pointers__.p_isl_id_get_user) ++#define isl_local_space_get_ctx (*isl_pointers__.p_isl_local_space_get_ctx) ++#define isl_map_fix_val (*isl_pointers__.p_isl_map_fix_val) ++#define isl_options_set_ast_build_atomic_upper_bound (*isl_pointers__.p_isl_options_set_ast_build_atomic_upper_bound) ++#define isl_printer_print_ast_node (*isl_pointers__.p_isl_printer_print_ast_node) ++#define isl_printer_print_str (*isl_pointers__.p_isl_printer_print_str) ++#define isl_printer_set_output_format (*isl_pointers__.p_isl_printer_set_output_format) ++#define isl_pw_aff_mod_val (*isl_pointers__.p_isl_pw_aff_mod_val) ++#define isl_schedule_constraints_compute_schedule (*isl_pointers__.p_isl_schedule_constraints_compute_schedule) ++#define isl_schedule_constraints_on_domain (*isl_pointers__.p_isl_schedule_constraints_on_domain) ++#define isl_schedule_constraints_set_coincidence (*isl_pointers__.p_isl_schedule_constraints_set_coincidence) ++#define isl_schedule_constraints_set_proximity (*isl_pointers__.p_isl_schedule_constraints_set_proximity) ++#define isl_schedule_constraints_set_validity (*isl_pointers__.p_isl_schedule_constraints_set_validity) ++#define isl_set_get_dim_id (*isl_pointers__.p_isl_set_get_dim_id) ++#define isl_set_max_val (*isl_pointers__.p_isl_set_max_val) ++#define isl_set_min_val (*isl_pointers__.p_isl_set_min_val) ++#define isl_set_params (*isl_pointers__.p_isl_set_params) ++#define isl_space_align_params (*isl_pointers__.p_isl_space_align_params) ++#define isl_space_map_from_domain_and_range (*isl_pointers__.p_isl_space_map_from_domain_and_range) ++#define isl_space_set_tuple_name (*isl_pointers__.p_isl_space_set_tuple_name) ++#define isl_space_wrap (*isl_pointers__.p_isl_space_wrap) ++#define isl_union_map_from_domain_and_range (*isl_pointers__.p_isl_union_map_from_domain_and_range) ++#define isl_union_map_range (*isl_pointers__.p_isl_union_map_range) ++#define isl_union_set_union (*isl_pointers__.p_isl_union_set_union) ++#define isl_union_set_universe (*isl_pointers__.p_isl_union_set_universe) ++#define isl_val_2exp (*isl_pointers__.p_isl_val_2exp) ++#define isl_val_add_ui (*isl_pointers__.p_isl_val_add_ui) ++#define isl_val_copy (*isl_pointers__.p_isl_val_copy) ++#define isl_val_free (*isl_pointers__.p_isl_val_free) ++#define isl_val_get_num_gmp (*isl_pointers__.p_isl_val_get_num_gmp) ++#define isl_val_int_from_gmp (*isl_pointers__.p_isl_val_int_from_gmp) ++#define isl_val_int_from_si (*isl_pointers__.p_isl_val_int_from_si) ++#define isl_val_int_from_ui (*isl_pointers__.p_isl_val_int_from_ui) ++#define isl_val_mul (*isl_pointers__.p_isl_val_mul) ++#define isl_val_neg (*isl_pointers__.p_isl_val_neg) ++#define isl_val_sub (*isl_pointers__.p_isl_val_sub) ++#define isl_printer_print_union_map (*isl_pointers__.p_isl_printer_print_union_map) ++#define isl_pw_aff_get_ctx (*isl_pointers__.p_isl_pw_aff_get_ctx) ++#define isl_val_is_int (*isl_pointers__.p_isl_val_is_int) ++#define isl_ctx_get_max_operations (*isl_pointers__.p_isl_ctx_get_max_operations) ++#define isl_ctx_set_max_operations (*isl_pointers__.p_isl_ctx_set_max_operations) ++#define isl_ctx_last_error (*isl_pointers__.p_isl_ctx_last_error) ++#define isl_ctx_reset_operations (*isl_pointers__.p_isl_ctx_reset_operations) ++#define isl_map_coalesce (*isl_pointers__.p_isl_map_coalesce) ++#define isl_printer_print_schedule (*isl_pointers__.p_isl_printer_print_schedule) ++#define isl_set_set_dim_id (*isl_pointers__.p_isl_set_set_dim_id) ++#define isl_union_map_coalesce (*isl_pointers__.p_isl_union_map_coalesce) ++ + typedef struct poly_dr *poly_dr_p; + + typedef struct poly_bb *poly_bb_p; +--- a/gcc/graphite.c.jj 2015-11-04 14:15:32.000000000 +0100 ++++ b/gcc/graphite.c 2015-11-04 14:56:02.645536409 +0100 +@@ -54,6 +54,34 @@ along with GCC; see the file COPYING3. + #include "tree-cfgcleanup.h" + #include "graphite.h" + ++__typeof (isl_pointers__) isl_pointers__; ++ ++static bool ++init_isl_pointers (void) ++{ ++ void *h; ++ ++ if (isl_pointers__.inited) ++ return isl_pointers__.h != NULL; ++ h = dlopen ("libisl.so.13", RTLD_LAZY); ++ isl_pointers__.h = h; ++ if (h == NULL) ++ return false; ++#define DYNSYM(x) \ ++ do \ ++ { \ ++ union { __typeof (isl_pointers__.p_##x) p; void *q; } u; \ ++ u.q = dlsym (h, #x); \ ++ if (u.q == NULL) \ ++ return false; \ ++ isl_pointers__.p_##x = u.p; \ ++ } \ ++ while (0) ++ DYNSYMS ++#undef DYNSYM ++ return true; ++} ++ + /* Print global statistics to FILE. */ + + static void +@@ -298,6 +326,15 @@ graphite_transform_loops (void) + if (parallelized_function_p (cfun->decl)) + return; + ++ if (number_of_loops (cfun) <= 1) ++ return; ++ ++ if (!init_isl_pointers ()) ++ { ++ sorry ("Graphite loop optimizations cannot be used"); ++ return; ++ } ++ + ctx = isl_ctx_alloc (); + isl_options_set_on_error (ctx, ISL_ON_ERROR_ABORT); + if (!graphite_initialize (ctx)) diff --git a/main/gcc/101_all_gcc49_configure.patch b/main/gcc/101_all_gcc49_configure.patch deleted file mode 100644 index ab9aae047a..0000000000 --- a/main/gcc/101_all_gcc49_configure.patch +++ /dev/null @@ -1,156 +0,0 @@ -2013-12-30 Magnus Granberg - - * gcc/configure.ac Add --enable-esp and define ENABLE_ESP. - Check if we support crtbeginP and define ENABLE_CRTBEGINP. - * gcc/configure Regenerated - - ---- a/gcc/configure.ac 2011-11-18 11:52:32.000000000 +0100 -+++ b/gcc/configure.ac 2012-10-02 17:39:15.649526241 +0200 -@@ -5130,6 +5237,55 @@ if test x"${LINKER_HASH_STYLE}" != x; th - [The linker hash style]) - fi - -+# -------------- -+# Esp checks -+# -------------- -+ -+# Check whether --enable-esp was given and target have the support. -+AC_ARG_ENABLE([esp], -+[AS_HELP_STRING([--enable-esp], -+ [Enable Stack protector and Position independent executable as -+ default if we have suppot for it when compiling -+ and link with -z now as default. -+ Linux targets supported i*86, x86_64, x32, -+ powerpc, powerpc64, ia64, arm and mips.])], -+ enable_esp=$enableval, -+ enable_esp=no) -+if test $enable_esp = yes ; then -+ AC_MSG_CHECKING(if $target support esp) -+ case "$target" in -+ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips-*-linux* | arm*-*-linux* | ia64-*-linux*) -+ enable_esp=yes -+ AC_DEFINE(ENABLE_ESP, 1, -+ [Define if your target support esp and you have enable it.]) -+ ;; -+ *) -+ enable_esp=no -+ ;; -+ esac -+AC_MSG_RESULT($enable_esp) -+fi -+AC_SUBST([enable_esp]) -+if test $enable_esp = yes ; then -+ AC_MSG_CHECKING(checking for crtbeginP.o support) -+ if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginP=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginP=yes -+ AC_DEFINE(ENABLE_CRTBEGINP, 1, -+ [Define if your compiler will support crtbeginP.]) -+ fi -+ ;; -+ *) enable_crtbeginP=no ;; -+ esac -+ fi -+ AC_MSG_RESULT($enable_crtbeginP) -+fi -+AC_SUBST([enable_crtbeginP]) -+ - # Configure the subdirectories - # AC_CONFIG_SUBDIRS($subdirs) - ---- a/gcc/configure 2013-02-01 21:26:24.000000000 +0100 -+++ b/gcc/configure 2013-02-12 01:59:20.000000000 +0100 -@@ -600,6 +600,8 @@ - ac_subst_vars='LTLIBOBJS - LIBOBJS - PICFLAG -+enable_crtbeginP -+enable_esp - enable_host_shared - enable_plugin - pluginlibs -@@ -920,6 +922,7 @@ - enable_plugin - enable_libquadmath_support - with_linker_hash_style -+enable_esp - ' - ac_precious_vars='build_alias - host_alias -@@ -1633,6 +1636,11 @@ - --enable-plugin enable plugin support - --disable-libquadmath-support - disable libquadmath support for Fortran -+ --enable-esp Enable Stack protector and Position independent -+ executable as default if we have suppot for it when -+ compiling and link with -z now as default. -+ Linux targets supported i*86, x86_64, x32, -+ powerpc, powerpc64, ia64, arm and mips. - - Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] -@@ -27419,6 +27427,59 @@ - - fi - -+# -------------- -+# Esp checks -+# -------------- -+ -+# Check whether --enable-esp was given and target have the support. -+# Check whether --enable-esp was given. -+if test "${enable_esp+set}" = set; then : -+ enableval=$enable_esp; enable_esp=$enableval -+else -+ enable_esp=no -+fi -+ -+if test $enable_esp = yes ; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $target support esp" >&5 -+$as_echo_n "checking if $target support esp... " >&6; } -+ case "$target" in -+ i?86*-*-linux* | x86_64-*-linux* | powerpc*-*-linux* | mips*-*-linux* | arm*-*-linux* | ia64-*-linux*) -+ enable_esp=yes -+ -+$as_echo "#define ENABLE_ESP 1" >>confdefs.h -+ -+ ;; -+ *) -+ enable_esp=no -+ ;; -+ esac -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_esp" >&5 -+$as_echo "$enable_esp" >&6; } -+fi -+ -+if test $enable_esp = yes ; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for crtbeginP.o support" >&5 -+$as_echo_n "checking checking for crtbeginP.o support... " >&6; } -+ if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginP=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginP=yes -+ -+$as_echo "#define ENABLE_CRTBEGINP 1" >>confdefs.h -+ -+ fi -+ ;; -+ *) enable_crtbeginP=no ;; -+ esac -+ fi -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_crtbeginP" >&5 -+$as_echo "$enable_crtbeginP" >&6; } -+fi -+ -+ - # Configure the subdirectories - # AC_CONFIG_SUBDIRS($subdirs) - diff --git a/main/gcc/102_all_gcc48_config.in.patch b/main/gcc/102_all_gcc48_config.in.patch deleted file mode 100644 index 3ad51f3175..0000000000 --- a/main/gcc/102_all_gcc48_config.in.patch +++ /dev/null @@ -1,32 +0,0 @@ -2013-02-13 Magnus Granberg - - * gcc/config.in Add ENABLE_CRTBEGINP, ENABLE_ESP - ---- ./gcc/config.in 2009-04-21 11:08:08.000000000 +0200 -+++ ./gcc/config.in 2009-05-12 00:10:08.000000000 +0200 -@@ -46,6 +46,12 @@ - #endif - - -+/* Define to 1 to enable crtbeginP.o. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_CRTBEGINP -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -@@ -65,6 +65,12 @@ - #endif - - -+/* Define to 1 to enable esp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP -+#endif -+ -+ - /* Define to 1 to enable fixed-point arithmetic extension to C. */ - #ifndef USED_FOR_TARGET - #undef ENABLE_FIXED_POINT diff --git a/main/gcc/103_all_gcc49_Makefile.in.patch b/main/gcc/103_all_gcc49_Makefile.in.patch deleted file mode 100644 index 24778958c8..0000000000 --- a/main/gcc/103_all_gcc49_Makefile.in.patch +++ /dev/null @@ -1,106 +0,0 @@ -2014-01-05 Magnus Granberg - - * gcc/Makefile.in Add -fno-PIE. to ALL_CFLAGS and - ALL_CXXFLAGS if enable_esp yes. - Echo enable_esp and enable_crtbeginP to tmp-libgcc.mvars. - * libgcc/Makefile.in Add crtbeginP.o to EXTRA_PARTS if enable_crtbeginP yes - We add new file crtbeginP.o if enable_crtbeginP yes - Add -fno-PIE. to CRTSTUFF_CFLAGS. - Disable -fstack-check - ---- a/gcc/Makefile.in 2011-11-09 02:20:14.000000000 +0100 -+++ b/gcc/Makefile.in 2011-12-24 22:28:08.864804375 +0100 -@@ -247,6 +247,14 @@ LINKER_FLAGS = $(CFLAGS) - endif - endif - -+# We don't want to compile the compiler with -fPIE, it make PCH fail. -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+else -+ESP_NOPIE_CFLAGS= -+endif -+ - # ------------------------------------------- - # Programs which operate on the build machine - # ------------------------------------------- -@@ -974,12 +982,13 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@ - - # This is the variable actually used when we compile. If you change this, - # you probably want to update BUILD_CFLAGS in configure.ac --ALL_CFLAGS = $(T_CFLAGS) $(CFLAGS-$@) \ -+ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \ - $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ - - # The C++ version. --ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) $(INTERNAL_CFLAGS) \ -- $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) $(WARN_CXXFLAGS) @DEFS@ -+ALL_CXXFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS) \ -+ $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(NOEXCEPTION_FLAGS) \ -+ $(WARN_CXXFLAGS) @DEFS@ - - # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro - # puts -I options in CPPFLAGS, our include files in the srcdir will always -@@ -1814,6 +1823,8 @@ libgcc.mvars: config.status Makefile spe - echo GCC_CFLAGS = '$(GCC_CFLAGS)' >> tmp-libgcc.mvars - echo INHIBIT_LIBC_CFLAGS = '$(INHIBIT_LIBC_CFLAGS)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars -+ echo enable_esp = '$(enable_esp)' >> tmp-libgcc.mvars -+ echo enable_crtbeginP = '@enable_crtbeginP@' >> tmp-libgcc.mvars - - mv tmp-libgcc.mvars libgcc.mvars - ---- a/libgcc/Makefile.in 2011-11-22 04:01:02.000000000 +0100 -+++ b/libgcc/Makefile.in 2011-12-25 15:18:22.449610631 +0100 -@@ -219,6 +219,17 @@ else - DECNUMINC = - endif - -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+else -+ESP_NOPIE_CFLAGS= -+endif -+ -+# We add crtbeginP.o to the EXTRA_PARTS list if enable_crtbeginP = yes -+ifeq ($(enable_crtbeginP),yes) -+EXTRA_PARTS += crtbeginP.o -+endif -+ - # Options to use when compiling libgcc2.a. - # - LIBGCC2_DEBUG_CFLAGS = -g -@@ -225,7 +225,7 @@ endif - LIBGCC2_DEBUG_CFLAGS = -g - LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ - $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ -- -fbuilding-libgcc -fno-stack-protector \ -+ -fbuilding-libgcc -fno-stack-protector -fstack-check=no \ - $(INHIBIT_LIBC_CFLAGS) - - # Additional options to use when compiling libgcc2.a. -@@ -298,7 +298,7 @@ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(IN - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ - -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \ -- $(INHIBIT_LIBC_CFLAGS) -+ -fstack-check=no $(ESP_NOPIE_CFLAGS) $(INHIBIT_LIBC_CFLAGS) - - # Extra flags to use when compiling crt{begin,end}.o. - CRTSTUFF_T_CFLAGS = -@@ -966,6 +977,13 @@ crtendS$(objext): $(srcdir)/crtstuff.c - # This is a version of crtbegin for -static links. - crtbeginT$(objext): $(srcdir)/crtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O -+ -+# This is a version of crtbegin for -static -fPIE links. -+ifeq ($(enable_crtbeginP),yes) -+crtbeginP$(objext): $(srcdir)/crtstuff.c -+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $< -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O -+endif - - ifeq ($(enable_vtable_verify),yes) - # These are used in vtable verification; see comments in source files for - \ No newline at end of file diff --git a/main/gcc/105_all_gcc48_gcc.c.patch b/main/gcc/105_all_gcc48_gcc.c.patch deleted file mode 100644 index 4cea772eb0..0000000000 --- a/main/gcc/105_all_gcc48_gcc.c.patch +++ /dev/null @@ -1,25 +0,0 @@ -2013-03-24 Magnus Granberg - - * gcc/gcc.c include esp.h - static const char *cc1_spec We set that in esp.h if ENABLE_ESP. - ---- ./gcc/gcc.c 2010-01-21 10:29:30.000000000 -0500 -+++ ./gcc/gcc.c 2010-01-29 23:29:16.000000000 -0500 -@@ -44,6 +44,7 @@ - #include "opts.h" - #include "params.h" - #include "vec.h" -+#include "config/esp.h" /* for --enable-esp support */ - #include "filenames.h" - - /* By default there is no special suffix for target executables. */ -@@ -822,7 +823,9 @@ - - static const char *asm_debug; - static const char *cpp_spec = CPP_SPEC; -+#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC; -+#endif - 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; diff --git a/main/gcc/116_all_gcc47_nopie_option.patch b/main/gcc/116_all_gcc47_nopie_option.patch deleted file mode 100644 index ed9a961d76..0000000000 --- a/main/gcc/116_all_gcc47_nopie_option.patch +++ /dev/null @@ -1,16 +0,0 @@ -2012-01-24 Magnus Granberg - - * gcc/common.opt Add -nopie - ---- a/gcc/common.opt 2011-11-23 19:51:17.000000000 +0100 -+++ b//gcc/common.opt 2012-01-24 16:56:24.302224357 +0100 -@@ -2280,6 +2280,9 @@ Driver - nodefaultlibs - Driver - -+nopie -+Driver -+ - nostartfiles - Driver - diff --git a/main/gcc/120_all_gcc49_config_crtbeginp.patch b/main/gcc/120_all_gcc49_config_crtbeginp.patch deleted file mode 100644 index 62474c0222..0000000000 --- a/main/gcc/120_all_gcc49_config_crtbeginp.patch +++ /dev/null @@ -1,40 +0,0 @@ -2014-04-23 Magnus Granberg - - * gcc/config/gnu-user.h If ENABLE_CRTBEGINP, -static and -pie use crtbegineP.o. - * gcc/config/rs6000/sysv4.h If ENABLE_CRTBEGINP, -static and -pie use crtbegineP.o. - ---- a/gcc/config/gnu-user.h 2014-01-02 23:23:26.000000000 +0100 -+++ b/gcc/config/gnu-user.h 2014-04-23 00:55:06.390265454 +0200 -@@ -40,7 +40,15 @@ see the files COPYING3 and COPYING.RUNTI - provides part of the support for getting C++ file-scope static - object constructed before entering `main'. */ - --#if defined HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) -+#define GNU_USER_TARGET_STARTFILE_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+ crti.o%s %{static:%{pie:crtbeginP.o%s;: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}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) - #define GNU_USER_TARGET_STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \ ---- a/gcc/config/rs6000/sysv4.h 2009-04-10 01:23:07.000000000 +0200 -+++ b/gcc/config/rs6000/sysv4.h 2009-09-08 04:41:50.000000000 +0200 -@@ -883,7 +883,12 @@ - %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ - %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" - --#ifdef HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINP) -+#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:%{pie:crtbeginP.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINP) - #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} \ diff --git a/main/gcc/124_all_gcc49_invoke.texi.patch b/main/gcc/124_all_gcc49_invoke.texi.patch deleted file mode 100644 index 20f98f6909..0000000000 --- a/main/gcc/124_all_gcc49_invoke.texi.patch +++ /dev/null @@ -1,44 +0,0 @@ -2014-04-24 Magnus Granberg - - * gcc/doc/invoke.texi Add NOTES about -fstack-protector-all, -pie and - -fPIE/-fpie when --enable-esp is enable, this options is on by default. - ---- a/gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200 -+++ b/gcc/doc/invoke.texi 2009-06-18 14:08:38.000000000 +0200 -@@ -9233,6 +9245,11 @@ If a guard check fails, an error message - @opindex fstack-protector-all - Like @option{-fstack-protector} except that all functions are protected. - -+NOTE: NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector}, -+@option{-nostdlib}, @option{-ffreestanding}, @option{-fstack-protector}, -+@option{-fstack-protector-strong}or @option{-fstack-protector-all}are found. -+ - @item -fstack-protector-strong - @opindex fstack-protector-strong - Like @option{-fstack-protector} but includes additional functions to -@@ -7960,6 +7965,12 @@ - that were used to generate code (@option{-fpie}, @option{-fPIE}, - or model suboptions) when you specify this option. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} -+are found. -+ - @item -rdynamic - @opindex rdynamic - Pass the flag @option{-export-dynamic} to the ELF linker, on targets -@@ -15889,6 +15910,11 @@ - @code{__pie__} and @code{__PIE__}. The macros have the value 1 - for @option{-fpie} and 2 for @option{-fPIE}. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} are found. -+ - @item -fno-jump-tables - @opindex fno-jump-tables - Do not use jump tables for switch statements even where it would be diff --git a/main/gcc/134_all_gcc48_config_i386.patch b/main/gcc/134_all_gcc48_config_i386.patch deleted file mode 100644 index 9f0f7a3d41..0000000000 --- a/main/gcc/134_all_gcc48_config_i386.patch +++ /dev/null @@ -1,56 +0,0 @@ -2013-03-24 Magnus Granberg - - * gcc/config/i386/gnu-user-common.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. - * gcc/config/i386/gnu-user.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. - * gcc/config/i386/i386.h (SUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. - ---- a/gcc/config/i386/gnu-user-common.h 2013-01-10 21:38:27.000000000 +0100 -+++ b/gcc/config/i386/gnu-user-common.h 2013-02-14 00:51:44.689637605 +0100 -@@ -70,3 +70,7 @@ along with GCC; see the file COPYING3. - - /* Static stack checking is supported by means of probes. */ - #define STACK_CHECK_STATIC_BUILTIN 1 -+ -+#ifdef ENABLE_ESP -+#define DRIVER_SELF_SPECS ESP_DRIVER_SELF_SPEC -+#endif ---- a/gcc/config/i386/gnu-user.h 2011-05-05 14:32:50.000000000 +0200 -+++ b/gcc/config/i386/gnu-user.h 2012-07-09 14:28:38.726289455 +0200 -@@ -93,9 +93,16 @@ along with GCC; see the file COPYING3. - "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" - - #undef SUBTARGET_EXTRA_SPECS -+#ifdef ENABLE_ESP - #define SUBTARGET_EXTRA_SPECS \ - { "link_emulation", GNU_USER_LINK_EMULATION },\ -- { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } -+ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \ -+ ESP_EXTRA_SPECS -+#else -+#define SUBTARGET_EXTRA_SPECS \ -+ { "link_emulation", GNU_USER_LINK_EMULATION },\ -+ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } -+#endif - - #undef LINK_SPEC - #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ ---- a/gcc/config/i386/i386.h 2011-11-24 23:11:12.000000000 +0100 -+++ b/gcc/config/i386/i386.h 2012-07-09 14:21:24.575276517 +0200 -@@ -617,13 +617,16 @@ enum target_cpu_default - Do not define this macro if it does not need to do anything. */ - - #ifndef SUBTARGET_EXTRA_SPECS -+#ifdef ENABLE_ESP -+#define SUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS -+#else - #define SUBTARGET_EXTRA_SPECS - #endif -+#endif - - #define EXTRA_SPECS \ - { "cc1_cpu", CC1_CPU_SPEC }, \ - SUBTARGET_EXTRA_SPECS -- - - /* Set the value of FLT_EVAL_METHOD in float.h. When using only the - FPU, assume that the fpcw is set to extended precision; when using diff --git a/main/gcc/135_all_gcc48_config_arm.patch b/main/gcc/135_all_gcc48_config_arm.patch deleted file mode 100644 index 22ab23b322..0000000000 --- a/main/gcc/135_all_gcc48_config_arm.patch +++ /dev/null @@ -1,35 +0,0 @@ -2013-06-03 Magnus Granberg - - * gcc/config/arm/arm.h (DRIVER_SELF_SPECS): Add ESP_DRIVER_SELF_SPEC. - * gcc/config/arm/elf.h (SUBSUBTARGET_EXTRA_SPECS): Add ESP_EXTRA_SPECS. - ---- a/gcc/config/arm/arm.h 2015-06-02 08:42:53.724969452 +0000 -+++ b/gcc/config/arm/arm.h 2015-06-02 08:46:26.515546804 +0000 -@@ -2411,6 +2411,12 @@ - # define EXTRA_SPEC_FUNCTIONS BIG_LITTLE_CPU_SPEC_FUNCTIONS - #endif - --#define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS -+#ifdef ENABLE_ESP -+# define DRIVER_SELF_SPECS \ -+ MCPU_MTUNE_NATIVE_SPECS, \ -+ ESP_DRIVER_SELF_SPEC -+#else -+# define DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS -+#endif - #define TARGET_SUPPORTS_WIDE_INT 1 - #endif /* ! GCC_ARM_H */ ---- a/gcc/config/arm/elf.h 2013-01-10 21:38:27.000000000 +0100 -+++ b/gcc/config/arm/elf.h 2013-05-19 02:15:49.595855825 +0200 -@@ -49,7 +49,11 @@ - #endif - - #undef SUBSUBTARGET_EXTRA_SPECS -+#ifdef ENABLE_ESP -+#define SUBSUBTARGET_EXTRA_SPECS ESP_EXTRA_SPECS -+#else - #define SUBSUBTARGET_EXTRA_SPECS -+#endif - - #ifndef ASM_SPEC - #define ASM_SPEC "\ diff --git a/main/gcc/140_all_gcc49_config_esp.patch b/main/gcc/140_all_gcc49_config_esp.patch deleted file mode 100644 index cc58e6e7d0..0000000000 --- a/main/gcc/140_all_gcc49_config_esp.patch +++ /dev/null @@ -1,135 +0,0 @@ -2014-05-12 Magnus Granberg - - * gcc/esp.h New file to support --enable-esp - Version 20140512.1 - ---- a/gcc/config/esp.h 2010-04-09 16:14:00.000000000 +0200 -+++ b/gcc/config/esp.h 2012-06-23 01:00:31.248348491 +0200 -@@ -0,0 +1,127 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20140512.1 -+ * Magnus Granberg (Zorry) */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector-all, -fstack-check, -fPIE, -pie and -z now -+ as default if the defines and the spec allow it. -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -+ This will add some unsupported upstream commands options as -nopie and -nonow. -+ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all and -fstack-check when building kernels. -+ ESP_CC1_SPEC is added to CC1_SPEC. -+ ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. -+ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. -+ ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie. -+*/ -+#ifdef ENABLE_ESP -+ -+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ -+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)" -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: %{!fno-stack-check: }}}" -+ #else -+ #define ESP_CC1_SSP_SPEC "" -+ #endif -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #else -+ #define ESP_CC1_PIE_SPEC "" -+ #endif -+ #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" -+ -+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable -+ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check -+ Don't remove the specs in the end */ -+ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " -+ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" -+ -+ /* We use ESP_DRIVER_SELF_SPEC to add pie and ssp command-line options. */ -+ #define ESP_DRIVER_SELF_SPEC "%{D__KERNEL__:;:%{!nopie:%(esp_options_pie) \ -+ %(esp_link_pie)} %(esp_options_ssp) }" -+ -+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector -+ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */ -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_OPTIONS_SSP_SPEC \ -+ "%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \ -+ fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} \ -+ %{fstack-check|fstack-check=*:;: -fstack-check}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */ -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ -+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -+ -nostdlib -nostartfiles. */ -+ /* With ENABLE_CRTBEGINP we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINP -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINP we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ -+ #ifdef ENABLE_CRTBEGINP -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ -+ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out -+ "-pie and (static)|pg|p|profile are incompatible when linking" */ -+ /* With ENABLE_CRTBEGINP we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINP -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" -+ #else -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}" -+ #endif -+ -+ /* We don't pass -pie to the linker when -static. */ -+ #ifdef ENABLE_CRTBEGINP -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_LINK_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ -+ { "esp_driver_self", ESP_DRIVER_SELF_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; -+ -+#endif -+#endif /* End GCC_ESP_H */ diff --git a/main/gcc/141_all_gcc49_config_esp_alpine.patch b/main/gcc/141_all_gcc49_config_esp_alpine.patch deleted file mode 100644 index b8c88e286c..0000000000 --- a/main/gcc/141_all_gcc49_config_esp_alpine.patch +++ /dev/null @@ -1,67 +0,0 @@ -Apply Alpine Linux specific differences to Gentoo ESP configuration: -- default PIE and SSP by default without additional CFLAGS (to clean up APKBUILD) -- do not enable -fstack-check by default (caused failures in programs that setup - small stack in musl) -- enable -z relro by default -- enable -fstack-protector-strong instead of -fstack-protector-all by default - ---- gcc-4.9.2/gcc/config/esp.h 2014-12-10 15:54:19.925060848 +0000 -+++ gcc-4.9.2/gcc/config/esp.h 2014-12-10 15:59:16.793850060 +0000 -@@ -4,7 +4,7 @@ - #ifndef GCC_ESP_H - #define GCC_ESP_H - --/* This file will add -fstack-protector-all, -fstack-check, -fPIE, -pie and -z now -+/* This file will add -fstack-protector-strong, -fPIE, -pie, -z relro and -z now - as default if the defines and the spec allow it. - Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass - to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -@@ -16,11 +16,14 @@ - ENABLE_CRTBEGINP add support for crtbeginP.o, build -static with -fPIE or -fpie. - */ - #ifdef ENABLE_ESP -+ -+ /* Enable by default on Alpine */ -+ #define EFAULT_PIE_SSP - - /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ - #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)" - #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -- #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: %{!fno-stack-check: }}}" -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" - #else - #define ESP_CC1_SSP_SPEC "" - #endif -@@ -34,20 +37,20 @@ - /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable - -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check - Don't remove the specs in the end */ -- #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " -+ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_relro) %(esp_link_pie_check) " - #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" -+ #define ESP_LINK_RELRO_SPEC "%{!norelro:-z relro}" - - /* We use ESP_DRIVER_SELF_SPEC to add pie and ssp command-line options. */ - #define ESP_DRIVER_SELF_SPEC "%{D__KERNEL__:;:%{!nopie:%(esp_options_pie) \ - %(esp_link_pie)} %(esp_options_ssp) }" - -- /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector -+ /* This will add -fstack-protector-strong if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector - -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */ - #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) - #define ESP_OPTIONS_SSP_SPEC \ - "%{nostdlib|ffreestanding|fno-stack-protector|fstack-protector| \ -- fstack-protector-all|fstack-protector-strong:;:-fstack-protector-all} \ -- %{fstack-check|fstack-check=*:;: -fstack-check}" -+ fstack-protector-all|fstack-protector-strong:;:-fstack-protector-strong}" - #else - #define ESP_OPTIONS_SSP_SPEC "" - #endif -@@ -115,6 +118,7 @@ - { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ - { "esp_link", ESP_LINK_SPEC }, \ - { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_relro", ESP_LINK_RELRO_SPEC }, \ - { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ - { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ - { "esp_driver_self", ESP_DRIVER_SELF_SPEC }, \ diff --git a/main/gcc/201-cilkrts.patch b/main/gcc/201-cilkrts.patch new file mode 100644 index 0000000000..4aac10d6d9 --- /dev/null +++ b/main/gcc/201-cilkrts.patch @@ -0,0 +1,59 @@ +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/main/gcc/201-libitm.patch b/main/gcc/201-libitm.patch deleted file mode 100644 index 78396056bc..0000000000 --- a/main/gcc/201-libitm.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc -index a1c2cfd..ea8f023 100644 ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 - - #ifdef __linux__ - #include --#include -+#include - #include - - static void __attribute__((constructor)) -diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h -index e731ab7..54ad8b6 100644 ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x) - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H diff --git a/main/gcc/202-musl-config-v3.patch b/main/gcc/202-musl-config-v3.patch deleted file mode 100644 index 55c1a6b6b5..0000000000 --- a/main/gcc/202-musl-config-v3.patch +++ /dev/null @@ -1,294 +0,0 @@ -diff --git a/gcc/config.gcc b/gcc/config.gcc -index 243e899..6634660 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -575,7 +575,7 @@ case ${target} in - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -728,6 +728,9 @@ case ${target} in - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 857389a..b551c56 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -50,21 +52,25 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - } while (0) - - /* Determine which dynamic linker to use depending on whether GLIBC or -- uClibc or Bionic is the default C library and whether -- -muclibc or -mglibc or -mbionic has been passed to change the default. */ -+ uClibc or Bionic or musl is the default C library and whether -+ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change -+ the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -81,24 +87,100 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" - #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" -+/* Should be redefined for each target that supports musl. */ -+#define MUSL_DYNAMIC_LINKER "/dev/null" -+#define MUSL_DYNAMIC_LINKER32 "/dev/null" -+#define MUSL_DYNAMIC_LINKER64 "/dev/null" -+#define MUSL_DYNAMIC_LINKERX32 "/dev/null" - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) - -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -+ - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ - /* This is a *uclinux* target. We don't define below macros to normal linux - versions, because doing so would require *uclinux* targets to include -diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt -index c054338..ef055a7 100644 ---- a/gcc/config/linux.opt -+++ b/gcc/config/linux.opt -@@ -28,5 +28,9 @@ Target Report RejectNegative Var(linux_libc,LIBC_GLIBC) Negative(muclibc) - Use GNU C library - - muclibc --Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) -+Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) -+Use musl C library -diff --git a/gcc/configure b/gcc/configure -index e563e94..b99eb6d 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -27740,6 +27740,9 @@ if test "${gcc_cv_libc_provides_ssp+set}" = set; then : - else - gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -27772,6 +27775,7 @@ fi - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail" -@@ -27868,6 +27872,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -diff --git a/gcc/configure.ac b/gcc/configure.ac -index 55fe633..810725c 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5247,6 +5247,9 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library, - gcc_cv_libc_provides_ssp, - [gcc_cv_libc_provides_ssp=no - case "$target" in -+ *-*-musl*) -+ # All versions of musl provide stack protector -+ gcc_cv_libc_provides_ssp=yes;; - *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - # glibc 2.4 and later provides __stack_chk_fail and - # either __stack_chk_guard, or TLS access to stack guard canary. -@@ -5273,6 +5276,7 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library, - # ) and for now - # simply assert that glibc does provide this, which is true for all - # realistically usable GNU/Hurd configurations. -+ # All supported versions of musl provide it as well - gcc_cv_libc_provides_ssp=yes;; - *-*-darwin* | *-*-freebsd*) - AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes], -@@ -5346,6 +5350,9 @@ case "$target" in - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 9c8aa99..c25d045 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -668,7 +668,7 @@ Objective-C and Objective-C++ Dialects}. - -mcpu=@var{cpu}} - - @emph{GNU/Linux Options} --@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol -+@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol - -tno-android-cc -tno-android-ld} - - @emph{H8/300 Options} -@@ -15362,13 +15362,19 @@ These @samp{-m} options are defined for GNU/Linux targets: - @item -mglibc - @opindex mglibc - Use the GNU C library. This is the default except --on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. -+on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and -+@samp{*-*-linux-*android*} targets. - - @item -muclibc - @opindex muclibc - Use uClibc C library. This is the default on - @samp{*-*-linux-*uclibc*} targets. - -+@item -mmusl -+@opindex mmusl -+Use the musl C library. This is the default on -+@samp{*-*-linux-*musl*} targets. -+ - @item -mbionic - @opindex mbionic - Use Bionic C library. This is the default on diff --git a/main/gcc/202-posix_memalign.patch b/main/gcc/202-posix_memalign.patch new file mode 100644 index 0000000000..2018575088 --- /dev/null +++ b/main/gcc/202-posix_memalign.patch @@ -0,0 +1,42 @@ +From bab47fac06af5d891caaccac99f1dc1e75bdc219 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 1 Aug 2015 23:24:07 +0000 +Subject: [PATCH 2/6] 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 a1f98d3..4f6b2dc 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.8.1 + diff --git a/main/gcc/203-libgcc_s.patch b/main/gcc/203-libgcc_s.patch new file mode 100644 index 0000000000..c74351c713 --- /dev/null +++ b/main/gcc/203-libgcc_s.patch @@ -0,0 +1,56 @@ +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/main/gcc/204-arm.patch b/main/gcc/204-arm.patch deleted file mode 100644 index 0fa87de332..0000000000 --- a/main/gcc/204-arm.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h -index e9d65dc..f12e6bd 100644 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,6 +77,23 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC diff --git a/main/gcc/204-linux_libc_has_function.patch b/main/gcc/204-linux_libc_has_function.patch new file mode 100644 index 0000000000..2dcedc3a7a --- /dev/null +++ b/main/gcc/204-linux_libc_has_function.patch @@ -0,0 +1,25 @@ +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/main/gcc/205-nopie.patch b/main/gcc/205-nopie.patch new file mode 100644 index 0000000000..e3da94d105 --- /dev/null +++ b/main/gcc/205-nopie.patch @@ -0,0 +1,75 @@ +From b6015aca9c9cc83739fd0ed637a835119b2c4e34 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 7 Nov 2015 02:08:05 +0000 +Subject: [PATCH 5/6] nopie + +--- + gcc/configure | 27 +++++++++++++++++++++++++++ + gcc/configure.ac | 13 +++++++++++++ + 2 files changed, 40 insertions(+) + +diff --git a/gcc/configure b/gcc/configure +index 1c6e340..7e8b5d6 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -29390,6 +29390,33 @@ fi + $as_echo "$gcc_cv_no_pie" >&6; } + if test "$gcc_cv_no_pie" = "yes"; then + NO_PIE_FLAG="-no-pie" ++else ++ # Check if -nopie works. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -nopie option" >&5 ++$as_echo_n "checking for -nopie option... " >&6; } ++if test "${gcc_cv_nopie+set}" = set; then : ++ $as_echo_n "(cached) " >&6 ++else ++ saved_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -nopie" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++int main(void) {return 0;} ++_ACEOF ++if ac_fn_cxx_try_link "$LINENO"; then : ++ gcc_cv_nopie=yes ++else ++ gcc_cv_nopie=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ LDFLAGS="$saved_LDFLAGS" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_nopie" >&5 ++$as_echo "$gcc_cv_nopie" >&6; } ++ if test "$gcc_cv_nopie" = "yes"; then ++ NO_PIE_FLAG="-nopie" ++ fi + fi + + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 6c1dcd9..0ca7647 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6098,6 +6098,19 @@ AC_CACHE_CHECK([for -no-pie option], + LDFLAGS="$saved_LDFLAGS"]) + if test "$gcc_cv_no_pie" = "yes"; then + NO_PIE_FLAG="-no-pie" ++else ++ # Check if -nopie works. ++ AC_CACHE_CHECK([for -nopie option], ++ [gcc_cv_nopie], ++ [saved_LDFLAGS="$LDFLAGS" ++ LDFLAGS="$LDFLAGS -nopie" ++ AC_LINK_IFELSE([int main(void) {return 0;}], ++ [gcc_cv_nopie=yes], ++ [gcc_cv_nopie=no]) ++ LDFLAGS="$saved_LDFLAGS"]) ++ if test "$gcc_cv_nopie" = "yes"; then ++ NO_PIE_FLAG="-nopie" ++ fi + fi + AC_SUBST([NO_PIE_FLAG]) + +-- +2.8.1 + diff --git a/main/gcc/206-ssp_nonshared.patch b/main/gcc/206-ssp_nonshared.patch new file mode 100644 index 0000000000..d819dd9d98 --- /dev/null +++ b/main/gcc/206-ssp_nonshared.patch @@ -0,0 +1,26 @@ +From dcdbeb92e5e9dc59eeb082b5783104f2eb83c5e4 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 7 Nov 2015 14:58:40 +0000 +Subject: [PATCH 6/6] ssp_nonshared + +--- + gcc/gcc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 1af5920..0208d61 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -860,7 +860,8 @@ proper position among the other output files. */ + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ +- "|fstack-protector-strong|fstack-protector-explicit:}" ++ "|fstack-protector-strong|fstack-protector-explicit" \ ++ ":-lssp_nonshared}" + #else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit" \ +-- +2.8.1 + diff --git a/main/gcc/207-static-pie.patch b/main/gcc/207-static-pie.patch new file mode 100644 index 0000000000..44c6c70152 --- /dev/null +++ b/main/gcc/207-static-pie.patch @@ -0,0 +1,40 @@ +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}" + #endif + #else + #define LD_PIE_SPEC "" diff --git a/main/gcc/209-x86-v3.patch b/main/gcc/209-x86-v3.patch deleted file mode 100644 index 6d31cd97a0..0000000000 --- a/main/gcc/209-x86-v3.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h -index a100963..385aefd 100644 ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,6 @@ along with GCC; see the file COPYING3. If not see - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" -diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h -index a27d3be..e300480 100644 ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/main/gcc/210-fixincludes.patch b/main/gcc/210-fixincludes.patch deleted file mode 100644 index fa5e053d08..0000000000 --- a/main/gcc/210-fixincludes.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh -index 6653fed..0d96c8c 100755 ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ case $machine in - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/main/gcc/211-unwind.patch b/main/gcc/211-unwind.patch deleted file mode 100644 index d708c561f7..0000000000 --- a/main/gcc/211-unwind.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c -index e1e566b..137dced 100644 ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -59,6 +59,12 @@ - - #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ - && defined(TARGET_DL_ITERATE_PHDR) \ -+ && defined(__linux__) -+# define USE_PT_GNU_EH_FRAME -+#endif -+ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) \ - && (defined(__DragonFly__) || defined(__FreeBSD__)) - # define ElfW __ElfN - # define USE_PT_GNU_EH_FRAME diff --git a/main/gcc/212-gthr.patch b/main/gcc/212-gthr.patch deleted file mode 100644 index d3b40276c1..0000000000 --- a/main/gcc/212-gthr.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4 -index ba890f9..30b8b1a6 100644 ---- a/libgfortran/acinclude.m4 -+++ b/libgfortran/acinclude.m4 -@@ -100,7 +100,7 @@ void foo (void); - [Define to 1 if the target supports #pragma weak]) - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - AC_DEFINE(GTHREAD_USE_WEAK, 0, - [Define to 0 if the target shouldn't use #pragma weak]) - ;; -diff --git a/libgfortran/configure b/libgfortran/configure -index e1592f7..07542e1 100755 ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -26447,7 +26447,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h - - fi - case "$host" in -- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) -+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) - - $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h - -diff --git a/libstdc++-v3/config/os/generic/os_defines.h b/libstdc++-v3/config/os/generic/os_defines.h -index 45bf52a..103ec0e 100644 ---- a/libstdc++-v3/config/os/generic/os_defines.h -+++ b/libstdc++-v3/config/os/generic/os_defines.h -@@ -33,4 +33,9 @@ - // System-specific #define, typedefs, corrections, etc, go here. This - // file will come before all others. - -+// Disable the weak reference logic in gthr.h for os/generic because it -+// is broken on every platform unless there is implementation specific -+// workaround in gthr-posix.h and at link-time for static linking. -+#define _GLIBCXX_GTHREAD_USE_WEAK 0 -+ - #endif -diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host -index 82ddc52..a349ce3 100644 ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -271,6 +271,9 @@ case "${host_os}" in - freebsd*) - os_include_dir="os/bsd/freebsd" - ;; -+ linux-musl*) -+ os_include_dir="os/generic" -+ ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" diff --git a/main/gcc/213-posix_memalign.patch b/main/gcc/213-posix_memalign.patch deleted file mode 100644 index 4a5df48bfc..0000000000 --- a/main/gcc/213-posix_memalign.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h -index 901001b..321fcd3 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 __gcc_posix_memalign (void **, size_t, size_t) - #else --extern "C" int posix_memalign (void **, size_t, size_t) throw (); -+extern "C" int __gcc_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 (__gcc_posix_memalign (&ptr, alignment, size) == 0) - return ptr; - else - return NULL; diff --git a/main/gcc/214-stdint.patch b/main/gcc/214-stdint.patch deleted file mode 100644 index be37ae2dbb..0000000000 --- a/main/gcc/214-stdint.patch +++ /dev/null @@ -1,109 +0,0 @@ -diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h -index c567f43..475ea06 100644 ---- a/gcc/config/alpha/linux.h -+++ b/gcc/config/alpha/linux.h -@@ -61,10 +61,14 @@ along with GCC; see the file COPYING3. If not see - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; -diff --git a/gcc/config/glibc-stdint.h b/gcc/config/glibc-stdint.h -index 3fc67dc..98f4f04 100644 ---- a/gcc/config/glibc-stdint.h -+++ b/gcc/config/glibc-stdint.h -@@ -22,6 +22,12 @@ a copy of the GCC Runtime Library Exception along with this program; - see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - . */ - -+/* Systems using musl libc should use this header and make sure -+ OPTION_MUSL is defined correctly before using the TYPE macros. */ -+#ifndef OPTION_MUSL -+#define OPTION_MUSL 0 -+#endif -+ - #define SIG_ATOMIC_TYPE "int" - - #define INT8_TYPE "signed char" -@@ -43,12 +49,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INT_FAST8_TYPE "signed char" --#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") --#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") -+#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") -+#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") - #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") - #define UINT_FAST8_TYPE "unsigned char" --#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") --#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") -+#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") -+#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") - #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") - - #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index b551c56..7bc87ab 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,11 +32,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL - #define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - -diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h -index fe0ebd6..a68ff69 100644 ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -30,10 +30,14 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; -diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h -index 0879e7e..1b7f695 100644 ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -299,10 +299,14 @@ extern int dot_symbols; - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#undef OPTION_MUSL -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - /* Determine what functions are present at the runtime; diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index cb6fb4c410..3aaf42ceed 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa pkgname=gcc -pkgver=5.3.0 +pkgver=6.1.0 _cross="" [ "$BOOTSTRAP" = "noheaders" ] && pkgname="gcc-pass1" [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" @@ -19,6 +19,7 @@ makedepends_build="paxmark bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev !gettext-dev" makedepends="$makedepends_build $makedepends_host" subpackages=" " +[ "$_cross" ] && options="!tracedeps" [ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_cross" replaces="libstdc++ binutils" @@ -135,16 +136,20 @@ if $LANG_FORTRAN; then _languages="$_languages,fortran" fi if $LANG_ADA; then - subpackages="$subpackages libgnat gcc-gnat$_cross:gnat" + [ "$CHOST" = "$CTARGET" ] && subpackages="$subpackages libgnat" + subpackages="$subpackages gcc-gnat$_cross:gnat" _languages="$_languages,ada" makedepends="$makedepends gcc-gnat" fi source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 - ftp://sourceware.org/pub/java/ecj-latest.jar + ftp://sourceware.org/pub/java/ecj-4.9.jar - 005_all_gcc-spec-env.patch - 010_all_default-fortify-source.patch + 001_all_default-ssp-strong.patch + 002_all_default-relro.patch + 003_all_default-fortify-source.patch + 004_all_default-hash-gnu.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 @@ -152,51 +157,32 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 051_all_libiberty-pic.patch 053_all_libitm-no-fortify-source.patch 067_all_gcc-poison-system-directories.patch - 074_all_gcc5_isl-dl.patch + 074_all_gcc6_isl-dl.patch 090_all_pr55930-dependency-tracking.patch - 101_all_gcc49_configure.patch - 102_all_gcc48_config.in.patch - 103_all_gcc49_Makefile.in.patch - 105_all_gcc48_gcc.c.patch - 116_all_gcc47_nopie_option.patch - 120_all_gcc49_config_crtbeginp.patch - 124_all_gcc49_invoke.texi.patch - 134_all_gcc48_config_i386.patch - 135_all_gcc48_config_arm.patch - 140_all_gcc49_config_esp.patch - 141_all_gcc49_config_esp_alpine.patch - - 201-libitm.patch - 202-musl-config-v3.patch - 204-arm.patch - 209-x86-v3.patch - 210-fixincludes.patch - 211-unwind.patch - 212-gthr.patch - 213-posix_memalign.patch - 214-stdint.patch - arm-pr65932.patch + 201-cilkrts.patch + 202-posix_memalign.patch + 203-libgcc_s.patch + 204-linux_libc_has_function.patch + 205-nopie.patch + 206-ssp_nonshared.patch + 207-static-pie.patch libgcc-always-build-gcceh.a.patch - gcc-4.8-musl-libssp.patch gcc-4.9-musl-fortify.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-no-pie.patch ada-fixes.patch ada-shared.patch ada-musl.patch - vanilla.specs - hardenednossp.specs - hardenednopie.specs - hardenednopiessp.specs + pr70839.patch " # we build out-of-tree @@ -238,7 +224,7 @@ prepare() { || return 1 # see http://gcc.gnu.org/ml/java/2008-04/msg00027.html - mv "$srcdir"/ecj-latest.jar ecj.jar + mv "$srcdir"/ecj-*.jar ecj.jar echo ${pkgver} > gcc/BASE-VER } @@ -253,7 +239,7 @@ build() { cd "$_gccdir" case "$CTARGET" in - armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=cortex-a15 --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux";; + armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";; armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";; mipsel-*-*-*) _arch_configure="--with-arch-32=mips2 --with-tune-32=mips32 --with-fp-32=32 --with-mips-plt --with-float=hard --with-abi=32";; i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";; @@ -321,7 +307,7 @@ build() { --disable-werror \ $_symvers \ --enable-__cxa_atexit \ - --enable-esp \ + --enable-default-pie \ --enable-cloog-backend \ --enable-languages=$_languages \ $_arch_configure \ @@ -331,11 +317,6 @@ build() { --with-system-zlib \ || return 1 - # fix ada bootstrap - # piepatches adds -fstack-check to spec which breaks ada bootstrap - # TODO: upstream this to piepatches - export ADA_CFLAGS='-fno-stack-check' - make || return 1 } @@ -345,16 +326,6 @@ package() { ln -s gcc "$pkgdir"/usr/bin/cc - # install the specs - local i - for i in $source; do - case "$i" in - *.specs) - install -m644 "$srcdir"/$i "$pkgdir"/$_gcclibdir/$i || return 1 - ;; - esac - done - # we dont support gcj -static # and saving 35MB is not bad. find "$pkgdir" -name libgcj.a -o -name libgtkpeer.a \ @@ -396,7 +367,7 @@ package() { # move ada runtime libs if $LANG_ADA; then - for i in "$pkgdir"/$_gcclibdir/adalib/libgna*.so; do + for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do mv "$i" "$pkgdir"/usr/lib/ || return 1 ln -s ../../../../${i##*/} $i || return 1 done @@ -406,6 +377,8 @@ package() { # cross-gcc: remove any files that would conflict with the # native gcc package rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "$pkgdir"/usr/share + # libcc1 does not depend on target, don't ship it + rm -rf "$pkgdir"/usr/lib/libcc1.so* fi } @@ -610,7 +583,6 @@ gfortran() { "$subpkgdir"/usr/lib/ || return 1 fi mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec || return 1 - mv "$pkgdir"/$_gcclibdir/libgfortranbegin.a "$subpkgdir"/$_gcclibdir || return 1 mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir || return 1 } @@ -638,156 +610,111 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ || return 1 } -md5sums="c9616fd448f980259c31de613e575719 gcc-5.3.0.tar.bz2 -d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar -f4be3dc5dcbe42df9274774ddb908d4a 005_all_gcc-spec-env.patch -56147d4efc0a64dd193f5d211d5b9a61 010_all_default-fortify-source.patch -7f950b52dfdd1efb3de9aa101282a79f 011_all_default-warn-format-security.patch +md5sums="8fb6cb98b8459f5863328380fbf06bd1 gcc-6.1.0.tar.bz2 +7339f199ba11c941890031fd9981d7be ecj-4.9.jar +3634a8f58065805809273b105071c1f3 001_all_default-ssp-strong.patch +28ca9eac639e88869ac975d593ff7a89 002_all_default-relro.patch +b7235f279097e28295b6bbaa0804302f 003_all_default-fortify-source.patch +d4e31fe787e2fc1cb8afdd3815e9d28a 004_all_default-hash-gnu.patch +ed9ebe1548ea27147b5742a24d480fcd 005_all_default-as-needed.patch +614776347743e17651c778f1c6a9fa2e 011_all_default-warn-format-security.patch 55afcb3f072a6ffaff8ce03f310ae57f 012_all_default-warn-trampolines.patch c324e6e3204a39334aa559329592bde3 020_all_msgfmt-libstdc++-link.patch a99126f384a2899ff2716ad7389b784b 050_all_libiberty-asprintf.patch d8692c56f04b92667096f59d843e95c5 051_all_libiberty-pic.patch 9cb2d475322dc61a1fe35054257001c5 053_all_libitm-no-fortify-source.patch -5d4fc1966db6860c43e2547be89bc666 067_all_gcc-poison-system-directories.patch -bbfb766dce636e8bc41e5e4cdc7731b4 074_all_gcc5_isl-dl.patch +0a1ebe8be16b36c4ddd07859f0e9f427 067_all_gcc-poison-system-directories.patch +b8c2226a789be9f11a8dc3a54e9865bc 074_all_gcc6_isl-dl.patch 7d4c5c1becd11ab4fe0ef9088f96e638 090_all_pr55930-dependency-tracking.patch -096f21a5269adc12cc967c2a63620fa0 101_all_gcc49_configure.patch -2a8d6a9046efc9f44449b012cf12d7fd 102_all_gcc48_config.in.patch -d7ab73bcfbb05a8636424fb479959c59 103_all_gcc49_Makefile.in.patch -bcc6826afc77ae77a5dd5f164b51c746 105_all_gcc48_gcc.c.patch -c4e4451863b021963645d904fc847105 116_all_gcc47_nopie_option.patch -b521d19ed71e0858fd700e31e57a8db5 120_all_gcc49_config_crtbeginp.patch -48da8dcab1946ebe1dec257472266ff9 124_all_gcc49_invoke.texi.patch -b0910da9f2eb4fe6a684e680f6336491 134_all_gcc48_config_i386.patch -9c6f5cd698ef54b4d32394988101cc37 135_all_gcc48_config_arm.patch -f972492ebb115777ee099f6d779a7a2d 140_all_gcc49_config_esp.patch -965a029d968eec0695191e3f148040f9 141_all_gcc49_config_esp_alpine.patch -938e8c9baf60508d37fe4483b2afc654 201-libitm.patch -c6542e3831e14d429848eb610a8fb179 202-musl-config-v3.patch -97d1014ce63986c6b7f8991cc0721ad2 204-arm.patch -0f5349304444b1ee2d991b363d8eaaeb 209-x86-v3.patch -f44f290f4d35f99fd682c0c114f35df9 210-fixincludes.patch -1671c6ebdebc01494e008f276aec2ce2 211-unwind.patch -8967273be5dd491d79530c81d9211f14 212-gthr.patch -81e7ef6d8bbd374fb73bc3edf6912228 213-posix_memalign.patch -ab90688b8df55e3602b5eb83ef272699 214-stdint.patch -d718d3a14ed8c36b7a73a75076a0ab34 arm-pr65932.patch +19dab52bc9aab374041fca80f1479a47 201-cilkrts.patch +63658f05abe13649dba516ae44dde01f 202-posix_memalign.patch +12e816fc89aabb03e1ae72ebd479c89d 203-libgcc_s.patch +feaddd681acded33c22fd92ad8819982 204-linux_libc_has_function.patch +a7836fe20d35f91ddf623e3c62a920fe 205-nopie.patch +0193a00fe8cc9f87d447c17903f9e4aa 206-ssp_nonshared.patch +0b0a4f54760e0e368e4113dc9bd04d7b 207-static-pie.patch 504c7dd8651c5d98229892c4cd9ea591 libgcc-always-build-gcceh.a.patch -0d0a41c02802b85c8f1b78ce28544f92 gcc-4.8-musl-libssp.patch 9e658e590bc51be611f39945183f6aa2 gcc-4.9-musl-fortify.patch 0ea0f556d4ef9c260d1353b7fd33970c boehm-gc-musl.patch 2e2b787bb988d9007c9f7ce42178dfe6 gcc-pure64.patch +1e143d6a88cdcbc4e3266b19208df0fd fix-gcj-stdgnu14-link.patch 14fc0a0b925ef911ce78cd030fe58902 fix-gcj-musl.patch e17bbb0fe802974e20645b4182b4c410 fix-gcj-iconv-musl.patch 0a2041bbf83648e6c4f6d3484f7249ca gcc-4.8-build-args.patch 4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch -a4ccdeee63d0ab08d5e6165cb32b66ff ada-no-pie.patch -8f1d0704dd1b564e4a5e0790b3c27aa2 ada-fixes.patch +d00d7e4b0c00cb7448576af9cd7fcea8 ada-fixes.patch 20e2731c02ce50739ebdead2795f9c41 ada-shared.patch 221773e09429ae2aba03780fb1089290 ada-musl.patch -a2f435d81e872a73a8b44a4581832af0 vanilla.specs -17a31b8580de9dd9c06a1ed96886d538 hardenednossp.specs -33ce2d221828a2d03978da52ba609524 hardenednopie.specs -5c431710b72c6ec16ed21bcca83d9f87 hardenednopiessp.specs" -sha256sums="b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db gcc-5.3.0.tar.bz2 -98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 ecj-latest.jar -aac72f6c1940153084d5ffca8040db6e2eb9e75f15915b8f3f695bb0cd44716b 005_all_gcc-spec-env.patch -9f354a85bb1914b9a9cbd82e2a48fbd3aca384b801285b27512eb2b238c48635 010_all_default-fortify-source.patch -ff311c71e9398d3949e34c5f67fc9cde6edb553c3910a64b5ad7d1ff781ad4e5 011_all_default-warn-format-security.patch +243bf5804799d2e70c4e51d3a6ca9d1a pr70839.patch" +sha256sums="09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351 gcc-6.1.0.tar.bz2 +9506e75b862f782213df61af67338eb7a23c35ff425d328affc65585477d34cd ecj-4.9.jar +deb22792f37e107d0afff5f4ea6b2a9fc9de4f48e1c7133bf658b6e0d057b1d6 001_all_default-ssp-strong.patch +2c7fcbc3879cce0775e37306441110dc63e7f457e2e5ad890f6b0800eb520ef6 002_all_default-relro.patch +611d3d101351c134d3c03f6d8265a90268cef71c682bf72e02a6cd2d99315ef8 003_all_default-fortify-source.patch +549ad945d43370994ae8b8b0921b703efff71857e7669eff804f976bba3f5ae7 004_all_default-hash-gnu.patch +302c868dd7559ba01a38fea32c313d492403d02c8a3cebd51bb7be5988aee7f9 005_all_default-as-needed.patch +5ba3639e8834f2e8b59c51c567d1084dfff7ed27c84565dee8ed769b63c90936 011_all_default-warn-format-security.patch da1fae26d6a387aa216af1816f241d141d8d4f158b1e5c3c827643ab8b491f3e 012_all_default-warn-trampolines.patch c080f458c95dd0cbcc1322edc35890da892c3aaa7944c4eceb6319ca412cff02 020_all_msgfmt-libstdc++-link.patch 7e19261e2b5a5b9e518f6fd6844c1f0f5d0306de8bc1537c7c5cc4992a391049 050_all_libiberty-asprintf.patch da6bbb5dc654d5e1df8ecae5c9ebb56265426c405931f14f5878248b8c79f78d 051_all_libiberty-pic.patch 545a0ffcf70fdd712c7e881cbd29e657f499b5e13cec5d0516b9fa277cefe67b 053_all_libitm-no-fortify-source.patch -278fe3352c38da7804292ddf2119aadf9a88999042cb8516301989c61a50e3f0 067_all_gcc-poison-system-directories.patch -4500e1b6aaf3f119abfe6712cddc9b1115906b8460bd0b82514473654fbed422 074_all_gcc5_isl-dl.patch +44ab02edeaebd85fe5ccba5e87342ad50b53171fbd45be78a3e7684d94b742a1 067_all_gcc-poison-system-directories.patch +72b0c21995a811ba9bc70d1f0f5723e46aab4f5054761379304fad8ce2b56afe 074_all_gcc6_isl-dl.patch f108fdc8bb62aea4245ff9ad3d314603c69f7993f4c81de3a4c92a44b80b206e 090_all_pr55930-dependency-tracking.patch -d86a599414c8378aa1cfde75d7c2f94e7345c34063ff0114432c6de119eba2fc 101_all_gcc49_configure.patch -f301cce95609650f57c5212b38daf5288b4e7c5fa37ae2892664d4c8ceaadfbf 102_all_gcc48_config.in.patch -4bba7922c5cc6092860766022e418e920d8ea31608fd8006c912924b2416149d 103_all_gcc49_Makefile.in.patch -5fbe104dedff59b5faf9f11a51ea31b26913e8baa23fc724fc0238a4ef03b4e9 105_all_gcc48_gcc.c.patch -40a54195784bb613a27724518b6d6f1dc5475c47acccdade43cc1707d331f7f9 116_all_gcc47_nopie_option.patch -fded7088ad66eaa2c18890c1317492d1004229b485b200d4fbd882859e37d20d 120_all_gcc49_config_crtbeginp.patch -175051a5938073bba5d9f2f5803b6d9405e10475bfa9356df29cdda4f9a36719 124_all_gcc49_invoke.texi.patch -150f17367d7f514fda9e0aac283e059b190a2251d7d9dfa2b5686b2bdc67b725 134_all_gcc48_config_i386.patch -726838179efa612061bdf631514f68fffcf345198ef2e3adb46cafe068ee22f5 135_all_gcc48_config_arm.patch -e4ae7a4ac9c08775311fec84d800511f3409f1b5e9f25f0dd39cc0571d03846c 140_all_gcc49_config_esp.patch -b36f44331ca0204234263a4e3d953b741f114a8e6d05270ba0b9dc270faa0475 141_all_gcc49_config_esp_alpine.patch -cd6d91c2a7437e9d30497bdd1cd627ddbf477a0edd9629eeb2016ae175ada1fd 201-libitm.patch -f3cb8a345ed872f6ec5c996c7c31eca4705b7a0fd7cc1a850c403d0b9242b9f1 202-musl-config-v3.patch -24e989d8a87f0390029af2d486c37903456ee5ad32f1f3636484ffeddf8ba407 204-arm.patch -9ba4056b5d35dfe2ad65004577b07164dccdb45d8980e045917ddce0706b921d 209-x86-v3.patch -a151a3f3e34c52ce74718c768b25c7f50c9eab96f04943f4cdb2bd4c1bb7958e 210-fixincludes.patch -82001041657a7061cb4f5682a22f884abf7ba1d4f83d9cfda9737d235f0f6522 211-unwind.patch -b81fda1453d7f33ab81b526450e40132fa37d396e9cc6a76642ae7139cb74771 212-gthr.patch -87370f7854063bcf5f57bff931684c228370668ccf5ecd8e36ea9cf7c7455b16 213-posix_memalign.patch -a4909818a9811a8b8e074f5ab5b47d77075411a5192f3ebe4ed9766463be183b 214-stdint.patch -ca2567deb978ffa9566ca656ad1713edee2d90268aa0740b76e2658419b8b888 arm-pr65932.patch +e564d0c93e8e6afb5fbd5640822fef14f41aec53a1f2fbea5cd59d6bdf0a2652 201-cilkrts.patch +a5de063de487d944443901cdfa398e1614edbf2e62b7d633f78da1be222a2b05 202-posix_memalign.patch +6a640a2e6a3820a24e6079f26146f3919a2bc484f3c6abebd2c7d9e502c92d2c 203-libgcc_s.patch +40b48315791dbdcd5b09af2ffc14454d75d50dd0ecc0a353df7b686a19e06c1e 204-linux_libc_has_function.patch +2427b5a0e564af84c6569921a31a277d07b739a4a4d924057ce725136cc5d355 205-nopie.patch +80a528e73d8eaf21bd236c86298c28b6de7b6324b521c0c3c9ab3f1e187208ed 206-ssp_nonshared.patch +df92e2f03615c1591278c132cd38ee0ed2c576cd942d8ea751a44d0521057e6b 207-static-pie.patch 1975189156d70f5428cb7f1516533965d1c8734f3009fc89a9b8e289b72326f1 libgcc-always-build-gcceh.a.patch -80b76ca30dcaf07481ab102869d741f044c7e5235f462182bc27467baacda9a4 gcc-4.8-musl-libssp.patch dc93f97dff28b872f9c7e241fb87a3eca0271f706534d196b3517781b05667fa gcc-4.9-musl-fortify.patch 6ccca88695ef84c0d038cd315cad5ae5b799672ecb009fdaab34e68ba60b733c boehm-gc-musl.patch f5473c6aea96d5137defd68898ba31042944a3f3ed26c05b964a40bd876c6f47 gcc-pure64.patch +c03165e7ce812c93a33fdb0893847b4f9eb892e353d32d85b23249610fb24396 fix-gcj-stdgnu14-link.patch 22c78cc4a2658ff574e7ded1e5bc765a4f81f730d12e72d5883fe0bf73e71220 fix-gcj-musl.patch 51782c972ab828eb4ccb3ca3570341d025b2ae9a8e8fd8188cefb29c5f87401b fix-gcj-iconv-musl.patch bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build-args.patch a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch -7b71cd7c3c186ae488d2e2af169816e4f0f19782fc0e7bc6f9d0a9032e09ee5e ada-no-pie.patch -e12d67a15bd45c4a05ffdea98caaa4017237cfd93b3853e380b0d2ab97f1d8f9 ada-fixes.patch +d2a67a7ae0304cd10532883df19923b98dbc9b7a24957b619d4a6e04f19c5507 ada-fixes.patch d6c7fc1820a4fa285297c299c255fe2f19ce1695486f20edd098252a97545e6a ada-shared.patch 23d99e94060972bb25de4687da88ecb4fce9a7f0afa4b71a05161246917cd75d ada-musl.patch -1315d4c430b4d81c61d14a252d7681125fd7d79fde457c014c18c62c4f1aa1de vanilla.specs -50a46bb1c4d209ce687d13e74cc9e4e0b87cef4a8165d22fb9be243c9cf08374 hardenednossp.specs -8eccfcf282fb54aadede7c23a8b5b843c0a63a55485e74d4332ab49025d38e78 hardenednopie.specs -af85685ff501f5e0eaaa394628365425486dafe4780f0f683a4536ab60173cdf hardenednopiessp.specs" -sha512sums="d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a gcc-5.3.0.tar.bz2 -d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e ecj-latest.jar -486ddf9293f11db70fa277196ba95a3a5a45c181c99d6460ef6b2ad7396a1e75533ef29d5c47f30319acf4fb731a40f312ba1c32105b23ee905a78b017e7aaf0 005_all_gcc-spec-env.patch -5c95afffbd6dc49c252fd3723142d240067470f4c347237c38d37cafe30f6251cd9bebad62d54b75ceacdccab3a2d806a1d17ad94122ce6a84229e099bac4379 010_all_default-fortify-source.patch -1eba1f17328760f72369947cd0d942d2356546fcd7c0b85f5f18ab42819e051e2010b8641eee35faf6492818a680d24bd6ae680b7a0cf2f36a3361e1a829ce81 011_all_default-warn-format-security.patch +2c4836eeac884e96fbf35c01862820efd0ff08fa73b580e2747d457f761fe80e pr70839.patch" +sha512sums="eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2 +28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar +a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch +e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch +f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch +1d186d4fba52d8f650df02466e49a8bf9cdcd8423f37a3ba5282b6e965b52cb5b6adb9dfd2f7010b6c4aa3fcbf048b8a87a9d383e4645d813d532ba9c88c8aa0 004_all_default-hash-gnu.patch +a10e1909eb80ca15178ceac2caf7388e18839d0c61106d7f0d29c2be097c17a83854972028c2678e7355bd6cb71a465f6b703c19783549aa906990973af303fc 005_all_default-as-needed.patch +3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch 9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 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 -9798f22203df092cc8c96a59da211431f4bc3dfc52676f288f0462ae207e5c26fa205b146e9e5dbff0d79755bd59eb980801e3f2c2ca556433a2994d99096728 067_all_gcc-poison-system-directories.patch -a197419f31395972f63545fba41ca1a50164471f868810fa913dcf1639dc91f9005766e97af303d56e8dfbc6816d15dbb78e3dfcdd7f4aa80981af1502518564 074_all_gcc5_isl-dl.patch +e87da18aa7ab92b02b06168658c63b42a6c73a08fad2a30f81ef6296100fdbe3c3a91548fd0cb24eaf591e862bb08e4b67249bc4b977b07da33523aee0c686bc 067_all_gcc-poison-system-directories.patch +5b87a1de0061163eec3710d4e888fe575b466912cfe39e7f561dbe46f6cbf7069dbca29b7116f0610dc4c7bdd4634504716fb188e3a61367ebf61c6c933d27d2 074_all_gcc6_isl-dl.patch 4a328d1e1a56c20166307edcfa322068915784d9c08025b7f81cf69714da48fc266b6d34f77b9135c2f10da830d9df408276a1b78d1fd218637c2823506593c2 090_all_pr55930-dependency-tracking.patch -618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 101_all_gcc49_configure.patch -21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 102_all_gcc48_config.in.patch -adb01f47518ee81ebb2f463acc90a3422ee711f83edf56eda0e5d04586bc6346740e00c6ad1461c54fa67901da2e381a0f45cbcb8418e78c04809ecf8a463af9 103_all_gcc49_Makefile.in.patch -e98cc321d71e5bb62c6116b30ed6f11044bda440e238026a83dec63f04a0587440bdae50ec211b07976fcd9deb329f9dd1dac1317dae5003088a8a8bddbb97c1 105_all_gcc48_gcc.c.patch -98a4da3137177c5cad7dd7d35ad39cd416aa36f07867714e09ab8c0d8b759d2659063aa87b16ac1b708a283afd2ac54e20b327a32d1147720996d7bc11dcbd63 116_all_gcc47_nopie_option.patch -8fc6f2fd921c560fb1d7ba17b5cef4ea8071ee6909d372e41201667c011f948560fa543b1246cf55c0009622abf0dbc0bd79f718a853f2f0b59290e3df2c2968 120_all_gcc49_config_crtbeginp.patch -32bfe9c1f6f566de72c93388622001ff4b95086ea6f476bdfc08403ea474f98212f7396bc75d88a79a053159f78dca922ec6f641f83d9959ad419b0d8901b504 124_all_gcc49_invoke.texi.patch -dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec88aae5463763f5f64454b8a627ebd1d0a5c92984017025ad 134_all_gcc48_config_i386.patch -8355bc7dea07bf444b8bf3704dc8dc345b647f3b215a3a3ec09372a9bd86fc05922f53f46a8975791322fc755f155a648d0d1b2a86d7ed9e93b49dc927eb44d5 135_all_gcc48_config_arm.patch -976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 140_all_gcc49_config_esp.patch -e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 141_all_gcc49_config_esp_alpine.patch -0f9a05d21f060a2bfddee12441124b1e6e0f27ed140368b13de6fe9a35fa7a4a0e3f426e6a67bd3ccd82b657188ae6645129f3e28da9e0069b66dc1bc2ae9264 201-libitm.patch -1588508c31978f611dc0c0c2daa5400e2fa1f98644da8ca819e838f128b7e8242e758b8311490f3174dd2b3fec3137d26733dfd45be1479e31bfb9872317c966 202-musl-config-v3.patch -b46d0980ef1ff4387e7a5ab56b48d6f99df2679c78e338f755393e3d90fc5e317447c917bb6439e8715749392ad086605d4a44a39a8004c38a5e6ba914f6f079 204-arm.patch -a16eae6439b000ce75abc1ee8ece8c90af56eae10ca96d579e7c9468b4a424987dfc4c23fd8e2df21547541d1a019916d100f4339c15f82efa68207195e13c56 209-x86-v3.patch -f9d3d10a178b50cef06e2b16756d31662faf88e7f4a257efb7093eea9e104dd3b33fdf7f838a8f608ee876524ec896051cc1f777fc268d8b556f4f4da07b027e 210-fixincludes.patch -769ad0631c609c109d6d6f9930320d739693f0616d5b49e07b6e18284853d4c69eac5d7f876306c5a22b8aeb3836a15f0d976081c32bd8b8ec68351755d4485c 211-unwind.patch -f53475e3cc7953f5f2bfe5079b89c16d30bc09ddfc359dcd8bf87604f0899c0da07505b9bbc7ab8a844edd0911e0fc5745b60b3f724d5e5d30993372176c227f 212-gthr.patch -27e1a29e039dcc4c5190416702d1d95d48fbaeaac6440d81584989fe71a12f7bf5a484241ced9aa82b9f050eb3be8786d9584ba5299d304e7ed30506755880bc 213-posix_memalign.patch -27cbc715643b2b28d213bbc31ad68d8ca4fc2ca730b6967dce827ec9d4c54b74fa6c2ce021d91684984680b07734ab07ef9b824aec2281ed3f632fb9335cc3f6 214-stdint.patch -d0a95aa7253635ff8928840901436c94f50ecb907327b539d05fbf16611a14824b898a199615bf586f2f83910fb390820c707cb3784bdb4e229a6088644c49dd arm-pr65932.patch +ef052d0c3c9642fcb5ed570069c5a49c8ef523c47ac8ce3f201a801766f72ae4ff7c3725a70ee66e52c0fb559621e35fe0cf5b88b901d71ceadd381f49653a08 201-cilkrts.patch +40b7f2fc44fbe8125027c424f9ef3e6b89129ee4c6d47f3f3075f28979bcece2a3bc0ddd17df6bae77960db773f48fba2eb252923063ac81788340e7ec575d99 202-posix_memalign.patch +808e206f5e107084156fba333d4e091dcbd62f5d7756142bc292d4b0a52619f8c2aaca3617defc2f5b6552ba0439aebd33f4141329d88eab6ddf2dd637d92c08 203-libgcc_s.patch +fc0de05b36613b732a0222ea005c90653c6a40d6761b6894af2419272f4e74875f37e26af33a9b9940669ef89269c44c46d17ca5bcd54b5cd1176e5eaf2992c1 204-linux_libc_has_function.patch +98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch +1a0cb840091df45e4020b2cbd12fca2b1ed0782ec2a45c5556a18ea3c502a35ef99f273acdbd80c386fbbf543659ee4edc2d3246642e29d4942e9e3dcee74028 206-ssp_nonshared.patch +cf6f9814dee8c524b13f455106e1b92ad4bcbd998bf56bdb0858d1c6c89bfaf7ee8f75514d3e7092137f06d40b8419b6a5d2434e48d2ec32a83aa9c2ced45558 207-static-pie.patch d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch -e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch 4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c 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 -e80a08de4b43fb71f7699bcce360cd99bc525dab20b9109e7152bd211def5d8e728f88771ed59f15ed520cbf069364debc4f822c10a1abf7e2c7badd67e1c83c ada-no-pie.patch -efab5c2b3334848f46bb039f067a65eeef3a11f5031ee87df6e14ede6afe891280cd9155bb660a54dc48fc8246120b5d32405a975398018dda00999012e3a3f4 ada-fixes.patch +9016b257abd8fa981de44a49512e35db814d1cbb47c1a87cd31c12d4ae20b13e9e149fe41691a7ec3c95bbcfde8a79194a8d2eaf547ceade3a246fad67c47dd8 ada-fixes.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch a13c6acd864933bd7b12501686da57b09cbff9471c7f630f5bc9a92902a4006a9024a08ee41574707e4c232a754a21633ea89e0bb45dc0d5967e50b299ef6a5e ada-musl.patch -83a0996a48096032bcc674a6d28524f1cd2d81837621ebe4c15b5aedbd551c77ce5576b6307adb673ef0e4ac0431d935ad6a427edca2af5c21b6be9176bfaddb vanilla.specs -e4d38905527c500c61c421d782a8ac6ef2b034b15fd81d868486ac330a70922937d3c47e0684e9f3250744569b56a8df199499a4a5c107a6d544dca84458dc12 hardenednossp.specs -b56f7c308c5aefd0cfc647abd75939508a6640c53fce7c19da7c7d8ef4405d29b0d88800117fc7ff8d0022b035d511fb6d478e745bb2ed12a1b63f9f8cf3e168 hardenednopie.specs -f5ac7282201006548ed2bd835234af64d6f79f13f0b9a3410f5c794537e0ea91601361ae72180f49870b6b0f9af5f16002c86660feb94df346b9b1d9602e9d3a hardenednopiessp.specs" +15f91fe67939e153ac096c4cc64600a457b637c9e8a96b0e691c89f2339821b0c7b32477e0f66bf27ed8650d5c5a7e9cbae4006ea4639a386d47bf66a8a1ecc7 pr70839.patch" diff --git a/main/gcc/ada-fixes.patch b/main/gcc/ada-fixes.patch index 60a16a368e..ba4ea42b4d 100644 --- a/main/gcc/ada-fixes.patch +++ b/main/gcc/ada-fixes.patch @@ -1,20 +1,30 @@ ---- gcc-4.8.1/gcc/ada/terminals.c.orig -+++ gcc-4.8.1/gcc/ada/terminals.c -@@ -984,13 +984,6 @@ +--- gcc-6.1.0.orig/gcc/ada/cal.c ++++ gcc-6.1.0/gcc/ada/cal.c +@@ -49,6 +49,7 @@ + #include + #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 (FREEBSD) && \ -- ! defined (__APPLE__) && ! defined(__rtems__) +-#if !defined (__hpux__) && !defined (BSD) && !defined (__APPLE__) \ +- && !defined (__rtems__) -# include -#endif - #include #include #include -@@ -1078,7 +1078,7 @@ +@@ -1169,7 +1162,7 @@ char *slave_name = NULL; #ifdef USE_GETPT @@ -23,13 +33,3 @@ #elif defined (USE_OPENPTY) status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); #elif defined (USE_CLONE_DEVICE) ---- gcc-4.8.1/gcc/ada/cal.c.orig -+++ gcc-4.8.1/gcc/ada/cal.c -@@ -65,6 +65,7 @@ - #include - #else - #include -+#include - #endif - - #ifdef __MINGW32__ diff --git a/main/gcc/ada-no-pie.patch b/main/gcc/ada-no-pie.patch deleted file mode 100644 index 502d3a435f..0000000000 --- a/main/gcc/ada-no-pie.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- gcc-4.9.2/gcc/ada/gcc-interface/Makefile.in.orig 2014-05-17 13:13:12.000000000 -0300 -+++ gcc-4.9.2/gcc/ada/gcc-interface/Makefile.in 2014-12-10 12:01:32.304493855 -0200 -@@ -2570,23 +2570,23 @@ - gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \ - gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS) - $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - - ../../gnatsym$(exeext): ../stamp-tools - $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)" -@@ -2608,7 +2608,7 @@ - $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake - $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - - # Note the use of the "mv" command in order to allow gnatlink to be linked with - # with the former version of gnatlink itself which cannot override itself. -@@ -2618,7 +2618,7 @@ - $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink - $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \ -- --GCC="$(GCC_LINK)" $(TOOLS_LIBS) -+ --GCC="$(GCC_LINK)" -fno-PIE $(TOOLS_LIBS) - $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext) - - # Needs to be built with CC=gcc -@@ -2627,10 +2627,10 @@ - - # Likewise for the tools - ../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS) -- +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) -+ +$(GCC_LINK) $(ALL_CFLAGS) -fno-PIE -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) - - ../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS) -- +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) -+ +$(GCC_LINK) $(ALL_CFLAGS) -fno-PIE -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) - - ../stamp-gnatlib-$(RTSDIR): - @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \ diff --git a/main/gcc/arm-pr65932.patch b/main/gcc/arm-pr65932.patch deleted file mode 100644 index e7287d018e..0000000000 --- a/main/gcc/arm-pr65932.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- gcc/gcc/config/arm/arm.h (revision 224441) -+++ gcc/gcc/config/arm/arm.h (working copy) -@@ -523,16 +523,10 @@ extern int arm_arch_crc; - type, but kept valid in the wider mode. The signedness of the - extension may differ from that of the type. */ - --/* It is far faster to zero extend chars than to sign extend them */ -- - #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ - if (GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < 4) \ - { \ -- if (MODE == QImode) \ -- UNSIGNEDP = 1; \ -- else if (MODE == HImode) \ -- UNSIGNEDP = 1; \ - (MODE) = SImode; \ - } - diff --git a/main/gcc/fix-gcj-stdgnu14-link.patch b/main/gcc/fix-gcj-stdgnu14-link.patch new file mode 100644 index 0000000000..2b2ce0fa59 --- /dev/null +++ b/main/gcc/fix-gcj-stdgnu14-link.patch @@ -0,0 +1,35 @@ +--- 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/main/gcc/gcc-4.8-musl-libssp.patch b/main/gcc/gcc-4.8-musl-libssp.patch deleted file mode 100644 index 88725c8e46..0000000000 --- a/main/gcc/gcc-4.8-musl-libssp.patch +++ /dev/null @@ -1,21 +0,0 @@ -Author: Timo Teräs - -Alpine musl package provides libssp_nonshared.a. We link to it unconditionally, -as otherwise we get link failures if some objects are -fstack-protector built -and final link happens with -fno-stack-protector. This seems to be the common -case when bootstrapping gcc, the piepatches do not seem to fully fix the -crosstoolchain and bootstrap sequence wrt. stack-protector flag usage. - ---- gcc-4.8.1/gcc/gcc.c.orig 2013-09-24 06:27:32.133894539 +0000 -+++ gcc-4.8.1/gcc/gcc.c 2013-09-24 06:29:35.790562854 +0000 -@@ -656,7 +656,9 @@ - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector:}" - #else - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}" diff --git a/main/gcc/hardenednopie.specs b/main/gcc/hardenednopie.specs deleted file mode 100644 index ccc4d76437..0000000000 --- a/main/gcc/hardenednopie.specs +++ /dev/null @@ -1,12 +0,0 @@ -*esp_cc1_pie: - - -*esp_options_pie: - - -*esp_link_pie_check: - - -*esp_link_pie: - - diff --git a/main/gcc/hardenednopiessp.specs b/main/gcc/hardenednopiessp.specs deleted file mode 100644 index 307abbdaaf..0000000000 --- a/main/gcc/hardenednopiessp.specs +++ /dev/null @@ -1,4 +0,0 @@ -%include -%include - - diff --git a/main/gcc/hardenednossp.specs b/main/gcc/hardenednossp.specs deleted file mode 100644 index 2c6a8d0953..0000000000 --- a/main/gcc/hardenednossp.specs +++ /dev/null @@ -1,6 +0,0 @@ -*esp_cc1_ssp: - - -*esp_options_ssp: - - diff --git a/main/gcc/pr70839.patch b/main/gcc/pr70839.patch new file mode 100644 index 0000000000..3be1483ac7 --- /dev/null +++ b/main/gcc/pr70839.patch @@ -0,0 +1,42 @@ +https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01791.html + +diff --git a/gcc/java/decl.c b/gcc/java/decl.c +--- a/gcc/java/decl.c ++++ b/gcc/java/decl.c +@@ -507,7 +507,7 @@ static void + parse_version (void) + { + const char *p = version_string; +- unsigned int major = 0, minor = 0; ++ unsigned int major = 0; + unsigned int abi_version; + + /* Skip leading junk. */ +@@ -525,13 +525,6 @@ parse_version (void) + gcc_assert (*p == '.' && ISDIGIT (p[1])); + ++p; + +- /* Extract minor version. */ +- while (ISDIGIT (*p)) +- { +- minor = minor * 10 + *p - '0'; +- ++p; +- } +- + if (flag_indirect_dispatch) + { + abi_version = GCJ_CURRENT_BC_ABI_VERSION; +@@ -540,9 +533,9 @@ parse_version (void) + else /* C++ ABI */ + { + /* Implicit in this computation is the idea that we won't break the +- old-style binary ABI in a sub-minor release (e.g., from 4.0.0 to +- 4.0.1). */ +- abi_version = 100000 * major + 1000 * minor; ++ old-style binary ABI in a minor release (e.g., from 6.1.0 to ++ 6.2.0). */ ++ abi_version = 100000 * major; + } + if (flag_bootstrap_classes) + abi_version |= FLAG_BOOTSTRAP_LOADER; + diff --git a/main/gcc/vanilla.specs b/main/gcc/vanilla.specs deleted file mode 100644 index 545699de36..0000000000 --- a/main/gcc/vanilla.specs +++ /dev/null @@ -1,11 +0,0 @@ -%include -%include -*esp_link_now: - - -*esp_link_relro: - - -*esp_cc1_strict_overflow: - - -- cgit v1.2.3