1.1 --- a/config/cc/gcc.in Sun May 16 18:56:51 2010 +0200
1.2 +++ b/config/cc/gcc.in Sun May 16 19:41:53 2010 +0200
1.3 @@ -25,6 +25,12 @@
1.4 depends on EXPERIMENTAL
1.5 select CC_GCC_4_5_or_later
1.6
1.7 +config CC_V_4_4_4
1.8 + bool
1.9 + prompt "4.4.4 (EXPERIMENTAL)"
1.10 + depends on EXPERIMENTAL
1.11 + select CC_GCC_4_4_or_later
1.12 +
1.13 config CC_V_4_4_3
1.14 bool
1.15 prompt "4.4.3"
1.16 @@ -158,6 +164,7 @@
1.17 # Don't remove next line
1.18 # CT_INSERT_VERSION_STRING_BELOW
1.19 default "4.5.0" if CC_V_4_5_0
1.20 + default "4.4.4" if CC_V_4_4_4
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
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/gcc/4.4.4/100-alpha-mieee-default.patch Sun May 16 19:41:53 2010 +0200
2.3 @@ -0,0 +1,26 @@
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 +
2.6 +diff -durN gcc-4.4.4.orig/gcc/config/alpha/alpha.h gcc-4.4.4/gcc/config/alpha/alpha.h
2.7 +--- gcc-4.4.4.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100
2.8 ++++ gcc-4.4.4/gcc/config/alpha/alpha.h 2010-05-16 19:10:19.000000000 +0200
2.9 +@@ -95,6 +95,8 @@
2.10 + while (0)
2.11 + #endif
2.12 +
2.13 ++#define CPP_SPEC "%{!no-ieee:-mieee}"
2.14 ++
2.15 + #define WORD_SWITCH_TAKES_ARG(STR) \
2.16 + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
2.17 +
2.18 +diff -durN gcc-4.4.4.orig/gcc/config/alpha/alpha.opt gcc-4.4.4/gcc/config/alpha/alpha.opt
2.19 +--- gcc-4.4.4.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
2.20 ++++ gcc-4.4.4/gcc/config/alpha/alpha.opt 2010-05-16 19:10:19.000000000 +0200
2.21 +@@ -39,7 +39,7 @@
2.22 + Request IEEE-conformant math library routines (OSF/1)
2.23 +
2.24 + mieee
2.25 +-Target Report RejectNegative Mask(IEEE)
2.26 ++Target Report Mask(IEEE)
2.27 + Emit IEEE-conformant code, without inexact exceptions
2.28 +
2.29 + mieee-with-inexact
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/gcc/4.4.4/110-trampolinewarn.patch Sun May 16 19:41:53 2010 +0200
3.3 @@ -0,0 +1,29 @@
3.4 +diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c
3.5 +
3.6 +diff -durN gcc-4.4.4.orig/gcc/builtins.c gcc-4.4.4/gcc/builtins.c
3.7 +--- gcc-4.4.4.orig/gcc/builtins.c 2010-03-22 16:00:20.000000000 +0100
3.8 ++++ gcc-4.4.4/gcc/builtins.c 2010-05-16 19:10:34.000000000 +0200
3.9 +@@ -5783,6 +5783,9 @@
3.10 + trampolines_created = 1;
3.11 + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
3.12 +
3.13 ++ if (warn_trampolines)
3.14 ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
3.15 ++
3.16 + return const0_rtx;
3.17 + }
3.18 +
3.19 +diff -durN gcc-4.4.4.orig/gcc/common.opt gcc-4.4.4/gcc/common.opt
3.20 +--- gcc-4.4.4.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100
3.21 ++++ gcc-4.4.4/gcc/common.opt 2010-05-16 19:10:34.000000000 +0200
3.22 +@@ -197,6 +197,10 @@
3.23 + Common Var(warn_type_limits) Init(-1) Warning
3.24 + Warn if a comparison is always true or always false due to the limited range of the data type
3.25 +
3.26 ++Wtrampolines
3.27 ++Common Var(warn_trampolines) Init(1)
3.28 ++Warn whenever a trampoline is generated
3.29 ++
3.30 + Wuninitialized
3.31 + Common Var(warn_uninitialized) Warning
3.32 + Warn about uninitialized automatic variables
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/gcc/4.4.4/120-java-nomulti.patch Sun May 16 19:41:53 2010 +0200
4.3 @@ -0,0 +1,48 @@
4.4 +diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure
4.5 +
4.6 +diff -durN gcc-4.4.4.orig/libjava/configure gcc-4.4.4/libjava/configure
4.7 +--- gcc-4.4.4.orig/libjava/configure 2010-04-29 10:26:54.000000000 +0200
4.8 ++++ gcc-4.4.4/libjava/configure 2010-05-16 19:10:49.000000000 +0200
4.9 +@@ -1021,6 +1021,8 @@
4.10 + default=yes
4.11 + --enable-java-maintainer-mode
4.12 + allow rebuilding of .class and .h files
4.13 ++ --enable-libjava-multilib
4.14 ++ build libjava as multilib
4.15 + --disable-dependency-tracking speeds up one-time build
4.16 + --enable-dependency-tracking do not reject slow dependency extractors
4.17 + --enable-maintainer-mode enable make rules and dependencies not useful
4.18 +@@ -1973,6 +1975,16 @@
4.19 + fi
4.20 +
4.21 +
4.22 ++# Check whether --enable-libjava-multilib was given.
4.23 ++if test "${enable_libjava_multilib+set}" = set; then
4.24 ++ enableval=$enable_libjava_multilib;
4.25 ++fi
4.26 ++
4.27 ++if test "$enable_libjava_multilib" = no; then
4.28 ++ multilib=no
4.29 ++ ac_configure_args="$ac_configure_args --disable-multilib"
4.30 ++fi
4.31 ++
4.32 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
4.33 +
4.34 +
4.35 +diff -durN gcc-4.4.4.orig/libjava/configure.ac gcc-4.4.4/libjava/configure.ac
4.36 +--- gcc-4.4.4.orig/libjava/configure.ac 2010-04-21 19:04:42.000000000 +0200
4.37 ++++ gcc-4.4.4/libjava/configure.ac 2010-05-16 19:10:49.000000000 +0200
4.38 +@@ -139,6 +139,13 @@
4.39 + [allow rebuilding of .class and .h files]))
4.40 + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
4.41 +
4.42 ++AC_ARG_ENABLE(libjava-multilib,
4.43 ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
4.44 ++if test "$enable_libjava_multilib" = no; then
4.45 ++ multilib=no
4.46 ++ ac_configure_args="$ac_configure_args --disable-multilib"
4.47 ++fi
4.48 ++
4.49 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
4.50 + GCC_NO_EXECUTABLES
4.51 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/gcc/4.4.4/130-cross-compile.patch Sun May 16 19:41:53 2010 +0200
5.3 @@ -0,0 +1,41 @@
5.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
5.5 +
5.6 +diff -durN gcc-4.4.4.orig/gcc/configure gcc-4.4.4/gcc/configure
5.7 +--- gcc-4.4.4.orig/gcc/configure 2009-10-19 14:15:27.000000000 +0200
5.8 ++++ gcc-4.4.4/gcc/configure 2010-05-16 19:11:00.000000000 +0200
5.9 +@@ -13997,7 +13997,7 @@
5.10 + | powerpc*-*-*,powerpc64*-*-*)
5.11 + CROSS="$CROSS -DNATIVE_CROSS" ;;
5.12 + esac
5.13 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
5.14 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
5.15 + SYSTEM_HEADER_DIR=$build_system_header_dir
5.16 + fi
5.17 +
5.18 +diff -durN gcc-4.4.4.orig/gcc/configure.ac gcc-4.4.4/gcc/configure.ac
5.19 +--- gcc-4.4.4.orig/gcc/configure.ac 2009-10-19 14:15:27.000000000 +0200
5.20 ++++ gcc-4.4.4/gcc/configure.ac 2010-05-16 19:11:00.000000000 +0200
5.21 +@@ -1720,7 +1720,7 @@
5.22 + | powerpc*-*-*,powerpc64*-*-*)
5.23 + CROSS="$CROSS -DNATIVE_CROSS" ;;
5.24 + esac
5.25 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
5.26 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
5.27 + SYSTEM_HEADER_DIR=$build_system_header_dir
5.28 + fi
5.29 +
5.30 +diff -durN gcc-4.4.4.orig/gcc/unwind-dw2.c gcc-4.4.4/gcc/unwind-dw2.c
5.31 +--- gcc-4.4.4.orig/gcc/unwind-dw2.c 2010-01-20 09:39:18.000000000 +0100
5.32 ++++ gcc-4.4.4/gcc/unwind-dw2.c 2010-05-16 19:11:00.000000000 +0200
5.33 +@@ -329,9 +329,11 @@
5.34 + }
5.35 + #endif
5.36 +
5.37 ++#ifndef inhibit_libc
5.38 + #ifdef MD_UNWIND_SUPPORT
5.39 + #include MD_UNWIND_SUPPORT
5.40 + #endif
5.41 ++#endif
5.42 +
5.43 + /* Extract any interesting information from the CIE for the translation
5.44 + 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.4/140-default-format-security.patch Sun May 16 19:41:53 2010 +0200
6.3 @@ -0,0 +1,51 @@
6.4 +diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c
6.5 +
6.6 +diff -durN gcc-4.4.4.orig/gcc/c-common.c gcc-4.4.4/gcc/c-common.c
6.7 +--- gcc-4.4.4.orig/gcc/c-common.c 2009-11-05 15:57:57.000000000 +0100
6.8 ++++ gcc-4.4.4/gcc/c-common.c 2010-05-16 19:11:21.000000000 +0200
6.9 +@@ -301,7 +301,7 @@
6.10 + /* Warn about format/argument anomalies in calls to formatted I/O functions
6.11 + (*printf, *scanf, strftime, strfmon, etc.). */
6.12 +
6.13 +-int warn_format;
6.14 ++int warn_format = 1;
6.15 +
6.16 + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled
6.17 + with GCC this doesn't matter as __null is guaranteed to have the right
6.18 +diff -durN gcc-4.4.4.orig/gcc/c.opt gcc-4.4.4/gcc/c.opt
6.19 +--- gcc-4.4.4.orig/gcc/c.opt 2009-09-18 23:53:23.000000000 +0200
6.20 ++++ gcc-4.4.4/gcc/c.opt 2010-05-16 19:11:21.000000000 +0200
6.21 +@@ -236,7 +236,7 @@
6.22 + Warn about format strings that contain NUL bytes
6.23 +
6.24 + Wformat-security
6.25 +-C ObjC C++ ObjC++ Var(warn_format_security) Warning
6.26 ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
6.27 + Warn about possible security problems with format functions
6.28 +
6.29 + Wformat-y2k
6.30 +diff -durN gcc-4.4.4.orig/gcc/doc/invoke.texi gcc-4.4.4/gcc/doc/invoke.texi
6.31 +--- gcc-4.4.4.orig/gcc/doc/invoke.texi 2010-04-08 12:46:46.000000000 +0200
6.32 ++++ gcc-4.4.4/gcc/doc/invoke.texi 2010-05-16 19:11:21.000000000 +0200
6.33 +@@ -2888,6 +2888,9 @@
6.34 + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
6.35 + @option{-Wformat=2} are available, but are not included in @option{-Wall}.
6.36 +
6.37 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
6.38 ++To disable, use @option{-Wformat=0}.
6.39 ++
6.40 + @item -Wformat-y2k
6.41 + @opindex Wformat-y2k
6.42 + @opindex Wno-format-y2k
6.43 +@@ -2941,6 +2944,11 @@
6.44 + in future warnings may be added to @option{-Wformat-security} that are not
6.45 + included in @option{-Wformat-nonliteral}.)
6.46 +
6.47 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
6.48 ++To disable, use @option{-Wno-format-security}, or disable all format warnings
6.49 ++with @option{-Wformat=0}. To make format security warnings fatal, specify
6.50 ++@option{-Werror=format-security}.
6.51 ++
6.52 + @item -Wformat=2
6.53 + @opindex Wformat=2
6.54 + @opindex Wno-format=2
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/patches/gcc/4.4.4/150-default-fortify-source.patch Sun May 16 19:41:53 2010 +0200
7.3 @@ -0,0 +1,28 @@
7.4 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
7.5 +
7.6 +diff -durN gcc-4.4.4.orig/gcc/doc/invoke.texi gcc-4.4.4/gcc/doc/invoke.texi
7.7 +--- gcc-4.4.4.orig/gcc/doc/invoke.texi 2010-05-16 19:11:21.000000000 +0200
7.8 ++++ gcc-4.4.4/gcc/doc/invoke.texi 2010-05-16 19:11:30.000000000 +0200
7.9 +@@ -5432,6 +5432,11 @@
7.10 + Please note the warning under @option{-fgcse} about
7.11 + invoking @option{-O2} on programs that use computed gotos.
7.12 +
7.13 ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
7.14 ++activated when @option{-O} is set to 2 or higher. This enables additional
7.15 ++compile-time and run-time checks for several libc functions. To disable,
7.16 ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}.
7.17 ++
7.18 + @item -O3
7.19 + @opindex O3
7.20 + Optimize yet more. @option{-O3} turns on all optimizations specified
7.21 +diff -durN gcc-4.4.4.orig/gcc/gcc.c gcc-4.4.4/gcc/gcc.c
7.22 +--- gcc-4.4.4.orig/gcc/gcc.c 2010-01-09 01:05:06.000000000 +0100
7.23 ++++ gcc-4.4.4/gcc/gcc.c 2010-05-16 19:11:30.000000000 +0200
7.24 +@@ -807,6 +807,7 @@
7.25 + %{H} %C %{D*&U*&A*} %{i*} %Z %i\
7.26 + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
7.27 + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
7.28 ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
7.29 + %{E|M|MM:%W{o*}}";
7.30 +
7.31 + /* 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.4/160-netbsd-symbolic.patch Sun May 16 19:41:53 2010 +0200
8.3 @@ -0,0 +1,13 @@
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 +
8.6 +diff -durN gcc-4.4.4.orig/gcc/config/netbsd-elf.h gcc-4.4.4/gcc/config/netbsd-elf.h
8.7 +--- gcc-4.4.4.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
8.8 ++++ gcc-4.4.4/gcc/config/netbsd-elf.h 2010-05-16 19:11:50.000000000 +0200
8.9 +@@ -82,6 +82,7 @@
8.10 + #define NETBSD_LINK_SPEC_ELF \
8.11 + "%{assert*} %{R*} %{rpath*} \
8.12 + %{shared:-shared} \
8.13 ++ %{symbolic:-Bsymbolic} \
8.14 + %{!shared: \
8.15 + -dc -dp \
8.16 + %{!nostdlib: \
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/patches/gcc/4.4.4/170-sparc64-bsd.patch Sun May 16 19:41:53 2010 +0200
9.3 @@ -0,0 +1,31 @@
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 +
9.6 +diff -durN gcc-4.4.4.orig/gcc/config/sparc/freebsd.h gcc-4.4.4/gcc/config/sparc/freebsd.h
9.7 +--- gcc-4.4.4.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
9.8 ++++ gcc-4.4.4/gcc/config/sparc/freebsd.h 2010-05-16 19:12:00.000000000 +0200
9.9 +@@ -25,9 +25,22 @@
9.10 + /* FreeBSD needs the platform name (sparc64) defined.
9.11 + Emacs needs to know if the arch is 64 or 32-bits. */
9.12 +
9.13 +-#undef CPP_CPU64_DEFAULT_SPEC
9.14 +-#define CPP_CPU64_DEFAULT_SPEC \
9.15 +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
9.16 ++#undef FBSD_TARGET_CPU_CPP_BUILTINS
9.17 ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \
9.18 ++ do \
9.19 ++ { \
9.20 ++ if (TARGET_ARCH64) \
9.21 ++ { \
9.22 ++ builtin_define ("__sparc64__"); \
9.23 ++ builtin_define ("__sparc_v9__"); \
9.24 ++ builtin_define ("__sparcv9"); \
9.25 ++ } \
9.26 ++ else \
9.27 ++ builtin_define ("__sparc"); \
9.28 ++ builtin_define ("__sparc__"); \
9.29 ++ } \
9.30 ++ while (0)
9.31 ++
9.32 +
9.33 + #define LINK_SPEC "%(link_arch) \
9.34 + %{!mno-relax:%{!r:-relax}} \
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/patches/gcc/4.4.4/180-libgomp-no-werror.patch Sun May 16 19:41:53 2010 +0200
10.3 @@ -0,0 +1,14 @@
10.4 +diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure
10.5 +
10.6 +diff -durN gcc-4.4.4.orig/libgomp/configure gcc-4.4.4/libgomp/configure
10.7 +--- gcc-4.4.4.orig/libgomp/configure 2010-04-29 10:26:54.000000000 +0200
10.8 ++++ gcc-4.4.4/libgomp/configure 2010-05-16 19:12:19.000000000 +0200
10.9 +@@ -3334,7 +3334,7 @@
10.10 +
10.11 + # Add -Wall -Werror if we are using GCC.
10.12 + if test "x$GCC" = "xyes"; then
10.13 +- XCFLAGS="$XCFLAGS -Wall -Werror"
10.14 ++ XCFLAGS="$XCFLAGS -Wall"
10.15 + fi
10.16 +
10.17 + # Find other programs we need.
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/patches/gcc/4.4.4/190-flatten-switch-stmt-00.patch Sun May 16 19:41:53 2010 +0200
11.3 @@ -0,0 +1,26 @@
11.4 +diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c
11.5 +
11.6 +diff -durN gcc-4.4.4.orig/gcc/stmt.c gcc-4.4.4/gcc/stmt.c
11.7 +--- gcc-4.4.4.orig/gcc/stmt.c 2010-03-08 12:46:28.000000000 +0100
11.8 ++++ gcc-4.4.4/gcc/stmt.c 2010-05-16 19:12:31.000000000 +0200
11.9 +@@ -2377,7 +2377,11 @@
11.10 + use_cost_table
11.11 + = (TREE_CODE (orig_type) != ENUMERAL_TYPE
11.12 + && estimate_case_costs (case_list));
11.13 +- balance_case_nodes (&case_list, NULL);
11.14 ++ /* When optimizing for size, we want a straight list to avoid
11.15 ++ jumps as much as possible. This basically creates an if-else
11.16 ++ chain. */
11.17 ++ if (!optimize_size)
11.18 ++ balance_case_nodes (&case_list, NULL);
11.19 + emit_case_nodes (index, case_list, default_label, index_type);
11.20 + if (default_label)
11.21 + emit_jump (default_label);
11.22 +@@ -2943,6 +2947,7 @@
11.23 + {
11.24 + if (!node_has_low_bound (node, index_type))
11.25 + {
11.26 ++ if (!optimize_size) /* don't jl to the .default_label. */
11.27 + emit_cmp_and_jump_insns (index,
11.28 + convert_modes
11.29 + (mode, imode,
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/patches/gcc/4.4.4/200-libiberty.h-asprintf.patch Sun May 16 19:41:53 2010 +0200
12.3 @@ -0,0 +1,17 @@
12.4 +diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h
12.5 +
12.6 +diff -durN gcc-4.4.4.orig/include/libiberty.h gcc-4.4.4/include/libiberty.h
12.7 +--- gcc-4.4.4.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200
12.8 ++++ gcc-4.4.4/include/libiberty.h 2010-05-16 19:12:50.000000000 +0200
12.9 +@@ -595,8 +595,11 @@
12.10 + /* Like sprintf but provides a pointer to malloc'd storage, which must
12.11 + be freed by the caller. */
12.12 +
12.13 ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
12.14 ++#ifndef asprintf
12.15 + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
12.16 + #endif
12.17 ++#endif
12.18 +
12.19 + #if !HAVE_DECL_VASPRINTF
12.20 + /* 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.4/210-arm-unbreak-armv4t.patch Sun May 16 19:41:53 2010 +0200
13.3 @@ -0,0 +1,14 @@
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 +
13.6 +diff -durN gcc-4.4.4.orig/gcc/config/arm/linux-eabi.h gcc-4.4.4/gcc/config/arm/linux-eabi.h
13.7 +--- gcc-4.4.4.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100
13.8 ++++ gcc-4.4.4/gcc/config/arm/linux-eabi.h 2010-05-16 19:13:00.000000000 +0200
13.9 +@@ -44,7 +44,7 @@
13.10 + The ARM10TDMI core is the default for armv5t, so set
13.11 + SUBTARGET_CPU_DEFAULT to achieve this. */
13.12 + #undef SUBTARGET_CPU_DEFAULT
13.13 +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
13.14 ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
13.15 +
13.16 + /* TARGET_BIG_ENDIAN_DEFAULT is set in
13.17 + 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.4/220-libiberty-pic.patch Sun May 16 19:41:53 2010 +0200
14.3 @@ -0,0 +1,13 @@
14.4 +diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in
14.5 +
14.6 +diff -durN gcc-4.4.4.orig/libiberty/Makefile.in gcc-4.4.4/libiberty/Makefile.in
14.7 +--- gcc-4.4.4.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200
14.8 ++++ gcc-4.4.4/libiberty/Makefile.in 2010-05-16 19:13:20.000000000 +0200
14.9 +@@ -227,6 +227,7 @@
14.10 + $(AR) $(AR_FLAGS) $(TARGETLIB) \
14.11 + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
14.12 + $(RANLIB) $(TARGETLIB); \
14.13 ++ cp $(TARGETLIB) ../ ; \
14.14 + cd ..; \
14.15 + else true; fi
14.16 +
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/patches/gcc/4.4.4/230-superh-default-multilib.patch Sun May 16 19:41:53 2010 +0200
15.3 @@ -0,0 +1,14 @@
15.4 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
15.5 +
15.6 +diff -durN gcc-4.4.4.orig/gcc/config.gcc gcc-4.4.4/gcc/config.gcc
15.7 +--- gcc-4.4.4.orig/gcc/config.gcc 2010-02-18 05:24:04.000000000 +0100
15.8 ++++ gcc-4.4.4/gcc/config.gcc 2010-05-16 19:13:30.000000000 +0200
15.9 +@@ -2128,7 +2128,7 @@
15.10 + if test x${sh_multilibs} = x ; then
15.11 + case ${target} in
15.12 + sh64-superh-linux* | \
15.13 +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
15.14 ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
15.15 + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
15.16 + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
15.17 + 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.4/240-libstdc++-pic.patch Sun May 16 19:41:53 2010 +0200
16.3 @@ -0,0 +1,55 @@
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 +
16.6 +diff -durN gcc-4.4.4.orig/libstdc++-v3/src/Makefile.am gcc-4.4.4/libstdc++-v3/src/Makefile.am
16.7 +--- gcc-4.4.4.orig/libstdc++-v3/src/Makefile.am 2009-08-26 21:04:11.000000000 +0200
16.8 ++++ gcc-4.4.4/libstdc++-v3/src/Makefile.am 2010-05-16 19:13:50.000000000 +0200
16.9 +@@ -356,6 +356,13 @@
16.10 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
16.11 +
16.12 +
16.13 ++install-exec-local:
16.14 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
16.15 ++ if [ x"$$pic_objs" != x ]; then \
16.16 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
16.17 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
16.18 ++ fi
16.19 ++
16.20 + # Added bits to build debug library.
16.21 + if GLIBCXX_BUILD_DEBUG
16.22 + all-local: build_debug
16.23 +diff -durN gcc-4.4.4.orig/libstdc++-v3/src/Makefile.in gcc-4.4.4/libstdc++-v3/src/Makefile.in
16.24 +--- gcc-4.4.4.orig/libstdc++-v3/src/Makefile.in 2009-08-26 21:04:11.000000000 +0200
16.25 ++++ gcc-4.4.4/libstdc++-v3/src/Makefile.in 2010-05-16 19:13:50.000000000 +0200
16.26 +@@ -726,7 +726,7 @@
16.27 +
16.28 + install-data-am: install-data-local
16.29 +
16.30 +-install-exec-am: install-toolexeclibLTLIBRARIES
16.31 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
16.32 +
16.33 + install-info: install-info-am
16.34 +
16.35 +@@ -765,7 +765,7 @@
16.36 + maintainer-clean-generic mostlyclean mostlyclean-compile \
16.37 + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
16.38 + tags uninstall uninstall-am uninstall-info-am \
16.39 +- uninstall-toolexeclibLTLIBRARIES
16.40 ++ uninstall-toolexeclibLTLIBRARIES install-exec-local
16.41 +
16.42 +
16.43 + # Symbol versioning for shared libraries.
16.44 +@@ -947,6 +947,14 @@
16.45 + install_debug:
16.46 + (cd ${debugdir} && $(MAKE) \
16.47 + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
16.48 ++
16.49 ++install-exec-local:
16.50 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
16.51 ++ if [ x"$$pic_objs" != x ]; then \
16.52 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
16.53 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
16.54 ++ fi
16.55 ++
16.56 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
16.57 + # Otherwise a system limit (for SysV at least) may be exceeded.
16.58 + .NOEXPORT:
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/patches/gcc/4.4.4/250-ia64-noteGNUstack.patch Sun May 16 19:41:53 2010 +0200
17.3 @@ -0,0 +1,81 @@
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 +
17.6 +diff -durN gcc-4.4.4.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.4/gcc/config/ia64/crtbegin.asm
17.7 +--- gcc-4.4.4.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200
17.8 ++++ gcc-4.4.4/gcc/config/ia64/crtbegin.asm 2010-05-16 19:13:59.000000000 +0200
17.9 +@@ -252,3 +252,7 @@
17.10 + .weak __cxa_finalize
17.11 + #endif
17.12 + .weak _Jv_RegisterClasses
17.13 ++
17.14 ++#ifdef __linux__
17.15 ++.section .note.GNU-stack; .previous
17.16 ++#endif
17.17 +diff -durN gcc-4.4.4.orig/gcc/config/ia64/crtend.asm gcc-4.4.4/gcc/config/ia64/crtend.asm
17.18 +--- gcc-4.4.4.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200
17.19 ++++ gcc-4.4.4/gcc/config/ia64/crtend.asm 2010-05-16 19:13:59.000000000 +0200
17.20 +@@ -119,3 +119,7 @@
17.21 +
17.22 + br.ret.sptk.many rp
17.23 + .endp __do_global_ctors_aux
17.24 ++
17.25 ++#ifdef __linux__
17.26 ++.section .note.GNU-stack; .previous
17.27 ++#endif
17.28 +diff -durN gcc-4.4.4.orig/gcc/config/ia64/crti.asm gcc-4.4.4/gcc/config/ia64/crti.asm
17.29 +--- gcc-4.4.4.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200
17.30 ++++ gcc-4.4.4/gcc/config/ia64/crti.asm 2010-05-16 19:13:59.000000000 +0200
17.31 +@@ -51,3 +51,7 @@
17.32 + .body
17.33 +
17.34 + # end of crti.asm
17.35 ++
17.36 ++#ifdef __linux__
17.37 ++.section .note.GNU-stack; .previous
17.38 ++#endif
17.39 +diff -durN gcc-4.4.4.orig/gcc/config/ia64/crtn.asm gcc-4.4.4/gcc/config/ia64/crtn.asm
17.40 +--- gcc-4.4.4.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200
17.41 ++++ gcc-4.4.4/gcc/config/ia64/crtn.asm 2010-05-16 19:13:59.000000000 +0200
17.42 +@@ -41,3 +41,7 @@
17.43 + br.ret.sptk.many b0
17.44 +
17.45 + # end of crtn.asm
17.46 ++
17.47 ++#ifdef __linux__
17.48 ++.section .note.GNU-stack; .previous
17.49 ++#endif
17.50 +diff -durN gcc-4.4.4.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.4/gcc/config/ia64/lib1funcs.asm
17.51 +--- gcc-4.4.4.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
17.52 ++++ gcc-4.4.4/gcc/config/ia64/lib1funcs.asm 2010-05-16 19:13:59.000000000 +0200
17.53 +@@ -793,3 +793,7 @@
17.54 + .endp __floattitf
17.55 + #endif
17.56 + #endif
17.57 ++
17.58 ++#ifdef __linux__
17.59 ++.section .note.GNU-stack; .previous
17.60 ++#endif
17.61 +diff -durN gcc-4.4.4.orig/gcc/config/ia64/linux.h gcc-4.4.4/gcc/config/ia64/linux.h
17.62 +--- gcc-4.4.4.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100
17.63 ++++ gcc-4.4.4/gcc/config/ia64/linux.h 2010-05-16 19:13:59.000000000 +0200
17.64 +@@ -5,6 +5,8 @@
17.65 +
17.66 + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
17.67 +
17.68 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
17.69 ++
17.70 + /* This is for -profile to use -lc_p instead of -lc. */
17.71 + #undef CC1_SPEC
17.72 + #define CC1_SPEC "%{profile:-p} %{G*}"
17.73 +diff -durN gcc-4.4.4.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.4/gcc/config/rs6000/ppc-asm.h
17.74 +--- gcc-4.4.4.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200
17.75 ++++ gcc-4.4.4/gcc/config/rs6000/ppc-asm.h 2010-05-16 19:13:59.000000000 +0200
17.76 +@@ -172,7 +172,7 @@
17.77 + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
17.78 + #endif
17.79 +
17.80 +-#if defined __linux__ && !defined __powerpc64__
17.81 ++#if defined __linux__
17.82 + .section .note.GNU-stack
17.83 + .previous
17.84 + #endif
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/patches/gcc/4.4.4/260-sh-libgcc-stacks.patch Sun May 16 19:41:53 2010 +0200
18.3 @@ -0,0 +1,27 @@
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 +
18.6 +diff -durN gcc-4.4.4.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.4/gcc/config/sh/lib1funcs.asm
18.7 +--- gcc-4.4.4.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
18.8 ++++ gcc-4.4.4/gcc/config/sh/lib1funcs.asm 2010-05-16 19:14:19.000000000 +0200
18.9 +@@ -30,6 +30,11 @@
18.10 + !! recoded in assembly by Toshiyasu Morita
18.11 + !! tm@netcom.com
18.12 +
18.13 ++#if defined(__ELF__) && defined(__linux__)
18.14 ++.section .note.GNU-stack,"",%progbits
18.15 ++.previous
18.16 ++#endif
18.17 ++
18.18 + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
18.19 + ELF local label prefixes by J"orn Rennecke
18.20 + amylaar@cygnus.com */
18.21 +diff -durN gcc-4.4.4.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.4/gcc/config/sh/linux-atomic.asm
18.22 +--- gcc-4.4.4.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200
18.23 ++++ gcc-4.4.4/gcc/config/sh/linux-atomic.asm 2010-05-16 19:14:19.000000000 +0200
18.24 +@@ -136,3 +136,6 @@
18.25 + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov)
18.26 +
18.27 + #endif /* ! __SH5__ */
18.28 ++
18.29 ++.section .note.GNU-stack,"",%progbits
18.30 ++.previous
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/patches/gcc/4.4.4/270-sh-pr24836.patch Sun May 16 19:41:53 2010 +0200
19.3 @@ -0,0 +1,26 @@
19.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
19.5 +
19.6 +diff -durN gcc-4.4.4.orig/gcc/configure gcc-4.4.4/gcc/configure
19.7 +--- gcc-4.4.4.orig/gcc/configure 2010-05-16 19:11:00.000000000 +0200
19.8 ++++ gcc-4.4.4/gcc/configure 2010-05-16 19:14:31.000000000 +0200
19.9 +@@ -22241,7 +22241,7 @@
19.10 + tls_first_minor=14
19.11 + tls_as_opt="-m64 -Aesame --fatal-warnings"
19.12 + ;;
19.13 +- sh-*-* | sh[34]-*-*)
19.14 ++ sh-*-* | sh[34]*-*-*)
19.15 + conftest_s='
19.16 + .section ".tdata","awT",@progbits
19.17 + foo: .long 25
19.18 +diff -durN gcc-4.4.4.orig/gcc/configure.ac gcc-4.4.4/gcc/configure.ac
19.19 +--- gcc-4.4.4.orig/gcc/configure.ac 2010-05-16 19:11:00.000000000 +0200
19.20 ++++ gcc-4.4.4/gcc/configure.ac 2010-05-16 19:14:31.000000000 +0200
19.21 +@@ -2684,7 +2684,7 @@
19.22 + tls_first_minor=14
19.23 + tls_as_opt="-m64 -Aesame --fatal-warnings"
19.24 + ;;
19.25 +- sh-*-* | sh[34]-*-*)
19.26 ++ sh-*-* | sh[34]*-*-*)
19.27 + conftest_s='
19.28 + .section ".tdata","awT",@progbits
19.29 + foo: .long 25
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/patches/gcc/4.4.4/280-freebsd.patch Sun May 16 19:41:53 2010 +0200
20.3 @@ -0,0 +1,96 @@
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 +
20.6 +diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h
20.7 +--- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200
20.8 ++++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200
20.9 +@@ -61,6 +61,8 @@
20.10 + builtin_assert ("system=unix"); \
20.11 + builtin_assert ("system=bsd"); \
20.12 + builtin_assert ("system=FreeBSD"); \
20.13 ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \
20.14 ++ builtin_define("_LONGLONG"); \
20.15 + FBSD_TARGET_CPU_CPP_BUILTINS(); \
20.16 + } \
20.17 + while (0)
20.18 +diff -durN gcc-4.4.4.orig/gcc/config/t-freebsd-eh gcc-4.4.4/gcc/config/t-freebsd-eh
20.19 +--- gcc-4.4.4.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100
20.20 ++++ gcc-4.4.4/gcc/config/t-freebsd-eh 2010-05-16 19:36:15.000000000 +0200
20.21 +@@ -0,0 +1,4 @@
20.22 ++# Use unwind-dw2-fde-glibc
20.23 ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
20.24 ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
20.25 ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
20.26 +diff -durN gcc-4.4.4.orig/gcc/config.gcc gcc-4.4.4/gcc/config.gcc
20.27 +--- gcc-4.4.4.orig/gcc/config.gcc 2010-05-16 19:13:30.000000000 +0200
20.28 ++++ gcc-4.4.4/gcc/config.gcc 2010-05-16 19:36:15.000000000 +0200
20.29 +@@ -456,7 +456,7 @@
20.30 + # pleases around the provided core setting.
20.31 + gas=yes
20.32 + gnu_ld=yes
20.33 +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
20.34 ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
20.35 + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
20.36 + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
20.37 + tmake_file="t-slibgcc-elf-ver t-freebsd"
20.38 +@@ -1042,6 +1042,10 @@
20.39 + ;;
20.40 + i[34567]86-*-freebsd*)
20.41 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
20.42 ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
20.43 ++ if test ${fbsd_major} -ge 7; then
20.44 ++ tmake_file="${tmake_file} t-freebsd-eh"
20.45 ++ fi
20.46 + ;;
20.47 + x86_64-*-freebsd*)
20.48 + 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.49 +diff -durN gcc-4.4.4.orig/gcc/crtstuff.c gcc-4.4.4/gcc/crtstuff.c
20.50 +--- gcc-4.4.4.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200
20.51 ++++ gcc-4.4.4/gcc/crtstuff.c 2010-05-16 19:36:15.000000000 +0200
20.52 +@@ -85,13 +85,15 @@
20.53 + && !defined(OBJECT_FORMAT_FLAT) \
20.54 + && defined(HAVE_LD_EH_FRAME_HDR) \
20.55 + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
20.56 +- && defined(__GLIBC__) && __GLIBC__ >= 2
20.57 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \
20.58 ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022))
20.59 + #include <link.h>
20.60 + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
20.61 + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */
20.62 + # if !defined(__UCLIBC__) \
20.63 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.64 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
20.65 ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.66 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
20.67 ++ || (__FreeBSD_version >= 700022)
20.68 + # define USE_PT_GNU_EH_FRAME
20.69 + # endif
20.70 + #endif
20.71 +diff -durN gcc-4.4.4.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.4/gcc/unwind-dw2-fde-glibc.c
20.72 +--- gcc-4.4.4.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200
20.73 ++++ gcc-4.4.4/gcc/unwind-dw2-fde-glibc.c 2010-05-16 19:36:15.000000000 +0200
20.74 +@@ -46,8 +46,9 @@
20.75 + #include "gthr.h"
20.76 +
20.77 + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
20.78 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.79 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
20.80 ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.81 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
20.82 ++ || (__FreeBSD_version >= 700022 ))
20.83 +
20.84 + #ifndef __RELOC_POINTER
20.85 + # define __RELOC_POINTER(ptr, base) ((ptr) + (base))
20.86 +@@ -63,6 +64,13 @@
20.87 + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
20.88 + #endif
20.89 +
20.90 ++/* Support FreeBSD */
20.91 ++#ifndef ElfW
20.92 ++# ifdef __ElfN
20.93 ++# define ElfW __ElfN
20.94 ++# endif
20.95 ++#endif
20.96 ++
20.97 + struct unw_eh_callback_data
20.98 + {
20.99 + _Unwind_Ptr pc;
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/patches/gcc/4.4.4/290-freebsd.patch Sun May 16 19:41:53 2010 +0200
21.3 @@ -0,0 +1,66 @@
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 +
21.6 +diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h
21.7 +--- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200
21.8 ++++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:21.000000000 +0200
21.9 +@@ -86,9 +86,10 @@
21.10 + #define FBSD_STARTFILE_SPEC \
21.11 + "%{!shared: \
21.12 + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
21.13 +- %{!p:%{profile:gcrt1.o%s} \
21.14 +- %{!profile:crt1.o%s}}}} \
21.15 +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
21.16 ++ %{!p:%{profile:gcrt1.o%s} \
21.17 ++ %{!profile:crt1.o%s}}}} \
21.18 ++ crti.o%s \
21.19 ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
21.20 +
21.21 + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
21.22 + the magical crtend.o file (see crtstuff.c) which provides part of
21.23 +@@ -126,7 +127,8 @@
21.24 + %{pg: -lc_p} \
21.25 + }"
21.26 + #else
21.27 +-#if FBSD_MAJOR < 5
21.28 ++#include <sys/param.h>
21.29 ++#if __FreeBSD_version < 500016
21.30 + #define FBSD_LIB_SPEC " \
21.31 + %{!shared: \
21.32 + %{!pg: \
21.33 +@@ -136,17 +138,34 @@
21.34 + %{!pthread:-lc_p} \
21.35 + %{pthread:-lc_r_p}} \
21.36 + }"
21.37 +-#else
21.38 ++#elif __FreeBSD_version < 700022
21.39 + #define FBSD_LIB_SPEC " \
21.40 + %{!shared: \
21.41 + %{!pg: %{pthread:-lpthread} -lc} \
21.42 + %{pg: %{pthread:-lpthread_p} -lc_p} \
21.43 + }"
21.44 ++#else
21.45 ++#define FBSD_LIB_SPEC " \
21.46 ++ %{!shared: \
21.47 ++ %{!pg: %{pthread:-lpthread} -lc} \
21.48 ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \
21.49 ++ %{shared: \
21.50 ++ %{pthread:-lpthread} -lc} \
21.51 ++ "
21.52 + #endif
21.53 + #endif
21.54 +
21.55 +-#if FBSD_MAJOR < 6
21.56 ++#if FBSD_MAJOR < 5
21.57 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
21.58 + #else
21.59 + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
21.60 + #endif
21.61 ++
21.62 ++#if defined(HAVE_LD_EH_FRAME_HDR)
21.63 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
21.64 ++#endif
21.65 ++
21.66 ++/* Use --as-needed -lgcc_s for eh support. */
21.67 ++#ifdef HAVE_LD_AS_NEEDED
21.68 ++#define USE_LD_AS_NEEDED 1
21.69 ++#endif
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/patches/gcc/4.4.4/300-uclibc-conf.patch Sun May 16 19:41:53 2010 +0200
22.3 @@ -0,0 +1,37 @@
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 +
22.6 +diff -durN gcc-4.4.4.orig/contrib/regression/objs-gcc.sh gcc-4.4.4/contrib/regression/objs-gcc.sh
22.7 +--- gcc-4.4.4.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200
22.8 ++++ gcc-4.4.4/contrib/regression/objs-gcc.sh 2010-05-16 19:36:36.000000000 +0200
22.9 +@@ -106,6 +106,10 @@
22.10 + then
22.11 + make all-gdb all-dejagnu all-ld || exit 1
22.12 + make install-gdb install-dejagnu install-ld || exit 1
22.13 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
22.14 ++ then
22.15 ++ make all-gdb all-dejagnu all-ld || exit 1
22.16 ++ make install-gdb install-dejagnu install-ld || exit 1
22.17 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
22.18 + make bootstrap || exit 1
22.19 + make install || exit 1
22.20 +diff -durN gcc-4.4.4.orig/libjava/classpath/ltconfig gcc-4.4.4/libjava/classpath/ltconfig
22.21 +--- gcc-4.4.4.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200
22.22 ++++ gcc-4.4.4/libjava/classpath/ltconfig 2010-05-16 19:36:36.000000000 +0200
22.23 +@@ -603,7 +603,7 @@
22.24 +
22.25 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
22.26 + case $host_os in
22.27 +-linux-gnu*) ;;
22.28 ++linux-gnu*|linux-uclibc*) ;;
22.29 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
22.30 + esac
22.31 +
22.32 +@@ -1251,7 +1251,7 @@
22.33 + ;;
22.34 +
22.35 + # This must be Linux ELF.
22.36 +-linux-gnu*)
22.37 ++linux*)
22.38 + version_type=linux
22.39 + need_lib_prefix=no
22.40 + need_version=no
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/patches/gcc/4.4.4/310-missing-execinfo_h.patch Sun May 16 19:41:53 2010 +0200
23.3 @@ -0,0 +1,14 @@
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 +
23.6 +diff -durN gcc-4.4.4.orig/boehm-gc/include/gc.h gcc-4.4.4/boehm-gc/include/gc.h
23.7 +--- gcc-4.4.4.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
23.8 ++++ gcc-4.4.4/boehm-gc/include/gc.h 2010-05-16 19:36:48.000000000 +0200
23.9 +@@ -503,7 +503,7 @@
23.10 + #if defined(__linux__) || defined(__GLIBC__)
23.11 + # include <features.h>
23.12 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
23.13 +- && !defined(__ia64__)
23.14 ++ && !defined(__ia64__) && !defined(__UCLIBC__)
23.15 + # ifndef GC_HAVE_BUILTIN_BACKTRACE
23.16 + # define GC_HAVE_BUILTIN_BACKTRACE
23.17 + # endif
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/patches/gcc/4.4.4/320-c99-snprintf.patch Sun May 16 19:41:53 2010 +0200
24.3 @@ -0,0 +1,14 @@
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 +
24.6 +diff -durN gcc-4.4.4.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.4/libstdc++-v3/include/c_global/cstdio
24.7 +--- gcc-4.4.4.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200
24.8 ++++ gcc-4.4.4/libstdc++-v3/include/c_global/cstdio 2010-05-16 19:37:06.000000000 +0200
24.9 +@@ -139,7 +139,7 @@
24.10 +
24.11 + _GLIBCXX_END_NAMESPACE
24.12 +
24.13 +-#if _GLIBCXX_USE_C99
24.14 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
24.15 +
24.16 + #undef snprintf
24.17 + #undef vfscanf
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/patches/gcc/4.4.4/330-libmudflap-susv3-legacy.patch Sun May 16 19:41:53 2010 +0200
25.3 @@ -0,0 +1,50 @@
25.4 +diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c
25.5 +
25.6 +diff -durN gcc-4.4.4.orig/libmudflap/mf-hooks2.c gcc-4.4.4/libmudflap/mf-hooks2.c
25.7 +--- gcc-4.4.4.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200
25.8 ++++ gcc-4.4.4/libmudflap/mf-hooks2.c 2010-05-16 19:37:18.000000000 +0200
25.9 +@@ -421,7 +421,7 @@
25.10 + {
25.11 + TRACE ("%s\n", __PRETTY_FUNCTION__);
25.12 + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
25.13 +- bzero (s, n);
25.14 ++ memset (s, 0, n);
25.15 + }
25.16 +
25.17 +
25.18 +@@ -431,7 +431,7 @@
25.19 + TRACE ("%s\n", __PRETTY_FUNCTION__);
25.20 + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
25.21 + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
25.22 +- bcopy (src, dest, n);
25.23 ++ memmove (dest, src, n);
25.24 + }
25.25 +
25.26 +
25.27 +@@ -441,7 +441,7 @@
25.28 + TRACE ("%s\n", __PRETTY_FUNCTION__);
25.29 + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
25.30 + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
25.31 +- return bcmp (s1, s2, n);
25.32 ++ return n == 0 ? 0 : memcmp (s1, s2, n);
25.33 + }
25.34 +
25.35 +
25.36 +@@ -450,7 +450,7 @@
25.37 + size_t n = strlen (s);
25.38 + TRACE ("%s\n", __PRETTY_FUNCTION__);
25.39 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
25.40 +- return index (s, c);
25.41 ++ return strchr (s, c);
25.42 + }
25.43 +
25.44 +
25.45 +@@ -459,7 +459,7 @@
25.46 + size_t n = strlen (s);
25.47 + TRACE ("%s\n", __PRETTY_FUNCTION__);
25.48 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
25.49 +- return rindex (s, c);
25.50 ++ return strrchr (s, c);
25.51 + }
25.52 +
25.53 + /* XXX: stpcpy, memccpy */
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26.2 +++ b/patches/gcc/4.4.4/340-ecjx-host-cc.patch Sun May 16 19:41:53 2010 +0200
26.3 @@ -0,0 +1,15 @@
26.4 +diff -ur gcc-4.4.1-orig/libjava/Makefile.in gcc-4.4.1/libjava/Makefile.in
26.5 +
26.6 +diff -durN gcc-4.4.4.orig/libjava/Makefile.in gcc-4.4.4/libjava/Makefile.in
26.7 +--- gcc-4.4.4.orig/libjava/Makefile.in 2010-04-29 10:26:54.000000000 +0200
26.8 ++++ gcc-4.4.4/libjava/Makefile.in 2010-05-16 19:37:38.000000000 +0200
26.9 +@@ -9270,6 +9270,9 @@
26.10 + ecjx$(EXEEXT): $(ecjx_OBJECTS) $(ecjx_DEPENDENCIES)
26.11 + @rm -f ecjx$(EXEEXT)
26.12 + $(ecjx_LINK) $(ecjx_LDFLAGS) $(ecjx_OBJECTS) $(ecjx_LDADD) $(LIBS)
26.13 ++ecjx.$(OBJEXT): $(ecjx_SOURCES)
26.14 ++ @rm -f ecjx.$(OBJEXT)
26.15 ++ $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c -o $@ $<
26.16 + gappletviewer$(EXEEXT): $(gappletviewer_OBJECTS) $(gappletviewer_DEPENDENCIES)
26.17 + @rm -f gappletviewer$(EXEEXT)
26.18 + $(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.4/350-index_macro.patch Sun May 16 19:41:53 2010 +0200
27.3 @@ -0,0 +1,34 @@
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 +
27.12 +diff -durN gcc-4.4.4.orig/libstdc++-v3/include/ext/rope gcc-4.4.4/libstdc++-v3/include/ext/rope
27.13 +--- gcc-4.4.4.orig/libstdc++-v3/include/ext/rope 2009-04-10 01:23:07.000000000 +0200
27.14 ++++ gcc-4.4.4/libstdc++-v3/include/ext/rope 2010-05-16 19:37:47.000000000 +0200
27.15 +@@ -54,6 +54,9 @@
27.16 + #include <bits/gthr.h>
27.17 + #include <tr1/functional>
27.18 +
27.19 ++/* cope w/ index defined as macro, SuSv3 proposal */
27.20 ++#undef index
27.21 ++
27.22 + # ifdef __GC
27.23 + # define __GC_CONST const
27.24 + # else
27.25 +diff -durN gcc-4.4.4.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.4.4/libstdc++-v3/include/ext/ropeimpl.h
27.26 +--- gcc-4.4.4.orig/libstdc++-v3/include/ext/ropeimpl.h 2009-04-10 01:23:07.000000000 +0200
27.27 ++++ gcc-4.4.4/libstdc++-v3/include/ext/ropeimpl.h 2010-05-16 19:37:47.000000000 +0200
27.28 +@@ -49,6 +49,9 @@
27.29 + #include <ext/memory> // For uninitialized_copy_n
27.30 + #include <ext/numeric> // For power
27.31 +
27.32 ++/* cope w/ index defined as macro, SuSv3 proposal */
27.33 ++#undef index
27.34 ++
27.35 + _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
27.36 +
27.37 + using std::size_t;
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/patches/gcc/4.4.4/360-arm-bigendian.patch Sun May 16 19:41:53 2010 +0200
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 +diff -durN gcc-4.4.4.orig/gcc/config/arm/linux-elf.h gcc-4.4.4/gcc/config/arm/linux-elf.h
28.10 +--- gcc-4.4.4.orig/gcc/config/arm/linux-elf.h 2009-02-20 16:20:38.000000000 +0100
28.11 ++++ gcc-4.4.4/gcc/config/arm/linux-elf.h 2010-05-16 19:38:07.000000000 +0200
28.12 +@@ -51,7 +51,7 @@
28.13 +
28.14 + #undef MULTILIB_DEFAULTS
28.15 + #define MULTILIB_DEFAULTS \
28.16 +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
28.17 ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
28.18 +
28.19 + /* Now we define the strings used to build the spec file. */
28.20 + #undef LIB_SPEC
28.21 +diff -durN gcc-4.4.4.orig/gcc/config.gcc gcc-4.4.4/gcc/config.gcc
28.22 +--- gcc-4.4.4.orig/gcc/config.gcc 2010-05-16 19:36:15.000000000 +0200
28.23 ++++ gcc-4.4.4/gcc/config.gcc 2010-05-16 19:38:07.000000000 +0200
28.24 +@@ -733,6 +733,11 @@
28.25 + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
28.26 + tmake_file="arm/t-arm arm/t-arm-elf"
28.27 + case ${target} in
28.28 ++ arm*b-*)
28.29 ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
28.30 ++ ;;
28.31 ++ esac
28.32 ++ case ${target} in
28.33 + arm*-*-uclinux*eabi)
28.34 + tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
28.35 + tmake_file="$tmake_file arm/t-bpabi"
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/patches/gcc/4.4.4/370-bootstrap-target_lib_path.patch Sun May 16 19:41:53 2010 +0200
29.3 @@ -0,0 +1,38 @@
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 -durN gcc-4.4.4.orig/Makefile.in gcc-4.4.4/Makefile.in
29.13 +--- gcc-4.4.4.orig/Makefile.in 2009-04-25 06:10:29.000000000 +0200
29.14 ++++ gcc-4.4.4/Makefile.in 2010-05-16 19:38:17.000000000 +0200
29.15 +@@ -245,7 +245,10 @@
29.16 + STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
29.17 + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
29.18 + WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
29.19 +- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
29.20 ++@if gcc-bootstrap
29.21 ++ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
29.22 ++@endif gcc-bootstrap
29.23 ++ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
29.24 +
29.25 + RAW_CXX_TARGET_EXPORTS = \
29.26 + $(BASE_TARGET_EXPORTS) \
29.27 +diff -durN gcc-4.4.4.orig/Makefile.tpl gcc-4.4.4/Makefile.tpl
29.28 +--- gcc-4.4.4.orig/Makefile.tpl 2009-04-14 10:57:33.000000000 +0200
29.29 ++++ gcc-4.4.4/Makefile.tpl 2010-05-16 19:38:17.000000000 +0200
29.30 +@@ -248,7 +248,10 @@
29.31 + STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
29.32 + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
29.33 + WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
29.34 +- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
29.35 ++@if gcc-bootstrap
29.36 ++ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
29.37 ++@endif gcc-bootstrap
29.38 ++ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
29.39 +
29.40 + RAW_CXX_TARGET_EXPORTS = \
29.41 + $(BASE_TARGET_EXPORTS) \
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/patches/gcc/4.4.4/380-powerpc-libgcc_s-link-libm.patch Sun May 16 19:41:53 2010 +0200
30.3 @@ -0,0 +1,137 @@
30.4 +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
30.5 +
30.6 +On glibc the libc.so carries a copy of the math function copysignl() but
30.7 +on uClibc math functions like copysignl() live in libm. Since libgcc_s
30.8 +contains unresolved symbols, any attempt to link against libgcc_s
30.9 +without explicitely specifying -lm fails, resulting in a broken
30.10 +bootstrap of the compiler.
30.11 +
30.12 +
30.13 +diff -rdup gcc-4.4.0.old/gcc/config/t-slibgcc-elf-ver gcc-4.4.0/gcc/config/t-slibgcc-elf-ver
30.14 +
30.15 +diff -durN gcc-4.4.4.orig/gcc/config/t-slibgcc-elf-ver gcc-4.4.4/gcc/config/t-slibgcc-elf-ver
30.16 +--- gcc-4.4.4.orig/gcc/config/t-slibgcc-elf-ver 2010-01-04 16:13:08.000000000 +0100
30.17 ++++ gcc-4.4.4/gcc/config/t-slibgcc-elf-ver 2010-05-16 19:38:36.000000000 +0200
30.18 +@@ -9,7 +9,7 @@
30.19 + SHLIB_OBJS = @shlib_objs@
30.20 + SHLIB_DIR = @multilib_dir@
30.21 + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
30.22 +-SHLIB_LC = -lc
30.23 ++SHLIB_LC = @libgcc_libm@ -lc
30.24 + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
30.25 + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
30.26 + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
30.27 +diff -durN gcc-4.4.4.orig/libgcc/Makefile.in gcc-4.4.4/libgcc/Makefile.in
30.28 +--- gcc-4.4.4.orig/libgcc/Makefile.in 2009-04-10 01:23:07.000000000 +0200
30.29 ++++ gcc-4.4.4/libgcc/Makefile.in 2010-05-16 19:38:36.000000000 +0200
30.30 +@@ -39,6 +39,7 @@
30.31 + decimal_float = @decimal_float@
30.32 + enable_decimal_float = @enable_decimal_float@
30.33 + fixed_point = @fixed_point@
30.34 ++LIBGCC_LIBM = @LIBGCC_LIBM@
30.35 +
30.36 + host_noncanonical = @host_noncanonical@
30.37 +
30.38 +@@ -787,9 +788,10 @@
30.39 + @multilib_dir@,$(MULTIDIR),$(subst \
30.40 + @shlib_objs@,$(objects),$(subst \
30.41 + @shlib_base_name@,libgcc_s,$(subst \
30.42 ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
30.43 + @shlib_map_file@,$(mapfile),$(subst \
30.44 + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
30.45 +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
30.46 ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
30.47 +
30.48 + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
30.49 + # @multilib_flags@ is still needed because this may use
30.50 +diff -durN gcc-4.4.4.orig/libgcc/configure gcc-4.4.4/libgcc/configure
30.51 +--- gcc-4.4.4.orig/libgcc/configure 2008-11-20 18:13:01.000000000 +0100
30.52 ++++ gcc-4.4.4/libgcc/configure 2010-05-16 19:38:36.000000000 +0200
30.53 +@@ -272,7 +272,7 @@
30.54 + PACKAGE_BUGREPORT=''
30.55 +
30.56 + ac_unique_file="static-object.mk"
30.57 +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
30.58 ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS libgcc_topdir enable_shared slibdir INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK build build_cpu build_vendor build_os host host_cpu host_vendor host_os host_noncanonical build_libsubdir build_subdir host_subdir target_subdir AR ac_ct_AR LIPO ac_ct_LIPO NM ac_ct_NM RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP decimal_float enable_decimal_float fixed_point vis_hide set_have_cc_tls LIBGCC_LIBM tmake_file extra_parts asm_hidden_op LIBOBJS LTLIBOBJS'
30.59 + ac_subst_files=''
30.60 + ac_pwd=`pwd`
30.61 +
30.62 +@@ -3547,6 +3547,39 @@
30.63 + fi
30.64 +
30.65 +
30.66 ++# On powerpc libgcc_s references copysignl which is a libm function but
30.67 ++# glibc apparently also provides it via libc as opposed to uClibc where
30.68 ++# it lives in libm.
30.69 ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5
30.70 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
30.71 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then
30.72 ++ echo $ECHO_N "(cached) $ECHO_C" >&6
30.73 ++else
30.74 ++
30.75 ++ echo '#include <features.h>' > conftest.c
30.76 ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
30.77 ++ libgcc_cv_copysignl_lib="-lc"
30.78 ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
30.79 ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30.80 ++ (eval $ac_try) 2>&5
30.81 ++ ac_status=$?
30.82 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
30.83 ++ (exit $ac_status); }; }
30.84 ++ then
30.85 ++ libgcc_cv_copysignl_lib="-lm"
30.86 ++ fi
30.87 ++ rm -f conftest.*
30.88 ++
30.89 ++fi
30.90 ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
30.91 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
30.92 ++
30.93 ++case /${libgcc_cv_copysignl_lib}/ in
30.94 ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
30.95 ++ *) LIBGCC_LIBM= ;;
30.96 ++esac
30.97 ++
30.98 ++
30.99 + # Conditionalize the makefile for this target machine.
30.100 + tmake_file_=
30.101 + for f in ${tmake_file}
30.102 +@@ -4267,6 +4300,7 @@
30.103 + s,@fixed_point@,$fixed_point,;t t
30.104 + s,@vis_hide@,$vis_hide,;t t
30.105 + s,@set_have_cc_tls@,$set_have_cc_tls,;t t
30.106 ++s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t
30.107 + s,@tmake_file@,$tmake_file,;t t
30.108 + s,@extra_parts@,$extra_parts,;t t
30.109 + s,@asm_hidden_op@,$asm_hidden_op,;t t
30.110 +diff -durN gcc-4.4.4.orig/libgcc/configure.ac gcc-4.4.4/libgcc/configure.ac
30.111 +--- gcc-4.4.4.orig/libgcc/configure.ac 2008-11-20 18:13:01.000000000 +0100
30.112 ++++ gcc-4.4.4/libgcc/configure.ac 2010-05-16 19:38:36.000000000 +0200
30.113 +@@ -223,6 +223,27 @@
30.114 + fi
30.115 + AC_SUBST(set_have_cc_tls)
30.116 +
30.117 ++# On powerpc libgcc_s references copysignl which is a libm function but
30.118 ++# glibc apparently also provides it via libc as opposed to uClibc where
30.119 ++# it lives in libm.
30.120 ++AC_CACHE_CHECK
30.121 ++ libgcc_cv_copysignl_lib,
30.122 ++ echo '#include <features.h>' > conftest.c
30.123 ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
30.124 ++ libgcc_cv_copysignl_lib="-lc"
30.125 ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
30.126 ++ then
30.127 ++ libgcc_cv_copysignl_lib="-lm"
30.128 ++ fi
30.129 ++ rm -f conftest.*
30.130 ++ ])
30.131 ++
30.132 ++case /${libgcc_cv_copysignl_lib}/ in
30.133 ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
30.134 ++ *) LIBGCC_LIBM= ;;
30.135 ++esac
30.136 ++AC_SUBST(LIBGCC_LIBM)
30.137 ++
30.138 + # Conditionalize the makefile for this target machine.
30.139 + tmake_file_=
30.140 + for f in ${tmake_file}