From 6e1b72b5cd3e62bb418efaae68bd0f50d7391700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 2 Jun 2015 08:56:31 +0000 Subject: main/gcc: upgrade to gcc 5.1.0 --- 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 | 43 ++ main/gcc/012_all_default-warn-trampolines.patch | 25 + main/gcc/01_all_gcc49_configure.patch | 156 ----- main/gcc/020_all_msgfmt-libstdc++-link.patch | 39 ++ main/gcc/02_all_gcc48_config.in.patch | 32 - main/gcc/03_all_gcc49_Makefile.in.patch | 96 --- main/gcc/050_all_libiberty-asprintf.patch | 18 + main/gcc/051_all_libiberty-pic.patch | 10 + main/gcc/053_all_libitm-no-fortify-source.patch | 27 + main/gcc/05_all_gcc48_gcc.c.patch | 25 - .../067_all_gcc-poison-system-directories.patch | 176 ++++++ main/gcc/074_all_gcc5_isl-dl.patch | 596 +++++++++++++++++ .../gcc/086_all_gcc5-pie-copy-relocs-pr65780.patch | 48 ++ main/gcc/090_all_pr55930-dependency-tracking.patch | 18 + 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/10_all_default-fortify-source.patch | 31 - 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/12_all_default-warn-trampolines.patch | 24 - 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/15_all_libgfortran-Werror.patch | 17 - main/gcc/16_all_gcc47_nopie_option.patch | 16 - main/gcc/16_all_libgomp-Werror.patch | 17 - main/gcc/201-libitm.patch | 46 ++ main/gcc/202-musl-config-v3.patch | 294 +++++++++ main/gcc/204-arm.patch | 28 + main/gcc/209-x86-v3.patch | 26 + main/gcc/20_all_gcc49_config_crtbeginp.patch | 40 -- 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/24_all_gcc49_invoke.texi.patch | 44 -- main/gcc/34_all_gcc48_config_i386.patch | 56 -- main/gcc/35_all_gcc48_config_arm.patch | 35 - main/gcc/40_all_gcc49_config_esp.patch | 135 ---- main/gcc/41_all_gcc49_config_esp_alpine.patch | 67 -- main/gcc/48_all_x86_pr53113_libitm-avx.patch | 28 - main/gcc/50_all_libiberty-asprintf.patch | 18 - main/gcc/51_all_libiberty-pic.patch | 10 - .../gcc/67_all_gcc-poison-system-directories.patch | 190 ------ main/gcc/APKBUILD | 307 ++++----- main/gcc/ada-fixes.patch | 9 - main/gcc/ada-musl.patch | 41 +- main/gcc/boehm-gc-uclibc.patch | 11 - main/gcc/fix-cxxflags-for-target.patch | 5 - main/gcc/gcc-4.6-pr32219.patch | 25 - main/gcc/gcc-4.8-musl-fix-iteratephdr.patch | 22 - main/gcc/gcc-4.9-musl.patch | 703 --------------------- main/gcc/gcc-ice-hack.patch | 304 --------- main/gcc/gcc-spec-env.patch | 42 -- main/gcc/gcc49-cloog-dl.patch | 478 -------------- main/gcc/musl-posix_memalign-c++.patch | 27 - main/gcc/pr63740.patch | 17 - main/gcc/pr64037.patch | 83 --- 65 files changed, 2627 insertions(+), 2930 deletions(-) create mode 100644 main/gcc/005_all_gcc-spec-env.patch create mode 100644 main/gcc/010_all_default-fortify-source.patch create mode 100644 main/gcc/011_all_default-warn-format-security.patch create mode 100644 main/gcc/012_all_default-warn-trampolines.patch delete mode 100644 main/gcc/01_all_gcc49_configure.patch create mode 100644 main/gcc/020_all_msgfmt-libstdc++-link.patch delete mode 100644 main/gcc/02_all_gcc48_config.in.patch delete mode 100644 main/gcc/03_all_gcc49_Makefile.in.patch create mode 100644 main/gcc/050_all_libiberty-asprintf.patch create mode 100644 main/gcc/051_all_libiberty-pic.patch create mode 100644 main/gcc/053_all_libitm-no-fortify-source.patch delete mode 100644 main/gcc/05_all_gcc48_gcc.c.patch create mode 100644 main/gcc/067_all_gcc-poison-system-directories.patch create mode 100644 main/gcc/074_all_gcc5_isl-dl.patch create mode 100644 main/gcc/086_all_gcc5-pie-copy-relocs-pr65780.patch create mode 100644 main/gcc/090_all_pr55930-dependency-tracking.patch create mode 100644 main/gcc/101_all_gcc49_configure.patch create mode 100644 main/gcc/102_all_gcc48_config.in.patch create mode 100644 main/gcc/103_all_gcc49_Makefile.in.patch create mode 100644 main/gcc/105_all_gcc48_gcc.c.patch delete mode 100644 main/gcc/10_all_default-fortify-source.patch create mode 100644 main/gcc/116_all_gcc47_nopie_option.patch create mode 100644 main/gcc/120_all_gcc49_config_crtbeginp.patch create mode 100644 main/gcc/124_all_gcc49_invoke.texi.patch delete mode 100644 main/gcc/12_all_default-warn-trampolines.patch create mode 100644 main/gcc/134_all_gcc48_config_i386.patch create mode 100644 main/gcc/135_all_gcc48_config_arm.patch create mode 100644 main/gcc/140_all_gcc49_config_esp.patch create mode 100644 main/gcc/141_all_gcc49_config_esp_alpine.patch delete mode 100644 main/gcc/15_all_libgfortran-Werror.patch delete mode 100644 main/gcc/16_all_gcc47_nopie_option.patch delete mode 100644 main/gcc/16_all_libgomp-Werror.patch create mode 100644 main/gcc/201-libitm.patch create mode 100644 main/gcc/202-musl-config-v3.patch create mode 100644 main/gcc/204-arm.patch create mode 100644 main/gcc/209-x86-v3.patch delete mode 100644 main/gcc/20_all_gcc49_config_crtbeginp.patch create mode 100644 main/gcc/210-fixincludes.patch create mode 100644 main/gcc/211-unwind.patch create mode 100644 main/gcc/212-gthr.patch create mode 100644 main/gcc/213-posix_memalign.patch create mode 100644 main/gcc/214-stdint.patch delete mode 100644 main/gcc/24_all_gcc49_invoke.texi.patch delete mode 100644 main/gcc/34_all_gcc48_config_i386.patch delete mode 100644 main/gcc/35_all_gcc48_config_arm.patch delete mode 100644 main/gcc/40_all_gcc49_config_esp.patch delete mode 100644 main/gcc/41_all_gcc49_config_esp_alpine.patch delete mode 100644 main/gcc/48_all_x86_pr53113_libitm-avx.patch delete mode 100644 main/gcc/50_all_libiberty-asprintf.patch delete mode 100644 main/gcc/51_all_libiberty-pic.patch delete mode 100644 main/gcc/67_all_gcc-poison-system-directories.patch delete mode 100644 main/gcc/boehm-gc-uclibc.patch delete mode 100644 main/gcc/fix-cxxflags-for-target.patch delete mode 100644 main/gcc/gcc-4.6-pr32219.patch delete mode 100644 main/gcc/gcc-4.8-musl-fix-iteratephdr.patch delete mode 100644 main/gcc/gcc-4.9-musl.patch delete mode 100644 main/gcc/gcc-ice-hack.patch delete mode 100644 main/gcc/gcc-spec-env.patch delete mode 100644 main/gcc/gcc49-cloog-dl.patch delete mode 100644 main/gcc/musl-posix_memalign-c++.patch delete mode 100644 main/gcc/pr63740.patch delete mode 100644 main/gcc/pr64037.patch (limited to 'main') diff --git a/main/gcc/005_all_gcc-spec-env.patch b/main/gcc/005_all_gcc-spec-env.patch new file mode 100644 index 000000000..214638e1f --- /dev/null +++ b/main/gcc/005_all_gcc-spec-env.patch @@ -0,0 +1,87 @@ +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 new file mode 100644 index 000000000..ad2f2b1c2 --- /dev/null +++ b/main/gcc/010_all_default-fortify-source.patch @@ -0,0 +1,29 @@ +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 new file mode 100644 index 000000000..ee6c7c439 --- /dev/null +++ b/main/gcc/011_all_default-warn-format-security.patch @@ -0,0 +1,43 @@ +Enable -Wformat and -Wformat-security by default. + + +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -412,7 +412,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O + Warn about format strings that are not literals + + Wformat-security +-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0) + Warn about possible security problems with format functions + + Wformat-y2k +@@ -424,7 +424,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++ + Warn about zero-length formats + + Wformat= +-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) ++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) + Warn about printf/scanf/strftime/strfmon format string anomalies + + Wignored-qualifiers +--- a/gcc/doc/gcc.info ++++ b/gcc/doc/gcc.info +@@ -3451,6 +3451,8 @@ compiler warns that an unrecognized option is present. + '-Wno-format-contains-nul', '-Wno-format-extra-args', and + '-Wno-format-zero-length'. '-Wformat' is enabled by '-Wall'. + ++ This option is enabled by default in Gentoo. ++ + '-Wno-format-contains-nul' + If '-Wformat' is specified, do not warn about format strings + that contain NUL bytes. +@@ -3496,6 +3498,8 @@ compiler warns that an unrecognized option is present. + future warnings may be added to '-Wformat-security' that are + not included in '-Wformat-nonliteral'.) + ++ This option is enabled by default in Gentoo. ++ + '-Wformat-y2k' + If '-Wformat' is specified, also warn about 'strftime' formats + that may yield only a two-digit year. diff --git a/main/gcc/012_all_default-warn-trampolines.patch b/main/gcc/012_all_default-warn-trampolines.patch new file mode 100644 index 000000000..9ab4378d4 --- /dev/null +++ b/main/gcc/012_all_default-warn-trampolines.patch @@ -0,0 +1,25 @@ +Enable -Wtrampolines by default. + + +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -648,7 +648,7 @@ Common Var(warn_system_headers) Warning + Do not suppress warnings from system headers + + Wtrampolines +-Common Var(warn_trampolines) Warning ++Common Var(warn_trampolines) Init(1) Warning + Warn whenever a trampoline is generated + + Wtype-limits +--- a/gcc/doc/gcc.info ++++ b/gcc/doc/gcc.info +@@ -4021,6 +4021,8 @@ compiler warns that an unrecognized option is present. + and thus requires the stack to be made executable in order for the + program to work properly. + ++ This warning is enabled by default in Gentoo. ++ + '-Wfloat-equal' + Warn if floating-point values are used in equality comparisons. + diff --git a/main/gcc/01_all_gcc49_configure.patch b/main/gcc/01_all_gcc49_configure.patch deleted file mode 100644 index ab9aae047..000000000 --- a/main/gcc/01_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/020_all_msgfmt-libstdc++-link.patch b/main/gcc/020_all_msgfmt-libstdc++-link.patch new file mode 100644 index 000000000..a70ea50a0 --- /dev/null +++ b/main/gcc/020_all_msgfmt-libstdc++-link.patch @@ -0,0 +1,39 @@ +Ensure that msgfmt doesn't encounter problems during gcc bootstrapping. + +Solves error messages like the following: + +msgfmt: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/libstdc++.so.6) + +The libgcc_s.so used during build doesn't satisfy the needs of the +libstdc++.so that msgfmt is linked against. On the other hand, msgfmt +is used as a stand-alone application here, and what library it uses +behind the scenes is of no concern to the gcc build process. +Therefore, simply invoking it "as usual", i.e. without any special +library path, will make it work as expected here. + +2011-09-19 Martin von Gagern + +References: +https://bugs.gentoo.org/372377 +https://bugs.gentoo.org/295480 + +--- gcc-4.1.2.orig/libstdc++-v3/po/Makefile.am ++++ gcc-4.1.2/libstdc++-v3/po/Makefile.am +@@ -39,6 +39,7 @@ MSGFMT = msgfmt + EXTRA_DIST = string_literals.cc POTFILES.in $(PACKAGE).pot $(LOCALE_IN) + + .po.mo: ++ env --unset=LD_LIBRARY_PATH \ + $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) +--- gcc-4.1.2.orig/libstdc++-v3/po/Makefile.in ++++ gcc-4.1.2/libstdc++-v3/po/Makefile.in +@@ -419,6 +419,7 @@ uninstall-am: uninstall-info-am + + + .po.mo: ++ env --unset=LD_LIBRARY_PATH \ + $(MSGFMT) -o $@ $< + + all-local: all-local-$(USE_NLS) diff --git a/main/gcc/02_all_gcc48_config.in.patch b/main/gcc/02_all_gcc48_config.in.patch deleted file mode 100644 index 3ad51f317..000000000 --- a/main/gcc/02_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/03_all_gcc49_Makefile.in.patch b/main/gcc/03_all_gcc49_Makefile.in.patch deleted file mode 100644 index bf53d3ca0..000000000 --- a/main/gcc/03_all_gcc49_Makefile.in.patch +++ /dev/null @@ -1,96 +0,0 @@ -2012-01-17 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. - ---- 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 -@@ -279,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CF - CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -- -fno-stack-protector \ -+ -fno-stack-protector $(ESP_NOPIE_CFLAGS) \ - $(INHIBIT_LIBC_CFLAGS) - - # Extra flags to use when compiling crt{begin,end}.o. -@@ -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/050_all_libiberty-asprintf.patch b/main/gcc/050_all_libiberty-asprintf.patch new file mode 100644 index 000000000..bee0c4c23 --- /dev/null +++ b/main/gcc/050_all_libiberty-asprintf.patch @@ -0,0 +1,18 @@ +2008-07-25 Magnus Granberg + + * include/libiberty.h (asprintf): Don't declare if defined as a macro + +--- a/include/libiberty.h ++++ b/include/libiberty.h +@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); + /* Like sprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. */ + ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ ++#ifndef asprintf + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; + #endif ++#endif + + #if !HAVE_DECL_VASPRINTF + /* Like vsprintf but provides a pointer to malloc'd storage, which diff --git a/main/gcc/051_all_libiberty-pic.patch b/main/gcc/051_all_libiberty-pic.patch new file mode 100644 index 000000000..b6160a730 --- /dev/null +++ b/main/gcc/051_all_libiberty-pic.patch @@ -0,0 +1,10 @@ +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) + $(AR) $(AR_FLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ + $(RANLIB) $(TARGETLIB); \ ++ cp $(TARGETLIB) ../ ; \ + cd ..; \ + else true; fi + diff --git a/main/gcc/053_all_libitm-no-fortify-source.patch b/main/gcc/053_all_libitm-no-fortify-source.patch new file mode 100644 index 000000000..5ab15afc3 --- /dev/null +++ b/main/gcc/053_all_libitm-no-fortify-source.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/508852 +https://gcc.gnu.org/PR61164 + +2014-04-27 Magnus Granberg + + #508852 + * libitm/configure.tgt: Disable FORTIFY + +--- a/libitm/configure.tgt ++++ b/libitm/configure.tgt +@@ -43,6 +43,16 @@ if test "$gcc_cv_have_tls" = yes ; then + esac + fi + ++# FIXME: error: inlining failed in call to always_inline ++# ‘int vfprintf(FILE*, const char*, __va_list_tag*)’ ++# : function body can be overwritten at link time ++# Disable Fortify in libitm for now. #508852 ++case "${target}" in ++ *-*-linux*) ++ XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE" ++ ;; ++esac ++ + # Map the target cpu to an ARCH sub-directory. At the same time, + # work out any special compilation flags as necessary. + case "${target_cpu}" in diff --git a/main/gcc/05_all_gcc48_gcc.c.patch b/main/gcc/05_all_gcc48_gcc.c.patch deleted file mode 100644 index 4cea772eb..000000000 --- a/main/gcc/05_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/067_all_gcc-poison-system-directories.patch b/main/gcc/067_all_gcc-poison-system-directories.patch new file mode 100644 index 000000000..d8b812b6e --- /dev/null +++ b/main/gcc/067_all_gcc-poison-system-directories.patch @@ -0,0 +1,176 @@ +http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-4.9/0016-gcc-poison-system-directories.patch + +From: Khem Raj +Date: Fri, 29 Mar 2013 08:59:00 +0400 +Subject: [PATCH 16/35] 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-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 + ++Wpoison-system-directories ++Common Var(flag_poison_system_directories) Init(1) Warning ++Warn for -I and -L options using system directories if cross compiling ++ + Wshadow + Common Var(warn_shadow) Warning + Warn when one local variable shadows another +--- 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])]) + ++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) +--- gcc-4.9-20140316.orig/gcc/configure ++++ gcc-4.9-20140316/gcc/configure +@@ -928,6 +928,7 @@ with_system_zlib + enable_maintainer_mode + enable_link_mutex + enable_version_specific_runtime_libs ++enable_poison_system_directories + enable_plugin + enable_host_shared + enable_libquadmath_support +@@ -1648,6 +1649,8 @@ Optional Features: + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory ++ --enable-poison-system-directories ++ warn for use of native system header directories + --enable-plugin enable plugin support + --enable-host-shared build host code as shared libraries + --disable-libquadmath-support +@@ -27702,6 +27705,19 @@ if test "${enable_version_specific_runti + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi ++ + # Substitute configuration variables + + +--- gcc-4.9-20140316.orig/gcc/config.in ++++ gcc-4.9-20140316/gcc/config.in +@@ -138,6 +138,12 @@ + #endif + + ++/* Define to warn for use of native system header directories */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +--- 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 @@ + #include "intl.h" + #include "incpath.h" + #include "cppdefault.h" ++#include "diagnostic-core.h" + + /* Microsoft Windows does not natively support inodes. + VMS has non-numeric inodes. */ +@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo + } + fprintf (stderr, _("End of search list.\n")); + } ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (flag_poison_system_directories) ++ { ++ struct cpp_dir *p; ++ ++ for (p = heads[QUOTE]; p; p = p->next) ++ { ++ if ((!strncmp (p->name, "/usr/include", 12)) ++ || (!strncmp (p->name, "/usr/local/include", 18)) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ warning (OPT_Wpoison_system_directories, ++ "include location \"%s\" is unsafe for " ++ "cross-compilation", ++ p->name); ++ } ++ } ++#endif + } + + /* Use given -I paths for #include "..." but not #include <...>, and +--- 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. + diff --git a/main/gcc/074_all_gcc5_isl-dl.patch b/main/gcc/074_all_gcc5_isl-dl.patch new file mode 100644 index 000000000..052d30516 --- /dev/null +++ b/main/gcc/074_all_gcc5_isl-dl.patch @@ -0,0 +1,596 @@ +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/086_all_gcc5-pie-copy-relocs-pr65780.patch b/main/gcc/086_all_gcc5-pie-copy-relocs-pr65780.patch new file mode 100644 index 000000000..3e6b8b5bd --- /dev/null +++ b/main/gcc/086_all_gcc5-pie-copy-relocs-pr65780.patch @@ -0,0 +1,48 @@ +https://gcc.gnu.org/PR65780 + +2015-04-22 Jakub Jelinek + + PR target/65780 + * config/s390/linux.h (TARGET_BINDS_LOCAL_P): Define to + default_binds_local_p_2. + * config/arm/linux-elf.h (TARGET_BINDS_LOCAL_P): Likewise. + * config/aarch64/aarch64-linux.h (TARGET_BINDS_LOCAL_P): Likewise. + +--- a/gcc/config/s390/linux.h.jj 2015-01-05 13:07:16.000000000 +0100 ++++ b/gcc/config/s390/linux.h 2015-04-22 17:39:38.880273650 +0200 +@@ -90,4 +90,10 @@ along with GCC; see the file COPYING3. + #undef TARGET_LIBC_HAS_FUNCTION + #define TARGET_LIBC_HAS_FUNCTION gnu_libc_has_function + ++/* Uninitialized common symbols in non-PIE executables, even with ++ strong definitions in dependent shared libraries, will resolve ++ to COPY relocated symbol in the executable. See PR65780. */ ++#undef TARGET_BINDS_LOCAL_P ++#define TARGET_BINDS_LOCAL_P default_binds_local_p_2 ++ + #endif +--- a/gcc/config/arm/linux-elf.h.jj 2015-01-05 13:07:16.000000000 +0100 ++++ b/gcc/config/arm/linux-elf.h 2015-04-22 17:42:35.979420149 +0200 +@@ -118,3 +118,9 @@ + /* Add .note.GNU-stack. */ + #undef NEED_INDICATE_EXEC_STACK + #define NEED_INDICATE_EXEC_STACK 1 ++ ++/* Uninitialized common symbols in non-PIE executables, even with ++ strong definitions in dependent shared libraries, will resolve ++ to COPY relocated symbol in the executable. See PR65780. */ ++#undef TARGET_BINDS_LOCAL_P ++#define TARGET_BINDS_LOCAL_P default_binds_local_p_2 +--- a/gcc/config/aarch64/aarch64-linux.h.jj 2015-01-05 13:07:17.000000000 +0100 ++++ b/gcc/config/aarch64/aarch64-linux.h 2015-04-22 17:40:46.395185820 +0200 +@@ -69,4 +69,10 @@ + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++/* Uninitialized common symbols in non-PIE executables, even with ++ strong definitions in dependent shared libraries, will resolve ++ to COPY relocated symbol in the executable. See PR65780. */ ++#undef TARGET_BINDS_LOCAL_P ++#define TARGET_BINDS_LOCAL_P default_binds_local_p_2 ++ + #endif /* GCC_AARCH64_LINUX_H */ diff --git a/main/gcc/090_all_pr55930-dependency-tracking.patch b/main/gcc/090_all_pr55930-dependency-tracking.patch new file mode 100644 index 000000000..a8743e08c --- /dev/null +++ b/main/gcc/090_all_pr55930-dependency-tracking.patch @@ -0,0 +1,18 @@ +libatomic build failure if configured with --disable-dependency-tracking +load_n.c:115:1: fatal error: opening dependency file .deps/load_1_.lo.Ppo: No such file or directory + +https://bugs.gentoo.org/463463 +http://gcc.gnu.org/PR55930 + +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) + PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c diff --git a/main/gcc/101_all_gcc49_configure.patch b/main/gcc/101_all_gcc49_configure.patch new file mode 100644 index 000000000..ab9aae047 --- /dev/null +++ b/main/gcc/101_all_gcc49_configure.patch @@ -0,0 +1,156 @@ +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 new file mode 100644 index 000000000..3ad51f317 --- /dev/null +++ b/main/gcc/102_all_gcc48_config.in.patch @@ -0,0 +1,32 @@ +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 new file mode 100644 index 000000000..24778958c --- /dev/null +++ b/main/gcc/103_all_gcc49_Makefile.in.patch @@ -0,0 +1,106 @@ +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 new file mode 100644 index 000000000..4cea772eb --- /dev/null +++ b/main/gcc/105_all_gcc48_gcc.c.patch @@ -0,0 +1,25 @@ +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/10_all_default-fortify-source.patch b/main/gcc/10_all_default-fortify-source.patch deleted file mode 100644 index e74d60cc2..000000000 --- a/main/gcc/10_all_default-fortify-source.patch +++ /dev/null @@ -1,31 +0,0 @@ -Enable -D_FORTIFY_SOURCE=2 by default. - -Original patch from: -http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.2/gentoo/10_all_default-fortify-source.patch - ---- 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 Alpine Linux, `-D_FORTIFY_SOURCE=2' is set by default, and is -+ activated when `-Os' or `-O1' or higher is used. 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/116_all_gcc47_nopie_option.patch b/main/gcc/116_all_gcc47_nopie_option.patch new file mode 100644 index 000000000..ed9a961d7 --- /dev/null +++ b/main/gcc/116_all_gcc47_nopie_option.patch @@ -0,0 +1,16 @@ +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 new file mode 100644 index 000000000..62474c022 --- /dev/null +++ b/main/gcc/120_all_gcc49_config_crtbeginp.patch @@ -0,0 +1,40 @@ +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 new file mode 100644 index 000000000..20f98f690 --- /dev/null +++ b/main/gcc/124_all_gcc49_invoke.texi.patch @@ -0,0 +1,44 @@ +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/12_all_default-warn-trampolines.patch b/main/gcc/12_all_default-warn-trampolines.patch deleted file mode 100644 index 2fd4051b1..000000000 --- a/main/gcc/12_all_default-warn-trampolines.patch +++ /dev/null @@ -1,24 +0,0 @@ -Enable -Wtrampolines by default. - ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -640,7 +640,7 @@ Common Var(warn_system_headers) Warning - Do not suppress warnings from system headers - - Wtrampolines --Common Var(warn_trampolines) Warning -+Common Var(warn_trampolines) Init(1) Warning - Warn whenever a trampoline is generated - - Wtype-limits ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -4007,6 +4007,8 @@ headers---for that, @option{-Wunknown-pragmas} must also be used. - 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. - -+ This warning is enabled by default in Gentoo. -+ - @item -Wfloat-equal - @opindex Wfloat-equal - @opindex Wno-float-equal diff --git a/main/gcc/134_all_gcc48_config_i386.patch b/main/gcc/134_all_gcc48_config_i386.patch new file mode 100644 index 000000000..9f0f7a3d4 --- /dev/null +++ b/main/gcc/134_all_gcc48_config_i386.patch @@ -0,0 +1,56 @@ +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 new file mode 100644 index 000000000..7317c69f6 --- /dev/null +++ b/main/gcc/135_all_gcc48_config_arm.patch @@ -0,0 +1,35 @@ +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,13 @@ extern const char *host_detect_local_cpu + # define EXTRA_SPEC_FUNCTIONS BIG_LITTLE_CPU_SPEC_FUNCTIONS + #endif + ++#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 DRIVER_SELF_SPECS MCPU_MTUNE_NATIVE_SPECS + #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 new file mode 100644 index 000000000..cc58e6e7d --- /dev/null +++ b/main/gcc/140_all_gcc49_config_esp.patch @@ -0,0 +1,135 @@ +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 new file mode 100644 index 000000000..b8c88e286 --- /dev/null +++ b/main/gcc/141_all_gcc49_config_esp_alpine.patch @@ -0,0 +1,67 @@ +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/15_all_libgfortran-Werror.patch b/main/gcc/15_all_libgfortran-Werror.patch deleted file mode 100644 index 5f15373d8..000000000 --- a/main/gcc/15_all_libgfortran-Werror.patch +++ /dev/null @@ -1,17 +0,0 @@ -libgfortran does not respect --disable-werror - -https://bugs.gentoo.org/433435 -http://gcc.gnu.org/PR54724 - - ---- a/libgfortran/configure -+++ b/libgfortran/configure -@@ -5764,7 +5764,7 @@ fi - - # Add -Wall -fno-repack-arrays -fno-underscoring if we are using GCC. - if test "x$GCC" = "xyes"; then -- AM_FCFLAGS="-I . -Wall -Werror -fimplicit-none -fno-repack-arrays -fno-underscoring" -+ AM_FCFLAGS="-I . -Wall -fimplicit-none -fno-repack-arrays -fno-underscoring" - ## We like to use C99 routines when available. This makes sure that - ## __STDC_VERSION__ is set such that libc includes make them available. - AM_CFLAGS="-std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings" diff --git a/main/gcc/16_all_gcc47_nopie_option.patch b/main/gcc/16_all_gcc47_nopie_option.patch deleted file mode 100644 index ed9a961d7..000000000 --- a/main/gcc/16_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/16_all_libgomp-Werror.patch b/main/gcc/16_all_libgomp-Werror.patch deleted file mode 100644 index d6a355d67..000000000 --- a/main/gcc/16_all_libgomp-Werror.patch +++ /dev/null @@ -1,17 +0,0 @@ -libgomp does not respect --disable-werror - -https://bugs.gentoo.org/229059 -http://gcc.gnu.org/PR38436 - - ---- a/libgomp/configure -+++ b/libgomp/configure -@@ -4282,7 +4282,7 @@ save_CFLAGS="$CFLAGS" - - # Add -Wall -Werror if we are using GCC. - if test "x$GCC" = "xyes"; then -- XCFLAGS="$XCFLAGS -Wall -Werror" -+ XCFLAGS="$XCFLAGS -Wall" - fi - - # Find other programs we need. diff --git a/main/gcc/201-libitm.patch b/main/gcc/201-libitm.patch new file mode 100644 index 000000000..78396056b --- /dev/null +++ b/main/gcc/201-libitm.patch @@ -0,0 +1,46 @@ +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 new file mode 100644 index 000000000..55c1a6b6b --- /dev/null +++ b/main/gcc/202-musl-config-v3.patch @@ -0,0 +1,294 @@ +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/204-arm.patch b/main/gcc/204-arm.patch new file mode 100644 index 000000000..0fa87de33 --- /dev/null +++ b/main/gcc/204-arm.patch @@ -0,0 +1,28 @@ +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/209-x86-v3.patch b/main/gcc/209-x86-v3.patch new file mode 100644 index 000000000..6d31cd97a --- /dev/null +++ b/main/gcc/209-x86-v3.patch @@ -0,0 +1,26 @@ +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/20_all_gcc49_config_crtbeginp.patch b/main/gcc/20_all_gcc49_config_crtbeginp.patch deleted file mode 100644 index 62474c022..000000000 --- a/main/gcc/20_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/210-fixincludes.patch b/main/gcc/210-fixincludes.patch new file mode 100644 index 000000000..fa5e053d0 --- /dev/null +++ b/main/gcc/210-fixincludes.patch @@ -0,0 +1,14 @@ +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 new file mode 100644 index 000000000..d708c561f --- /dev/null +++ b/main/gcc/211-unwind.patch @@ -0,0 +1,17 @@ +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 new file mode 100644 index 000000000..d3b40276c --- /dev/null +++ b/main/gcc/212-gthr.patch @@ -0,0 +1,54 @@ +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 new file mode 100644 index 000000000..4a5df48bf --- /dev/null +++ b/main/gcc/213-posix_memalign.patch @@ -0,0 +1,30 @@ +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 new file mode 100644 index 000000000..be37ae2db --- /dev/null +++ b/main/gcc/214-stdint.patch @@ -0,0 +1,109 @@ +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/24_all_gcc49_invoke.texi.patch b/main/gcc/24_all_gcc49_invoke.texi.patch deleted file mode 100644 index 20f98f690..000000000 --- a/main/gcc/24_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/34_all_gcc48_config_i386.patch b/main/gcc/34_all_gcc48_config_i386.patch deleted file mode 100644 index 9f0f7a3d4..000000000 --- a/main/gcc/34_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/35_all_gcc48_config_arm.patch b/main/gcc/35_all_gcc48_config_arm.patch deleted file mode 100644 index 5aecc6ba3..000000000 --- a/main/gcc/35_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 2013-01-15 17:17:28.000000000 +0100 -+++ b/gcc/config/arm/arm.h 2013-02-18 22:45:18.327284928 +0100 -@@ -2326,6 +2326,11 @@ extern const char *host_detect_local_cpu - # define MCPU_MTUNE_NATIVE_SPECS "" - #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 - #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/40_all_gcc49_config_esp.patch b/main/gcc/40_all_gcc49_config_esp.patch deleted file mode 100644 index cc58e6e7d..000000000 --- a/main/gcc/40_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/41_all_gcc49_config_esp_alpine.patch b/main/gcc/41_all_gcc49_config_esp_alpine.patch deleted file mode 100644 index b8c88e286..000000000 --- a/main/gcc/41_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/48_all_x86_pr53113_libitm-avx.patch b/main/gcc/48_all_x86_pr53113_libitm-avx.patch deleted file mode 100644 index b17653023..000000000 --- a/main/gcc/48_all_x86_pr53113_libitm-avx.patch +++ /dev/null @@ -1,28 +0,0 @@ -libitm checks for AVX support in the assembler and adds -mavx to x86_avx.cc -which defines the needed typedefs. User CFLAGS can override -mavx however, -so also use the fallback typedef if __AVX__ isn't defined. - -https://bugs.gentoo.org/417271 -http://gcc.gnu.org/PR53113 - - ---- a/libitm/config/x86/x86_avx.cc -+++ b/libitm/config/x86/x86_avx.cc -@@ -29,7 +29,7 @@ - - extern "C" { - --#ifndef HAVE_AS_AVX -+#if !defined (HAVE_AS_AVX) || !defined(__AVX__) - // If we don't have an AVX capable assembler, we didn't set -mavx on the - // command-line either, which means that libitm.h defined neither this type - // nor the functions in this file. Define the type and unconditionally -@@ -40,7 +40,7 @@ typedef float _ITM_TYPE_M256 __attribute__((vector_size(32), may_alias)); - // Re-define the memcpy implementations so that we can frob the - // interface to deal with possibly missing AVX instruction set support. - --#ifdef HAVE_AS_AVX -+#if defined(HAVE_AS_AVX) && defined(__AVX__) - #define RETURN(X) return X - #define STORE(X,Y) X = Y - #define OUTPUT(T) _ITM_TYPE_##T diff --git a/main/gcc/50_all_libiberty-asprintf.patch b/main/gcc/50_all_libiberty-asprintf.patch deleted file mode 100644 index 9ad4a9266..000000000 --- a/main/gcc/50_all_libiberty-asprintf.patch +++ /dev/null @@ -1,18 +0,0 @@ -2008-07-25 Magnus Granberg - - * include/libiberty.h (asprintf): Don't declare if defined as a macro - ---- a/include/libiberty.h -+++ b/include/libiberty.h -@@ -609,8 +609,11 @@ extern int pwait (int, int *, int); - /* Like sprintf but provides a pointer to malloc'd storage, which must - be freed by the caller. */ - -+/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ -+#ifndef asprintf - extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; - #endif -+#endif - - #if !HAVE_DECL_VASPRINTF - /* Like vsprintf but provides a pointer to malloc'd storage, which diff --git a/main/gcc/51_all_libiberty-pic.patch b/main/gcc/51_all_libiberty-pic.patch deleted file mode 100644 index b6160a730..000000000 --- a/main/gcc/51_all_libiberty-pic.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/libiberty/Makefile.in -+++ b/libiberty/Makefile.in -@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) - $(AR) $(AR_FLAGS) $(TARGETLIB) \ - $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ - $(RANLIB) $(TARGETLIB); \ -+ cp $(TARGETLIB) ../ ; \ - cd ..; \ - else true; fi - diff --git a/main/gcc/67_all_gcc-poison-system-directories.patch b/main/gcc/67_all_gcc-poison-system-directories.patch deleted file mode 100644 index 475ef96b9..000000000 --- a/main/gcc/67_all_gcc-poison-system-directories.patch +++ /dev/null @@ -1,190 +0,0 @@ -From 160397ef3c3331099af028f1b8d3e085b07d88ad 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 - -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(-) - -Index: gcc-4.9-20140316/gcc/common.opt -=================================================================== ---- 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 - -+Wpoison-system-directories -+Common Var(flag_poison_system_directories) Init(1) Warning -+Warn for -I and -L options using system directories if cross compiling -+ - Wshadow - Common Var(warn_shadow) Warning - Warn when one local variable shadows another -Index: gcc-4.9-20140316/gcc/config.in -=================================================================== ---- gcc-4.9-20140316.orig/gcc/config.in -+++ gcc-4.9-20140316/gcc/config.in -@@ -138,6 +138,12 @@ - #endif - - -+/* Define to warn for use of native system header directories */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_POISON_SYSTEM_DIRECTORIES -+#endif -+ -+ - /* Define if you want all operations on RTL (the basic data structure of the - optimizer and back end) to be checked for dynamic type safety at runtime. - This is quite expensive. */ -Index: gcc-4.9-20140316/gcc/configure -=================================================================== ---- gcc-4.9-20140316.orig/gcc/configure -+++ gcc-4.9-20140316/gcc/configure -@@ -928,6 +928,7 @@ with_system_zlib - enable_maintainer_mode - enable_link_mutex - enable_version_specific_runtime_libs -+enable_poison_system_directories - enable_plugin - enable_host_shared - enable_libquadmath_support -@@ -1648,6 +1649,8 @@ Optional Features: - --enable-version-specific-runtime-libs - specify that runtime libraries should be installed - in a compiler-specific directory -+ --enable-poison-system-directories -+ warn for use of native system header directories - --enable-plugin enable plugin support - --enable-host-shared build host code as shared libraries - --disable-libquadmath-support -@@ -27702,6 +27705,19 @@ if test "${enable_version_specific_runti - fi - - -+# Check whether --enable-poison-system-directories was given. -+if test "${enable_poison_system_directories+set}" = set; then : -+ enableval=$enable_poison_system_directories; -+else -+ enable_poison_system_directories=no -+fi -+ -+if test "x${enable_poison_system_directories}" = "xyes"; then -+ -+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h -+ -+fi -+ - # Substitute configuration variables - - -Index: gcc-4.9-20140316/gcc/configure.ac -=================================================================== ---- 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])]) - -+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) -Index: gcc-4.9-20140316/gcc/doc/invoke.texi -=================================================================== ---- gcc-4.9-20140316.orig/gcc/doc/invoke.texi -+++ gcc-4.9-20140316/gcc/doc/invoke.texi -@@ -260,6 +260,7 @@ Objective-C and Objective-C++ Dialects}. - -Woverlength-strings -Wpacked -Wpacked-bitfield-compat -Wpadded @gol - -Wparentheses -Wpedantic-ms-format -Wno-pedantic-ms-format @gol - -Wpointer-arith -Wno-pointer-to-int-cast @gol -+-Wno-poison-system-directories @gol - -Wredundant-decls -Wno-return-local-addr @gol - -Wreturn-type -Wsequence-point -Wshadow @gol - -Wsign-compare -Wsign-conversion -Wfloat-conversion @gol -@@ -4230,6 +4231,14 @@ headers---for that, @option{-Wunknown-pr - for most targets, it is made up of code and thus requires the stack - to be made executable in order for the program to work properly. - -+@item -Wno-poison-system-directories -+@opindex Wno-poison-system-directories -+Do not warn for @option{-I} or @option{-L} options using system -+directories such as @file{/usr/include} when cross compiling. This -+option is intended for use in chroot environments when such -+directories contain the correct headers and libraries for the target -+system rather than the host. -+ - @item -Wfloat-equal - @opindex Wfloat-equal - @opindex Wno-float-equal -Index: gcc-4.9-20140316/gcc/gcc.c -=================================================================== ---- 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)}\ -Index: gcc-4.9-20140316/gcc/incpath.c -=================================================================== ---- gcc-4.9-20140316.orig/gcc/incpath.c -+++ gcc-4.9-20140316/gcc/incpath.c -@@ -28,6 +28,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "diagnostic-core.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo - } - fprintf (stderr, _("End of search list.\n")); - } -+ -+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES -+ if (flag_poison_system_directories) -+ { -+ struct cpp_dir *p; -+ -+ for (p = heads[QUOTE]; p; p = p->next) -+ { -+ if ((!strncmp (p->name, "/usr/include", 12)) -+ || (!strncmp (p->name, "/usr/local/include", 18)) -+ || (!strncmp (p->name, "/usr/X11R6/include", 18))) -+ warning (OPT_Wpoison_system_directories, -+ "include location \"%s\" is unsafe for " -+ "cross-compilation", -+ p->name); -+ } -+ } -+#endif - } - - /* Use given -I paths for #include "..." but not #include <...>, and diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index aae7e5c8a..0bcffa627 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Natanael Copa pkgname=gcc -pkgver=4.9.2 +pkgver=5.1.0 _cross="" [ "$BOOTSTRAP" = "noheaders" ] && pkgname="gcc-pass1" [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" @@ -8,15 +8,15 @@ _cross="" && _cross="-$CTARGET" pkgname="$pkgname$_cross" -pkgrel=6 +pkgrel=0 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" arch="all" license="GPL LGPL" _gccrel=$pkgver-r$pkgrel -depends="binutils$_cross" -makedepends_build="paxmark bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev cloog-dev" -makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev cloog-dev !gettext-dev" +depends="binutils$_cross isl" +makedepends_build="paxmark bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev" +makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev !gettext-dev" makedepends="$makedepends_build $makedepends_host" subpackages=" " [ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_cross" @@ -143,48 +143,51 @@ fi source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2 ftp://sourceware.org/pub/java/ecj-latest.jar - 01_all_gcc49_configure.patch - 02_all_gcc48_config.in.patch - 03_all_gcc49_Makefile.in.patch - 05_all_gcc48_gcc.c.patch - 16_all_gcc47_nopie_option.patch - 20_all_gcc49_config_crtbeginp.patch - 24_all_gcc49_invoke.texi.patch - 34_all_gcc48_config_i386.patch - 35_all_gcc48_config_arm.patch - 40_all_gcc49_config_esp.patch - 41_all_gcc49_config_esp_alpine.patch - - 10_all_default-fortify-source.patch - 12_all_default-warn-trampolines.patch - 15_all_libgfortran-Werror.patch - 16_all_libgomp-Werror.patch - 48_all_x86_pr53113_libitm-avx.patch - 50_all_libiberty-asprintf.patch - 51_all_libiberty-pic.patch - 67_all_gcc-poison-system-directories.patch - - gcc49-cloog-dl.patch - gcc-ice-hack.patch - gcc-spec-env.patch + 005_all_gcc-spec-env.patch + 010_all_default-fortify-source.patch + 011_all_default-warn-format-security.patch + 012_all_default-warn-trampolines.patch + 020_all_msgfmt-libstdc++-link.patch + 050_all_libiberty-asprintf.patch + 051_all_libiberty-pic.patch + 053_all_libitm-no-fortify-source.patch + 067_all_gcc-poison-system-directories.patch + 074_all_gcc5_isl-dl.patch + 086_all_gcc5-pie-copy-relocs-pr65780.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 + libgcc-always-build-gcceh.a.patch - gcc-4.6-pr32219.patch - gcc-4.9-musl.patch - gcc-4.8-musl-fix-iteratephdr.patch gcc-4.8-musl-libssp.patch gcc-4.9-musl-fortify.patch - boehm-gc-uclibc.patch boehm-gc-musl.patch gcc-pure64.patch fix-gcj-musl.patch fix-gcj-iconv-musl.patch - musl-posix_memalign-c++.patch - pr63740.patch - pr64037.patch gcc-4.8-build-args.patch fix-cxxflags-passing.patch - fix-cxxflags-for-target.patch ada-no-pie.patch ada-fixes.patch ada-shared.patch @@ -372,7 +375,14 @@ package() { if $LANG_JAVA; then sed -i -e 's/lib: /&%{static:%eJava programs cannot be linked statically}/' \ - "$pkdir"/usr/lib/libgcj.spec + "$pkgdir"/usr/lib/libgcj.spec + fi + + if $LIBGOMP; then + mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir || return 1 + fi + if $LIBITM; then + mv "$pkgdir"/usr/lib/libitm.spec "$pkgdir"/$_gcclibdir || return 1 fi # remove ffi @@ -487,7 +497,7 @@ java() { depends="zlib-dev gcc=$_gccrel libgcj=$_gccrel" paxmark -pm "$pkgdir"/$_gcclibexec/ecj1 || return 1 - mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib + mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib "$subpkgdir"/$_gcclibdir/ cd "$pkgdir"/usr/bin mv gcj gcj-dbtool gjavah gcjh jcf-dump "$subpkgdir"/usr/bin/ cd "$pkgdir" @@ -497,13 +507,11 @@ java() { done for i in "$pkgdir"/usr/lib/libgcj*.so; do if [ -L "$i" ]; then - mv "$i" "$subpkgdir"/usr/lib/ + mv "$i" "$subpkgdir"/usr/lib/ || return 1 fi done - mv \ - "$pkgdir"/usr/lib/libgij.so \ - "$pkgdir"/usr/lib/libgcj.spec \ - "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/libgij.so "$subpkgdir"/usr/lib/ || return 1 + mv "$pkgdir"/usr/lib/libgcj.spec "$subpkgdir"/$_gcclibdir/ || return 1 } libgcj() { @@ -602,10 +610,9 @@ gfortran() { "$pkgdir"/usr/lib/libquadmath.so \ "$subpkgdir"/usr/lib/ || return 1 fi - mv "$pkgdir"/$_gcclibexec/f951 \ - "$subpkgdir"/$_gcclibexec - mv "$pkgdir"/$_gcclibdir/libgfortranbegin.a \ - "$subpkgdir"/$_gcclibdir + 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 } libgnat() { @@ -632,149 +639,155 @@ gnat() { mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ || return 1 } -md5sums="4df8ee253b7f3863ad0b86359cd39c43 gcc-4.9.2.tar.bz2 +md5sums="d5525b1127d07d215960e6051c5da35e gcc-5.1.0.tar.bz2 d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar -096f21a5269adc12cc967c2a63620fa0 01_all_gcc49_configure.patch -2a8d6a9046efc9f44449b012cf12d7fd 02_all_gcc48_config.in.patch -4e7099835d0eb0914ba859132e38cec2 03_all_gcc49_Makefile.in.patch -bcc6826afc77ae77a5dd5f164b51c746 05_all_gcc48_gcc.c.patch -c4e4451863b021963645d904fc847105 16_all_gcc47_nopie_option.patch -b521d19ed71e0858fd700e31e57a8db5 20_all_gcc49_config_crtbeginp.patch -48da8dcab1946ebe1dec257472266ff9 24_all_gcc49_invoke.texi.patch -b0910da9f2eb4fe6a684e680f6336491 34_all_gcc48_config_i386.patch -adcc78e93f54b80210bc436041c1a6e7 35_all_gcc48_config_arm.patch -f972492ebb115777ee099f6d779a7a2d 40_all_gcc49_config_esp.patch -965a029d968eec0695191e3f148040f9 41_all_gcc49_config_esp_alpine.patch -51ffc4915fb1dfc24c84ac3a5d81d941 10_all_default-fortify-source.patch -f28e9334c58ce14f69a9e988026bc772 12_all_default-warn-trampolines.patch -7eb9ad894dfdf1b3d4a8a407a339a6f1 15_all_libgfortran-Werror.patch -452e457a0ac45e6f8f75eb6d6ba4d04b 16_all_libgomp-Werror.patch -8975abab9ee8ae5028a55e84b930cf02 48_all_x86_pr53113_libitm-avx.patch -326fa30475ba206cc2ef1666ec4314c8 50_all_libiberty-asprintf.patch -d8692c56f04b92667096f59d843e95c5 51_all_libiberty-pic.patch -96d4fea730498efb2c4b8aa6a181cac5 67_all_gcc-poison-system-directories.patch -f819b63e534cf761d91b9fd0ce45c9e6 gcc49-cloog-dl.patch -ea0fdebab6c660635736d27f4ea2f113 gcc-ice-hack.patch -a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch +f4be3dc5dcbe42df9274774ddb908d4a 005_all_gcc-spec-env.patch +56147d4efc0a64dd193f5d211d5b9a61 010_all_default-fortify-source.patch +7f950b52dfdd1efb3de9aa101282a79f 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 +7fb79fc1d5b28d9cd103b1411eb75f2c 086_all_gcc5-pie-copy-relocs-pr65780.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 +d06cd888089d346ebdd9abb702c0a3bf 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 504c7dd8651c5d98229892c4cd9ea591 libgcc-always-build-gcceh.a.patch -32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch -39c75e44e138a5d558b3027b8e97e416 gcc-4.9-musl.patch -6e5c32243a86ff35b7b47d18c95b31bd gcc-4.8-musl-fix-iteratephdr.patch 0d0a41c02802b85c8f1b78ce28544f92 gcc-4.8-musl-libssp.patch 9e658e590bc51be611f39945183f6aa2 gcc-4.9-musl-fortify.patch -2c6cb49bb9bfd8b6e690222e66ccc901 boehm-gc-uclibc.patch 0ea0f556d4ef9c260d1353b7fd33970c boehm-gc-musl.patch 2e2b787bb988d9007c9f7ce42178dfe6 gcc-pure64.patch 14fc0a0b925ef911ce78cd030fe58902 fix-gcj-musl.patch e17bbb0fe802974e20645b4182b4c410 fix-gcj-iconv-musl.patch -4ec9d6c3ed7734811d9a8996dbc4884f musl-posix_memalign-c++.patch -c8968669baced4afc2550147a5e18cc6 pr63740.patch -a89e2d822654beb96a4fe79099827a51 pr64037.patch 0a2041bbf83648e6c4f6d3484f7249ca gcc-4.8-build-args.patch 4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch -87684048ecaaf0e046983bc2782292dd fix-cxxflags-for-target.patch a4ccdeee63d0ab08d5e6165cb32b66ff ada-no-pie.patch -2b4235111d2e66f2c690eb340cb4178b ada-fixes.patch +8f1d0704dd1b564e4a5e0790b3c27aa2 ada-fixes.patch 20e2731c02ce50739ebdead2795f9c41 ada-shared.patch -ed08316331af9dcfacb0938c1a5512cf ada-musl.patch +221773e09429ae2aba03780fb1089290 ada-musl.patch a2f435d81e872a73a8b44a4581832af0 vanilla.specs 17a31b8580de9dd9c06a1ed96886d538 hardenednossp.specs 33ce2d221828a2d03978da52ba609524 hardenednopie.specs 5c431710b72c6ec16ed21bcca83d9f87 hardenednopiessp.specs" -sha256sums="2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd gcc-4.9.2.tar.bz2 +sha256sums="b7dafdf89cbb0e20333dbf5b5349319ae06e3d1a30bf3515b5488f7e89dca5ad gcc-5.1.0.tar.bz2 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781 ecj-latest.jar -d86a599414c8378aa1cfde75d7c2f94e7345c34063ff0114432c6de119eba2fc 01_all_gcc49_configure.patch -f301cce95609650f57c5212b38daf5288b4e7c5fa37ae2892664d4c8ceaadfbf 02_all_gcc48_config.in.patch -f62f5bd0d39a6a529a5373252ca450a23a825a41bae91e9a128b617a441d081b 03_all_gcc49_Makefile.in.patch -5fbe104dedff59b5faf9f11a51ea31b26913e8baa23fc724fc0238a4ef03b4e9 05_all_gcc48_gcc.c.patch -40a54195784bb613a27724518b6d6f1dc5475c47acccdade43cc1707d331f7f9 16_all_gcc47_nopie_option.patch -fded7088ad66eaa2c18890c1317492d1004229b485b200d4fbd882859e37d20d 20_all_gcc49_config_crtbeginp.patch -175051a5938073bba5d9f2f5803b6d9405e10475bfa9356df29cdda4f9a36719 24_all_gcc49_invoke.texi.patch -150f17367d7f514fda9e0aac283e059b190a2251d7d9dfa2b5686b2bdc67b725 34_all_gcc48_config_i386.patch -48e22b2794ae70985c418832f7845814d65e78abcf56d38205db4b760a1c5ffa 35_all_gcc48_config_arm.patch -e4ae7a4ac9c08775311fec84d800511f3409f1b5e9f25f0dd39cc0571d03846c 40_all_gcc49_config_esp.patch -b36f44331ca0204234263a4e3d953b741f114a8e6d05270ba0b9dc270faa0475 41_all_gcc49_config_esp_alpine.patch -538d3d2de8a1bf89c74fcff308dfb320d9d00e1f4d335a0e66968f9f6dd261d7 10_all_default-fortify-source.patch -ce7774aa13be5da274220258772ccbdd6f54abdad97a3798ba282865c809f042 12_all_default-warn-trampolines.patch -8b1450d5a7756af2b890588005690785a663601e2b1533671b609aa8cce0f718 15_all_libgfortran-Werror.patch -1f106fe03cede7c697bde7d81732e0d3bb2c7197e4967789182a5fd8db532900 16_all_libgomp-Werror.patch -cead5b092ab4881e8b830d51c0037a8fb149bab632e7661aa505ba574295e0e4 48_all_x86_pr53113_libitm-avx.patch -38f7c0841d99c6dd3610cd5618b68dd6579713c018eaed856217fc4263bcf6a6 50_all_libiberty-asprintf.patch -da6bbb5dc654d5e1df8ecae5c9ebb56265426c405931f14f5878248b8c79f78d 51_all_libiberty-pic.patch -c3272ceb67eebcc2dad7b5509573a55610b6ca6ba3fd28638662a36ea9cd85b6 67_all_gcc-poison-system-directories.patch -482d3bfa9c75109dab7011e05070e3396d62fec6c20ea6b538a9fcf68e754b7a gcc49-cloog-dl.patch -8f7efd182fd7517fdcd8b78de11b75bfd9f2fa623ffec3d762ae6ff9ab77a476 gcc-ice-hack.patch -64b01f29fb853fee5ecda998b66eeaa7ec86ff1fc3b21432bfd69eb543c93e6a gcc-spec-env.patch +aac72f6c1940153084d5ffca8040db6e2eb9e75f15915b8f3f695bb0cd44716b 005_all_gcc-spec-env.patch +9f354a85bb1914b9a9cbd82e2a48fbd3aca384b801285b27512eb2b238c48635 010_all_default-fortify-source.patch +ff311c71e9398d3949e34c5f67fc9cde6edb553c3910a64b5ad7d1ff781ad4e5 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 +bcb8dba8dad6daa4e10d1274e298a05b9e522223641ab79599a8d8472d099fa6 086_all_gcc5-pie-copy-relocs-pr65780.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 +e572e1631f892b9aa3820fbda66b4bdc781898dec45b48c61eac7d916abf34a5 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 1975189156d70f5428cb7f1516533965d1c8734f3009fc89a9b8e289b72326f1 libgcc-always-build-gcceh.a.patch -89207a8b62137a857ee2c43499d6b5247d37b530d1338844dbb330a6846b2ad2 gcc-4.6-pr32219.patch -9ab8fdc56e64d44c83fd18cbeb472bd3d1554b5059fa6bf49f33488208de1417 gcc-4.9-musl.patch -151c11c3303233e6ff06e27aa6dc889140bc46a7b5e4870587c40e37d36ede2c gcc-4.8-musl-fix-iteratephdr.patch 80b76ca30dcaf07481ab102869d741f044c7e5235f462182bc27467baacda9a4 gcc-4.8-musl-libssp.patch dc93f97dff28b872f9c7e241fb87a3eca0271f706534d196b3517781b05667fa gcc-4.9-musl-fortify.patch -02751ccf223dcfc898c0ce2214cd0859d275e90b742f1a66e38db5c50f94b38c boehm-gc-uclibc.patch 6ccca88695ef84c0d038cd315cad5ae5b799672ecb009fdaab34e68ba60b733c boehm-gc-musl.patch f5473c6aea96d5137defd68898ba31042944a3f3ed26c05b964a40bd876c6f47 gcc-pure64.patch 22c78cc4a2658ff574e7ded1e5bc765a4f81f730d12e72d5883fe0bf73e71220 fix-gcj-musl.patch 51782c972ab828eb4ccb3ca3570341d025b2ae9a8e8fd8188cefb29c5f87401b fix-gcj-iconv-musl.patch -24d8dbbb7eb4cbf1bc9aa215c94482f76258d5ea67892a491de21f49eb68c028 musl-posix_memalign-c++.patch -eedd8697f42a3b01e6957676343cce486b16fe8b2e4d1f2926c43db391c743c1 pr63740.patch -c1044420a06a6559ed9e575d9bb76b13ea4585a9ba23147aecb39e4aaf1e8915 pr64037.patch bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build-args.patch a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch -a5678380e887dbf600c59273d382e81c10f89d28e422238a617d0a43ad5c5a69 fix-cxxflags-for-target.patch 7b71cd7c3c186ae488d2e2af169816e4f0f19782fc0e7bc6f9d0a9032e09ee5e ada-no-pie.patch -ca0db7f59e7af0c621751eee9e3775d4c00c4b663f82f9e04c53a2efb16edca1 ada-fixes.patch +e12d67a15bd45c4a05ffdea98caaa4017237cfd93b3853e380b0d2ab97f1d8f9 ada-fixes.patch d6c7fc1820a4fa285297c299c255fe2f19ce1695486f20edd098252a97545e6a ada-shared.patch -0f4d4d60f8042181163a314ebeed0f045382da8fa74c7dad90d8a80953ff1ba2 ada-musl.patch +23d99e94060972bb25de4687da88ecb4fce9a7f0afa4b71a05161246917cd75d ada-musl.patch 1315d4c430b4d81c61d14a252d7681125fd7d79fde457c014c18c62c4f1aa1de vanilla.specs 50a46bb1c4d209ce687d13e74cc9e4e0b87cef4a8165d22fb9be243c9cf08374 hardenednossp.specs 8eccfcf282fb54aadede7c23a8b5b843c0a63a55485e74d4332ab49025d38e78 hardenednopie.specs af85685ff501f5e0eaaa394628365425486dafe4780f0f683a4536ab60173cdf hardenednopiessp.specs" -sha512sums="e96cba06d572dbe7f382a2b00fd9297dcf9f9219d46a9ad0bd904dc36d5e7db3335e422640b79a27fed6fde91b0731732b94a0e2fbcd47344d6779f8ba1f4f9c gcc-4.9.2.tar.bz2 +sha512sums="30f6a94d3adb25bc51fcaddf32a6c41429f569eeb9ed64330445b1296f99998fbfa03277b375be4f7b2b80f519910ef88e4149db7cd9031e2c61a49f501bde94 gcc-5.1.0.tar.bz2 d4e1bf7538ace56e3d69fa91da5bbd16c272923b4de0a9d8dee23ea2b75f9f38c603de72fc4061df49285c450b63f3df211cee5270e9fffc5447445d1a9c9e4e ecj-latest.jar -618a8d037ccad15e60182acc9c85ba844cb9b5800a22ece0b814e43541b01b4e390a2847f86debb351f4b05580241747fde87e86a17060744e7bb2b9a3dc5bd4 01_all_gcc49_configure.patch -21770259c7916e55568027926e4a543eea468b04436cc61c28f749be5a6635c48e68b7924a8eb19a76733a9d2f00921ba06faddaedbf14b1cdad5ab1810cc6c6 02_all_gcc48_config.in.patch -3afe2cc407b5440333d9517daca3257e08a7318695d20645a9186cafac53afa6d0c075af67398ff7abd06250567cc6c751e6dabb65a310eef9a5d981e910aa25 03_all_gcc49_Makefile.in.patch -e98cc321d71e5bb62c6116b30ed6f11044bda440e238026a83dec63f04a0587440bdae50ec211b07976fcd9deb329f9dd1dac1317dae5003088a8a8bddbb97c1 05_all_gcc48_gcc.c.patch -98a4da3137177c5cad7dd7d35ad39cd416aa36f07867714e09ab8c0d8b759d2659063aa87b16ac1b708a283afd2ac54e20b327a32d1147720996d7bc11dcbd63 16_all_gcc47_nopie_option.patch -8fc6f2fd921c560fb1d7ba17b5cef4ea8071ee6909d372e41201667c011f948560fa543b1246cf55c0009622abf0dbc0bd79f718a853f2f0b59290e3df2c2968 20_all_gcc49_config_crtbeginp.patch -32bfe9c1f6f566de72c93388622001ff4b95086ea6f476bdfc08403ea474f98212f7396bc75d88a79a053159f78dca922ec6f641f83d9959ad419b0d8901b504 24_all_gcc49_invoke.texi.patch -dd5b9b30eb7716cb3c010ca79a83ed6219ff6e6f2557deb4e1d26cecac0f2b14c4ef7bf4dc5c2aec88aae5463763f5f64454b8a627ebd1d0a5c92984017025ad 34_all_gcc48_config_i386.patch -8829f85323d8b11e26e3c19ced4a51875fc63f1483cfdc4d0f579a6cb37e1b6e23fcf33a87a574a6e0007250374ea46d117a136e73a40fbe43f0e39d9b2dd1a8 35_all_gcc48_config_arm.patch -976994900d20a448b97fa91e1d758b6da6d8ad9121b3dbc2e8f66ff8006d8e496cd3dddc41394db6c4d20366d56fe12375b97f494d6fb9abb8e64ab626acc2ef 40_all_gcc49_config_esp.patch -e2d027be2e76a64a607ae44566d163bcc2a03c9e14d5bd20cd8bb15c2e9e395d8964b747a6a9c49541a5d1613d721855b73d60cce7c834427b44788fa92d44dc 41_all_gcc49_config_esp_alpine.patch -6cdac0741568b418af1e267a69b487e48a98e319f5ec8ab2bad293f2520ceced40c7df7ddef84963f5b101b94f34e441574c501ef3993ded097beb7c9d3b205f 10_all_default-fortify-source.patch -5069e4b741488913a646a9b5d871af8e7f7a606158ea09305d0ddd46257c5b659770627bc2ca3abeaae039da1717b3ba6c9cd90554a441da74eb4ecf24c13074 12_all_default-warn-trampolines.patch -c18a99b7303a734fe4dca9d4e90e21d18e5bd71c7d91e1a26c86b1354c73f567590a875941bfe64ce59f0393023b91c606c96b30885c55b98a790c3ab0c84ca7 15_all_libgfortran-Werror.patch -433404fd9bfa172d69fff4a5505e8648cbbbf5f052d2b4235608ff7af0c4063d557d25d80c85c5bd0d1e1ed64b568e7bbc0cdbce11cc74db4c0189af3a01634a 16_all_libgomp-Werror.patch -ff16f259fff8d78230593eee8641eab5a72c5c517c6ac5f09597edbc624d964b33f185a0dd5772d6029f757a5edb66431b3eab77dac71e76a0ef155bb7443d2c 48_all_x86_pr53113_libitm-avx.patch -c6c314a2d24531b4286436dec7189f83e443c4cfa9b88339a4c324c2d40812d766ed44dcfd4a0c3b67695bb76969a4d8a9784ff95876ceba23def305ef8a48f8 50_all_libiberty-asprintf.patch -0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 51_all_libiberty-pic.patch -9b623a0b00254326596a56fff23dacc97e560823ebdf35698799fc7ab5e98984c71b7ddfceeb1589bbbdd1ba89a742cd7becf8f70f0081dfc26bcef4198b1b5d 67_all_gcc-poison-system-directories.patch -9c6aa6d7f096c3aaebbe21d52967872195aea130b51d60a1934255b00bf1b23d24ec598c7763152f987f7999da9e56f512d169958666a3133641de3780a75d3f gcc49-cloog-dl.patch -7242876e4bba34235f6f3ea960d72439638bd31547284ca96cb94c97a2d46dd7b38a3709fd159cf86efa1e8a44e3e9125fe82bc3a1cc71153591755827d6c9fd gcc-ice-hack.patch -ce9c1f923e2c6d17347ec2d3d8482351a9644194b2753627389294d43bb4f11b9c2ef41eda1b46ad83d09901a0bedebd5b6b8a57a198646030ab61e8d2d8cb48 gcc-spec-env.patch +486ddf9293f11db70fa277196ba95a3a5a45c181c99d6460ef6b2ad7396a1e75533ef29d5c47f30319acf4fb731a40f312ba1c32105b23ee905a78b017e7aaf0 005_all_gcc-spec-env.patch +5c95afffbd6dc49c252fd3723142d240067470f4c347237c38d37cafe30f6251cd9bebad62d54b75ceacdccab3a2d806a1d17ad94122ce6a84229e099bac4379 010_all_default-fortify-source.patch +1eba1f17328760f72369947cd0d942d2356546fcd7c0b85f5f18ab42819e051e2010b8641eee35faf6492818a680d24bd6ae680b7a0cf2f36a3361e1a829ce81 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 +18aa696350d0272af70920fc4736c3a8c81b59624938dd684245a7626dc444d99bbe486401557e6a024aa4bd19240930f4afcd80f39c602dd207d273640171ce 086_all_gcc5-pie-copy-relocs-pr65780.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 +c5048cde8d267d340b030d1843f8dbec8d1d7e8276d40d170b41a31f2b10f887249ce987afbff884ca54f76559b9a599b72009428d222fc51a17a8e3406d6140 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 d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch -9fc5e32f2573ae67b6cf22119d636d10a47c42718635bceff7d457a93a3f664ae1ed10e154f70964ba2d26b0de04f879a8c05de6411112760d40433373dd0a80 gcc-4.6-pr32219.patch -e2be926c0ed4d67587857652678253a2a4e42294009a0c4b9fc420e53b0e6d44d1a2c6c2c62db837bc010470e9e62eb4af1ba7f51ff507c41e40922cd022dd26 gcc-4.9-musl.patch -b5b0210dfaccfe0b06f0a9090666b1fae2a3faa4140b7930146b29531f0da9beb1f2c1f7e7bc2bd29179f9fe05dc30e246e96220b8ff75a90f75e8350c9058a1 gcc-4.8-musl-fix-iteratephdr.patch e6d9b103c128e5d4eca515b1496d78b05708de770597c883daddd95ea41e77b5ef1be613b989357cc870a7efd9e43b011022c2d302e7056cff7b69e764906ff2 gcc-4.8-musl-libssp.patch 600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch -e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehm-gc-uclibc.patch bda845a6aa1854d2c883910b115f79ccfa93dfc2b5eac69a3a236d83eb34cadc140731d616ffc24698c7abc8878dd15f231bcc5119f1860e575a120b311706c7 boehm-gc-musl.patch 4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch f89ddeb21bc8f97e6a850a6b70b4501a8f3e49a4bc8cc82897488decda5d98ad01cb7f6c8b392d452e9579924a523bc75da6e0648c1c976d42e40af48b10343b fix-gcj-musl.patch 54d67cc008b735e47771314171930c5d8b8f5f5dc97fcf4214824c105c808f3e75d22d5a4fdf5068ed0457fa0d46c60cfb442e276259a4a5e9b8722a027d18e6 fix-gcj-iconv-musl.patch -7de81fc8c7eb36690949eb30082515454978440a8f389b12407ac5e9125ef6824d6059ffb5b063ab1ccc6c4827b1a6a0984b538f056b85e3171800a6f723ec8b musl-posix_memalign-c++.patch -095281d940ad7504ed7071cc9800d81db33eb4aa5465696ef7b12bf1213dbdfa701f4392095c5167b331c38219b19d25a0798524b319f1c77aa8522d76d8c92c pr63740.patch -efc04b179d41b484eddddc56d0e442634995d56c994e6295ae09b9856ab46649d5f45f51ea84494ab39df41c213772d0e68aee67e66fdf340f0a647b55629ced pr64037.patch abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch -c731f4aaaa65c8950e1b2bd9331410f92d378fd8c7e718532dccaa27ee11984d51d74216c3611e89a802325b81d7f184116839dce2dab50cae9b643c20a82fe7 fix-cxxflags-for-target.patch e80a08de4b43fb71f7699bcce360cd99bc525dab20b9109e7152bd211def5d8e728f88771ed59f15ed520cbf069364debc4f822c10a1abf7e2c7badd67e1c83c ada-no-pie.patch -b37195a126476775e2ef16e0adc9173664c514339fb319f628debd8a4133fa53e022278387c68fc260cf813e58602617e9e629ea8177133bfdf5972398fe1c55 ada-fixes.patch +efab5c2b3334848f46bb039f067a65eeef3a11f5031ee87df6e14ede6afe891280cd9155bb660a54dc48fc8246120b5d32405a975398018dda00999012e3a3f4 ada-fixes.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch -76d7d35066534c332956a88da84a95c8c54c6e0742c3c46e6b256395bf67f7c167b5ecd47fbed697fb1c9d7a41016c99e7dcd06465516a0e963707a0eab8f8b6 ada-musl.patch +a13c6acd864933bd7b12501686da57b09cbff9471c7f630f5bc9a92902a4006a9024a08ee41574707e4c232a754a21633ea89e0bb45dc0d5967e50b299ef6a5e ada-musl.patch 83a0996a48096032bcc674a6d28524f1cd2d81837621ebe4c15b5aedbd551c77ce5576b6307adb673ef0e4ac0431d935ad6a427edca2af5c21b6be9176bfaddb vanilla.specs e4d38905527c500c61c421d782a8ac6ef2b034b15fd81d868486ac330a70922937d3c47e0684e9f3250744569b56a8df199499a4a5c107a6d544dca84458dc12 hardenednossp.specs b56f7c308c5aefd0cfc647abd75939508a6640c53fce7c19da7c7d8ef4405d29b0d88800117fc7ff8d0022b035d511fb6d478e745bb2ed12a1b63f9f8cf3e168 hardenednopie.specs diff --git a/main/gcc/ada-fixes.patch b/main/gcc/ada-fixes.patch index c302f5be5..60a16a368 100644 --- a/main/gcc/ada-fixes.patch +++ b/main/gcc/ada-fixes.patch @@ -23,15 +23,6 @@ #elif defined (USE_OPENPTY) status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL); #elif defined (USE_CLONE_DEVICE) -@@ -1179,7 +1170,7 @@ - int status; - - /* ensure that s is filled with 0 */ -- bzero (&s, sizeof (&s)); -+ bzero (&s, sizeof (s)); - - /* Get the current terminal settings */ - status = tcgetattr (fd, &s); --- gcc-4.8.1/gcc/ada/cal.c.orig +++ gcc-4.8.1/gcc/ada/cal.c @@ -65,6 +65,7 @@ diff --git a/main/gcc/ada-musl.patch b/main/gcc/ada-musl.patch index a94f0e744..a44056a4c 100644 --- a/main/gcc/ada-musl.patch +++ b/main/gcc/ada-musl.patch @@ -1,19 +1,19 @@ -diff -ru gcc-4.9.2/gcc/ada/adaint.c gcc-4.9.2/gcc/ada/adaint.c ---- gcc-4.9.2/gcc/ada/adaint.c 2014-02-24 18:51:58.000000000 -0200 -+++ gcc-4.9.2/gcc/ada/adaint.c 2014-12-10 12:05:44.621173474 -0200 -@@ -67,6 +67,11 @@ +diff -rup gcc-5.1.0/gcc.orig/ada/adaint.c gcc-5.1.0/gcc/ada/adaint.c +--- gcc-5.1.0/gcc.orig/ada/adaint.c 2015-02-20 11:48:57.000000000 +0000 ++++ gcc-5.1.0/gcc/ada/adaint.c 2015-06-02 10:47:51.672767476 +0000 +@@ -70,6 +70,11 @@ + #include #include #endif - ++ +#if defined (linux) +#define _GNU_SOURCE 1 +#include +#endif -+ - #ifdef VMS - #define _POSIX_EXIT 1 - #define HOST_EXECUTABLE_SUFFIX ".exe" -@@ -3891,8 +3896,6 @@ + + #ifdef __PikeOS__ + #define __BSD_VISIBLE 1 +@@ -3057,8 +3062,6 @@ __gnat_lwp_self (void) return (void *) syscall (__NR_gettid); } @@ -22,7 +22,7 @@ diff -ru gcc-4.9.2/gcc/ada/adaint.c gcc-4.9.2/gcc/ada/adaint.c /* glibc versions earlier than 2.7 do not define the routines to handle dynamically allocated CPU sets. For these targets, we use the static versions. */ -@@ -3901,7 +3904,7 @@ +@@ -3067,7 +3070,7 @@ __gnat_lwp_self (void) /* Dynamic cpu sets */ @@ -31,7 +31,7 @@ diff -ru gcc-4.9.2/gcc/ada/adaint.c gcc-4.9.2/gcc/ada/adaint.c __gnat_cpu_alloc (size_t count) { return CPU_ALLOC (count); -@@ -3914,33 +3917,33 @@ +@@ -3080,33 +3083,33 @@ __gnat_cpu_alloc_size (size_t count) } void @@ -73,7 +73,7 @@ diff -ru gcc-4.9.2/gcc/ada/adaint.c gcc-4.9.2/gcc/ada/adaint.c } size_t -@@ -3950,23 +3953,23 @@ +@@ -3116,23 +3119,23 @@ __gnat_cpu_alloc_size (size_t count ATTR } void @@ -102,10 +102,10 @@ diff -ru gcc-4.9.2/gcc/ada/adaint.c gcc-4.9.2/gcc/ada/adaint.c } #endif /* !CPU_ALLOC */ #endif /* linux */ -diff -ru gcc-4.9.2/gcc/ada/adaint.h gcc-4.9.2/gcc/ada/adaint.h ---- gcc-4.9.2/gcc/ada/adaint.h 2014-02-24 18:51:58.000000000 -0200 -+++ gcc-4.9.2/gcc/ada/adaint.h 2014-12-10 12:03:48.377834174 -0200 -@@ -266,13 +266,11 @@ +diff -rup gcc-5.1.0/gcc.orig/ada/adaint.h gcc-5.1.0/gcc/ada/adaint.h +--- gcc-5.1.0/gcc.orig/ada/adaint.h 2015-01-27 17:20:27.000000000 +0000 ++++ gcc-5.1.0/gcc/ada/adaint.h 2015-06-02 10:47:23.188910894 +0000 +@@ -287,13 +287,11 @@ extern void *__gnat_lwp_self (voi /* Routines for interface to required CPU set primitives */ @@ -123,9 +123,10 @@ diff -ru gcc-4.9.2/gcc/ada/adaint.h gcc-4.9.2/gcc/ada/adaint.h #endif #if defined (_WIN32) ---- gcc-4.9.2/gcc/ada/gcc-interface/Makefile.in.orig 2014-12-11 08:16:33.364902456 -0200 -+++ gcc-4.9.2/gcc/ada/gcc-interface/Makefile.in 2014-12-11 08:16:51.998236755 -0200 -@@ -1948,7 +1948,7 @@ +diff -rup gcc-5.1.0/gcc.orig/ada/gcc-interface/Makefile.in gcc-5.1.0/gcc/ada/gcc-interface/Makefile.in +--- gcc-5.1.0/gcc.orig/ada/gcc-interface/Makefile.in 2015-04-09 20:29:28.000000000 +0000 ++++ gcc-5.1.0/gcc/ada/gcc-interface/Makefile.in 2015-06-02 10:47:23.188910894 +0000 +@@ -1910,7 +1910,7 @@ ifeq ($(strip $(filter-out powerpc% linu endif # ARM linux, GNU eabi diff --git a/main/gcc/boehm-gc-uclibc.patch b/main/gcc/boehm-gc-uclibc.patch deleted file mode 100644 index 0fa688410..000000000 --- a/main/gcc/boehm-gc-uclibc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./boehm-gc/include/gc.h.orig -+++ ./boehm-gc/include/gc.h -@@ -503,7 +503,7 @@ - #if defined(__linux__) || defined(__GLIBC__) - # include - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ -- && !defined(__ia64__) -+ && !defined(__ia64__) && !defined(__UCLIBC__) - # ifndef GC_HAVE_BUILTIN_BACKTRACE - # define GC_HAVE_BUILTIN_BACKTRACE - # endif diff --git a/main/gcc/fix-cxxflags-for-target.patch b/main/gcc/fix-cxxflags-for-target.patch deleted file mode 100644 index 24dafe74b..000000000 --- a/main/gcc/fix-cxxflags-for-target.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- gcc-4.8.1/config/mt-gnu.orig -+++ gcc-4.8.1/config/mt-gnu -@@ -1 +1 @@ --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE -+CXXFLAGS_FOR_TARGET := $(CXXFLAGS_FOR_TARGET) -D_GNU_SOURCE diff --git a/main/gcc/gcc-4.6-pr32219.patch b/main/gcc/gcc-4.6-pr32219.patch deleted file mode 100644 index 8233e5b23..000000000 --- a/main/gcc/gcc-4.6-pr32219.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- ./gcc/varasm.c.orig -+++ ./gcc/varasm.c -@@ -6758,6 +6758,10 @@ - /* Static variables are always local. */ - else if (! TREE_PUBLIC (exp)) - local_p = true; -+ /* Weak data can be overridden by a strong symbol -+ in another module and so are not local. */ -+ else if (DECL_WEAK (exp)) -+ local_p = false; - /* A variable is local if the user has said explicitly that it will - be. */ - else if ((DECL_VISIBILITY_SPECIFIED (exp) -@@ -6771,11 +6775,6 @@ - local. */ - else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT) - local_p = true; -- /* Default visibility weak data can be overridden by a strong symbol -- in another module and so are not local. */ -- else if (DECL_WEAK (exp) -- && !resolved_locally) -- local_p = false; - /* If PIC, then assume that any global name can be overridden by - symbols resolved from other modules. */ - else if (shlib) diff --git a/main/gcc/gcc-4.8-musl-fix-iteratephdr.patch b/main/gcc/gcc-4.8-musl-fix-iteratephdr.patch deleted file mode 100644 index b06597ec7..000000000 --- a/main/gcc/gcc-4.8-musl-fix-iteratephdr.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gcc-4.8.1/gcc/configure.ac.orig 2013-09-25 04:08:25.046595893 +0000 -+++ gcc-4.8.1/gcc/configure.ac 2013-09-25 04:09:06.023263205 +0000 -@@ -4822,7 +4822,7 @@ - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -- *-linux-musl*) -+ *-linux-musl* | *-linux-uclibc* | *-linux-gnu*) - gcc_cv_target_dl_iterate_phdr=yes - ;; - esac ---- gcc-4.8.1/gcc/configure.orig 2013-09-25 04:08:17.826596392 +0000 -+++ gcc-4.8.1/gcc/configure 2013-09-25 04:09:24.393263387 +0000 -@@ -26923,7 +26923,7 @@ - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -- *-linux-musl*) -+ *-linux-musl* | *-linux-uclibc* | *-linux-gnu*) - gcc_cv_target_dl_iterate_phdr=yes - ;; - esac diff --git a/main/gcc/gcc-4.9-musl.patch b/main/gcc/gcc-4.9-musl.patch deleted file mode 100644 index 06381ce08..000000000 --- a/main/gcc/gcc-4.9-musl.patch +++ /dev/null @@ -1,703 +0,0 @@ -# HG changeset patch -# Parent 2f9df662aaaba956600bbdb123b6a227c8e64c59 -Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one. - -diff -r 2f9df662aaab libstdc++-v3/configure.host ---- a/libstdc++-v3/configure.host Tue May 20 11:00:21 2014 -0400 -+++ b/libstdc++-v3/configure.host Tue May 20 11:05:42 2014 -0400 -@@ -264,6 +264,13 @@ - os_include_dir="os/bsd/freebsd" - ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) -+ # check for musl by target -+ case "${host_os}" in -+ *-musl*) -+ os_include_dir="os/generic" -+ ;; -+ *) -+ - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" - elif [ "$bionic" = "yes" ]; then -@@ -272,6 +279,9 @@ - os_include_dir="os/gnu-linux" - fi - ;; -+ -+ esac -+ ;; - hpux*) - os_include_dir="os/hpux" - ;; -# HG changeset patch -# Parent b6f4ce05a3155dbcbc06d72aebdb67e2f8abc094 -Adding -mmusl as a musl libc specifier, and the necessary hacks for it to know how to find musl's dynamic linker. - -diff -r b6f4ce05a315 gcc/config.gcc ---- a/gcc/config.gcc Tue May 20 11:05:42 2014 -0400 -+++ b/gcc/config.gcc Tue May 20 11:05:45 2014 -0400 -@@ -594,7 +594,7 @@ - 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. -@@ -719,6 +719,9 @@ - *-*-*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 -r b6f4ce05a315 gcc/config/linux.h ---- a/gcc/config/linux.h Tue May 20 11:05:42 2014 -0400 -+++ b/gcc/config/linux.h Tue May 20 11:05:45 2014 -0400 -@@ -32,10 +32,12 @@ - #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() \ -@@ -53,18 +55,21 @@ - uClibc or Bionic is the default C library and whether - -muclibc or -mglibc or -mbionic 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 */ -@@ -84,21 +89,92 @@ - - #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 -r b6f4ce05a315 gcc/config/linux.opt ---- a/gcc/config/linux.opt Tue May 20 11:05:42 2014 -0400 -+++ b/gcc/config/linux.opt Tue May 20 11:05:45 2014 -0400 -@@ -30,3 +30,7 @@ - muclibc - Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) -+Use musl C library -diff -r b6f4ce05a315 gcc/ginclude/stddef.h ---- a/gcc/ginclude/stddef.h Tue May 20 11:05:42 2014 -0400 -+++ b/gcc/ginclude/stddef.h Tue May 20 11:05:45 2014 -0400 -@@ -181,6 +181,7 @@ - #ifndef _GCC_SIZE_T - #ifndef _SIZET_ - #ifndef __size_t -+#ifndef __DEFINED_size_t /* musl */ - #define __size_t__ /* BeOS */ - #define __SIZE_T__ /* Cray Unicos/Mk */ - #define _SIZE_T -@@ -197,6 +198,7 @@ - #define ___int_size_t_h - #define _GCC_SIZE_T - #define _SIZET_ -+#define __DEFINED_size_t /* musl */ - #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ - || defined(__FreeBSD_kernel__) - /* __size_t is a typedef on FreeBSD 5, must not trash it. */ -@@ -214,6 +216,7 @@ - typedef long ssize_t; - #endif /* __BEOS__ */ - #endif /* !(defined (__GNUG__) && defined (size_t)) */ -+#endif /* __DEFINED_size_t */ - #endif /* __size_t */ - #endif /* _SIZET_ */ - #endif /* _GCC_SIZE_T */ -# HG changeset patch -# Parent 65d595ef9fc3cdbbde4894d927593f1b0f5bbcb7 -A fix for libgomp to correctly request a POSIX version for time support. - -diff -r 65d595ef9fc3 libgomp/config/posix/time.c ---- a/libgomp/config/posix/time.c Tue May 20 11:05:45 2014 -0400 -+++ b/libgomp/config/posix/time.c Tue May 20 11:05:48 2014 -0400 -@@ -28,6 +28,8 @@ - The following implementation uses the most simple POSIX routines. - If present, POSIX 4 clocks should be used instead. */ - -+#define _POSIX_C_SOURCE 199309L /* for clocks */ -+ - #include "libgomp.h" - #include - #if TIME_WITH_SYS_TIME -diff -r 95f4f1d7668b libgcc/unwind-dw2-fde-dip.c ---- a/libgcc/unwind-dw2-fde-dip.c Tue May 20 11:05:48 2014 -0400 -+++ b/libgcc/unwind-dw2-fde-dip.c Tue May 20 11:05:52 2014 -0400 -@@ -46,33 +46,13 @@ - #include "unwind-compat.h" - #include "gthr.h" - --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ -- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) - # define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__BIONIC__) --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__FreeBSD__) && __FreeBSD__ >= 7 --# define ElfW __ElfN --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__OpenBSD__) --# define ElfW(type) Elf_##type --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(TARGET_DL_ITERATE_PHDR) \ -- && defined(__sun__) && defined(__svr4__) --# define USE_PT_GNU_EH_FRAME -+# ifdef __OpenBSD__ -+# define ElfW(type) Elf_##type -+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7 -+# define ElfW __ElfN -+# endif - #endif - - #if defined(USE_PT_GNU_EH_FRAME) -diff -r ff03fa61c6b3 gcc/configure ---- a/gcc/configure Tue May 20 11:05:51 2014 -0400 -+++ b/gcc/configure Tue May 20 11:05:55 2014 -0400 -@@ -27300,6 +27300,9 @@ - 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. -@@ -27332,6 +27335,7 @@ - # ) 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" -@@ -27421,6 +27425,9 @@ - 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 -r ff03fa61c6b3 gcc/configure.ac ---- a/gcc/configure.ac Tue May 20 11:05:51 2014 -0400 -+++ b/gcc/configure.ac Tue May 20 11:05:55 2014 -0400 -@@ -5001,6 +5001,9 @@ - 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. -@@ -5027,6 +5030,7 @@ - # ) 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], -@@ -5093,6 +5097,9 @@ - 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 -# HG changeset patch -# Parent 26f591b9e77e3df3d0f772b840bd9c13ec24bd4c -Get rid of ever-broken fixincludes on musl. - -diff -r 26f591b9e77e fixincludes/mkfixinc.sh ---- a/fixincludes/mkfixinc.sh Tue May 20 11:05:55 2014 -0400 -+++ b/fixincludes/mkfixinc.sh Tue May 20 11:05:58 2014 -0400 -@@ -19,7 +19,8 @@ - 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} -# HG changeset patch -# Parent bc117c35705fcc39396c19af046101411f251161 -Support for i386-linux-musl and x86_64-linux-musl. - -diff -r bc117c35705f gcc/config/i386/linux.h ---- a/gcc/config/i386/linux.h Tue May 20 11:05:58 2014 -0400 -+++ b/gcc/config/i386/linux.h Tue May 20 11:06:01 2014 -0400 -@@ -21,3 +21,4 @@ - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" -diff -r bc117c35705f gcc/config/i386/linux64.h ---- a/gcc/config/i386/linux64.h Tue May 20 11:05:58 2014 -0400 -+++ b/gcc/config/i386/linux64.h Tue May 20 11:06:01 2014 -0400 -@@ -30,3 +30,7 @@ - #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" -+ -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" -diff -r bc117c35705f libitm/config/linux/x86/tls.h ---- a/libitm/config/linux/x86/tls.h Tue May 20 11:05:58 2014 -0400 -+++ b/libitm/config/linux/x86/tls.h Tue May 20 11:06:01 2014 -0400 -@@ -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 @@ - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H -# HG changeset patch -# Parent 933c4f064622eb96a0b2ab213abd0cddbd977d1a -Support for arm-linux-musl. - -diff -r 933c4f064622 gcc/config/arm/linux-eabi.h ---- a/gcc/config/arm/linux-eabi.h Tue May 20 11:06:01 2014 -0400 -+++ b/gcc/config/arm/linux-eabi.h Tue May 20 11:06:04 2014 -0400 -@@ -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 -r 933c4f064622 libitm/config/arm/hwcap.cc ---- a/libitm/config/arm/hwcap.cc Tue May 20 11:06:01 2014 -0400 -+++ b/libitm/config/arm/hwcap.cc Tue May 20 11:06:04 2014 -0400 -@@ -40,7 +40,11 @@ - - #ifdef __linux__ - #include -+#ifdef __GLIBC__ - #include -+#else -+#include -+#endif - #include - - static void __attribute__((constructor)) -# HG changeset patch -# Parent 03fe896f3acaa911e935a8e999d15c7542ee73d1 -Support for mips-linux-musl. - -diff -r 03fe896f3aca gcc/config/mips/linux.h ---- a/gcc/config/mips/linux.h Tue May 20 11:06:04 2014 -0400 -+++ b/gcc/config/mips/linux.h Tue May 20 11:06:08 2014 -0400 -@@ -23,3 +23,10 @@ - #undef UCLIBC_DYNAMIC_LINKER - #define UCLIBC_DYNAMIC_LINKER \ - "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" -+ -+#if TARGET_ENDIAN_DEFAULT == 0 /* LE */ -+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" -+#endif -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E ".so.1" -# HG changeset patch -# Parent 6097333f2ab47a4ce37ccfb18b0f07a0cdcfec49 -Support for powerpc-linux-musl. - -diff -r 6097333f2ab4 gcc/config.gcc ---- a/gcc/config.gcc Tue May 20 11:06:08 2014 -0400 -+++ b/gcc/config.gcc Tue May 20 11:06:11 2014 -0400 -@@ -2326,6 +2326,10 @@ - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi -diff -r 6097333f2ab4 gcc/config/rs6000/linux64.h ---- a/gcc/config/rs6000/linux64.h Tue May 20 11:06:08 2014 -0400 -+++ b/gcc/config/rs6000/linux64.h Tue May 20 11:06:11 2014 -0400 -@@ -375,17 +375,21 @@ - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) -diff -r 6097333f2ab4 gcc/config/rs6000/secureplt.h ---- a/gcc/config/rs6000/secureplt.h Tue May 20 11:06:08 2014 -0400 -+++ b/gcc/config/rs6000/secureplt.h Tue May 20 11:06:11 2014 -0400 -@@ -18,3 +18,4 @@ - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" -diff -r 6097333f2ab4 gcc/config/rs6000/sysv4.h ---- a/gcc/config/rs6000/sysv4.h Tue May 20 11:06:08 2014 -0400 -+++ b/gcc/config/rs6000/sysv4.h Tue May 20 11:06:11 2014 -0400 -@@ -537,6 +537,9 @@ - #ifndef CC1_SECURE_PLT_DEFAULT_SPEC - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif - - /* Pass -G xxx to the compiler. */ - #define CC1_SPEC "%{G*} %(cc1_cpu)" \ -@@ -585,7 +588,8 @@ - - /* Override the default target of the linker. */ - #define LINK_TARGET_SPEC \ -- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") -+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \ -+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" - - /* Any specific OS flags. */ - #define LINK_OS_SPEC "\ -@@ -763,15 +767,18 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -894,6 +901,7 @@ - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -diff -r 813971b9f083 gcc/config/aarch64/aarch64-linux.h ---- a/gcc/config/aarch64/aarch64-linux.h Tue May 20 11:06:11 2014 -0400 -+++ b/gcc/config/aarch64/aarch64-linux.h Tue May 20 11:06:14 2014 -0400 -@@ -23,6 +23,8 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" - -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1" -+ - #define CPP_SPEC "%{pthread:-D_REENTRANT}" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ -# HG changeset patch -# Parent 4a62a6813db995fe195d47ff73234d455975ac30 -Microblaze support (again). - -diff -r 4a62a6813db9 gcc/config/microblaze/linux.h ---- a/gcc/config/microblaze/linux.h Tue May 20 11:06:14 2014 -0400 -+++ b/gcc/config/microblaze/linux.h Tue May 20 11:06:17 2014 -0400 -@@ -25,7 +25,22 @@ - #undef TLS_NEEDS_GOT - #define TLS_NEEDS_GOT 1 - --#define DYNAMIC_LINKER "/lib/ld.so.1" -+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ -+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" -+#endif -+ -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER -+#else -+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER -+#endif -+ -+ - #undef SUBTARGET_EXTRA_SPECS - #define SUBTARGET_EXTRA_SPECS \ - { "dynamic_linker", DYNAMIC_LINKER } -From 478ee0c03a08e2ef9371fd88d516738936943e78 Mon Sep 17 00:00:00 2001 -From: David Holsgrove -Date: Fri, 28 Sep 2012 16:32:03 +1000 -Subject: [PATCH 06/11] [Patch, microblaze]: Add SIZE_TYPE and PTRDIFF_TYPE to - microblaze.h - -Fixes warnings like; - -warning: format '%zX' expects argument of type 'size_t', -but argument 3 has type 'unsigned int' [-Wformat] - -Changelog - -2013-03-18 David Holsgrove - - * gcc/config/microblaze/microblaze.h: Define SIZE_TYPE - and PTRDIFF_TYPE. - -Signed-off-by: David Holsgrove ---- - gcc/config/microblaze/microblaze.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff -r 20d1c995f5de gcc/config/microblaze/microblaze.h ---- a/gcc/config/microblaze/microblaze.h Tue May 20 11:06:17 2014 -0400 -+++ b/gcc/config/microblaze/microblaze.h Tue May 20 11:06:20 2014 -0400 -@@ -218,6 +218,12 @@ - #undef PTRDIFF_TYPE - #define PTRDIFF_TYPE "int" - -+#undef SIZE_TYPE -+#define SIZE_TYPE "unsigned int" -+ -+#undef PTRDIFF_TYPE -+#define PTRDIFF_TYPE "int" -+ - #define CONSTANT_ALIGNMENT(EXP, ALIGN) \ - ((TREE_CODE (EXP) == STRING_CST || TREE_CODE (EXP) == CONSTRUCTOR) \ - && (ALIGN) < BITS_PER_WORD \ -diff -r 2f999fc929da gcc/config/sh/linux.h ---- a/gcc/config/sh/linux.h Fri Sep 28 16:32:03 2012 +1000 -+++ b/gcc/config/sh/linux.h Tue May 20 11:06:23 2014 -0400 -@@ -43,7 +43,14 @@ - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - -+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ -+#define MUSL_DYNAMIC_LINKER_E "eb" -+#else -+#define MUSL_DYNAMIC_LINKER_E -+#endif -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1" - - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/main/gcc/gcc-ice-hack.patch b/main/gcc/gcc-ice-hack.patch deleted file mode 100644 index f99323507..000000000 --- a/main/gcc/gcc-ice-hack.patch +++ /dev/null @@ -1,304 +0,0 @@ -# DP: Retry the build on an ice, save the calling options and preprocessed -# DP: source when the ice is reproducible. - -2004-01-23 Jakub Jelinek - - * gcc.c (execute): Don't free first string early, but at the end - of the function. Call retry_ice if compiler exited with - ICE_EXIT_CODE. - (retry_ice): New function. - * diagnostic.c (diagnostic_count_diagnostic, - diagnostic_action_after_output, error_recursion): Exit with - ICE_EXIT_CODE instead of FATAL_EXIT_CODE. - -Index: b/gcc/gcc.c -=================================================================== ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -249,6 +249,9 @@ - #if defined(HAVE_TARGET_OBJECT_SUFFIX) || defined(HAVE_TARGET_EXECUTABLE_SUFFIX) - static const char *convert_filename (const char *, int, int); - #endif -+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS)) -+static void retry_ice (const char *prog, const char **argv); -+#endif - - static const char *getenv_spec_function (int, const char **); - static const char *if_exists_spec_function (int, const char **); -@@ -2771,7 +2774,7 @@ - } - } - -- if (string != commands[i].prog) -+ if (i && string != commands[i].prog) - free (CONST_CAST (char *, string)); - } - -@@ -2824,6 +2827,16 @@ - else if (WIFEXITED (status) - && WEXITSTATUS (status) >= MIN_FATAL_STATUS) - { -+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS)) -+ /* For ICEs in cc1, cc1obj, cc1plus see if it is -+ reproducible or not. */ -+ const char *p; -+ if (WEXITSTATUS (status) == ICE_EXIT_CODE -+ && i == 0 -+ && (p = strrchr (commands[0].argv[0], DIR_SEPARATOR)) -+ && ! strncmp (p + 1, "cc1", 3)) -+ retry_ice (commands[0].prog, commands[0].argv); -+#endif - if (WEXITSTATUS (status) > greatest_status) - greatest_status = WEXITSTATUS (status); - ret_code = -1; -@@ -2881,6 +2894,9 @@ - } - } - -+ if (commands[0].argv[0] != commands[0].prog) -+ free (CONST_CAST (char *, commands[0].argv[0])); -+ - return ret_code; - } - } -@@ -6034,6 +6050,227 @@ - switches[switchnum].validated = true; - } - -+#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS)) -+#define RETRY_ICE_ATTEMPTS 2 -+ -+static void -+retry_ice (const char *prog, const char **argv) -+{ -+ int nargs, out_arg = -1, quiet = 0, attempt; -+ int pid, retries, sleep_interval; -+ const char **new_argv; -+ char *temp_filenames[RETRY_ICE_ATTEMPTS * 2 + 2]; -+ -+ if (gcc_input_filename == NULL || ! strcmp (gcc_input_filename, "-")) -+ return; -+ -+ for (nargs = 0; argv[nargs] != NULL; ++nargs) -+ /* Only retry compiler ICEs, not preprocessor ones. */ -+ if (! strcmp (argv[nargs], "-E")) -+ return; -+ else if (argv[nargs][0] == '-' && argv[nargs][1] == 'o') -+ { -+ if (out_arg == -1) -+ out_arg = nargs; -+ else -+ return; -+ } -+ /* If the compiler is going to output any time information, -+ it might varry between invocations. */ -+ else if (! strcmp (argv[nargs], "-quiet")) -+ quiet = 1; -+ else if (! strcmp (argv[nargs], "-ftime-report")) -+ return; -+ -+ if (out_arg == -1 || !quiet) -+ return; -+ -+ memset (temp_filenames, '\0', sizeof (temp_filenames)); -+ new_argv = XALLOCAVEC (const char *, nargs + 3); -+ memcpy (new_argv, argv, (nargs + 1) * sizeof (const char *)); -+ new_argv[nargs++] = "-frandom-seed=0"; -+ new_argv[nargs] = NULL; -+ if (new_argv[out_arg][2] == '\0') -+ new_argv[out_arg + 1] = "-"; -+ else -+ new_argv[out_arg] = "-o-"; -+ -+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS + 1; ++attempt) -+ { -+ int fd = -1; -+ int status; -+ -+ temp_filenames[attempt * 2] = make_temp_file (".out"); -+ temp_filenames[attempt * 2 + 1] = make_temp_file (".err"); -+ -+ if (attempt == RETRY_ICE_ATTEMPTS) -+ { -+ int i; -+ int fd1, fd2; -+ struct stat st1, st2; -+ size_t n, len; -+ char *buf; -+ -+ buf = XNEWVEC (char, 8192); -+ -+ for (i = 0; i < 2; ++i) -+ { -+ fd1 = open (temp_filenames[i], O_RDONLY); -+ fd2 = open (temp_filenames[2 + i], O_RDONLY); -+ -+ if (fd1 < 0 || fd2 < 0) -+ { -+ i = -1; -+ close (fd1); -+ close (fd2); -+ break; -+ } -+ -+ if (fstat (fd1, &st1) < 0 || fstat (fd2, &st2) < 0) -+ { -+ i = -1; -+ close (fd1); -+ close (fd2); -+ break; -+ } -+ -+ if (st1.st_size != st2.st_size) -+ { -+ close (fd1); -+ close (fd2); -+ break; -+ } -+ -+ len = 0; -+ for (n = st1.st_size; n; n -= len) -+ { -+ len = n; -+ if (len > 4096) -+ len = 4096; -+ -+ if (read (fd1, buf, len) != (int) len -+ || read (fd2, buf + 4096, len) != (int) len) -+ { -+ i = -1; -+ break; -+ } -+ -+ if (memcmp (buf, buf + 4096, len) != 0) -+ break; -+ } -+ -+ close (fd1); -+ close (fd2); -+ -+ if (n) -+ break; -+ } -+ -+ free (buf); -+ if (i == -1) -+ break; -+ -+ if (i != 2) -+ { -+ fnotice (stderr, "The bug is not reproducible, so it is" -+ " likely a hardware or OS problem.\n"); -+ break; -+ } -+ -+ fd = open (temp_filenames[attempt * 2], O_RDWR); -+ if (fd < 0) -+ break; -+ write (fd, "//", 2); -+ for (i = 0; i < nargs; i++) -+ { -+ write (fd, " ", 1); -+ write (fd, new_argv[i], strlen (new_argv[i])); -+ } -+ write (fd, "\n", 1); -+ new_argv[nargs] = "-E"; -+ new_argv[nargs + 1] = NULL; -+ } -+ -+ /* Fork a subprocess; wait and retry if it fails. */ -+ sleep_interval = 1; -+ pid = -1; -+ for (retries = 0; retries < 4; retries++) -+ { -+ pid = fork (); -+ if (pid >= 0) -+ break; -+ sleep (sleep_interval); -+ sleep_interval *= 2; -+ } -+ -+ if (pid < 0) -+ break; -+ else if (pid == 0) -+ { -+ if (attempt != RETRY_ICE_ATTEMPTS) -+ fd = open (temp_filenames[attempt * 2], O_RDWR); -+ if (fd < 0) -+ exit (-1); -+ if (fd != 1) -+ { -+ close (1); -+ dup (fd); -+ close (fd); -+ } -+ -+ fd = open (temp_filenames[attempt * 2 + 1], O_RDWR); -+ if (fd < 0) -+ exit (-1); -+ if (fd != 2) -+ { -+ close (2); -+ dup (fd); -+ close (fd); -+ } -+ -+ if (prog == new_argv[0]) -+ execvp (prog, CONST_CAST2 (char *const *, const char **, new_argv)); -+ else -+ execv (new_argv[0], CONST_CAST2 (char *const *, const char **, new_argv)); -+ exit (-1); -+ } -+ -+ if (waitpid (pid, &status, 0) < 0) -+ break; -+ -+ if (attempt < RETRY_ICE_ATTEMPTS -+ && (! WIFEXITED (status) || WEXITSTATUS (status) != ICE_EXIT_CODE)) -+ { -+ fnotice (stderr, "The bug is not reproducible, so it is" -+ " likely a hardware or OS problem.\n"); -+ break; -+ } -+ else if (attempt == RETRY_ICE_ATTEMPTS) -+ { -+ close (fd); -+ if (WIFEXITED (status) -+ && WEXITSTATUS (status) == SUCCESS_EXIT_CODE) -+ { -+ fnotice (stderr, "Preprocessed source stored into %s file," -+ " please attach this to your bugreport.\n", -+ temp_filenames[attempt * 2]); -+ /* Make sure it is not deleted. */ -+ free (temp_filenames[attempt * 2]); -+ temp_filenames[attempt * 2] = NULL; -+ break; -+ } -+ } -+ } -+ -+ for (attempt = 0; attempt < RETRY_ICE_ATTEMPTS * 2 + 2; attempt++) -+ if (temp_filenames[attempt]) -+ { -+ unlink (temp_filenames[attempt]); -+ free (temp_filenames[attempt]); -+ } -+} -+#endif -+ - /* Search for a file named NAME trying various prefixes including the - user's -B prefix and some standard ones. - Return the absolute file name found. If nothing is found, return NAME. */ -Index: b/gcc/diagnostic.c -=================================================================== ---- a/gcc/diagnostic.c -+++ b/gcc/diagnostic.c -@@ -455,7 +455,7 @@ - real_abort (); - diagnostic_finish (context); - fnotice (stderr, "compilation terminated.\n"); -- exit (FATAL_EXIT_CODE); -+ exit (ICE_EXIT_CODE); - - default: - gcc_unreachable (); diff --git a/main/gcc/gcc-spec-env.patch b/main/gcc/gcc-spec-env.patch deleted file mode 100644 index 57e7567e5..000000000 --- a/main/gcc/gcc-spec-env.patch +++ /dev/null @@ -1,42 +0,0 @@ - Add support for external spec file via the GCC_SPECS env var. 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 - ---- gcc-4/gcc/gcc.c -+++ gcc-4/gcc/gcc.c -@@ -6482,6 +6482,32 @@ - - /* Process any user specified specs in the order given on the command - line. */ -+#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 - for (uptr = user_specs_head; uptr; uptr = uptr->next) - { - char *filename = find_a_file (&startfile_prefixes, uptr->filename, diff --git a/main/gcc/gcc49-cloog-dl.patch b/main/gcc/gcc49-cloog-dl.patch deleted file mode 100644 index 93db9483e..000000000 --- a/main/gcc/gcc49-cloog-dl.patch +++ /dev/null @@ -1,478 +0,0 @@ -http://pkgs.fedoraproject.org/cgit/gcc.git/plain/gcc49-cloog-dl.patch - ---- 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 = $(CLOOGLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ -+BACKENDLIBS = $(if $(CLOOGLIBS),-ldl) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \ - $(ZLIB) - # Any system libraries needed just for GNAT. - SYSLIBS = @GNAT_LIBEXC@ -@@ -2011,6 +2011,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-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,371 @@ along with GCC; see the file COPYING3. - #ifndef GCC_GRAPHITE_POLY_H - #define GCC_GRAPHITE_POLY_H - -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#define DYNSYMS \ -+ DYNSYM (clast_pprint); \ -+ DYNSYM (cloog_clast_create_from_input); \ -+ DYNSYM (cloog_clast_free); \ -+ DYNSYM (cloog_domain_from_isl_set); \ -+ DYNSYM (cloog_input_alloc); \ -+ DYNSYM (cloog_isl_state_malloc); \ -+ DYNSYM (cloog_options_free); \ -+ DYNSYM (cloog_options_malloc); \ -+ DYNSYM (cloog_scattering_from_isl_map); \ -+ DYNSYM (cloog_state_free); \ -+ DYNSYM (cloog_union_domain_add_domain); \ -+ DYNSYM (cloog_union_domain_alloc); \ -+ DYNSYM (cloog_union_domain_set_name); \ -+ DYNSYM (isl_aff_add_coefficient_si); \ -+ DYNSYM (isl_aff_add_constant); \ -+ DYNSYM (isl_aff_free); \ -+ DYNSYM (isl_aff_get_coefficient); \ -+ DYNSYM (isl_aff_get_space); \ -+ DYNSYM (isl_aff_mod); \ -+ 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_member_is_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); \ -+ DYNSYM (isl_constraint_set_coefficient_si); \ -+ DYNSYM (isl_constraint_set_constant); \ -+ 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_mod); \ -+ 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_from_cloog_domain); \ -+ DYNSYM (isl_set_get_space); \ -+ DYNSYM (isl_set_get_tuple_id); \ -+ DYNSYM (isl_set_intersect); \ -+ DYNSYM (isl_set_is_empty); \ -+ DYNSYM (isl_set_max); \ -+ DYNSYM (isl_set_min); \ -+ 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 (stmt_ass); \ -+ DYNSYM (stmt_block); \ -+ DYNSYM (stmt_for); \ -+ DYNSYM (stmt_guard); \ -+ DYNSYM (stmt_root); \ -+ DYNSYM (stmt_user); -+extern struct cloog_pointers_s__ -+{ -+ bool inited; -+ void *h; -+#define DYNSYM(x) __typeof (x) *p_##x -+ DYNSYMS -+#undef DYNSYM -+} cloog_pointers__; -+ -+#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc) -+#define clast_pprint (*cloog_pointers__.p_clast_pprint) -+#define cloog_clast_create_from_input (*cloog_pointers__.p_cloog_clast_create_from_input) -+#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free) -+#define cloog_domain_from_isl_set (*cloog_pointers__.p_cloog_domain_from_isl_set) -+#define cloog_input_alloc (*cloog_pointers__.p_cloog_input_alloc) -+#define cloog_isl_state_malloc (*cloog_pointers__.p_cloog_isl_state_malloc) -+#define cloog_options_free (*cloog_pointers__.p_cloog_options_free) -+#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc) -+#define cloog_scattering_from_isl_map (*cloog_pointers__.p_cloog_scattering_from_isl_map) -+#define cloog_state_free (*cloog_pointers__.p_cloog_state_free) -+#define cloog_union_domain_add_domain (*cloog_pointers__.p_cloog_union_domain_add_domain) -+#define cloog_union_domain_alloc (*cloog_pointers__.p_cloog_union_domain_alloc) -+#define cloog_union_domain_set_name (*cloog_pointers__.p_cloog_union_domain_set_name) -+#define isl_aff_add_coefficient_si (*cloog_pointers__.p_isl_aff_add_coefficient_si) -+#define isl_aff_add_constant (*cloog_pointers__.p_isl_aff_add_constant) -+#define isl_aff_free (*cloog_pointers__.p_isl_aff_free) -+#define isl_aff_get_coefficient (*cloog_pointers__.p_isl_aff_get_coefficient) -+#define isl_aff_get_space (*cloog_pointers__.p_isl_aff_get_space) -+#define isl_aff_mod (*cloog_pointers__.p_isl_aff_mod) -+#define isl_aff_set_coefficient_si (*cloog_pointers__.p_isl_aff_set_coefficient_si) -+#define isl_aff_set_constant_si (*cloog_pointers__.p_isl_aff_set_constant_si) -+#define isl_aff_zero_on_domain (*cloog_pointers__.p_isl_aff_zero_on_domain) -+#define isl_band_free (*cloog_pointers__.p_isl_band_free) -+#define isl_band_get_children (*cloog_pointers__.p_isl_band_get_children) -+#define isl_band_get_partial_schedule (*cloog_pointers__.p_isl_band_get_partial_schedule) -+#define isl_band_has_children (*cloog_pointers__.p_isl_band_has_children) -+#define isl_band_list_free (*cloog_pointers__.p_isl_band_list_free) -+#define isl_band_list_get_band (*cloog_pointers__.p_isl_band_list_get_band) -+#define isl_band_list_get_ctx (*cloog_pointers__.p_isl_band_list_get_ctx) -+#define isl_band_list_n_band (*cloog_pointers__.p_isl_band_list_n_band) -+#define isl_band_member_is_zero_distance (*cloog_pointers__.p_isl_band_member_is_zero_distance) -+#define isl_band_n_member (*cloog_pointers__.p_isl_band_n_member) -+#define isl_basic_map_add_constraint (*cloog_pointers__.p_isl_basic_map_add_constraint) -+#define isl_basic_map_project_out (*cloog_pointers__.p_isl_basic_map_project_out) -+#define isl_basic_map_universe (*cloog_pointers__.p_isl_basic_map_universe) -+#define isl_constraint_set_coefficient (*cloog_pointers__.p_isl_constraint_set_coefficient) -+#define isl_constraint_set_coefficient_si (*cloog_pointers__.p_isl_constraint_set_coefficient_si) -+#define isl_constraint_set_constant (*cloog_pointers__.p_isl_constraint_set_constant) -+#define isl_constraint_set_constant_si (*cloog_pointers__.p_isl_constraint_set_constant_si) -+#define isl_ctx_alloc (*cloog_pointers__.p_isl_ctx_alloc) -+#define isl_ctx_free (*cloog_pointers__.p_isl_ctx_free) -+#define isl_equality_alloc (*cloog_pointers__.p_isl_equality_alloc) -+#define isl_id_alloc (*cloog_pointers__.p_isl_id_alloc) -+#define isl_id_copy (*cloog_pointers__.p_isl_id_copy) -+#define isl_id_free (*cloog_pointers__.p_isl_id_free) -+#define isl_inequality_alloc (*cloog_pointers__.p_isl_inequality_alloc) -+#define isl_local_space_copy (*cloog_pointers__.p_isl_local_space_copy) -+#define isl_local_space_free (*cloog_pointers__.p_isl_local_space_free) -+#define isl_local_space_from_space (*cloog_pointers__.p_isl_local_space_from_space) -+#define isl_local_space_range (*cloog_pointers__.p_isl_local_space_range) -+#define isl_map_add_constraint (*cloog_pointers__.p_isl_map_add_constraint) -+#define isl_map_add_dims (*cloog_pointers__.p_isl_map_add_dims) -+#define isl_map_align_params (*cloog_pointers__.p_isl_map_align_params) -+#define isl_map_apply_range (*cloog_pointers__.p_isl_map_apply_range) -+#define isl_map_copy (*cloog_pointers__.p_isl_map_copy) -+#define isl_map_dim (*cloog_pointers__.p_isl_map_dim) -+#define isl_map_dump (*cloog_pointers__.p_isl_map_dump) -+#define isl_map_equate (*cloog_pointers__.p_isl_map_equate) -+#define isl_map_fix_si (*cloog_pointers__.p_isl_map_fix_si) -+#define isl_map_flat_product (*cloog_pointers__.p_isl_map_flat_product) -+#define isl_map_flat_range_product (*cloog_pointers__.p_isl_map_flat_range_product) -+#define isl_map_free (*cloog_pointers__.p_isl_map_free) -+#define isl_map_from_basic_map (*cloog_pointers__.p_isl_map_from_basic_map) -+#define isl_map_from_pw_aff (*cloog_pointers__.p_isl_map_from_pw_aff) -+#define isl_map_from_union_map (*cloog_pointers__.p_isl_map_from_union_map) -+#define isl_map_get_ctx (*cloog_pointers__.p_isl_map_get_ctx) -+#define isl_map_get_space (*cloog_pointers__.p_isl_map_get_space) -+#define isl_map_get_tuple_id (*cloog_pointers__.p_isl_map_get_tuple_id) -+#define isl_map_insert_dims (*cloog_pointers__.p_isl_map_insert_dims) -+#define isl_map_intersect (*cloog_pointers__.p_isl_map_intersect) -+#define isl_map_intersect_domain (*cloog_pointers__.p_isl_map_intersect_domain) -+#define isl_map_intersect_range (*cloog_pointers__.p_isl_map_intersect_range) -+#define isl_map_is_empty (*cloog_pointers__.p_isl_map_is_empty) -+#define isl_map_lex_ge (*cloog_pointers__.p_isl_map_lex_ge) -+#define isl_map_lex_le (*cloog_pointers__.p_isl_map_lex_le) -+#define isl_map_n_out (*cloog_pointers__.p_isl_map_n_out) -+#define isl_map_range (*cloog_pointers__.p_isl_map_range) -+#define isl_map_set_tuple_id (*cloog_pointers__.p_isl_map_set_tuple_id) -+#define isl_map_universe (*cloog_pointers__.p_isl_map_universe) -+#define isl_options_set_on_error (*cloog_pointers__.p_isl_options_set_on_error) -+#define isl_options_set_schedule_fuse (*cloog_pointers__.p_isl_options_set_schedule_fuse) -+#define isl_options_set_schedule_max_constant_term (*cloog_pointers__.p_isl_options_set_schedule_max_constant_term) -+#define isl_options_set_schedule_maximize_band_depth (*cloog_pointers__.p_isl_options_set_schedule_maximize_band_depth) -+#define isl_printer_free (*cloog_pointers__.p_isl_printer_free) -+#define isl_printer_print_aff (*cloog_pointers__.p_isl_printer_print_aff) -+#define isl_printer_print_constraint (*cloog_pointers__.p_isl_printer_print_constraint) -+#define isl_printer_print_map (*cloog_pointers__.p_isl_printer_print_map) -+#define isl_printer_print_set (*cloog_pointers__.p_isl_printer_print_set) -+#define isl_printer_to_file (*cloog_pointers__.p_isl_printer_to_file) -+#define isl_pw_aff_add (*cloog_pointers__.p_isl_pw_aff_add) -+#define isl_pw_aff_alloc (*cloog_pointers__.p_isl_pw_aff_alloc) -+#define isl_pw_aff_copy (*cloog_pointers__.p_isl_pw_aff_copy) -+#define isl_pw_aff_eq_set (*cloog_pointers__.p_isl_pw_aff_eq_set) -+#define isl_pw_aff_free (*cloog_pointers__.p_isl_pw_aff_free) -+#define isl_pw_aff_from_aff (*cloog_pointers__.p_isl_pw_aff_from_aff) -+#define isl_pw_aff_ge_set (*cloog_pointers__.p_isl_pw_aff_ge_set) -+#define isl_pw_aff_gt_set (*cloog_pointers__.p_isl_pw_aff_gt_set) -+#define isl_pw_aff_is_cst (*cloog_pointers__.p_isl_pw_aff_is_cst) -+#define isl_pw_aff_le_set (*cloog_pointers__.p_isl_pw_aff_le_set) -+#define isl_pw_aff_lt_set (*cloog_pointers__.p_isl_pw_aff_lt_set) -+#define isl_pw_aff_mod (*cloog_pointers__.p_isl_pw_aff_mod) -+#define isl_pw_aff_mul (*cloog_pointers__.p_isl_pw_aff_mul) -+#define isl_pw_aff_ne_set (*cloog_pointers__.p_isl_pw_aff_ne_set) -+#define isl_pw_aff_nonneg_set (*cloog_pointers__.p_isl_pw_aff_nonneg_set) -+#define isl_pw_aff_set_tuple_id (*cloog_pointers__.p_isl_pw_aff_set_tuple_id) -+#define isl_pw_aff_sub (*cloog_pointers__.p_isl_pw_aff_sub) -+#define isl_pw_aff_zero_set (*cloog_pointers__.p_isl_pw_aff_zero_set) -+#define isl_schedule_free (*cloog_pointers__.p_isl_schedule_free) -+#define isl_schedule_get_band_forest (*cloog_pointers__.p_isl_schedule_get_band_forest) -+#define isl_set_add_constraint (*cloog_pointers__.p_isl_set_add_constraint) -+#define isl_set_add_dims (*cloog_pointers__.p_isl_set_add_dims) -+#define isl_set_apply (*cloog_pointers__.p_isl_set_apply) -+#define isl_set_coalesce (*cloog_pointers__.p_isl_set_coalesce) -+#define isl_set_copy (*cloog_pointers__.p_isl_set_copy) -+#define isl_set_dim (*cloog_pointers__.p_isl_set_dim) -+#define isl_set_fix_si (*cloog_pointers__.p_isl_set_fix_si) -+#define isl_set_free (*cloog_pointers__.p_isl_set_free) -+#define isl_set_from_cloog_domain (*cloog_pointers__.p_isl_set_from_cloog_domain) -+#define isl_set_get_space (*cloog_pointers__.p_isl_set_get_space) -+#define isl_set_get_tuple_id (*cloog_pointers__.p_isl_set_get_tuple_id) -+#define isl_set_intersect (*cloog_pointers__.p_isl_set_intersect) -+#define isl_set_is_empty (*cloog_pointers__.p_isl_set_is_empty) -+#define isl_set_max (*cloog_pointers__.p_isl_set_max) -+#define isl_set_min (*cloog_pointers__.p_isl_set_min) -+#define isl_set_n_dim (*cloog_pointers__.p_isl_set_n_dim) -+#define isl_set_nat_universe (*cloog_pointers__.p_isl_set_nat_universe) -+#define isl_set_project_out (*cloog_pointers__.p_isl_set_project_out) -+#define isl_set_set_tuple_id (*cloog_pointers__.p_isl_set_set_tuple_id) -+#define isl_set_universe (*cloog_pointers__.p_isl_set_universe) -+#define isl_space_add_dims (*cloog_pointers__.p_isl_space_add_dims) -+#define isl_space_alloc (*cloog_pointers__.p_isl_space_alloc) -+#define isl_space_copy (*cloog_pointers__.p_isl_space_copy) -+#define isl_space_dim (*cloog_pointers__.p_isl_space_dim) -+#define isl_space_domain (*cloog_pointers__.p_isl_space_domain) -+#define isl_space_find_dim_by_id (*cloog_pointers__.p_isl_space_find_dim_by_id) -+#define isl_space_free (*cloog_pointers__.p_isl_space_free) -+#define isl_space_from_domain (*cloog_pointers__.p_isl_space_from_domain) -+#define isl_space_get_tuple_id (*cloog_pointers__.p_isl_space_get_tuple_id) -+#define isl_space_params_alloc (*cloog_pointers__.p_isl_space_params_alloc) -+#define isl_space_range (*cloog_pointers__.p_isl_space_range) -+#define isl_space_set_alloc (*cloog_pointers__.p_isl_space_set_alloc) -+#define isl_space_set_dim_id (*cloog_pointers__.p_isl_space_set_dim_id) -+#define isl_space_set_tuple_id (*cloog_pointers__.p_isl_space_set_tuple_id) -+#define isl_union_map_add_map (*cloog_pointers__.p_isl_union_map_add_map) -+#define isl_union_map_align_params (*cloog_pointers__.p_isl_union_map_align_params) -+#define isl_union_map_apply_domain (*cloog_pointers__.p_isl_union_map_apply_domain) -+#define isl_union_map_apply_range (*cloog_pointers__.p_isl_union_map_apply_range) -+#define isl_union_map_compute_flow (*cloog_pointers__.p_isl_union_map_compute_flow) -+#define isl_union_map_copy (*cloog_pointers__.p_isl_union_map_copy) -+#define isl_union_map_empty (*cloog_pointers__.p_isl_union_map_empty) -+#define isl_union_map_flat_range_product (*cloog_pointers__.p_isl_union_map_flat_range_product) -+#define isl_union_map_foreach_map (*cloog_pointers__.p_isl_union_map_foreach_map) -+#define isl_union_map_free (*cloog_pointers__.p_isl_union_map_free) -+#define isl_union_map_from_map (*cloog_pointers__.p_isl_union_map_from_map) -+#define isl_union_map_get_ctx (*cloog_pointers__.p_isl_union_map_get_ctx) -+#define isl_union_map_get_space (*cloog_pointers__.p_isl_union_map_get_space) -+#define isl_union_map_gist_domain (*cloog_pointers__.p_isl_union_map_gist_domain) -+#define isl_union_map_gist_range (*cloog_pointers__.p_isl_union_map_gist_range) -+#define isl_union_map_intersect_domain (*cloog_pointers__.p_isl_union_map_intersect_domain) -+#define isl_union_map_is_empty (*cloog_pointers__.p_isl_union_map_is_empty) -+#define isl_union_map_subtract (*cloog_pointers__.p_isl_union_map_subtract) -+#define isl_union_map_union (*cloog_pointers__.p_isl_union_map_union) -+#define isl_union_set_add_set (*cloog_pointers__.p_isl_union_set_add_set) -+#define isl_union_set_compute_schedule (*cloog_pointers__.p_isl_union_set_compute_schedule) -+#define isl_union_set_copy (*cloog_pointers__.p_isl_union_set_copy) -+#define isl_union_set_empty (*cloog_pointers__.p_isl_union_set_empty) -+#define isl_union_set_from_set (*cloog_pointers__.p_isl_union_set_from_set) -+#define stmt_ass (*cloog_pointers__.p_stmt_ass) -+#define stmt_block (*cloog_pointers__.p_stmt_block) -+#define stmt_for (*cloog_pointers__.p_stmt_for) -+#define stmt_guard (*cloog_pointers__.p_stmt_guard) -+#define stmt_root (*cloog_pointers__.p_stmt_root) -+#define stmt_user (*cloog_pointers__.p_stmt_user) -+ - 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 -@@ -78,6 +78,34 @@ along with GCC; see the file COPYING3. - - CloogState *cloog_state; - -+__typeof (cloog_pointers__) cloog_pointers__; -+ -+static bool -+init_cloog_pointers (void) -+{ -+ void *h; -+ -+ if (cloog_pointers__.inited) -+ return cloog_pointers__.h != NULL; -+ h = dlopen ("libcloog-isl.so.4", RTLD_LAZY); -+ cloog_pointers__.h = h; -+ if (h == NULL) -+ return false; -+#define DYNSYM(x) \ -+ do \ -+ { \ -+ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \ -+ u.q = dlsym (h, #x); \ -+ if (u.q == NULL) \ -+ return false; \ -+ cloog_pointers__.p_##x = u.p; \ -+ } \ -+ while (0) -+ DYNSYMS -+#undef DYNSYM -+ return true; -+} -+ - /* Print global statistics to FILE. */ - - static void -@@ -277,6 +305,15 @@ graphite_transform_loops (void) - if (parallelized_function_p (cfun->decl)) - return; - -+ if (number_of_loops (cfun) <= 1) -+ return; -+ -+ if (!init_cloog_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)) ---- a/gcc/graphite-clast-to-gimple.c.jj 2012-12-13 11:31:27.000000000 +0100 -+++ b/gcc/graphite-clast-to-gimple.c 2012-12-14 13:27:47.196519858 +0100 -@@ -910,7 +910,7 @@ compute_bounds_for_loop (struct clast_fo - from STMT_FOR. */ - - static tree --type_for_clast_for (struct clast_for *stmt_for, ivs_params_p ip) -+type_for_clast_for (struct clast_for *stmt_fora, ivs_params_p ip) - { - mpz_t bound_one, bound_two; - tree lb_type, ub_type; -@@ -918,8 +918,8 @@ type_for_clast_for (struct clast_for *st - mpz_init (bound_one); - mpz_init (bound_two); - -- lb_type = type_for_clast_expr (stmt_for->LB, ip, bound_one, bound_two); -- ub_type = type_for_clast_expr (stmt_for->UB, ip, bound_one, bound_two); -+ lb_type = type_for_clast_expr (stmt_fora->LB, ip, bound_one, bound_two); -+ ub_type = type_for_clast_expr (stmt_fora->UB, ip, bound_one, bound_two); - - mpz_clear (bound_one); - mpz_clear (bound_two); diff --git a/main/gcc/musl-posix_memalign-c++.patch b/main/gcc/musl-posix_memalign-c++.patch deleted file mode 100644 index f3fad93ae..000000000 --- a/main/gcc/musl-posix_memalign-c++.patch +++ /dev/null @@ -1,27 +0,0 @@ -Fix conflicting prototype of posix_memalign for c++ -http://www.openwall.com/lists/musl/2013/11/10/1 - ---- ./gcc/config/i386/pmm_malloc.h.orig -+++ ./gcc/config/i386/pmm_malloc.h -@@ -28,11 +28,7 @@ - - /* We can't depend on since the prototype of posix_memalign - may not be visible. */ --#ifndef __cplusplus --extern int posix_memalign (void **, size_t, size_t); --#else --extern "C" int posix_memalign (void **, size_t, size_t) throw (); --#endif -+extern int __gcc_posix_memalign (void **, size_t, size_t) __asm__("posix_memalign"); - - static __inline void * - _mm_malloc (size_t size, size_t alignment) -@@ -42,7 +38,7 @@ - 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/pr63740.patch b/main/gcc/pr63740.patch deleted file mode 100644 index 234d46873..000000000 --- a/main/gcc/pr63740.patch +++ /dev/null @@ -1,17 +0,0 @@ -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63740 - ---- trunk/gcc/lra-lives.c 2014/06/16 09:25:26 211700 -+++ trunk/gcc/lra-lives.c 2014/06/16 09:58:34 211701 -@@ -558,7 +558,11 @@ - /* It might be 'inheritance pseudo <- reload pseudo'. */ - || (src_regno >= lra_constraint_new_regno_start - && ((int) REGNO (SET_DEST (set)) -- >= lra_constraint_new_regno_start)))) -+ >= lra_constraint_new_regno_start) -+ /* Remember to skip special cases where src/dest regnos are -+ the same, e.g. insn SET pattern has matching constraints -+ like =r,0. */ -+ && src_regno != (int) REGNO (SET_DEST (set))))) - { - int hard_regno = -1, regno = -1; - diff --git a/main/gcc/pr64037.patch b/main/gcc/pr64037.patch deleted file mode 100644 index 6b08a5117..000000000 --- a/main/gcc/pr64037.patch +++ /dev/null @@ -1,83 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=0817dc6f0e6b973e0e3671eb72d3758a8f042324 -(changelog changes removed) - -From 0817dc6f0e6b973e0e3671eb72d3758a8f042324 Mon Sep 17 00:00:00 2001 -From: hjl -Date: Sun, 14 Dec 2014 16:07:03 +0000 -Subject: [PATCH] Pass unpromoted argument to promote_function_mode - -This patch updates setup_incoming_promotions in combine.c to match what -is actually passed in assign_parm_setup_reg in function.c. - -Backported from mainline: - -gcc/ - - PR rtl-optimization/64037 - * combine.c (setup_incoming_promotions): Pass the argument - before any promotions happen to promote_function_mode. - -gcc/testsuite/ - - PR rtl-optimization/64037 - * g++.dg/pr64037.C: New test. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218721 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/combine.c | 4 ++-- - gcc/testsuite/g++.dg/pr64037.C | 27 +++++++++++++++++++++++++++ - 4 files changed, 46 insertions(+), 2 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/pr64037.C - -diff --git a/gcc/combine.c b/gcc/combine.c -index 7c00452..adea2c1 100644 ---- a/gcc/combine.c -+++ b/gcc/combine.c -@@ -1529,8 +1529,8 @@ setup_incoming_promotions (rtx first) - uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg)); - - /* The mode and signedness of the argument as it is actually passed, -- after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */ -- mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3, -+ see assign_parm_setup_reg in function.c. */ -+ mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns3, - TREE_TYPE (cfun->decl), 0); - - /* The mode of the register in which the argument is being passed. */ -diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C -new file mode 100644 -index 0000000..e5cd0e2 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/pr64037.C -@@ -0,0 +1,27 @@ -+// { dg-do run { target i?86-*-* x86_64-*-* } } -+// { dg-options "-std=c++11 -Os" } -+ -+enum class X : unsigned char { -+ V = 2, -+}; -+ -+static void -+__attribute__((noinline,noclone)) -+foo(unsigned &out, unsigned a, X b) -+{ -+ out = static_cast(b); -+} -+ -+int main() -+{ -+ unsigned deadbeef = 0xDEADBEEF; -+ asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef)); -+ -+ unsigned out; -+ foo(out, 2, X::V); -+ -+ if (out != 2) -+ __builtin_abort (); -+ -+ return 0; -+} --- -1.7.1 - -- cgit v1.2.3