cc/gcc: add latest 4.4.3, propagate patchset from 4.4.2
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jan 24 22:53:51 2010 +0100 (2010-01-24)
changeset 17522a0656d9c905
parent 1751 f54eaf5f261e
child 1753 fcc55af9aee5
child 1754 fe497dd5bec1
cc/gcc: add latest 4.4.3, propagate patchset from 4.4.2
config/cc/gcc.in
patches/gcc/4.4.3/100-alpha-mieee-default.patch
patches/gcc/4.4.3/110-trampolinewarn.patch
patches/gcc/4.4.3/120-java-nomulti.patch
patches/gcc/4.4.3/130-cross-compile.patch
patches/gcc/4.4.3/140-default-format-security.patch
patches/gcc/4.4.3/150-default-fortify-source.patch
patches/gcc/4.4.3/160-netbsd-symbolic.patch
patches/gcc/4.4.3/170-sparc64-bsd.patch
patches/gcc/4.4.3/180-libgomp-no-werror.patch
patches/gcc/4.4.3/190-flatten-switch-stmt-00.patch
patches/gcc/4.4.3/200-libiberty.h-asprintf.patch
patches/gcc/4.4.3/210-arm-unbreak-armv4t.patch
patches/gcc/4.4.3/220-libiberty-pic.patch
patches/gcc/4.4.3/230-superh-default-multilib.patch
patches/gcc/4.4.3/240-libstdc++-pic.patch
patches/gcc/4.4.3/250-ia64-noteGNUstack.patch
patches/gcc/4.4.3/260-sh-libgcc-stacks.patch
patches/gcc/4.4.3/270-sh-pr24836.patch
patches/gcc/4.4.3/280-freebsd.patch
patches/gcc/4.4.3/290-freebsd.patch
patches/gcc/4.4.3/300-uclibc-conf.patch
patches/gcc/4.4.3/310-missing-execinfo_h.patch
patches/gcc/4.4.3/320-c99-snprintf.patch
patches/gcc/4.4.3/330-libmudflap-susv3-legacy.patch
patches/gcc/4.4.3/340-ecjx-host-cc.patch
patches/gcc/4.4.3/350-index_macro.patch
patches/gcc/4.4.3/360-arm-bigendian.patch
patches/gcc/4.4.3/370-bootstrap-target_lib_path.patch
     1.1 --- a/config/cc/gcc.in	Sat Jan 23 22:15:17 2010 +0100
     1.2 +++ b/config/cc/gcc.in	Sun Jan 24 22:53:51 2010 +0100
     1.3 @@ -19,6 +19,13 @@
     1.4  # Don't remove next line
     1.5  # CT_INSERT_VERSION_BELOW
     1.6  
     1.7 +config CC_V_4_4_3
     1.8 +    bool
     1.9 +    prompt "4.4.3 (EXPERIMENTAL)"
    1.10 +    depends on EXPERIMENTAL
    1.11 +    select CC_GCC_4_3_or_later
    1.12 +    select CC_GCC_4_4_or_later
    1.13 +
    1.14  config CC_V_4_4_2
    1.15      bool
    1.16      prompt "4.4.2 (EXPERIMENTAL)"
    1.17 @@ -120,6 +127,7 @@
    1.18      string
    1.19  # Don't remove next line
    1.20  # CT_INSERT_VERSION_STRING_BELOW
    1.21 +    default "4.4.3" if CC_V_4_4_3
    1.22      default "4.4.2" if CC_V_4_4_2
    1.23      default "4.4.1" if CC_V_4_4_1
    1.24      default "4.4.0" if CC_V_4_4_0
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/gcc/4.4.3/100-alpha-mieee-default.patch	Sun Jan 24 22:53:51 2010 +0100
     2.3 @@ -0,0 +1,24 @@
     2.4 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.h gcc-4.4.0/gcc/config/alpha/alpha.h
     2.5 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.h	2009-02-20 16:20:38.000000000 +0100
     2.6 ++++ gcc-4.4.0/gcc/config/alpha/alpha.h	2009-05-27 21:37:58.000000000 +0200
     2.7 +@@ -95,6 +95,8 @@
     2.8 +   while (0)
     2.9 + #endif
    2.10 + 
    2.11 ++#define CPP_SPEC "%{!no-ieee:-mieee}"
    2.12 ++
    2.13 + #define WORD_SWITCH_TAKES_ARG(STR)		\
    2.14 +  (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
    2.15 + 
    2.16 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.opt gcc-4.4.0/gcc/config/alpha/alpha.opt
    2.17 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.opt	2007-08-02 12:49:31.000000000 +0200
    2.18 ++++ gcc-4.4.0/gcc/config/alpha/alpha.opt	2009-05-27 21:37:58.000000000 +0200
    2.19 +@@ -39,7 +39,7 @@
    2.20 + Request IEEE-conformant math library routines (OSF/1)
    2.21 + 
    2.22 + mieee
    2.23 +-Target Report RejectNegative Mask(IEEE)
    2.24 ++Target Report Mask(IEEE)
    2.25 + Emit IEEE-conformant code, without inexact exceptions
    2.26 + 
    2.27 + mieee-with-inexact
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/gcc/4.4.3/110-trampolinewarn.patch	Sun Jan 24 22:53:51 2010 +0100
     3.3 @@ -0,0 +1,27 @@
     3.4 +diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c
     3.5 +--- gcc-4.4.0.orig/gcc/builtins.c	2009-03-30 19:42:27.000000000 +0200
     3.6 ++++ gcc-4.4.0/gcc/builtins.c	2009-05-27 21:38:01.000000000 +0200
     3.7 +@@ -5768,6 +5768,9 @@
     3.8 +   trampolines_created = 1;
     3.9 +   INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
    3.10 + 
    3.11 ++  if (warn_trampolines)
    3.12 ++    warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
    3.13 ++
    3.14 +   return const0_rtx;
    3.15 + }
    3.16 + 
    3.17 +diff -durN gcc-4.4.0.orig/gcc/common.opt gcc-4.4.0/gcc/common.opt
    3.18 +--- gcc-4.4.0.orig/gcc/common.opt	2009-03-28 18:28:45.000000000 +0100
    3.19 ++++ gcc-4.4.0/gcc/common.opt	2009-05-27 21:38:01.000000000 +0200
    3.20 +@@ -197,6 +197,10 @@
    3.21 + Common Var(warn_type_limits) Init(-1) Warning
    3.22 + Warn if a comparison is always true or always false due to the limited range of the data type
    3.23 + 
    3.24 ++Wtrampolines
    3.25 ++Common Var(warn_trampolines) Init(1)
    3.26 ++Warn whenever a trampoline is generated
    3.27 ++
    3.28 + Wuninitialized
    3.29 + Common Var(warn_uninitialized) Warning
    3.30 + Warn about uninitialized automatic variables
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/patches/gcc/4.4.3/120-java-nomulti.patch	Sun Jan 24 22:53:51 2010 +0100
     4.3 @@ -0,0 +1,46 @@
     4.4 +diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure
     4.5 +--- gcc-4.4.0.orig/libjava/configure	2009-04-21 11:08:08.000000000 +0200
     4.6 ++++ gcc-4.4.0/libjava/configure	2009-05-27 21:38:03.000000000 +0200
     4.7 +@@ -1021,6 +1021,8 @@
     4.8 +                           default=yes
     4.9 +   --enable-java-maintainer-mode
    4.10 +                           allow rebuilding of .class and .h files
    4.11 ++  --enable-libjava-multilib
    4.12 ++                          build libjava as multilib
    4.13 +   --disable-dependency-tracking  speeds up one-time build
    4.14 +   --enable-dependency-tracking   do not reject slow dependency extractors
    4.15 +   --enable-maintainer-mode  enable make rules and dependencies not useful
    4.16 +@@ -1973,6 +1975,16 @@
    4.17 + fi
    4.18 + 
    4.19 + 
    4.20 ++# Check whether --enable-libjava-multilib was given.
    4.21 ++if test "${enable_libjava_multilib+set}" = set; then
    4.22 ++  enableval=$enable_libjava_multilib;
    4.23 ++fi
    4.24 ++
    4.25 ++if test "$enable_libjava_multilib" = no; then
    4.26 ++  multilib=no
    4.27 ++  ac_configure_args="$ac_configure_args --disable-multilib"
    4.28 ++fi
    4.29 ++
    4.30 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
    4.31 + 
    4.32 + 
    4.33 +diff -durN gcc-4.4.0.orig/libjava/configure.ac gcc-4.4.0/libjava/configure.ac
    4.34 +--- gcc-4.4.0.orig/libjava/configure.ac	2009-04-09 23:54:28.000000000 +0200
    4.35 ++++ gcc-4.4.0/libjava/configure.ac	2009-05-27 21:38:03.000000000 +0200
    4.36 +@@ -139,6 +139,13 @@
    4.37 + 	[allow rebuilding of .class and .h files]))
    4.38 + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
    4.39 + 
    4.40 ++AC_ARG_ENABLE(libjava-multilib,
    4.41 ++	AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
    4.42 ++if test "$enable_libjava_multilib" = no; then
    4.43 ++  multilib=no
    4.44 ++  ac_configure_args="$ac_configure_args --disable-multilib"
    4.45 ++fi
    4.46 ++
    4.47 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
    4.48 + GCC_NO_EXECUTABLES
    4.49 + 
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/patches/gcc/4.4.3/130-cross-compile.patch	Sun Jan 24 22:53:51 2010 +0100
     5.3 @@ -0,0 +1,39 @@
     5.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
     5.5 +--- gcc-4.4.0.orig/gcc/configure	2009-03-24 18:46:03.000000000 +0100
     5.6 ++++ gcc-4.4.0/gcc/configure	2009-05-27 21:38:06.000000000 +0200
     5.7 +@@ -13997,7 +13997,7 @@
     5.8 + 	    | powerpc*-*-*,powerpc64*-*-*)
     5.9 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    5.10 + 	esac
    5.11 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    5.12 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    5.13 +         SYSTEM_HEADER_DIR=$build_system_header_dir
    5.14 + fi
    5.15 + 
    5.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
    5.17 +--- gcc-4.4.0.orig/gcc/configure.ac	2009-03-24 18:46:03.000000000 +0100
    5.18 ++++ gcc-4.4.0/gcc/configure.ac	2009-05-27 21:38:06.000000000 +0200
    5.19 +@@ -1720,7 +1720,7 @@
    5.20 + 	    | powerpc*-*-*,powerpc64*-*-*)
    5.21 + 		CROSS="$CROSS -DNATIVE_CROSS" ;;
    5.22 + 	esac
    5.23 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
    5.24 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
    5.25 +         SYSTEM_HEADER_DIR=$build_system_header_dir 
    5.26 + fi
    5.27 + 
    5.28 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2.c gcc-4.4.0/gcc/unwind-dw2.c
    5.29 +--- gcc-4.4.0.orig/gcc/unwind-dw2.c	2009-04-10 01:23:07.000000000 +0200
    5.30 ++++ gcc-4.4.0/gcc/unwind-dw2.c	2009-05-27 21:38:06.000000000 +0200
    5.31 +@@ -329,9 +329,11 @@
    5.32 + }
    5.33 + #endif
    5.34 + 
    5.35 ++#ifndef inhibit_libc
    5.36 + #ifdef MD_UNWIND_SUPPORT
    5.37 + #include MD_UNWIND_SUPPORT
    5.38 + #endif
    5.39 ++#endif
    5.40 + 
    5.41 + /* Extract any interesting information from the CIE for the translation
    5.42 +    unit F belongs to.  Return a pointer to the byte after the augmentation,
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/patches/gcc/4.4.3/140-default-format-security.patch	Sun Jan 24 22:53:51 2010 +0100
     6.3 @@ -0,0 +1,49 @@
     6.4 +diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c
     6.5 +--- gcc-4.4.0.orig/gcc/c-common.c	2009-03-30 19:42:27.000000000 +0200
     6.6 ++++ gcc-4.4.0/gcc/c-common.c	2009-05-27 21:38:08.000000000 +0200
     6.7 +@@ -301,7 +301,7 @@
     6.8 + /* Warn about format/argument anomalies in calls to formatted I/O functions
     6.9 +    (*printf, *scanf, strftime, strfmon, etc.).  */
    6.10 + 
    6.11 +-int warn_format;
    6.12 ++int warn_format = 1;
    6.13 + 
    6.14 + /* Warn about using __null (as NULL in C++) as sentinel.  For code compiled
    6.15 +    with GCC this doesn't matter as __null is guaranteed to have the right
    6.16 +diff -durN gcc-4.4.0.orig/gcc/c.opt gcc-4.4.0/gcc/c.opt
    6.17 +--- gcc-4.4.0.orig/gcc/c.opt	2009-03-18 22:14:53.000000000 +0100
    6.18 ++++ gcc-4.4.0/gcc/c.opt	2009-05-27 21:38:08.000000000 +0200
    6.19 +@@ -236,7 +236,7 @@
    6.20 + Warn about format strings that contain NUL bytes
    6.21 + 
    6.22 + Wformat-security
    6.23 +-C ObjC C++ ObjC++ Var(warn_format_security) Warning
    6.24 ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
    6.25 + Warn about possible security problems with format functions
    6.26 + 
    6.27 + Wformat-y2k
    6.28 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
    6.29 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi	2009-04-01 09:18:47.000000000 +0200
    6.30 ++++ gcc-4.4.0/gcc/doc/invoke.texi	2009-05-27 21:38:08.000000000 +0200
    6.31 +@@ -2867,6 +2867,9 @@
    6.32 + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
    6.33 + @option{-Wformat=2} are available, but are not included in @option{-Wall}.
    6.34 + 
    6.35 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
    6.36 ++To disable, use @option{-Wformat=0}.
    6.37 ++
    6.38 + @item -Wformat-y2k
    6.39 + @opindex Wformat-y2k
    6.40 + @opindex Wno-format-y2k
    6.41 +@@ -2920,6 +2923,11 @@
    6.42 + in future warnings may be added to @option{-Wformat-security} that are not
    6.43 + included in @option{-Wformat-nonliteral}.)
    6.44 + 
    6.45 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
    6.46 ++To disable, use @option{-Wno-format-security}, or disable all format warnings
    6.47 ++with @option{-Wformat=0}.  To make format security warnings fatal, specify
    6.48 ++@option{-Werror=format-security}.
    6.49 ++
    6.50 + @item -Wformat=2
    6.51 + @opindex Wformat=2
    6.52 + @opindex Wno-format=2
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/patches/gcc/4.4.3/150-default-fortify-source.patch	Sun Jan 24 22:53:51 2010 +0100
     7.3 @@ -0,0 +1,26 @@
     7.4 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
     7.5 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi	2009-05-27 21:38:11.000000000 +0200
     7.6 ++++ gcc-4.4.0/gcc/doc/invoke.texi	2009-05-27 21:38:11.000000000 +0200
     7.7 +@@ -5411,6 +5411,11 @@
     7.8 + Please note the warning under @option{-fgcse} about
     7.9 + invoking @option{-O2} on programs that use computed gotos.
    7.10 + 
    7.11 ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
    7.12 ++activated when @option{-O} is set to 2 or higher.  This enables additional
    7.13 ++compile-time and run-time checks for several libc functions.  To disable,
    7.14 ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}.
    7.15 ++
    7.16 + @item -O3
    7.17 + @opindex O3
    7.18 + Optimize yet more.  @option{-O3} turns on all optimizations specified
    7.19 +diff -durN gcc-4.4.0.orig/gcc/gcc.c gcc-4.4.0/gcc/gcc.c
    7.20 +--- gcc-4.4.0.orig/gcc/gcc.c	2009-03-17 22:25:59.000000000 +0100
    7.21 ++++ gcc-4.4.0/gcc/gcc.c	2009-05-27 21:38:11.000000000 +0200
    7.22 +@@ -807,6 +807,7 @@
    7.23 +  %{H} %C %{D*&U*&A*} %{i*} %Z %i\
    7.24 +  %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
    7.25 +  %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
    7.26 ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
    7.27 +  %{E|M|MM:%W{o*}}";
    7.28 + 
    7.29 + /* This contains cpp options which are common with cc1_options and are passed
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/patches/gcc/4.4.3/160-netbsd-symbolic.patch	Sun Jan 24 22:53:51 2010 +0100
     8.3 @@ -0,0 +1,11 @@
     8.4 +diff -durN gcc-4.4.0.orig/gcc/config/netbsd-elf.h gcc-4.4.0/gcc/config/netbsd-elf.h
     8.5 +--- gcc-4.4.0.orig/gcc/config/netbsd-elf.h	2007-09-03 18:14:04.000000000 +0200
     8.6 ++++ gcc-4.4.0/gcc/config/netbsd-elf.h	2009-05-27 21:38:14.000000000 +0200
     8.7 +@@ -82,6 +82,7 @@
     8.8 + #define NETBSD_LINK_SPEC_ELF \
     8.9 +   "%{assert*} %{R*} %{rpath*} \
    8.10 +    %{shared:-shared} \
    8.11 ++   %{symbolic:-Bsymbolic} \
    8.12 +    %{!shared: \
    8.13 +      -dc -dp \
    8.14 +      %{!nostdlib: \
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/patches/gcc/4.4.3/170-sparc64-bsd.patch	Sun Jan 24 22:53:51 2010 +0100
     9.3 @@ -0,0 +1,29 @@
     9.4 +diff -durN gcc-4.4.0.orig/gcc/config/sparc/freebsd.h gcc-4.4.0/gcc/config/sparc/freebsd.h
     9.5 +--- gcc-4.4.0.orig/gcc/config/sparc/freebsd.h	2007-08-02 12:49:31.000000000 +0200
     9.6 ++++ gcc-4.4.0/gcc/config/sparc/freebsd.h	2009-05-27 21:38:16.000000000 +0200
     9.7 +@@ -25,9 +25,22 @@
     9.8 + /* FreeBSD needs the platform name (sparc64) defined.
     9.9 +    Emacs needs to know if the arch is 64 or 32-bits.  */
    9.10 + 
    9.11 +-#undef  CPP_CPU64_DEFAULT_SPEC
    9.12 +-#define CPP_CPU64_DEFAULT_SPEC \
    9.13 +-  "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
    9.14 ++#undef  FBSD_TARGET_CPU_CPP_BUILTINS
    9.15 ++#define FBSD_TARGET_CPU_CPP_BUILTINS()                  \
    9.16 ++  do                                                    \
    9.17 ++    {                                                   \
    9.18 ++      if (TARGET_ARCH64)                                \
    9.19 ++        {                                               \
    9.20 ++          builtin_define ("__sparc64__");               \
    9.21 ++          builtin_define ("__sparc_v9__");              \
    9.22 ++          builtin_define ("__sparcv9");                 \
    9.23 ++        }                                               \
    9.24 ++      else                                              \
    9.25 ++        builtin_define ("__sparc");                     \
    9.26 ++      builtin_define ("__sparc__");                     \
    9.27 ++    }                                                   \
    9.28 ++  while (0)
    9.29 ++
    9.30 + 
    9.31 + #define LINK_SPEC "%(link_arch)						\
    9.32 +   %{!mno-relax:%{!r:-relax}}						\
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/patches/gcc/4.4.3/180-libgomp-no-werror.patch	Sun Jan 24 22:53:51 2010 +0100
    10.3 @@ -0,0 +1,12 @@
    10.4 +diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure
    10.5 +--- gcc-4.4.0.orig/libgomp/configure	2009-04-21 11:08:08.000000000 +0200
    10.6 ++++ gcc-4.4.0/libgomp/configure	2009-05-27 21:38:19.000000000 +0200
    10.7 +@@ -3334,7 +3334,7 @@
    10.8 + 
    10.9 + # Add -Wall -Werror if we are using GCC.
   10.10 + if test "x$GCC" = "xyes"; then
   10.11 +-  XCFLAGS="$XCFLAGS -Wall -Werror"
   10.12 ++  XCFLAGS="$XCFLAGS -Wall"
   10.13 + fi
   10.14 + 
   10.15 + # Find other programs we need.
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/patches/gcc/4.4.3/190-flatten-switch-stmt-00.patch	Sun Jan 24 22:53:51 2010 +0100
    11.3 @@ -0,0 +1,24 @@
    11.4 +diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c
    11.5 +--- gcc-4.4.0.orig/gcc/stmt.c	2009-02-27 20:49:42.000000000 +0100
    11.6 ++++ gcc-4.4.0/gcc/stmt.c	2009-05-27 21:38:21.000000000 +0200
    11.7 +@@ -2376,7 +2376,11 @@
    11.8 + 	  use_cost_table
    11.9 + 	    = (TREE_CODE (orig_type) != ENUMERAL_TYPE
   11.10 + 	       && estimate_case_costs (case_list));
   11.11 +-	  balance_case_nodes (&case_list, NULL);
   11.12 ++	  /* When optimizing for size, we want a straight list to avoid
   11.13 ++	     jumps as much as possible. This basically creates an if-else
   11.14 ++	     chain.  */
   11.15 ++	  if (!optimize_size)
   11.16 ++	    balance_case_nodes (&case_list, NULL);
   11.17 + 	  emit_case_nodes (index, case_list, default_label, index_type);
   11.18 + 	  if (default_label)
   11.19 + 	    emit_jump (default_label);
   11.20 +@@ -2942,6 +2946,7 @@
   11.21 + 	    {
   11.22 + 	      if (!node_has_low_bound (node, index_type))
   11.23 + 		{
   11.24 ++		  if (!optimize_size) /* don't jl to the .default_label. */
   11.25 + 		  emit_cmp_and_jump_insns (index,
   11.26 + 					   convert_modes
   11.27 + 					   (mode, imode,
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/patches/gcc/4.4.3/200-libiberty.h-asprintf.patch	Sun Jan 24 22:53:51 2010 +0100
    12.3 @@ -0,0 +1,15 @@
    12.4 +diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h
    12.5 +--- gcc-4.4.0.orig/include/libiberty.h	2008-06-24 03:42:31.000000000 +0200
    12.6 ++++ gcc-4.4.0/include/libiberty.h	2009-05-27 21:38:24.000000000 +0200
    12.7 +@@ -595,8 +595,11 @@
    12.8 + /* Like sprintf but provides a pointer to malloc'd storage, which must
    12.9 +    be freed by the caller.  */
   12.10 + 
   12.11 ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL.  */
   12.12 ++#ifndef asprintf
   12.13 + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
   12.14 + #endif
   12.15 ++#endif
   12.16 + 
   12.17 + #if !HAVE_DECL_VASPRINTF
   12.18 + /* Like vsprintf but provides a pointer to malloc'd storage, which
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/patches/gcc/4.4.3/210-arm-unbreak-armv4t.patch	Sun Jan 24 22:53:51 2010 +0100
    13.3 @@ -0,0 +1,12 @@
    13.4 +diff -durN gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h gcc-4.4.0/gcc/config/arm/linux-eabi.h
    13.5 +--- gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h	2007-11-08 14:44:09.000000000 +0100
    13.6 ++++ gcc-4.4.0/gcc/config/arm/linux-eabi.h	2009-05-27 21:38:26.000000000 +0200
    13.7 +@@ -44,7 +44,7 @@
    13.8 +    The ARM10TDMI core is the default for armv5t, so set
    13.9 +    SUBTARGET_CPU_DEFAULT to achieve this.  */
   13.10 + #undef  SUBTARGET_CPU_DEFAULT
   13.11 +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
   13.12 ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
   13.13 + 
   13.14 + /* TARGET_BIG_ENDIAN_DEFAULT is set in
   13.15 +    config.gcc for big endian configurations.  */
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/patches/gcc/4.4.3/220-libiberty-pic.patch	Sun Jan 24 22:53:51 2010 +0100
    14.3 @@ -0,0 +1,11 @@
    14.4 +diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in
    14.5 +--- gcc-4.4.0.orig/libiberty/Makefile.in	2008-10-22 15:30:19.000000000 +0200
    14.6 ++++ gcc-4.4.0/libiberty/Makefile.in	2009-05-27 21:38:29.000000000 +0200
    14.7 +@@ -227,6 +227,7 @@
    14.8 + 	  $(AR) $(AR_FLAGS) $(TARGETLIB) \
    14.9 + 	    $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
   14.10 + 	  $(RANLIB) $(TARGETLIB); \
   14.11 ++	  cp $(TARGETLIB) ../ ; \
   14.12 + 	  cd ..; \
   14.13 + 	else true; fi
   14.14 + 
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/patches/gcc/4.4.3/230-superh-default-multilib.patch	Sun Jan 24 22:53:51 2010 +0100
    15.3 @@ -0,0 +1,12 @@
    15.4 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
    15.5 +--- gcc-4.4.0.orig/gcc/config.gcc	2009-04-17 13:58:41.000000000 +0200
    15.6 ++++ gcc-4.4.0/gcc/config.gcc	2009-05-27 21:38:31.000000000 +0200
    15.7 +@@ -2121,7 +2121,7 @@
    15.8 + 	if test x${sh_multilibs} = x ; then
    15.9 + 		case ${target} in
   15.10 + 		sh64-superh-linux* | \
   15.11 +-		sh[1234]*)	sh_multilibs=${sh_cpu_target} ;;
   15.12 ++		sh[1234]*)	sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
   15.13 + 		sh64* | sh5*)	sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
   15.14 + 		sh-superh-*)	sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
   15.15 + 		sh*-*-linux*)	sh_multilibs=m1,m3e,m4 ;;
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/patches/gcc/4.4.3/240-libstdc++-pic.patch	Sun Jan 24 22:53:51 2010 +0100
    16.3 @@ -0,0 +1,53 @@
    16.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am gcc-4.4.0/libstdc++-v3/src/Makefile.am
    16.5 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am	2009-04-10 01:23:07.000000000 +0200
    16.6 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.am	2009-05-27 21:38:34.000000000 +0200
    16.7 +@@ -351,6 +351,13 @@
    16.8 + 	  $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
    16.9 + 
   16.10 + 
   16.11 ++install-exec-local:
   16.12 ++	pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
   16.13 ++	if [ x"$$pic_objs" != x ]; then \
   16.14 ++		$(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
   16.15 ++		$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
   16.16 ++	fi
   16.17 ++
   16.18 + # Added bits to build debug library.
   16.19 + if GLIBCXX_BUILD_DEBUG
   16.20 + all-local: build_debug
   16.21 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in gcc-4.4.0/libstdc++-v3/src/Makefile.in
   16.22 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in	2009-01-17 03:03:25.000000000 +0100
   16.23 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.in	2009-05-27 21:38:34.000000000 +0200
   16.24 +@@ -726,7 +726,7 @@
   16.25 + 
   16.26 + install-data-am: install-data-local
   16.27 + 
   16.28 +-install-exec-am: install-toolexeclibLTLIBRARIES
   16.29 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
   16.30 + 
   16.31 + install-info: install-info-am
   16.32 + 
   16.33 +@@ -765,7 +765,7 @@
   16.34 + 	maintainer-clean-generic mostlyclean mostlyclean-compile \
   16.35 + 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
   16.36 + 	tags uninstall uninstall-am uninstall-info-am \
   16.37 +-	uninstall-toolexeclibLTLIBRARIES
   16.38 ++	uninstall-toolexeclibLTLIBRARIES install-exec-local
   16.39 + 
   16.40 + 
   16.41 + # Symbol versioning for shared libraries.
   16.42 +@@ -942,6 +942,14 @@
   16.43 + install_debug:
   16.44 + 	(cd ${debugdir} && $(MAKE) \
   16.45 + 	toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
   16.46 ++
   16.47 ++install-exec-local:
   16.48 ++	pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
   16.49 ++	if [ x"$$pic_objs" != x ]; then \
   16.50 ++		$(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
   16.51 ++		$(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
   16.52 ++	fi
   16.53 ++
   16.54 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
   16.55 + # Otherwise a system limit (for SysV at least) may be exceeded.
   16.56 + .NOEXPORT:
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/patches/gcc/4.4.3/250-ia64-noteGNUstack.patch	Sun Jan 24 22:53:51 2010 +0100
    17.3 @@ -0,0 +1,79 @@
    17.4 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.0/gcc/config/ia64/crtbegin.asm
    17.5 +--- gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm	2009-04-10 01:23:07.000000000 +0200
    17.6 ++++ gcc-4.4.0/gcc/config/ia64/crtbegin.asm	2009-05-27 21:38:37.000000000 +0200
    17.7 +@@ -252,3 +252,7 @@
    17.8 + .weak __cxa_finalize
    17.9 + #endif
   17.10 + .weak _Jv_RegisterClasses
   17.11 ++
   17.12 ++#ifdef __linux__
   17.13 ++.section .note.GNU-stack; .previous
   17.14 ++#endif
   17.15 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtend.asm gcc-4.4.0/gcc/config/ia64/crtend.asm
   17.16 +--- gcc-4.4.0.orig/gcc/config/ia64/crtend.asm	2009-04-10 01:23:07.000000000 +0200
   17.17 ++++ gcc-4.4.0/gcc/config/ia64/crtend.asm	2009-05-27 21:38:37.000000000 +0200
   17.18 +@@ -119,3 +119,7 @@
   17.19 + 
   17.20 + 	br.ret.sptk.many rp
   17.21 + 	.endp __do_global_ctors_aux
   17.22 ++
   17.23 ++#ifdef __linux__
   17.24 ++.section .note.GNU-stack; .previous
   17.25 ++#endif
   17.26 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crti.asm gcc-4.4.0/gcc/config/ia64/crti.asm
   17.27 +--- gcc-4.4.0.orig/gcc/config/ia64/crti.asm	2009-04-10 01:23:07.000000000 +0200
   17.28 ++++ gcc-4.4.0/gcc/config/ia64/crti.asm	2009-05-27 21:38:37.000000000 +0200
   17.29 +@@ -51,3 +51,7 @@
   17.30 + 	.body
   17.31 + 
   17.32 + # end of crti.asm
   17.33 ++
   17.34 ++#ifdef __linux__
   17.35 ++.section .note.GNU-stack; .previous
   17.36 ++#endif
   17.37 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtn.asm gcc-4.4.0/gcc/config/ia64/crtn.asm
   17.38 +--- gcc-4.4.0.orig/gcc/config/ia64/crtn.asm	2009-04-10 01:23:07.000000000 +0200
   17.39 ++++ gcc-4.4.0/gcc/config/ia64/crtn.asm	2009-05-27 21:38:37.000000000 +0200
   17.40 +@@ -41,3 +41,7 @@
   17.41 + 	br.ret.sptk.many b0
   17.42 + 
   17.43 + # end of crtn.asm
   17.44 ++
   17.45 ++#ifdef __linux__
   17.46 ++.section .note.GNU-stack; .previous
   17.47 ++#endif
   17.48 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.0/gcc/config/ia64/lib1funcs.asm
   17.49 +--- gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm	2009-04-10 01:23:07.000000000 +0200
   17.50 ++++ gcc-4.4.0/gcc/config/ia64/lib1funcs.asm	2009-05-27 21:38:37.000000000 +0200
   17.51 +@@ -793,3 +793,7 @@
   17.52 + 	.endp __floattitf
   17.53 + #endif
   17.54 + #endif
   17.55 ++
   17.56 ++#ifdef __linux__
   17.57 ++.section .note.GNU-stack; .previous
   17.58 ++#endif
   17.59 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/linux.h gcc-4.4.0/gcc/config/ia64/linux.h
   17.60 +--- gcc-4.4.0.orig/gcc/config/ia64/linux.h	2009-02-12 17:30:53.000000000 +0100
   17.61 ++++ gcc-4.4.0/gcc/config/ia64/linux.h	2009-05-27 21:38:37.000000000 +0200
   17.62 +@@ -5,6 +5,8 @@
   17.63 + 
   17.64 + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
   17.65 + 
   17.66 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
   17.67 ++
   17.68 + /* This is for -profile to use -lc_p instead of -lc.  */
   17.69 + #undef CC1_SPEC
   17.70 + #define CC1_SPEC "%{profile:-p} %{G*}"
   17.71 +diff -durN gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.0/gcc/config/rs6000/ppc-asm.h
   17.72 +--- gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h	2008-10-13 17:44:26.000000000 +0200
   17.73 ++++ gcc-4.4.0/gcc/config/rs6000/ppc-asm.h	2009-05-27 21:38:37.000000000 +0200
   17.74 +@@ -172,7 +172,7 @@
   17.75 + 	.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
   17.76 + #endif
   17.77 + 
   17.78 +-#if defined __linux__ && !defined __powerpc64__
   17.79 ++#if defined __linux__
   17.80 + 	.section .note.GNU-stack
   17.81 + 	.previous
   17.82 + #endif
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/patches/gcc/4.4.3/260-sh-libgcc-stacks.patch	Sun Jan 24 22:53:51 2010 +0100
    18.3 @@ -0,0 +1,25 @@
    18.4 +diff -durN gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.0/gcc/config/sh/lib1funcs.asm
    18.5 +--- gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm	2009-04-10 01:23:07.000000000 +0200
    18.6 ++++ gcc-4.4.0/gcc/config/sh/lib1funcs.asm	2009-05-27 21:38:39.000000000 +0200
    18.7 +@@ -30,6 +30,11 @@
    18.8 + !! recoded in assembly by Toshiyasu Morita
    18.9 + !! tm@netcom.com
   18.10 + 
   18.11 ++#if defined(__ELF__) && defined(__linux__)
   18.12 ++.section .note.GNU-stack,"",%progbits
   18.13 ++.previous
   18.14 ++#endif
   18.15 ++
   18.16 + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
   18.17 +    ELF local label prefixes by J"orn Rennecke
   18.18 +    amylaar@cygnus.com  */
   18.19 +diff -durN gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.0/gcc/config/sh/linux-atomic.asm
   18.20 +--- gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm	2009-04-10 01:23:07.000000000 +0200
   18.21 ++++ gcc-4.4.0/gcc/config/sh/linux-atomic.asm	2009-05-27 21:38:39.000000000 +0200
   18.22 +@@ -136,3 +136,6 @@
   18.23 + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov)
   18.24 + 
   18.25 + #endif /* ! __SH5__ */
   18.26 ++
   18.27 ++.section .note.GNU-stack,"",%progbits
   18.28 ++.previous
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/patches/gcc/4.4.3/270-sh-pr24836.patch	Sun Jan 24 22:53:51 2010 +0100
    19.3 @@ -0,0 +1,24 @@
    19.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
    19.5 +--- gcc-4.4.0.orig/gcc/configure	2009-05-27 21:38:08.000000000 +0200
    19.6 ++++ gcc-4.4.0/gcc/configure	2009-05-27 21:38:42.000000000 +0200
    19.7 +@@ -22205,7 +22205,7 @@
    19.8 + 	tls_first_minor=14
    19.9 + 	tls_as_opt="-m64 -Aesame --fatal-warnings"
   19.10 + 	;;
   19.11 +-  sh-*-* | sh[34]-*-*)
   19.12 ++  sh-*-* | sh[34]*-*-*)
   19.13 +     conftest_s='
   19.14 + 	.section ".tdata","awT",@progbits
   19.15 + foo:	.long	25
   19.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
   19.17 +--- gcc-4.4.0.orig/gcc/configure.ac	2009-05-27 21:38:08.000000000 +0200
   19.18 ++++ gcc-4.4.0/gcc/configure.ac	2009-05-27 21:38:42.000000000 +0200
   19.19 +@@ -2673,7 +2673,7 @@
   19.20 + 	tls_first_minor=14
   19.21 + 	tls_as_opt="-m64 -Aesame --fatal-warnings"
   19.22 + 	;;
   19.23 +-  sh-*-* | sh[34]-*-*)
   19.24 ++  sh-*-* | sh[34]*-*-*)
   19.25 +     conftest_s='
   19.26 + 	.section ".tdata","awT",@progbits
   19.27 + foo:	.long	25
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/patches/gcc/4.4.3/280-freebsd.patch	Sun Jan 24 22:53:51 2010 +0100
    20.3 @@ -0,0 +1,94 @@
    20.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
    20.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h	2009-04-10 01:23:07.000000000 +0200
    20.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h	2009-05-27 21:38:45.000000000 +0200
    20.7 +@@ -61,6 +61,8 @@
    20.8 + 	builtin_assert ("system=unix");					\
    20.9 + 	builtin_assert ("system=bsd");					\
   20.10 + 	builtin_assert ("system=FreeBSD");				\
   20.11 ++	if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99)))	\
   20.12 ++		builtin_define("_LONGLONG");				\
   20.13 + 	FBSD_TARGET_CPU_CPP_BUILTINS();					\
   20.14 +     }									\
   20.15 +   while (0)
   20.16 +diff -durN gcc-4.4.0.orig/gcc/config/t-freebsd-eh gcc-4.4.0/gcc/config/t-freebsd-eh
   20.17 +--- gcc-4.4.0.orig/gcc/config/t-freebsd-eh	1970-01-01 01:00:00.000000000 +0100
   20.18 ++++ gcc-4.4.0/gcc/config/t-freebsd-eh	2009-05-27 21:38:45.000000000 +0200
   20.19 +@@ -0,0 +1,4 @@
   20.20 ++# Use unwind-dw2-fde-glibc
   20.21 ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
   20.22 ++  $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
   20.23 ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
   20.24 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
   20.25 +--- gcc-4.4.0.orig/gcc/config.gcc	2009-05-27 21:38:34.000000000 +0200
   20.26 ++++ gcc-4.4.0/gcc/config.gcc	2009-05-27 21:38:45.000000000 +0200
   20.27 +@@ -456,7 +456,7 @@
   20.28 +   # pleases around the provided core setting.
   20.29 +   gas=yes
   20.30 +   gnu_ld=yes
   20.31 +-  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
   20.32 ++  extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
   20.33 +   fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
   20.34 +   tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
   20.35 +   tmake_file="t-slibgcc-elf-ver t-freebsd"
   20.36 +@@ -1042,6 +1042,10 @@
   20.37 + 	;;
   20.38 + i[34567]86-*-freebsd*)
   20.39 + 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
   20.40 ++	fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
   20.41 ++	if test ${fbsd_major} -ge 7; then
   20.42 ++		tmake_file="${tmake_file} t-freebsd-eh"
   20.43 ++	fi
   20.44 + 	;;
   20.45 + x86_64-*-freebsd*)
   20.46 + 	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"
   20.47 +diff -durN gcc-4.4.0.orig/gcc/crtstuff.c gcc-4.4.0/gcc/crtstuff.c
   20.48 +--- gcc-4.4.0.orig/gcc/crtstuff.c	2009-04-10 01:23:07.000000000 +0200
   20.49 ++++ gcc-4.4.0/gcc/crtstuff.c	2009-05-27 21:38:45.000000000 +0200
   20.50 +@@ -85,13 +85,15 @@
   20.51 +     && !defined(OBJECT_FORMAT_FLAT) \
   20.52 +     && defined(HAVE_LD_EH_FRAME_HDR) \
   20.53 +     && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
   20.54 +-    && defined(__GLIBC__) && __GLIBC__ >= 2
   20.55 ++    && ((defined(__GLIBC__) && __GLIBC__ >= 2) \
   20.56 ++    || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022))
   20.57 + #include <link.h>
   20.58 + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
   20.59 +    But it doesn't use PT_GNU_EH_FRAME ELF segment currently.  */
   20.60 + # if !defined(__UCLIBC__) \
   20.61 +-     && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
   20.62 +-     || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
   20.63 ++     || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
   20.64 ++     || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
   20.65 ++     || (__FreeBSD_version >= 700022)
   20.66 + #  define USE_PT_GNU_EH_FRAME
   20.67 + # endif
   20.68 + #endif
   20.69 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c
   20.70 +--- gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c	2009-04-10 01:23:07.000000000 +0200
   20.71 ++++ gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c	2009-05-27 21:38:45.000000000 +0200
   20.72 +@@ -46,8 +46,9 @@
   20.73 + #include "gthr.h"
   20.74 + 
   20.75 + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
   20.76 +-    && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
   20.77 +-	|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
   20.78 ++    && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
   20.79 ++	|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
   20.80 ++    || (__FreeBSD_version >= 700022 ))
   20.81 + 
   20.82 + #ifndef __RELOC_POINTER
   20.83 + # define __RELOC_POINTER(ptr, base) ((ptr) + (base))
   20.84 +@@ -63,6 +64,13 @@
   20.85 + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
   20.86 + #endif
   20.87 + 
   20.88 ++/* Support FreeBSD */
   20.89 ++#ifndef ElfW
   20.90 ++# ifdef __ElfN
   20.91 ++#  define ElfW __ElfN
   20.92 ++# endif
   20.93 ++#endif
   20.94 ++
   20.95 + struct unw_eh_callback_data
   20.96 + {
   20.97 +   _Unwind_Ptr pc;
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/patches/gcc/4.4.3/290-freebsd.patch	Sun Jan 24 22:53:51 2010 +0100
    21.3 @@ -0,0 +1,64 @@
    21.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
    21.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h	2009-05-27 21:38:47.000000000 +0200
    21.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h	2009-05-27 21:38:47.000000000 +0200
    21.7 +@@ -86,9 +86,10 @@
    21.8 + #define FBSD_STARTFILE_SPEC \
    21.9 +   "%{!shared: \
   21.10 +      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
   21.11 +-		       %{!p:%{profile:gcrt1.o%s} \
   21.12 +-			 %{!profile:crt1.o%s}}}} \
   21.13 +-   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
   21.14 ++	%{!p:%{profile:gcrt1.o%s} \
   21.15 ++	 %{!profile:crt1.o%s}}}} \
   21.16 ++   crti.o%s \
   21.17 ++   %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
   21.18 + 
   21.19 + /* Provide a ENDFILE_SPEC appropriate for FreeBSD.  Here we tack on
   21.20 +    the magical crtend.o file (see crtstuff.c) which provides part of 
   21.21 +@@ -126,7 +127,8 @@
   21.22 +     %{pg:  -lc_p}							\
   21.23 +   }"
   21.24 + #else
   21.25 +-#if FBSD_MAJOR < 5
   21.26 ++#include <sys/param.h>
   21.27 ++#if __FreeBSD_version < 500016
   21.28 + #define FBSD_LIB_SPEC "							\
   21.29 +   %{!shared:								\
   21.30 +     %{!pg:								\
   21.31 +@@ -136,17 +138,34 @@
   21.32 +       %{!pthread:-lc_p}							\
   21.33 +       %{pthread:-lc_r_p}}						\
   21.34 +   }"
   21.35 +-#else
   21.36 ++#elif __FreeBSD_version < 700022
   21.37 + #define FBSD_LIB_SPEC "							\
   21.38 +   %{!shared:								\
   21.39 +     %{!pg: %{pthread:-lpthread} -lc}					\
   21.40 +     %{pg:  %{pthread:-lpthread_p} -lc_p}				\
   21.41 +   }"
   21.42 ++#else
   21.43 ++#define FBSD_LIB_SPEC "							\
   21.44 ++  %{!shared:								\
   21.45 ++    %{!pg: %{pthread:-lpthread} -lc}					\
   21.46 ++    %{pg:  %{pthread:-lpthread_p} -lc_p}}				\
   21.47 ++  %{shared:								\
   21.48 ++    %{pthread:-lpthread} -lc}						\
   21.49 ++  "
   21.50 + #endif
   21.51 + #endif
   21.52 + 
   21.53 +-#if FBSD_MAJOR < 6
   21.54 ++#if FBSD_MAJOR < 5
   21.55 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
   21.56 + #else
   21.57 + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
   21.58 + #endif
   21.59 ++
   21.60 ++#if defined(HAVE_LD_EH_FRAME_HDR)
   21.61 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
   21.62 ++#endif
   21.63 ++
   21.64 ++/* Use --as-needed -lgcc_s for eh support.  */
   21.65 ++#ifdef HAVE_LD_AS_NEEDED
   21.66 ++#define USE_LD_AS_NEEDED 1
   21.67 ++#endif
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/patches/gcc/4.4.3/300-uclibc-conf.patch	Sun Jan 24 22:53:51 2010 +0100
    22.3 @@ -0,0 +1,35 @@
    22.4 +diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh
    22.5 +--- gcc-4.4.0.orig/contrib/regression/objs-gcc.sh	2009-04-10 01:23:07.000000000 +0200
    22.6 ++++ gcc-4.4.0/contrib/regression/objs-gcc.sh	2009-05-27 21:38:53.000000000 +0200
    22.7 +@@ -106,6 +106,10 @@
    22.8 +  then
    22.9 +   make all-gdb all-dejagnu all-ld || exit 1
   22.10 +   make install-gdb install-dejagnu install-ld || exit 1
   22.11 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
   22.12 ++ then
   22.13 ++  make all-gdb all-dejagnu all-ld || exit 1
   22.14 ++  make install-gdb install-dejagnu install-ld || exit 1
   22.15 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
   22.16 +   make bootstrap || exit 1
   22.17 +   make install || exit 1
   22.18 +diff -durN gcc-4.4.0.orig/libjava/classpath/ltconfig gcc-4.4.0/libjava/classpath/ltconfig
   22.19 +--- gcc-4.4.0.orig/libjava/classpath/ltconfig	2007-06-04 01:18:43.000000000 +0200
   22.20 ++++ gcc-4.4.0/libjava/classpath/ltconfig	2009-05-27 21:38:53.000000000 +0200
   22.21 +@@ -603,7 +603,7 @@
   22.22 + 
   22.23 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
   22.24 + case $host_os in
   22.25 +-linux-gnu*) ;;
   22.26 ++linux-gnu*|linux-uclibc*) ;;
   22.27 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
   22.28 + esac
   22.29 + 
   22.30 +@@ -1251,7 +1251,7 @@
   22.31 +   ;;
   22.32 + 
   22.33 + # This must be Linux ELF.
   22.34 +-linux-gnu*)
   22.35 ++linux*)
   22.36 +   version_type=linux
   22.37 +   need_lib_prefix=no
   22.38 +   need_version=no
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/patches/gcc/4.4.3/310-missing-execinfo_h.patch	Sun Jan 24 22:53:51 2010 +0100
    23.3 @@ -0,0 +1,12 @@
    23.4 +diff -durN gcc-4.4.0.orig/boehm-gc/include/gc.h gcc-4.4.0/boehm-gc/include/gc.h
    23.5 +--- gcc-4.4.0.orig/boehm-gc/include/gc.h	2007-04-23 23:10:09.000000000 +0200
    23.6 ++++ gcc-4.4.0/boehm-gc/include/gc.h	2009-05-27 21:38:55.000000000 +0200
    23.7 +@@ -503,7 +503,7 @@
    23.8 + #if defined(__linux__) || defined(__GLIBC__)
    23.9 + # include <features.h>
   23.10 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
   23.11 +-     && !defined(__ia64__)
   23.12 ++     && !defined(__ia64__) && !defined(__UCLIBC__)
   23.13 + #   ifndef GC_HAVE_BUILTIN_BACKTRACE
   23.14 + #     define GC_HAVE_BUILTIN_BACKTRACE
   23.15 + #   endif
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/patches/gcc/4.4.3/320-c99-snprintf.patch	Sun Jan 24 22:53:51 2010 +0100
    24.3 @@ -0,0 +1,12 @@
    24.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.0/libstdc++-v3/include/c_global/cstdio
    24.5 +--- gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio	2009-04-10 01:23:07.000000000 +0200
    24.6 ++++ gcc-4.4.0/libstdc++-v3/include/c_global/cstdio	2009-05-27 21:38:58.000000000 +0200
    24.7 +@@ -139,7 +139,7 @@
    24.8 + 
    24.9 + _GLIBCXX_END_NAMESPACE
   24.10 + 
   24.11 +-#if _GLIBCXX_USE_C99
   24.12 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
   24.13 + 
   24.14 + #undef snprintf
   24.15 + #undef vfscanf
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/patches/gcc/4.4.3/330-libmudflap-susv3-legacy.patch	Sun Jan 24 22:53:51 2010 +0100
    25.3 @@ -0,0 +1,48 @@
    25.4 +diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c
    25.5 +--- gcc-4.4.0.orig/libmudflap/mf-hooks2.c	2009-04-10 01:23:07.000000000 +0200
    25.6 ++++ gcc-4.4.0/libmudflap/mf-hooks2.c	2009-05-27 21:39:00.000000000 +0200
    25.7 +@@ -421,7 +421,7 @@
    25.8 + {
    25.9 +   TRACE ("%s\n", __PRETTY_FUNCTION__);
   25.10 +   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
   25.11 +-  bzero (s, n);
   25.12 ++  memset (s, 0, n);
   25.13 + }
   25.14 + 
   25.15 + 
   25.16 +@@ -431,7 +431,7 @@
   25.17 +   TRACE ("%s\n", __PRETTY_FUNCTION__);
   25.18 +   MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
   25.19 +   MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
   25.20 +-  bcopy (src, dest, n);
   25.21 ++  memmove (dest, src, n);
   25.22 + }
   25.23 + 
   25.24 + 
   25.25 +@@ -441,7 +441,7 @@
   25.26 +   TRACE ("%s\n", __PRETTY_FUNCTION__);
   25.27 +   MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
   25.28 +   MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
   25.29 +-  return bcmp (s1, s2, n);
   25.30 ++  return n == 0 ? 0 : memcmp (s1, s2, n);
   25.31 + }
   25.32 + 
   25.33 + 
   25.34 +@@ -450,7 +450,7 @@
   25.35 +   size_t n = strlen (s);
   25.36 +   TRACE ("%s\n", __PRETTY_FUNCTION__);
   25.37 +   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
   25.38 +-  return index (s, c);
   25.39 ++  return strchr (s, c);
   25.40 + }
   25.41 + 
   25.42 + 
   25.43 +@@ -459,7 +459,7 @@
   25.44 +   size_t n = strlen (s);
   25.45 +   TRACE ("%s\n", __PRETTY_FUNCTION__);
   25.46 +   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
   25.47 +-  return rindex (s, c);
   25.48 ++  return strrchr (s, c);
   25.49 + }
   25.50 + 
   25.51 + /* XXX:  stpcpy, memccpy */
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/patches/gcc/4.4.3/340-ecjx-host-cc.patch	Sun Jan 24 22:53:51 2010 +0100
    26.3 @@ -0,0 +1,13 @@
    26.4 +diff -ur gcc-4.4.1-orig/libjava/Makefile.in gcc-4.4.1/libjava/Makefile.in
    26.5 +--- gcc-4.4.1-orig/libjava/Makefile.in	2009-08-04 04:12:27.000000000 -0700
    26.6 ++++ gcc-4.4.1/libjava/Makefile.in	2009-09-23 22:03:15.750951483 -0700
    26.7 +@@ -8874,6 +8874,9 @@
    26.8 + ecjx$(EXEEXT): $(ecjx_OBJECTS) $(ecjx_DEPENDENCIES) 
    26.9 + 	@rm -f ecjx$(EXEEXT)
   26.10 + 	$(ecjx_LINK) $(ecjx_LDFLAGS) $(ecjx_OBJECTS) $(ecjx_LDADD) $(LIBS)
   26.11 ++ecjx.$(OBJEXT): $(ecjx_SOURCES)
   26.12 ++	@rm -f ecjx.$(OBJEXT)
   26.13 ++	$(CC_FOR_BUILD) $(BUILD_CFLAGS) -c -o $@ $<
   26.14 + gappletviewer$(EXEEXT): $(gappletviewer_OBJECTS) $(gappletviewer_DEPENDENCIES) 
   26.15 + 	@rm -f gappletviewer$(EXEEXT)
   26.16 + 	$(gappletviewer_LINK) $(gappletviewer_LDFLAGS) $(gappletviewer_OBJECTS) $(gappletviewer_LDADD) $(LIBS)
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/patches/gcc/4.4.3/350-index_macro.patch	Sun Jan 24 22:53:51 2010 +0100
    27.3 @@ -0,0 +1,32 @@
    27.4 +Original patch from: ../4.3.2/290-index_macro.patch
    27.5 +
    27.6 +-= BEGIN original header =-
    27.7 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_304-index_macro.patch
    27.8 +-= END original header =-
    27.9 +
   27.10 +diff -durN gcc-4.3.3.orig/libstdc++-v3/include/ext/rope gcc-4.3.3/libstdc++-v3/include/ext/rope
   27.11 +--- gcc-4.3.3.orig/libstdc++-v3/include/ext/rope	2008-07-15 12:14:51.000000000 +0200
   27.12 ++++ gcc-4.3.3/libstdc++-v3/include/ext/rope	2009-01-27 22:25:41.000000000 +0100
   27.13 +@@ -59,6 +59,9 @@
   27.14 + #include <bits/gthr.h>
   27.15 + #include <tr1/functional>
   27.16 + 
   27.17 ++/* cope w/ index defined as macro, SuSv3 proposal */
   27.18 ++#undef index
   27.19 ++
   27.20 + # ifdef __GC
   27.21 + #   define __GC_CONST const
   27.22 + # else
   27.23 +diff -durN gcc-4.3.3.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.3.3/libstdc++-v3/include/ext/ropeimpl.h
   27.24 +--- gcc-4.3.3.orig/libstdc++-v3/include/ext/ropeimpl.h	2007-05-04 17:06:46.000000000 +0200
   27.25 ++++ gcc-4.3.3/libstdc++-v3/include/ext/ropeimpl.h	2009-01-27 22:25:41.000000000 +0100
   27.26 +@@ -54,6 +54,9 @@
   27.27 + #include <ext/memory> // For uninitialized_copy_n
   27.28 + #include <ext/numeric> // For power
   27.29 + 
   27.30 ++/* cope w/ index defined as macro, SuSv3 proposal */
   27.31 ++#undef index
   27.32 ++
   27.33 + _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
   27.34 + 
   27.35 +   using std::size_t;
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/patches/gcc/4.4.3/360-arm-bigendian.patch	Sun Jan 24 22:53:51 2010 +0100
    28.3 @@ -0,0 +1,32 @@
    28.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
    28.5 +Adds support for arm*b-linux* big-endian ARM targets
    28.6 +
    28.7 +See http://gcc.gnu.org/PR16350
    28.8 +
    28.9 +--- gcc-4.4.2.orig/gcc/config/arm/linux-elf.h	2009-02-20 16:20:38.000000000 +0100
   28.10 ++++ gcc-4.4.2/gcc/config/arm/linux-elf.h	2009-12-31 14:19:20.000000000 +0100
   28.11 +@@ -51,7 +51,7 @@
   28.12 + 
   28.13 + #undef  MULTILIB_DEFAULTS
   28.14 + #define MULTILIB_DEFAULTS \
   28.15 +-	{ "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
   28.16 ++	{ "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
   28.17 + 
   28.18 + /* Now we define the strings used to build the spec file.  */
   28.19 + #undef  LIB_SPEC
   28.20 +diff -ru gcc-4.4.2.orig/gcc/config.gcc gcc-4.4.2/gcc/config.gcc
   28.21 +--- gcc-4.4.2.orig/gcc/config.gcc	2009-12-31 14:43:17.000000000 +0100
   28.22 ++++ gcc-4.4.2/gcc/config.gcc	2010-01-05 09:27:42.000000000 +0100
   28.23 +@@ -733,6 +733,11 @@
   28.24 + 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
   28.25 + 	tmake_file="arm/t-arm arm/t-arm-elf"
   28.26 + 	case ${target} in
   28.27 ++	arm*b-*)
   28.28 ++		tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
   28.29 ++		;;
   28.30 ++	esac
   28.31 ++	case ${target} in
   28.32 + 	arm*-*-uclinux*eabi)
   28.33 + 	    tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
   28.34 + 	    tmake_file="$tmake_file arm/t-bpabi"
   28.35 +
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/patches/gcc/4.4.3/370-bootstrap-target_lib_path.patch	Sun Jan 24 22:53:51 2010 +0100
    29.3 @@ -0,0 +1,40 @@
    29.4 +ChangeLog:
    29.5 +2010-01-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
    29.6 +
    29.7 +	PR bootstrap/41818
    29.8 +	* Makefile.tpl (BASE_TARGET_EXPORTS): Only add TARGET_LIB_PATH
    29.9 +	to $(RPATH_ENVVAR) if bootstrapping.
   29.10 +	* Makefile.in: Regenerate.
   29.11 +
   29.12 +diff --git a/Makefile.in b/Makefile.in
   29.13 +index e5fa1d3..dbfc1f0 100644
   29.14 +--- a/Makefile.in
   29.15 ++++ b/Makefile.in
   29.16 +@@ -281,7 +281,10 @@ BASE_TARGET_EXPORTS = \
   29.17 + 	STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
   29.18 + 	WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
   29.19 + 	WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
   29.20 +-	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
   29.21 ++@if gcc-bootstrap
   29.22 ++	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
   29.23 ++@endif gcc-bootstrap
   29.24 ++	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
   29.25 + 
   29.26 + RAW_CXX_TARGET_EXPORTS = \
   29.27 + 	$(BASE_TARGET_EXPORTS) \
   29.28 +diff --git a/Makefile.tpl b/Makefile.tpl
   29.29 +index 15102e5..452d47c 100644
   29.30 +--- a/Makefile.tpl
   29.31 ++++ b/Makefile.tpl
   29.32 +@@ -284,7 +284,10 @@ BASE_TARGET_EXPORTS = \
   29.33 + 	STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
   29.34 + 	WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
   29.35 + 	WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
   29.36 +-	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
   29.37 ++@if gcc-bootstrap
   29.38 ++	$(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
   29.39 ++@endif gcc-bootstrap
   29.40 ++	$(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
   29.41 + 
   29.42 + RAW_CXX_TARGET_EXPORTS = \
   29.43 + 	$(BASE_TARGET_EXPORTS) \