diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-26 18:24:25 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-09-26 18:24:45 +0200 |
commit | b71f41a9286d34a9ac3d19a7ffa07208682c27e0 (patch) | |
tree | e5d61f5ca00ebb3bfe4fb8eef52608b09a242cfe /toolchain/gcc/patches/4.7.3 | |
parent | 85a2d02040f0c755ab4522df3d336ee636e6b757 (diff) |
add support for toolchain building for crisv32 architecture
Diffstat (limited to 'toolchain/gcc/patches/4.7.3')
-rw-r--r-- | toolchain/gcc/patches/4.7.3/armhf.patch | 72 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/cflags.patch | 241 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-cross.patch | 825 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-m68k.patch | 11 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-mips64.patch | 14 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-ppc.patch | 155 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-sh.patch | 11 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/musl-sparc.patch | 24 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/openbsd-lto.patch | 13 | ||||
-rw-r--r-- | toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch | 217 |
10 files changed, 0 insertions, 1583 deletions
diff --git a/toolchain/gcc/patches/4.7.3/armhf.patch b/toolchain/gcc/patches/4.7.3/armhf.patch deleted file mode 100644 index 4c0bf744d..000000000 --- a/toolchain/gcc/patches/4.7.3/armhf.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -Nur gcc-4.7.2.orig/gcc/config/arm/linux-eabi.h gcc-4.7.2/gcc/config/arm/linux-eabi.h ---- gcc-4.7.2.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100 -+++ gcc-4.7.2/gcc/config/arm/linux-eabi.h 2013-05-03 16:38:21.000000000 +0200 -@@ -34,7 +34,21 @@ - /* We default to a soft-float ABI so that binaries can run on all - target hardware. */ - #undef TARGET_DEFAULT_FLOAT_ABI -+#ifdef TARGET_CONFIGURED_FLOAT_ABI -+#if TARGET_CONFIGURED_FLOAT_ABI == 2 -+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD -+#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=hard" -+#elif TARGET_CONFIGURED_FLOAT_ABI == 1 -+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFTFP -+#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=softfp" -+#else - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT -+#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=soft" -+#endif -+#else -+#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT -+#define MULTILIB_DEFAULT_FLOAT_ABI "mfloat-abi=soft" -+#endif - - /* We default to the "aapcs-linux" ABI so that enums are int-sized by - default. */ -@@ -62,7 +76,45 @@ - /* Use ld-linux.so.3 so that it will be possible to run "classic" - GNU/Linux binaries on an EABI system. */ - #undef GLIBC_DYNAMIC_LINKER --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" -+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" -+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" -+#ifdef TARGET_CONFIGURED_FLOAT_ABI -+#if TARGET_CONFIGURED_FLOAT_ABI == 2 -+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_HARD_FLOAT -+#else -+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT -+#endif -+#else -+#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT -+#endif -+ -+#define GLIBC_DYNAMIC_LINKER \ -+ "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ -+ %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ -+ %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" -+ -+/* Set the multilib defaults according the configuration, needed to -+ let gcc -print-multi-dir do the right thing. */ -+ -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MULTILIB_DEFAULT_ENDIAN "mbig-endian" -+#else -+#define MULTILIB_DEFAULT_ENDIAN "mlittle-endian" -+#endif -+ -+#ifndef TARGET_CONFIGURED_THUMB_MODE -+#define MULTILIB_DEFAULT_MODE "marm" -+#elif TARGET_CONFIGURED_THUMB_MODE == 1 -+#define MULTILIB_DEFAULT_MODE "mthumb" -+#else -+#define MULTILIB_DEFAULT_MODE "marm" -+#endif -+ -+#undef MULTILIB_DEFAULTS -+#define MULTILIB_DEFAULTS \ -+ { MULTILIB_DEFAULT_MODE, MULTILIB_DEFAULT_ENDIAN, \ -+ MULTILIB_DEFAULT_FLOAT_ABI, "mno-thumb-interwork" } -+ - - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ diff --git a/toolchain/gcc/patches/4.7.3/cflags.patch b/toolchain/gcc/patches/4.7.3/cflags.patch deleted file mode 100644 index a9ccdcbc8..000000000 --- a/toolchain/gcc/patches/4.7.3/cflags.patch +++ /dev/null @@ -1,241 +0,0 @@ -diff -Nur gcc-4.7.2.orig/gcc/c-family/c-opts.c gcc-4.7.2/gcc/c-family/c-opts.c ---- gcc-4.7.2.orig/gcc/c-family/c-opts.c 2012-01-18 14:10:40.000000000 +0100 -+++ gcc-4.7.2/gcc/c-family/c-opts.c 2012-09-22 12:53:33.000000000 +0200 -@@ -108,6 +108,9 @@ - /* Number of deferred options scanned for -include. */ - static size_t include_cursor; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -449,6 +452,9 @@ - cpp_opts->warn_endif_labels = value; - break; - -+ case OPT_Werror_maybe_reset: -+ break; -+ - case OPT_Wformat: - set_Wformat (value); - break; -@@ -592,6 +598,12 @@ - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1098,6 +1110,47 @@ - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - -diff -Nur gcc-4.7.2.orig/gcc/c-family/c.opt gcc-4.7.2/gcc/c-family/c.opt ---- gcc-4.7.2.orig/gcc/c-family/c.opt 2012-02-06 11:31:18.000000000 +0100 -+++ gcc-4.7.2/gcc/c-family/c.opt 2012-09-22 12:53:33.000000000 +0200 -@@ -371,6 +371,10 @@ - C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration) - This switch is deprecated; use -Werror=implicit-function-declaration instead - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -830,6 +834,9 @@ - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment -diff -Nur gcc-4.7.2.orig/gcc/common.opt gcc-4.7.2/gcc/common.opt ---- gcc-4.7.2.orig/gcc/common.opt 2012-08-06 16:34:27.000000000 +0200 -+++ gcc-4.7.2/gcc/common.opt 2012-09-22 12:53:33.000000000 +0200 -@@ -531,6 +531,10 @@ - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1209,6 +1213,9 @@ - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a -diff -Nur gcc-4.7.2.orig/gcc/doc/cppopts.texi gcc-4.7.2/gcc/doc/cppopts.texi ---- gcc-4.7.2.orig/gcc/doc/cppopts.texi 2011-12-20 21:44:13.000000000 +0100 -+++ gcc-4.7.2/gcc/doc/cppopts.texi 2012-09-22 12:53:33.000000000 +0200 -@@ -164,6 +164,11 @@ - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful -diff -Nur gcc-4.7.2.orig/gcc/doc/invoke.texi gcc-4.7.2/gcc/doc/invoke.texi ---- gcc-4.7.2.orig/gcc/doc/invoke.texi 2012-09-14 22:45:27.000000000 +0200 -+++ gcc-4.7.2/gcc/doc/invoke.texi 2012-09-22 12:53:33.000000000 +0200 -@@ -242,7 +242,7 @@ - -Wconversion -Wcoverage-mismatch -Wno-cpp -Wno-deprecated @gol - -Wno-deprecated-declarations -Wdisabled-optimization @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-y2k @gol -@@ -4651,6 +4651,22 @@ - @option{-Wall} and by @option{-pedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+ at item -fhonour-copts -+ at opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -6570,7 +6586,7 @@ - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types -diff -Nur gcc-4.7.2.orig/gcc/java/jvspec.c gcc-4.7.2/gcc/java/jvspec.c ---- gcc-4.7.2.orig/gcc/java/jvspec.c 2011-02-13 20:20:01.000000000 +0100 -+++ gcc-4.7.2/gcc/java/jvspec.c 2012-09-22 12:53:33.000000000 +0200 -@@ -627,6 +627,7 @@ - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { -diff -Nur gcc-4.7.2.orig/gcc/opts.c gcc-4.7.2/gcc/opts.c ---- gcc-4.7.2.orig/gcc/opts.c 2012-01-10 17:27:55.000000000 +0100 -+++ gcc-4.7.2/gcc/opts.c 2012-09-22 12:53:33.000000000 +0200 -@@ -470,8 +470,6 @@ - { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 }, - #endif - { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 }, -- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, -- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, -@@ -489,6 +487,8 @@ - { OPT_LEVELS_2_PLUS_SPEED_ONLY, OPT_foptimize_strlen, NULL, 1 }, - - /* -O3 optimizations. */ -+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 }, -+ { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 }, - { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, - { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 }, - /* Inlining of functions reducing size is a good idea with -Os -@@ -1432,6 +1432,17 @@ - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; diff --git a/toolchain/gcc/patches/4.7.3/musl-cross.patch b/toolchain/gcc/patches/4.7.3/musl-cross.patch deleted file mode 100644 index 453ba9aec..000000000 --- a/toolchain/gcc/patches/4.7.3/musl-cross.patch +++ /dev/null @@ -1,825 +0,0 @@ -diff -Nur gcc-4.7.3.orig/config.sub gcc-4.7.3/config.sub ---- gcc-4.7.3.orig/config.sub 2012-08-06 16:34:27.000000000 +0200 -+++ gcc-4.7.3/config.sub 2013-09-16 15:39:42.000000000 +0200 -@@ -4,7 +4,7 @@ - # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - # 2011 Free Software Foundation, Inc. - --timestamp='2011-10-29' -+timestamp='2011-03-23' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -125,6 +125,7 @@ - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -+ linux-musl* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ -@@ -251,17 +252,13 @@ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -- | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ -- | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ -@@ -295,7 +292,7 @@ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ -- | rl78 | rx \ -+ | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -@@ -304,7 +301,7 @@ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ -- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ -+ | v850 | v850e \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) -@@ -361,7 +358,6 @@ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ -- | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ -@@ -370,10 +366,8 @@ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ -- | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -@@ -407,7 +401,7 @@ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ -- | rl78-* | romp-* | rs6000-* | rx-* \ -+ | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -@@ -415,11 +409,10 @@ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -- | tile*-* \ -+ | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ -- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ -- | vax-* \ -+ | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ -@@ -820,10 +813,6 @@ - basic_machine=i370-ibm - os=-mvs - ;; -- nacl) -- basic_machine=le32-unknown -- os=-nacl -- ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 -@@ -1132,8 +1121,13 @@ - basic_machine=t90-cray - os=-unicos - ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; - tile*) -- basic_machine=$basic_machine-unknown -+ basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) -@@ -1346,6 +1340,7 @@ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ -+ | -linux-musl* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -diff -Nur gcc-4.7.3.orig/fixincludes/mkfixinc.sh gcc-4.7.3/fixincludes/mkfixinc.sh ---- gcc-4.7.3.orig/fixincludes/mkfixinc.sh 2011-09-22 16:00:17.000000000 +0200 -+++ gcc-4.7.3/fixincludes/mkfixinc.sh 2013-09-16 15:39:42.000000000 +0200 -@@ -20,7 +20,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} -diff -Nur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h ---- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100 -+++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2013-09-16 15:39:42.000000000 +0200 -@@ -64,6 +64,23 @@ - #undef GLIBC_DYNAMIC_LINKER - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" - -+/* For ARM musl currently supports two 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. -+ musl does not support the legacy OABI (i.e. broken) mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, but this can be overridden by changing both -+ MUSL_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-musl-arm.so.1" -+#define MUSL_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-musl-armhf.so.1" -+#define MUSL_DYNAMIC_LINKER_DEFAULT MUSL_DYNAMIC_LINKER_SOFT_FLOAT -+ -+#define MUSL_DYNAMIC_LINKER \ -+ "%{mfloat-abi=hard:" MUSL_DYNAMIC_LINKER_HARD_FLOAT "} \ -+ %{mfloat-abi=soft*:" MUSL_DYNAMIC_LINKER_SOFT_FLOAT "} \ -+ %{!mfloat-abi=*:" MUSL_DYNAMIC_LINKER_DEFAULT "}" -+ - /* 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 -Nur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h ---- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200 -+++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-09-16 15:39:42.000000000 +0200 -@@ -31,3 +31,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 -Nur gcc-4.7.3.orig/gcc/config/i386/linux.h gcc-4.7.3/gcc/config/i386/linux.h ---- gcc-4.7.3.orig/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200 -+++ gcc-4.7.3/gcc/config/i386/linux.h 2013-09-16 15:39:42.000000000 +0200 -@@ -22,3 +22,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 -Nur gcc-4.7.3.orig/gcc/config/linux.h gcc-4.7.3/gcc/config/linux.h ---- gcc-4.7.3.orig/gcc/config/linux.h 2012-08-14 15:59:04.000000000 +0200 -+++ gcc-4.7.3/gcc/config/linux.h 2013-09-16 15:39:42.000000000 +0200 -@@ -33,10 +33,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() \ -@@ -54,18 +56,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 */ -@@ -85,21 +90,21 @@ - - #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) - - /* Determine whether the entire c99 runtime - is present in the runtime library. */ - #undef TARGET_C99_FUNCTIONS --#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) -+#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL) - - /* Whether we have sincos that follows the GNU extension. */ - #undef TARGET_HAS_SINCOS -@@ -108,3 +113,74 @@ - /* 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 -diff -Nur gcc-4.7.3.orig/gcc/config/linux.opt gcc-4.7.3/gcc/config/linux.opt ---- gcc-4.7.3.orig/gcc/config/linux.opt 2010-09-29 16:51:52.000000000 +0200 -+++ gcc-4.7.3/gcc/config/linux.opt 2013-09-16 15:39:42.000000000 +0200 -@@ -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 -Nur gcc-4.7.3.orig/gcc/config/mips/linux.h gcc-4.7.3/gcc/config/mips/linux.h ---- gcc-4.7.3.orig/gcc/config/mips/linux.h 2011-07-19 20:00:27.000000000 +0200 -+++ gcc-4.7.3/gcc/config/mips/linux.h 2013-09-16 15:39:43.000000000 +0200 -@@ -19,3 +19,5 @@ - <http://www.gnu.org/licenses/>. */ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+ -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1" -diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/linux64.h gcc-4.7.3/gcc/config/rs6000/linux64.h ---- gcc-4.7.3.orig/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100 -+++ gcc-4.7.3/gcc/config/rs6000/linux64.h 2013-09-16 15:39:43.000000000 +0200 -@@ -362,17 +362,21 @@ - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" - #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) - - - #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ -diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h gcc-4.7.3/gcc/config/rs6000/sysv4.h ---- gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h 2012-04-30 19:39:01.000000000 +0200 -+++ gcc-4.7.3/gcc/config/rs6000/sysv4.h 2013-09-16 15:39:43.000000000 +0200 -@@ -804,15 +808,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} \ -diff -Nur gcc-4.7.3.orig/gcc/config.gcc gcc-4.7.3/gcc/config.gcc ---- gcc-4.7.3.orig/gcc/config.gcc 2013-03-06 23:54:11.000000000 +0100 -+++ gcc-4.7.3/gcc/config.gcc 2013-09-16 15:39:43.000000000 +0200 -@@ -522,7 +522,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" - - # Common parts for widely ported systems. - case ${target} in -@@ -625,6 +625,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" - ;; -@@ -2092,6 +2095,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 -Nur gcc-4.7.3.orig/gcc/configure gcc-4.7.3/gcc/configure ---- gcc-4.7.3.orig/gcc/configure 2013-02-06 16:23:55.000000000 +0100 -+++ gcc-4.7.3/gcc/configure 2013-09-16 15:39:43.000000000 +0200 -@@ -26815,7 +26815,8 @@ - gcc_cv_libc_provides_ssp=yes - fi - ;; -- *-*-gnu*) -+ *-*-gnu* | \ -+ *-linux-musl*) - # Avoid complicated tests (see - # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now - # simply assert that glibc does provide this, which is true for all -@@ -26902,6 +26903,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 -Nur gcc-4.7.3.orig/gcc/configure.ac gcc-4.7.3/gcc/configure.ac ---- gcc-4.7.3.orig/gcc/configure.ac 2013-02-06 16:23:55.000000000 +0100 -+++ gcc-4.7.3/gcc/configure.ac 2013-09-16 15:39:43.000000000 +0200 -@@ -4692,7 +4692,8 @@ - gcc_cv_libc_provides_ssp=yes - fi] - ;; -- *-*-gnu*) -+ *-*-gnu* | \ -+ *-linux-musl*) - # Avoid complicated tests (see - # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now - # simply assert that glibc does provide this, which is true for all -@@ -4762,6 +4763,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 -diff -Nur gcc-4.7.3.orig/gcc/ginclude/stddef.h gcc-4.7.3/gcc/ginclude/stddef.h ---- gcc-4.7.3.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100 -+++ gcc-4.7.3/gcc/ginclude/stddef.h 2013-09-16 15:39:43.000000000 +0200 -@@ -184,6 +184,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 -@@ -200,6 +201,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. */ -@@ -215,6 +217,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 */ -diff -Nur gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c ---- gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c 2012-10-06 23:55:06.000000000 +0200 -+++ gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c 2013-09-16 15:39:43.000000000 +0200 -@@ -47,28 +47,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))) --# 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__) -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) - # define USE_PT_GNU_EH_FRAME -+# ifdef __OpenBSD__ -+# define ElfW(type) Elf_##typ -+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7 -+# define ElfW __ElfN -+# endif - #endif - - #if defined(USE_PT_GNU_EH_FRAME) -diff -Nur gcc-4.7.3.orig/libgomp/config/posix/time.c gcc-4.7.3/libgomp/config/posix/time.c ---- gcc-4.7.3.orig/libgomp/config/posix/time.c 2009-04-09 17:00:19.000000000 +0200 -+++ gcc-4.7.3/libgomp/config/posix/time.c 2013-09-16 15:39:43.000000000 +0200 -@@ -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 <unistd.h> - #if TIME_WITH_SYS_TIME -diff -Nur gcc-4.7.3.orig/libitm/config/arm/hwcap.cc gcc-4.7.3/libitm/config/arm/hwcap.cc ---- gcc-4.7.3.orig/libitm/config/arm/hwcap.cc 2011-12-15 04:24:05.000000000 +0100 -+++ gcc-4.7.3/libitm/config/arm/hwcap.cc 2013-09-16 15:39:43.000000000 +0200 -@@ -40,7 +40,11 @@ - - #ifdef __linux__ - #include <unistd.h> -+#ifdef __GLIBC__ - #include <sys/fcntl.h> -+#else -+#include <fcntl.h> -+#endif - #include <elf.h> - - static void __attribute__((constructor)) -diff -Nur gcc-4.7.3.orig/libitm/config/linux/x86/tls.h gcc-4.7.3/libitm/config/linux/x86/tls.h ---- gcc-4.7.3.orig/libitm/config/linux/x86/tls.h 2011-11-08 12:13:41.000000000 +0100 -+++ gcc-4.7.3/libitm/config/linux/x86/tls.h 2013-09-16 15:39:43.000000000 +0200 -@@ -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 -diff -Nur gcc-4.7.3.orig/libssp/configure gcc-4.7.3/libssp/configure ---- gcc-4.7.3.orig/libssp/configure 2012-08-06 16:34:27.000000000 +0200 -+++ gcc-4.7.3/libssp/configure 2013-09-16 15:39:43.000000000 +0200 -@@ -626,6 +626,8 @@ - ssp_have_usable_vsnprintf - EGREP - GREP -+LIBSSP_IN_LIBC_FALSE -+LIBSSP_IN_LIBC_TRUE - LIBSSP_USE_SYMVER_SUN_FALSE - LIBSSP_USE_SYMVER_SUN_TRUE - LIBSSP_USE_SYMVER_GNU_FALSE -@@ -735,6 +737,7 @@ - enable_multilib - enable_dependency_tracking - enable_symvers -+enable_ssp_in_libc - enable_shared - enable_static - with_pic -@@ -1374,6 +1377,7 @@ - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --disable-symvers disable symbol versioning for libssp -+ --enable-ssp-in-libc do not build SSP, as it is in libc - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] -@@ -4206,6 +4210,36 @@ - fi - - -+# musl provides libssp in libc -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libssp is provided in libc" >&5 -+$as_echo_n "checking whether libssp is provided in libc... " >&6; } -+# Check whether --enable-ssp_in_libc was given. -+if test "${enable_ssp_in_libc+set}" = set; then : -+ enableval=$enable_ssp_in_libc; ssp_in_libc=$enableval -+else -+ ssp_in_libc=check -+fi -+ -+if test "x$ssp_in_libc" = "xcheck"; then -+ case "$host" in -+ *-musl*) -+ ssp_in_libc=yes -+ ;; -+ -+ *) -+ ssp_in_libc=no -+ ;; -+ esac -+fi -+ if test "x$ssp_in_libc" = xyes; then -+ LIBSSP_IN_LIBC_TRUE= -+ LIBSSP_IN_LIBC_FALSE='#' -+else -+ LIBSSP_IN_LIBC_TRUE='#' -+ LIBSSP_IN_LIBC_FALSE= -+fi -+ -+ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 - $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -@@ -10650,7 +10684,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10653 "configure" -+#line 10687 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -10756,7 +10790,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10759 "configure" -+#line 10793 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11185,6 +11219,10 @@ - as_fn_error "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi -+if test -z "${LIBSSP_IN_LIBC_TRUE}" && test -z "${LIBSSP_IN_LIBC_FALSE}"; then -+ as_fn_error "conditional \"LIBSSP_IN_LIBC\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - - : ${CONFIG_STATUS=./config.status} - ac_write_fail=0 -diff -Nur gcc-4.7.3.orig/libssp/configure.ac gcc-4.7.3/libssp/configure.ac ---- gcc-4.7.3.orig/libssp/configure.ac 2012-05-31 20:59:34.000000000 +0200 -+++ gcc-4.7.3/libssp/configure.ac 2013-09-16 15:39:43.000000000 +0200 -@@ -114,6 +114,26 @@ - AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu]) - AM_CONDITIONAL(LIBSSP_USE_SYMVER_SUN, [test "x$ssp_use_symver" = xsun]) - -+# musl provides libssp in libc -+AC_MSG_CHECKING([whether libssp is provided in libc]) -+AC_ARG_ENABLE(ssp_in_libc, -+AC_HELP_STRING([--enable-ssp-in-libc], -+ [do not build SSP, as it is in libc]), -+ssp_in_libc=$enableval, -+ssp_in_libc=check) -+if test "x$ssp_in_libc" = "xcheck"; then -+ case "$host" in -+ *-musl*) -+ ssp_in_libc=yes -+ ;; -+ -+ *) -+ ssp_in_libc=no -+ ;; -+ esac -+fi -+AM_CONDITIONAL(LIBSSP_IN_LIBC, [test "x$ssp_in_libc" = xyes]) -+ - AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h) - - if test x$gcc_no_link = xyes; then -diff -Nur gcc-4.7.3.orig/libssp/Makefile.am gcc-4.7.3/libssp/Makefile.am ---- gcc-4.7.3.orig/libssp/Makefile.am 2010-12-06 01:50:04.000000000 +0100 -+++ gcc-4.7.3/libssp/Makefile.am 2013-09-16 15:39:43.000000000 +0200 -@@ -36,7 +36,11 @@ - - AM_CFLAGS = -Wall - -+if LIBSSP_IN_LIBC -+toolexeclib_LTLIBRARIES = libssp_nonshared.la -+else - toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la -+endif - - target_noncanonical = @target_noncanonical@ - libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include -diff -Nur gcc-4.7.3.orig/libssp/Makefile.in gcc-4.7.3/libssp/Makefile.in ---- gcc-4.7.3.orig/libssp/Makefile.in 2011-02-13 12:45:53.000000000 +0100 -+++ gcc-4.7.3/libssp/Makefile.in 2013-09-16 15:39:43.000000000 +0200 -@@ -93,12 +93,17 @@ - libssp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libssp_la_LDFLAGS) $(LDFLAGS) -o $@ -+@LIBSSP_IN_LIBC_FALSE@am_libssp_la_rpath = -rpath $(toolexeclibdir) - am_libssp_nonshared_la_OBJECTS = libssp_nonshared_la-ssp-local.lo - libssp_nonshared_la_OBJECTS = $(am_libssp_nonshared_la_OBJECTS) - libssp_nonshared_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(libssp_nonshared_la_CFLAGS) $(CFLAGS) \ - $(libssp_nonshared_la_LDFLAGS) $(LDFLAGS) -o $@ -+@LIBSSP_IN_LIBC_FALSE@am_libssp_nonshared_la_rpath = -rpath \ -+@LIBSSP_IN_LIBC_FALSE@ $(toolexeclibdir) -+@LIBSSP_IN_LIBC_TRUE@am_libssp_nonshared_la_rpath = -rpath \ -+@LIBSSP_IN_LIBC_TRUE@ $(toolexeclibdir) - DEFAULT_INCLUDES = -I.@am__isrc@ - depcomp = $(SHELL) $(top_srcdir)/../depcomp - am__depfiles_maybe = depfiles -@@ -258,7 +263,8 @@ - @LIBSSP_USE_SYMVER_GNU_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = $(srcdir)/ssp.map - @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = ssp.map-sun - AM_CFLAGS = -Wall --toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la -+@LIBSSP_IN_LIBC_FALSE@toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la -+@LIBSSP_IN_LIBC_TRUE@toolexeclib_LTLIBRARIES = libssp_nonshared.la - libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include - nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h - libssp_la_SOURCES = \ -@@ -414,9 +420,9 @@ - rm -f "$${dir}/so_locations"; \ - done - libssp.la: $(libssp_la_OBJECTS) $(libssp_la_DEPENDENCIES) -- $(libssp_la_LINK) -rpath $(toolexeclibdir) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS) -+ $(libssp_la_LINK) $(am_libssp_la_rpath) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS) - libssp_nonshared.la: $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_DEPENDENCIES) -- $(libssp_nonshared_la_LINK) -rpath $(toolexeclibdir) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS) -+ $(libssp_nonshared_la_LINK) $(am_libssp_nonshared_la_rpath) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS) - - mostlyclean-compile: - -rm -f *.$(OBJEXT) -diff -Nur gcc-4.7.3.orig/libstdc++-v3/configure.host gcc-4.7.3/libstdc++-v3/configure.host ---- gcc-4.7.3.orig/libstdc++-v3/configure.host 2012-12-18 15:27:14.000000000 +0100 -+++ gcc-4.7.3/libstdc++-v3/configure.host 2013-09-16 15:39:43.000000000 +0200 -@@ -243,6 +243,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 -@@ -251,6 +258,9 @@ - os_include_dir="os/gnu-linux" - fi - ;; -+ -+ esac -+ ;; - hpux*) - os_include_dir="os/hpux" - ;; diff --git a/toolchain/gcc/patches/4.7.3/musl-m68k.patch b/toolchain/gcc/patches/4.7.3/musl-m68k.patch deleted file mode 100644 index 54c7e0eef..000000000 --- a/toolchain/gcc/patches/4.7.3/musl-m68k.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/m68k/linux.h gcc-4.7.3/gcc/config/m68k/linux.h ---- gcc-4.7.3.orig/gcc/config/m68k/linux.h 2011-11-27 00:57:37.000000000 +0100 -+++ gcc-4.7.3/gcc/config/m68k/linux.h 2013-09-28 22:37:22.000000000 +0200 -@@ -73,6 +73,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1" - - #undef LINK_SPEC - #define LINK_SPEC "-m m68kelf %{shared} \ diff --git a/toolchain/gcc/patches/4.7.3/musl-mips64.patch b/toolchain/gcc/patches/4.7.3/musl-mips64.patch deleted file mode 100644 index 671ba9f28..000000000 --- a/toolchain/gcc/patches/4.7.3/musl-mips64.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux64.h gcc-4.7.3/gcc/config/mips/linux64.h ---- gcc-4.7.3.orig/gcc/config/mips/linux64.h 2011-07-19 20:00:27.000000000 +0200 -+++ gcc-4.7.3/gcc/config/mips/linux64.h 2013-09-17 09:24:36.000000000 +0200 -@@ -28,6 +28,9 @@ - #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" - #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1" -+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/toolchain/gcc/patches/4.7.3/musl-ppc.patch b/toolchain/gcc/patches/4.7.3/musl-ppc.patch deleted file mode 100644 index f4211ee73..000000000 --- a/toolchain/gcc/patches/4.7.3/musl-ppc.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h ---- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h 2011-11-12 18:20:58.000000000 +0100 -+++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h 2013-09-15 18:29:20.000000000 +0200 -@@ -27,7 +27,6 @@ - #define R_CR2 70 - #define R_VR0 77 - #define R_VRSAVE 109 --#define R_VSCR 110 - - struct gcc_vregs - { -@@ -176,38 +175,6 @@ - } - #endif - --/* Find an entry in the process auxiliary vector. The canonical way to -- test for VMX is to look at AT_HWCAP. */ -- --static long --ppc_linux_aux_vector (long which) --{ -- /* __libc_stack_end holds the original stack passed to a process. */ -- extern long *__libc_stack_end; -- long argc; -- char **argv; -- char **envp; -- struct auxv -- { -- long a_type; -- long a_val; -- } *auxp; -- -- /* The Linux kernel puts argc first on the stack. */ -- argc = __libc_stack_end[0]; -- /* Followed by argv, NULL terminated. */ -- argv = (char **) __libc_stack_end + 1; -- /* Followed by environment string pointers, NULL terminated. */ -- envp = argv + argc + 1; -- while (*envp++) -- continue; -- /* Followed by the aux vector, zero terminated. */ -- for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp) -- if (auxp->a_type == which) -- return auxp->a_val; -- return 0; --} -- - /* Do code reading to identify a signal frame, and set the frame - state data appropriately. See unwind-dw2.c for the structs. */ - -@@ -217,8 +184,8 @@ - ppc_fallback_frame_state (struct _Unwind_Context *context, - _Unwind_FrameState *fs) - { -- static long hwcap = 0; - struct gcc_regs *regs = get_regs (context); -+ struct gcc_vregs *vregs; - long new_cfa; - int i; - -@@ -230,12 +197,15 @@ - fs->regs.cfa_reg = STACK_POINTER_REGNUM; - fs->regs.cfa_offset = new_cfa - (long) context->cfa; - -- for (i = 0; i < 32; i++) -- if (i != STACK_POINTER_REGNUM) -- { -- fs->regs.reg[i].how = REG_SAVED_OFFSET; -- fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; -- } -+#ifdef __powerpc64__ -+ fs->regs.reg[2].how = REG_SAVED_OFFSET; -+ fs->regs.reg[2].loc.offset = (long) ®s->gpr[2] - new_cfa; -+#endif -+ for (i = 14; i < 32; i++) -+ { -+ fs->regs.reg[i].how = REG_SAVED_OFFSET; -+ fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; -+ } - - fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET; - /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit -@@ -251,57 +221,35 @@ - fs->retaddr_column = ARG_POINTER_REGNUM; - fs->signal_frame = 1; - -- if (hwcap == 0) -+ /* If we have a FPU... */ -+ for (i = 14; i < 32; i++) - { -- hwcap = ppc_linux_aux_vector (16); -- /* These will already be set if we found AT_HWCAP. A nonzero -- value stops us looking again if for some reason we couldn't -- find AT_HWCAP. */ --#ifdef __powerpc64__ -- hwcap |= 0xc0000000; --#else -- hwcap |= 0x80000000; --#endif -+ fs->regs.reg[i + 32].how = REG_SAVED_OFFSET; -+ fs->regs.reg[i + 32].loc.offset = (long) ®s->fpr[i] - new_cfa; - } - -- /* If we have a FPU... */ -- if (hwcap & 0x08000000) -- for (i = 0; i < 32; i++) -- { -- fs->regs.reg[i + 32].how = REG_SAVED_OFFSET; -- fs->regs.reg[i + 32].loc.offset = (long) ®s->fpr[i] - new_cfa; -- } -- - /* If we have a VMX unit... */ -- if (hwcap & 0x10000000) -- { -- struct gcc_vregs *vregs; - #ifdef __powerpc64__ -- vregs = regs->vp; -+ vregs = regs->vp; - #else -- vregs = ®s->vregs; -+ vregs = ®s->vregs; - #endif -- if (regs->msr & (1 << 25)) -+ if (regs->msr & (1 << 25)) -+ { -+ for (i = 20; i < 32; i++) - { -- for (i = 0; i < 32; i++) -- { -- fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET; -- fs->regs.reg[i + R_VR0].loc.offset -- = (long) &vregs->vr[i] - new_cfa; -- } -- -- fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET; -- fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa; -+ fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET; -+ fs->regs.reg[i + R_VR0].loc.offset = (long) &vregs->vr[i] - new_cfa; - } -- -- fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET; -- fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa; - } - -+ fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET; -+ fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa; -+ - /* If we have SPE register high-parts... we check at compile-time to - avoid expanding the code for all other PowerPC. */ - #ifdef __SPE__ -- for (i = 0; i < 32; i++) -+ for (i = 14; i < 32; i++) - { - fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET; - fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset diff --git a/toolchain/gcc/patches/4.7.3/musl-sh.patch b/toolchain/gcc/patches/4.7.3/musl-sh.patch deleted file mode 100644 index fbf06082a..000000000 --- a/toolchain/gcc/patches/4.7.3/musl-sh.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h ---- gcc-4.7.3.orig/gcc/config/sh/linux.h 2013-03-25 23:55:56.000000000 +0100 -+++ gcc-4.7.3/gcc/config/sh/linux.h 2013-09-26 21:16:39.000000000 +0200 -@@ -46,6 +46,7 @@ - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.so.1" - - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/toolchain/gcc/patches/4.7.3/musl-sparc.patch b/toolchain/gcc/patches/4.7.3/musl-sparc.patch deleted file mode 100644 index 7c9214f07..000000000 --- a/toolchain/gcc/patches/4.7.3/musl-sparc.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/linux64.h ---- gcc-4.7.3.orig/gcc/config/sparc/linux64.h 2011-11-12 02:05:07.000000000 +0100 -+++ gcc-4.7.3/gcc/config/sparc/linux64.h 2013-09-19 11:37:50.000000000 +0200 -@@ -95,6 +95,9 @@ - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.so.1" -+ - - #ifdef SPARC_BI_ARCH - -diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/linux.h ---- gcc-4.7.3.orig/gcc/config/sparc/linux.h 2011-11-12 02:05:07.000000000 +0100 -+++ gcc-4.7.3/gcc/config/sparc/linux.h 2013-09-19 11:37:12.000000000 +0200 -@@ -85,6 +85,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.so.1" - - #undef LINK_SPEC - #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ diff --git a/toolchain/gcc/patches/4.7.3/openbsd-lto.patch b/toolchain/gcc/patches/4.7.3/openbsd-lto.patch deleted file mode 100644 index 8a94971b7..000000000 --- a/toolchain/gcc/patches/4.7.3/openbsd-lto.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config.host gcc-4.7.3/gcc/config.host ---- gcc-4.7.3.orig/gcc/config.host Tue Oct 18 08:14:14 2011 -+++ gcc-4.7.3/gcc/config.host Tue Jan 7 04:33:29 2014 -@@ -292,6 +292,9 @@ - out_host_hook_obj=host-solaris.o - host_xmake_file="${host_xmake_file} x-solaris" - ;; -+ *-*-openbsd*) -+ host_lto_plugin_soname=liblto_plugin.so.0.0 -+ ;; - *-*-linux*) - out_host_hook_obj=host-linux.o - host_xmake_file="${host_xmake_file} x-linux" diff --git a/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch b/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch deleted file mode 100644 index 0e64e8d0e..000000000 --- a/toolchain/gcc/patches/4.7.3/ppc-uclibc-cmath.patch +++ /dev/null @@ -1,217 +0,0 @@ -diff -Nur gcc-4.7.3.orig/libstdc++-v3/include/tr1/cmath gcc-4.7.3/libstdc++-v3/include/tr1/cmath ---- gcc-4.7.3.orig/libstdc++-v3/include/tr1/cmath 2011-11-14 00:51:42.000000000 +0100 -+++ gcc-4.7.3/libstdc++-v3/include/tr1/cmath 2013-09-22 20:13:54.000000000 +0200 -@@ -159,143 +159,213 @@ - // functions - using ::acosh; - using ::acoshf; -+#ifdef __LONG_DOUBLE_128__ - using ::acoshl; -+#endif - - using ::asinh; - using ::asinhf; -+#ifdef __LONG_DOUBLE_128__ - using ::asinhl; -+#endif - - using ::atanh; - using ::atanhf; -+#ifdef __LONG_DOUBLE_128__ - using ::atanhl; -+#endif - - using ::cbrt; - using ::cbrtf; -+#ifdef __LONG_DOUBLE_128__ - using ::cbrtl; -+#endif - - using ::copysign; - using ::copysignf; -+#ifdef __LONG_DOUBLE_128__ - using ::copysignl; -+#endif - - using ::erf; - using ::erff; -+#ifdef __LONG_DOUBLE_128__ - using ::erfl; -+#endif - - using ::erfc; - using ::erfcf; -+#ifdef __LONG_DOUBLE_128__ - using ::erfcl; -+#endif - - using ::exp2; - using ::exp2f; -+#ifdef __LONG_DOUBLE_128__ - using ::exp2l; -+#endif - - using ::expm1; - using ::expm1f; -+#ifdef __LONG_DOUBLE_128__ - using ::expm1l; -+#endif - - using ::fdim; - using ::fdimf; -+#ifdef __LONG_DOUBLE_128__ - using ::fdiml; -+#endif - - using ::fma; - using ::fmaf; -+#ifdef __LONG_DOUBLE_128__ - using ::fmal; -+#endif - - using ::fmax; - using ::fmaxf; -+#ifdef __LONG_DOUBLE_128__ - using ::fmaxl; -+#endif - - using ::fmin; - using ::fminf; -+#ifdef __LONG_DOUBLE_128__ - using ::fminl; -+#endif - - using ::hypot; - using ::hypotf; -+#ifdef __LONG_DOUBLE_128__ - using ::hypotl; -+#endif - - using ::ilogb; - using ::ilogbf; -+#ifdef __LONG_DOUBLE_128__ - using ::ilogbl; -+#endif - - using ::lgamma; - using ::lgammaf; -+#ifdef __LONG_DOUBLE_128__ - using ::lgammal; -+#endif - - using ::llrint; - using ::llrintf; -+#ifdef __LONG_DOUBLE_128__ - using ::llrintl; -+#endif - - using ::llround; - using ::llroundf; -+#ifdef __LONG_DOUBLE_128__ - using ::llroundl; -+#endif - - using ::log1p; - using ::log1pf; -+#ifdef __LONG_DOUBLE_128__ - using ::log1pl; -+#endif - - using ::log2; - using ::log2f; -+#ifdef __LONG_DOUBLE_128__ - using ::log2l; -+#endif - - using ::logb; - using ::logbf; -+#ifdef __LONG_DOUBLE_128__ - using ::logbl; -+#endif - - using ::lrint; - using ::lrintf; -+#ifdef __LONG_DOUBLE_128__ - using ::lrintl; -+#endif - - using ::lround; - using ::lroundf; -+#ifdef __LONG_DOUBLE_128__ - using ::lroundl; -+#endif - - using ::nan; - using ::nanf; -+#ifdef __LONG_DOUBLE_128__ - using ::nanl; -+#endif - - using ::nearbyint; - using ::nearbyintf; -+#ifdef __LONG_DOUBLE_128__ - using ::nearbyintl; -+#endif - - using ::nextafter; - using ::nextafterf; -+#ifdef __LONG_DOUBLE_128__ - using ::nextafterl; -+#endif - - using ::nexttoward; - using ::nexttowardf; -+#ifdef __LONG_DOUBLE_128__ - using ::nexttowardl; -+#endif - - using ::remainder; - using ::remainderf; -+#ifdef __LONG_DOUBLE_128__ - using ::remainderl; -+#endif - - using ::remquo; - using ::remquof; -+#ifdef __LONG_DOUBLE_128__ - using ::remquol; -+#endif - - using ::rint; - using ::rintf; -+#ifdef __LONG_DOUBLE_128__ - using ::rintl; -+#endif - - using ::round; - using ::roundf; -+#ifdef __LONG_DOUBLE_128__ - using ::roundl; -+#endif - - using ::scalbln; - using ::scalblnf; -+#ifdef __LONG_DOUBLE_128__ - using ::scalblnl; -+#endif - - using ::scalbn; - using ::scalbnf; -+#ifdef __LONG_DOUBLE_128__ - using ::scalbnl; -+#endif - - using ::tgamma; - using ::tgammaf; -+#ifdef __LONG_DOUBLE_128__ - using ::tgammal; -+#endif - - using ::trunc; - using ::truncf; -+#ifdef __LONG_DOUBLE_128__ - using ::truncl; -+#endif - - #endif - |