diff options
author | 2009-10-17 20:10:41 +0000 | |
---|---|---|
committer | 2009-10-17 20:10:41 +0000 | |
commit | d663f99c4ff09c26fb820ed680fe413ce4978d21 (patch) | |
tree | e5f65d42e9485f69a891d77cfa126248e9ecb8ef /4.4.2 | |
parent | Add SH patch to 4.3.2 as well (diff) | |
download | gcc-patches-d663f99c4ff09c26fb820ed680fe413ce4978d21.tar.gz gcc-patches-d663f99c4ff09c26fb820ed680fe413ce4978d21.tar.bz2 gcc-patches-d663f99c4ff09c26fb820ed680fe413ce4978d21.zip |
Adding 4.4.2 patchset
Diffstat (limited to '4.4.2')
25 files changed, 998 insertions, 0 deletions
diff --git a/4.4.2/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch b/4.4.2/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch new file mode 100644 index 0000000..b6932d4 --- /dev/null +++ b/4.4.2/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch @@ -0,0 +1,31 @@ +Set the default behavior on alpha to use -mieee since the large majority of +time we want this (bad/weird things can happen with packages built without +-mieee). + +To satisfy those people who may not want -mieee forced on them all the time, +we also provide -mno-ieee. + +Patch by Mike Frysinger <vapier@gentoo.org> + +--- gcc-4.3.0/gcc/config/alpha/alpha.h ++++ gcc-4.3.0/gcc/config/alpha/alpha.h +@@ -95,6 +95,8 @@ + while (0) + #endif + ++#define CPP_SPEC "%{!no-ieee:-mieee}" ++ + #define WORD_SWITCH_TAKES_ARG(STR) \ + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR)) + +--- gcc-4.3.0/gcc/config/alpha/alpha.opt ++++ gcc-4.3.0/gcc/config/alpha/alpha.opt +@@ -39,7 +39,7 @@ + Request IEEE-conformant math library routines (OSF/1) + + mieee +-Target Report RejectNegative Mask(IEEE) ++Target Report Mask(IEEE) + Emit IEEE-conformant code, without inexact exceptions + + mieee-with-inexact diff --git a/4.4.2/gentoo/00_all_gcc-trampolinewarn.patch b/4.4.2/gentoo/00_all_gcc-trampolinewarn.patch new file mode 100644 index 0000000..a68a43f --- /dev/null +++ b/4.4.2/gentoo/00_all_gcc-trampolinewarn.patch @@ -0,0 +1,32 @@ + This trivial patch causes gcc to emit a warning whenever + it generates a trampoline. These are otherwise hard to + locate. It is rigged to default ON - to have it default + to OFF remove the text 'Init(1)' from the common.opt + patch, leaving just 'Common Var(warn_trampolines)'. + Kevin F. Quinn <kevquinn@gentoo.org> 17 Jan 2006 + +--- gcc/gcc/common.opt ++++ gcc/gcc/common.opt +@@ -141,6 +141,10 @@ + Common Var(warn_system_headers) + Do not suppress warnings from system headers + ++Wtrampolines ++Common Var(warn_trampolines) Init(1) ++Warn whenever a trampoline is generated ++ + Wuninitialized + Common Var(warn_uninitialized) + Warn about uninitialized automatic variables +--- gcc/gcc/builtins.c ++++ gcc/gcc/builtins.c +@@ -5224,6 +5224,9 @@ + #endif + trampolines_created = 1; + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain); ++ ++ if (warn_trampolines) ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)"); + + return const0_rtx; + } diff --git a/4.4.2/gentoo/03_all_gcc43-java-nomulti.patch b/4.4.2/gentoo/03_all_gcc43-java-nomulti.patch new file mode 100644 index 0000000..f07ead8 --- /dev/null +++ b/4.4.2/gentoo/03_all_gcc43-java-nomulti.patch @@ -0,0 +1,44 @@ +--- libjava/configure.ac.jj 2007-12-07 17:55:50.000000000 +0100 ++++ libjava/configure.ac 2007-12-07 18:36:56.000000000 +0100 +@@ -82,6 +82,13 @@ AC_ARG_ENABLE(java-maintainer-mode, + [allow rebuilding of .class and .h files])) + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes) + ++AC_ARG_ENABLE(libjava-multilib, ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib])) ++if test "$enable_libjava_multilib" = no; then ++ multilib=no ++ ac_configure_args="$ac_configure_args --disable-multilib" ++fi ++ + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. + GCC_NO_EXECUTABLES + +--- libjava/configure.jj 2007-12-07 17:55:50.000000000 +0100 ++++ libjava/configure 2007-12-07 18:39:58.000000000 +0100 +@@ -1018,6 +1018,8 @@ Optional Features: + --enable-gconf-peer compile GConf native peers for util.preferences + --enable-java-maintainer-mode + allow rebuilding of .class and .h files ++ --enable-libjava-multilib ++ build libjava as multilib + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful +@@ -1848,6 +1850,16 @@ else + fi + + ++# Check whether --enable-libjava-multilib was given. ++if test "${enable_libjava_multilib+set}" = set; then ++ enableval=$enable_libjava_multilib; ++fi ++ ++if test "$enable_libjava_multilib" = no; then ++ multilib=no ++ ac_configure_args="$ac_configure_args --disable-multilib" ++fi ++ + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. + + diff --git a/4.4.2/gentoo/08_all_gcc-4.1-cross-compile.patch b/4.4.2/gentoo/08_all_gcc-4.1-cross-compile.patch new file mode 100644 index 0000000..523caa4 --- /dev/null +++ b/4.4.2/gentoo/08_all_gcc-4.1-cross-compile.patch @@ -0,0 +1,40 @@ +Some notes on the 'bootstrap with or without libc headers' debate: +http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html +http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html + +--- gcc/unwind-dw2.c ++++ gcc/unwind-dw2.c +@@ -253,9 +253,11 @@ + } + #endif + ++#ifndef inhibit_libc + #ifdef MD_UNWIND_SUPPORT + #include MD_UNWIND_SUPPORT + #endif ++#endif + + /* Extract any interesting information from the CIE for the translation + unit F belongs to. Return a pointer to the byte after the augmentation, +--- gcc/configure ++++ gcc/configure +@@ -12857,7 +12857,7 @@ then + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + +--- gcc/configure.ac ++++ gcc/configure.ac +@@ -1717,7 +1717,7 @@ then + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + diff --git a/4.4.2/gentoo/10_all_gcc-default-format-security.patch b/4.4.2/gentoo/10_all_gcc-default-format-security.patch new file mode 100644 index 0000000..8631396 --- /dev/null +++ b/4.4.2/gentoo/10_all_gcc-default-format-security.patch @@ -0,0 +1,50 @@ +ripped from Debian + +# DP: Turn on -Wformat -Wformat-security by default for C, C++, ObjC, ObjC++. + +--- gcc/c-common.c ++++ gcc/c-common.c +@@ -277,7 +277,7 @@ + /* Warn about format/argument anomalies in calls to formatted I/O functions + (*printf, *scanf, strftime, strfmon, etc.). */ + +-int warn_format; ++int warn_format = 1; + + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled + with GCC this doesn't matter as __null is guaranteed to have the right +--- gcc/c.opt ++++ gcc/c.opt +@@ -228,7 +228,7 @@ + Warn about format strings that contain NUL bytes + + Wformat-security +-C ObjC C++ ObjC++ Var(warn_format_security) Warning ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning + Warn about possible security problems with format functions + + Wformat-y2k +--- gcc/doc/invoke.texi ++++ gcc/doc/invoke.texi +@@ -2802,6 +2802,9 @@ + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and + @option{-Wformat=2} are available, but are not included in @option{-Wall}. + ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. ++To disable, use @option{-Wformat=0}. ++ + @item -Wformat-y2k + @opindex Wformat-y2k + @opindex Wno-format-y2k +@@ -2849,6 +2852,11 @@ + in future warnings may be added to @option{-Wformat-security} that are not + included in @option{-Wformat-nonliteral}.) + ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. ++To disable, use @option{-Wno-format-security}, or disable all format warnings ++with @option{-Wformat=0}. To make format security warnings fatal, specify ++@option{-Werror=format-security}. ++ + @item -Wformat=2 + @opindex Wformat=2 + @opindex Wno-format=2 diff --git a/4.4.2/gentoo/10_all_gcc-default-fortify-source.patch b/4.4.2/gentoo/10_all_gcc-default-fortify-source.patch new file mode 100644 index 0000000..e5d8b6e --- /dev/null +++ b/4.4.2/gentoo/10_all_gcc-default-fortify-source.patch @@ -0,0 +1,28 @@ +ripped from Debian + +# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++. + +--- gcc/doc/invoke.texi ++++ gcc/doc/invoke.texi +@@ -5204,6 +5204,11 @@ + Please note the warning under @option{-fgcse} about + invoking @option{-O2} on programs that use computed gotos. + ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is ++activated when @option{-O} is set to 2 or higher. This enables additional ++compile-time and run-time checks for several libc functions. To disable, ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}. ++ + @item -O3 + @opindex O3 + Optimize yet more. @option{-O3} turns on all optimizations specified by +--- gcc/gcc.c ++++ gcc/gcc.c +@@ -802,6 +802,7 @@ + %{H} %C %{D*&U*&A*} %{i*} %Z %i\ + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\ + %{E|M|MM:%W{o*}}"; + + /* This contains cpp options which are common with cc1_options and are passed diff --git a/4.4.2/gentoo/11_all_gcc-netbsd-symbolic.patch b/4.4.2/gentoo/11_all_gcc-netbsd-symbolic.patch new file mode 100644 index 0000000..3b86491 --- /dev/null +++ b/4.4.2/gentoo/11_all_gcc-netbsd-symbolic.patch @@ -0,0 +1,12 @@ +http://bugs.gentoo.org/122698 + +--- gcc/config/netbsd-elf.h ++++ gcc/config/netbsd-elf.h +@@ -83,6 +83,7 @@ + #define NETBSD_LINK_SPEC_ELF \ + "%{assert*} %{R*} %{rpath*} \ + %{shared:-shared} \ ++ %{symbolic:-Bsymbolic} \ + %{!shared: \ + -dc -dp \ + %{!nostdlib: \ diff --git a/4.4.2/gentoo/14_all_gcc-sparc64-bsd.patch b/4.4.2/gentoo/14_all_gcc-sparc64-bsd.patch new file mode 100644 index 0000000..cdce9da --- /dev/null +++ b/4.4.2/gentoo/14_all_gcc-sparc64-bsd.patch @@ -0,0 +1,28 @@ +--- a/gcc/config/sparc/freebsd.h 2006-02-02 19:55:09 +0000 ++++ b/gcc/config/sparc/freebsd.h 2007-09-06 23:55:21 +0100 +@@ -26,9 +26,22 @@ + /* FreeBSD needs the platform name (sparc64) defined. + Emacs needs to know if the arch is 64 or 32-bits. */ + +-#undef CPP_CPU64_DEFAULT_SPEC +-#define CPP_CPU64_DEFAULT_SPEC \ +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__" ++#undef FBSD_TARGET_CPU_CPP_BUILTINS ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \ ++ do \ ++ { \ ++ if (TARGET_ARCH64) \ ++ { \ ++ builtin_define ("__sparc64__"); \ ++ builtin_define ("__sparc_v9__"); \ ++ builtin_define ("__sparcv9"); \ ++ } \ ++ else \ ++ builtin_define ("__sparc"); \ ++ builtin_define ("__sparc__"); \ ++ } \ ++ while (0) ++ + + #define LINK_SPEC "%(link_arch) \ + %{!mno-relax:%{!r:-relax}} \ diff --git a/4.4.2/gentoo/15_all_gcc-libgomp-no-werror.patch b/4.4.2/gentoo/15_all_gcc-libgomp-no-werror.patch new file mode 100644 index 0000000..1c3ec3a --- /dev/null +++ b/4.4.2/gentoo/15_all_gcc-libgomp-no-werror.patch @@ -0,0 +1,16 @@ +libgomp does not respect --disable-werror + +http://bugs.gentoo.org/229059 +http://gcc.gnu.org/PR38436 + +--- gcc-4.3.2/libgomp/configure ++++ gcc-4.3.2/libgomp/configure +@@ -3297,7 +3297,7 @@ + + # 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/4.4.2/gentoo/18_all_904-flatten-switch-stmt-00.patch b/4.4.2/gentoo/18_all_904-flatten-switch-stmt-00.patch new file mode 100644 index 0000000..1e68d86 --- /dev/null +++ b/4.4.2/gentoo/18_all_904-flatten-switch-stmt-00.patch @@ -0,0 +1,155 @@ +http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00927.html + +Hi, + +The attached patch makes sure that we create smaller object code for +simple switch statements. We just make sure to flatten the switch +statement into an if-else chain, basically. + +This fixes a size-regression as compared to gcc-3.4, as can be seen +below. + +2007-04-15 Bernhard Fischer <..> + + * stmt.c (expand_case): Do not create a complex binary tree when + optimizing for size but rather use the simple ordered list. + (emit_case_nodes): do not emit jumps to the default_label when + optimizing for size. + +Not regtested so far. +Comments? + +Attached is the test switch.c mentioned below. + +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done +$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do +gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done + +$ size switch-*.o + text data bss dec hex filename + 169 0 0 169 a9 switch-2.95.o + 115 0 0 115 73 switch-3.3.o + 103 0 0 103 67 switch-3.4.o + 124 0 0 124 7c switch-4.0.o + 124 0 0 124 7c switch-4.1.o + 124 0 0 124 7c switch-4.2.orig-HEAD.o + 95 0 0 95 5f switch-4.3-HEAD.o + 124 0 0 124 7c switch-4.3.orig-HEAD.o + 166 0 0 166 a6 switch-CHAIN-2.95.o + 111 0 0 111 6f switch-CHAIN-3.3.o + 95 0 0 95 5f switch-CHAIN-3.4.o + 95 0 0 95 5f switch-CHAIN-4.0.o + 95 0 0 95 5f switch-CHAIN-4.1.o + 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o + 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o + + +Content-Type: text/x-diff; charset=us-ascii +Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" + +Index: gcc-4.2.0/gcc/stmt.c +=================================================================== +--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843) ++++ gcc-4.2.0/gcc/stmt.c (working copy) +@@ -2517,7 +2517,11 @@ expand_case (tree exp) + use_cost_table + = (TREE_CODE (orig_type) != ENUMERAL_TYPE + && estimate_case_costs (case_list)); +- balance_case_nodes (&case_list, NULL); ++ /* When optimizing for size, we want a straight list to avoid ++ jumps as much as possible. This basically creates an if-else ++ chain. */ ++ if (!optimize_size) ++ balance_case_nodes (&case_list, NULL); + emit_case_nodes (index, case_list, default_label, index_type); + emit_jump (default_label); + } +@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt + { + if (!node_has_low_bound (node, index_type)) + { ++ if (!optimize_size) /* don't jl to the .default_label. */ + emit_cmp_and_jump_insns (index, + convert_modes + (mode, imode, + + +Content-Type: text/x-csrc; charset=us-ascii +Content-Disposition: attachment; filename="switch.c" + +int +commutative_tree_code (int code) +{ +#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret; +#ifndef CHAIN + switch (code) + { +# if 1 + CASE(1,3) + CASE(3,2) + CASE(5,8) + CASE(7,1) + CASE(33,4) + CASE(44,9) + CASE(55,10) + CASE(66,-1) + CASE(77,99) + CASE(666,0) +# else + case 1: + return 3; + case 3: + return 2; + case 5: + return 8; + case 7: + return 1; + case 33: + return 4; + case 44: + return 9; + case 55: + return 10; + case 66: + return -1; + case 77: + return 99; + case 666: + return 0; +# endif + default: + break; + } + return 4711; + +#else + if (code == 1) + return 3; + else if (code == 3) + return 2; + else if (code == 5) + return 8; + else if (code == 7) + return 1; + else if (code == 33) + return 4; + else if (code == 44) + return 9; + else if (code == 55) + return 10; + else if (code == 66) + return -1; + else if (code == 77) + return 99; + else if (code == 666) + return 0; + else + return 4711; +#endif +} + + +--AhhlLboLdkugWU4S-- + diff --git a/4.4.2/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch b/4.4.2/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch new file mode 100644 index 0000000..34450b4 --- /dev/null +++ b/4.4.2/gentoo/40_all_gcc-4.4-libiberty.h-asprintf.patch @@ -0,0 +1,18 @@ +2008-07-25 Magnus Granberg <zorry@ume.nu> + + * include/libiberty.h (asprintf): Don't declare if defined as a macro + +--- include/libiberty.h.zorry ++++ include/libiberty.h +@@ -554,8 +554,11 @@ + /* 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/4.4.2/gentoo/47_all_arm-unbreak-armv4t.patch b/4.4.2/gentoo/47_all_arm-unbreak-armv4t.patch new file mode 100644 index 0000000..123c751 --- /dev/null +++ b/4.4.2/gentoo/47_all_arm-unbreak-armv4t.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +gcc defaults to armv5t for all targets even armv4t + +--- gcc/config/arm/linux-eabi.h ++++ gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/4.4.2/gentoo/51_all_gcc-3.4-libiberty-pic.patch b/4.4.2/gentoo/51_all_gcc-3.4-libiberty-pic.patch new file mode 100644 index 0000000..d9a95a2 --- /dev/null +++ b/4.4.2/gentoo/51_all_gcc-3.4-libiberty-pic.patch @@ -0,0 +1,10 @@ +--- gcc-4.1.0-orig/libiberty/Makefile.in 2006-03-01 15:49:14.000000000 -0500 ++++ gcc-4.1.0/libiberty/Makefile.in 2006-03-01 18:10:46.000000000 -0500 +@@ -232,6 +232,7 @@ + $(AR) $(AR_FLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ + $(RANLIB) $(TARGETLIB); \ ++ cp $(TARGETLIB) ../ ; \ + cd ..; \ + else true; fi + diff --git a/4.4.2/gentoo/53_all_gcc4-superh-default-multilib.patch b/4.4.2/gentoo/53_all_gcc4-superh-default-multilib.patch new file mode 100644 index 0000000..0ad8ed9 --- /dev/null +++ b/4.4.2/gentoo/53_all_gcc4-superh-default-multilib.patch @@ -0,0 +1,23 @@ +The gcc-3.x toolchains would contain all the targets by default. With gcc-4, +you have to actually list out the multilibs you want or you will end up with +just one when using targets like 'sh4-linux-gnu'. + +The resulting toolchain can't even build a kernel as the kernel needs to build +with the nofpu flag to be sure that no fpu ops are generated. + +Here we restore the gcc-3.x behavior; the additional overhead of building all +of these multilibs by default is negligible. + +http://bugs.gentoo.org/140205 + +--- gcc-4.2.0/gcc/config.gcc ++++ gcc-4.2.0/gcc/config.gcc +@@ -2092,7 +2092,7 @@ + if test x${sh_multilibs} = x ; then + case ${target} in + sh64-superh-linux* | \ +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;; + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; + sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; diff --git a/4.4.2/gentoo/54_all_300-libstdc++-pic.patch b/4.4.2/gentoo/54_all_300-libstdc++-pic.patch new file mode 100644 index 0000000..886e864 --- /dev/null +++ b/4.4.2/gentoo/54_all_300-libstdc++-pic.patch @@ -0,0 +1,53 @@ +install libstdc++_pic.a if we have pic objs + +--- gcc/libstdc++-v3/src/Makefile.am ++++ gcc/libstdc++-v3/src/Makefile.am +@@ -214,6 +214,13 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@ + + ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Added bits to build debug library. + if GLIBCXX_BUILD_DEBUG + all-local: build_debug +--- gcc/libstdc++-v3/src/Makefile.in ++++ gcc/libstdc++-v3/src/Makefile.in +@@ -625,7 +625,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -664,7 +664,7 @@ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ +- uninstall-toolexeclibLTLIBRARIES ++ uninstall-toolexeclibLTLIBRARIES install-exec-local + + @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP) + @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver +@@ -743,6 +743,14 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/4.4.2/gentoo/61_all_gcc4-ia64-noteGNUstack.patch b/4.4.2/gentoo/61_all_gcc4-ia64-noteGNUstack.patch new file mode 100644 index 0000000..17cc7ef --- /dev/null +++ b/4.4.2/gentoo/61_all_gcc4-ia64-noteGNUstack.patch @@ -0,0 +1,88 @@ +2004-09-20 Jakub Jelinek <jakub@redhat.com> + + * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also + on ppc64-linux. + + * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on + ia64-linux. + * config/ia64/crtbegin.asm: Likewise. + * config/ia64/crtend.asm: Likewise. + * config/ia64/crti.asm: Likewise. + * config/ia64/crtn.asm: Likewise. + +2004-05-14 Jakub Jelinek <jakub@redhat.com> + + * config/ia64/linux.h (TARGET_ASM_FILE_END): Define. + +--- gcc/config/ia64/linux.h.jj 2004-05-14 07:21:27.000000000 -0400 ++++ gcc/config/ia64/linux.h 2004-05-14 09:21:09.000000000 -0400 +@@ -5,6 +5,8 @@ + + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux"); + ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + /* This is for -profile to use -lc_p instead of -lc. */ + #undef CC1_SPEC + #define CC1_SPEC "%{profile:-p} %{G*}" +--- gcc/config/rs6000/ppc-asm.h.jj 2003-06-04 18:40:59.000000000 +0200 ++++ gcc/config/rs6000/ppc-asm.h 2004-09-20 14:17:47.259396058 +0200 +@@ -158,7 +158,7 @@ GLUE(.L,name): \ + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name) + #endif + +-#if defined __linux__ && !defined __powerpc64__ ++#if defined __linux__ + .section .note.GNU-stack + .previous + #endif +--- gcc/config/ia64/lib1funcs.asm.jj 2003-10-27 11:45:17.000000000 +0100 ++++ gcc/config/ia64/lib1funcs.asm 2004-09-20 14:26:28.094132706 +0200 +@@ -741,3 +741,7 @@ __floattitf: + .endp __floattitf + + #endif ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- gcc/config/ia64/crtend.asm.jj 2004-05-20 14:36:14.000000000 +0200 ++++ gcc/config/ia64/crtend.asm 2004-09-20 14:25:57.329580329 +0200 +@@ -113,3 +113,7 @@ __do_global_ctors_aux: + + br.ret.sptk.many rp + .endp __do_global_ctors_aux ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- gcc/config/ia64/crti.asm.jj 2003-04-02 17:14:15.000000000 +0200 ++++ gcc/config/ia64/crti.asm 2004-09-20 14:26:06.852894092 +0200 +@@ -64,3 +64,7 @@ _fini: + .body + + # end of crti.asm ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- gcc/config/ia64/crtbegin.asm.jj 2004-05-20 14:36:14.000000000 +0200 ++++ gcc/config/ia64/crtbegin.asm 2004-09-20 14:25:47.105390566 +0200 +@@ -246,3 +246,7 @@ __do_jv_register_classes: + .weak __cxa_finalize + #endif + .weak _Jv_RegisterClasses ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +--- gcc/config/ia64/crtn.asm.jj 2003-04-02 17:14:15.000000000 +0200 ++++ gcc/config/ia64/crtn.asm 2004-09-20 14:26:16.381206878 +0200 +@@ -54,3 +54,7 @@ + br.ret.sptk.many b0 + + # end of crtn.asm ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif diff --git a/4.4.2/gentoo/73_all_sh-libgcc-stacks.patch b/4.4.2/gentoo/73_all_sh-libgcc-stacks.patch new file mode 100644 index 0000000..80decde --- /dev/null +++ b/4.4.2/gentoo/73_all_sh-libgcc-stacks.patch @@ -0,0 +1,44 @@ +http://gcc.gnu.org/PR38627 + +make sure objects in libgcc.a have GNU-stack markings: +!WX --- --- 4.3.2/_ashiftrt.o +!WX --- --- 4.3.2/_ashiftrt_n.o +!WX --- --- 4.3.2/_ashiftlt.o +!WX --- --- 4.3.2/_lshiftrt.o +!WX --- --- 4.3.2/_movmem.o +!WX --- --- 4.3.2/_movmem_i4.o +!WX --- --- 4.3.2/_mulsi3.o +!WX --- --- 4.3.2/_sdivsi3.o +!WX --- --- 4.3.2/_sdivsi3_i4.o +!WX --- --- 4.3.2/_udivsi3.o +!WX --- --- 4.3.2/_udivsi3_i4.o +!WX --- --- 4.3.2/_set_fpscr.o +!WX --- --- 4.3.2/_div_table.o +!WX --- --- 4.3.2/_udiv_qrnnd_16.o +!WX --- --- 4.3.2/_ic_invalidate.o +!WX --- --- 4.3.2/_ic_invalidate_array.o +!WX --- --- 4.3.2/linux-atomic.o + +--- gcc/config/sh/lib1funcs.asm ++++ gcc/config/sh/lib1funcs.asm +@@ -34,6 +34,11 @@ + !! recoded in assembly by Toshiyasu Morita + !! tm@netcom.com + ++#if defined(__ELF__) && defined(__linux__) ++.section .note.GNU-stack,"",%progbits ++.previous ++#endif ++ + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and + ELF local label prefixes by J"orn Rennecke + amylaar@cygnus.com */ +--- gcc/config/sh/linux-atomic.asm ++++ gcc/config/sh/linux-atomic.asm +@@ -138,3 +138,6 @@ + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov) + + #endif /* ! __SH5__ */ ++ ++.section .note.GNU-stack,"",%progbits ++.previous diff --git a/4.4.2/gentoo/74_all_sh-pr24836.patch b/4.4.2/gentoo/74_all_sh-pr24836.patch new file mode 100644 index 0000000..995c21f --- /dev/null +++ b/4.4.2/gentoo/74_all_sh-pr24836.patch @@ -0,0 +1,25 @@ +http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348 +http://gcc.gnu.org/PR24836 + +--- gcc/gcc/configure.ac ++++ gcc/gcc/configure.ac +@@ -2446,7 +2446,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 +--- gcc/gcc/configure ++++ gcc/gcc/configure +@@ -14846,7 +14846,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 diff --git a/4.4.2/gentoo/90_all_gcc-freebsd.patch b/4.4.2/gentoo/90_all_gcc-freebsd.patch new file mode 100644 index 0000000..309b2e0 --- /dev/null +++ b/4.4.2/gentoo/90_all_gcc-freebsd.patch @@ -0,0 +1,92 @@ +http://bugs.gentoo.org/192403 +http://gcc.gnu.org/PR33417 + +--- gcc-4.3.1/gcc/config/freebsd-spec.h ++++ gcc-4.3.1/gcc/config/freebsd-spec.h +@@ -56,6 +56,8 @@ + builtin_assert ("system=unix"); \ + builtin_assert ("system=bsd"); \ + builtin_assert ("system=FreeBSD"); \ ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \ ++ builtin_define("_LONGLONG"); \ + FBSD_TARGET_CPU_CPP_BUILTINS(); \ + } \ + while (0) +--- gcc-4.3.1/gcc/config/t-freebsd-eh ++++ gcc-4.3.1/gcc/config/t-freebsd-eh +@@ -0,0 +1,4 @@ ++# Use unwind-dw2-fde-glibc ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c +--- gcc-4.3.1/gcc/config.gcc ++++ gcc-4.3.1/gcc/config.gcc +@@ -462,7 +462,7 @@ + # pleases around the provided core setting. + gas=yes + gnu_ld=yes +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}" + tmake_file="t-slibgcc-elf-ver t-freebsd" +@@ -1116,6 +1116,10 @@ + ;; + i[34567]86-*-freebsd*) + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` ++ if test ${fbsd_major} -ge 7; then ++ tmake_file="${tmake_file} t-freebsd-eh" ++ fi + ;; + x86_64-*-freebsd*) + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" +--- gcc-4.3.1/gcc/crtstuff.c ++++ gcc-4.3.1/gcc/crtstuff.c +@@ -90,13 +90,15 @@ + && !defined(OBJECT_FORMAT_FLAT) \ + && defined(HAVE_LD_EH_FRAME_HDR) \ + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \ +- && defined(__GLIBC__) && __GLIBC__ >= 2 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \ ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022)) + #include <link.h> + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ + # if !defined(__UCLIBC__) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ ++ || (__FreeBSD_version >= 700022) + # define USE_PT_GNU_EH_FRAME + # endif + #endif +--- gcc-4.3.1/gcc/unwind-dw2-fde-glibc.c ++++ gcc-4.3.1/gcc/unwind-dw2-fde-glibc.c +@@ -49,8 +49,9 @@ + #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))) ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ ++ || (__FreeBSD_version >= 700022 )) + + #ifndef __RELOC_POINTER + # define __RELOC_POINTER(ptr, base) ((ptr) + (base)) +@@ -66,6 +67,13 @@ + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) + #endif + ++/* Support FreeBSD */ ++#ifndef ElfW ++# ifdef __ElfN ++# define ElfW __ElfN ++# endif ++#endif ++ + struct unw_eh_callback_data + { + _Unwind_Ptr pc; diff --git a/4.4.2/gentoo/91_all_gcc-freebsd.patch b/4.4.2/gentoo/91_all_gcc-freebsd.patch new file mode 100644 index 0000000..4531bd5 --- /dev/null +++ b/4.4.2/gentoo/91_all_gcc-freebsd.patch @@ -0,0 +1,66 @@ +http://bugs.gentoo.org/192403 +http://gcc.gnu.org/PR33417 + +--- gcc-4.3.1/gcc/config/freebsd-spec.h ++++ gcc-4.3.1/gcc/config/freebsd-spec.h +@@ -79,9 +81,10 @@ + #define FBSD_STARTFILE_SPEC \ + "%{!shared: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ +- %{!p:%{profile:gcrt1.o%s} \ +- %{!profile:crt1.o%s}}}} \ +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ %{!p:%{profile:gcrt1.o%s} \ ++ %{!profile:crt1.o%s}}}} \ ++ crti.o%s \ ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" + + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on + the magical crtend.o file (see crtstuff.c) which provides part of +@@ -119,7 +122,8 @@ + %{pg: -lc_p} \ + }" + #else +-#if FBSD_MAJOR < 5 ++#include <sys/param.h> ++#if __FreeBSD_version < 500016 + #define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: \ +@@ -129,17 +133,34 @@ + %{!pthread:-lc_p} \ + %{pthread:-lc_r_p}} \ + }" +-#else ++#elif __FreeBSD_version < 700022 + #define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: %{pthread:-lpthread} -lc} \ + %{pg: %{pthread:-lpthread_p} -lc_p} \ + }" ++#else ++#define FBSD_LIB_SPEC " \ ++ %{!shared: \ ++ %{!pg: %{pthread:-lpthread} -lc} \ ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \ ++ %{shared: \ ++ %{pthread:-lpthread} -lc} \ ++ " + #endif + #endif + +-#if FBSD_MAJOR < 6 ++#if FBSD_MAJOR < 5 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" + #else + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" + #endif ++ ++#if defined(HAVE_LD_EH_FRAME_HDR) ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#endif ++ ++/* Use --as-needed -lgcc_s for eh support. */ ++#ifdef HAVE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 1 ++#endif diff --git a/4.4.2/gentoo/README.history b/4.4.2/gentoo/README.history new file mode 100644 index 0000000..ce8510d --- /dev/null +++ b/4.4.2/gentoo/README.history @@ -0,0 +1,22 @@ +1.0 17.10.2009 + + 00_all_gcc-4.1-alpha-mieee-default.patch + + 00_all_gcc-trampolinewarn.patch + + 03_all_gcc43-java-nomulti.patch + + 08_all_gcc-4.1-cross-compile.patch + + 10_all_gcc-default-format-security.patch + + 10_all_gcc-default-fortify-source.patch + + 11_all_gcc-netbsd-symbolic.patch + + 14_all_gcc-sparc64-bsd.patch + + 15_all_gcc-libgomp-no-werror.patch + + 18_all_904-flatten-switch-stmt-00.patch + + 40_all_gcc-4.4-libiberty.h-asprintf.patch + + 47_all_arm-unbreak-armv4t.patch + + 51_all_gcc-3.4-libiberty-pic.patch + + 53_all_gcc4-superh-default-multilib.patch + + 54_all_300-libstdc++-pic.patch + + 61_all_gcc4-ia64-noteGNUstack.patch + + 73_all_sh-libgcc-stacks.patch + + 74_all_sh-pr24836.patch + + 90_all_gcc-freebsd.patch + + 91_all_gcc-freebsd.patch + diff --git a/4.4.2/uclibc/90_all_100-uclibc-conf.patch b/4.4.2/uclibc/90_all_100-uclibc-conf.patch new file mode 100644 index 0000000..cca8c82 --- /dev/null +++ b/4.4.2/uclibc/90_all_100-uclibc-conf.patch @@ -0,0 +1,33 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +--- gcc/libjava/classpath/ltconfig ++++ gcc/libjava/classpath/ltconfig +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/4.4.2/uclibc/90_all_301-missing-execinfo_h.patch b/4.4.2/uclibc/90_all_301-missing-execinfo_h.patch new file mode 100644 index 0000000..0e2092f --- /dev/null +++ b/4.4.2/uclibc/90_all_301-missing-execinfo_h.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 ++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 +@@ -500,7 +500,7 @@ + #ifdef __linux__ + # include <features.h> + # 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/4.4.2/uclibc/90_all_302-c99-snprintf.patch b/4.4.2/uclibc/90_all_302-c99-snprintf.patch new file mode 100644 index 0000000..ba51a0e --- /dev/null +++ b/4.4.2/uclibc/90_all_302-c99-snprintf.patch @@ -0,0 +1,13 @@ +Index: gcc-4.3.0/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (revision 129202) ++++ gcc-4.3.0/libstdc++-v3/include/c_global/cstdio (working copy) +@@ -144,7 +144,7 @@ + + _GLIBCXX_END_NAMESPACE + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/4.4.2/uclibc/90_all_305-libmudflap-susv3-legacy.patch b/4.4.2/uclibc/90_all_305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000..374b1f8 --- /dev/null +++ b/4.4.2/uclibc/90_all_305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.2/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834) ++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy) +@@ -427,7 +427,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -437,7 +437,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -447,7 +447,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -456,7 +456,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -465,7 +465,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ |