1.1 --- a/config/cc/gcc.in Fri Mar 23 01:36:42 2012 -0700
1.2 +++ b/config/cc/gcc.in Fri Mar 23 01:36:42 2012 -0700
1.3 @@ -109,6 +109,11 @@
1.4 depends on CC_GCC_SHOW_LINARO
1.5 select CC_GCC_4_4
1.6
1.7 +config CC_V_4_4_7
1.8 + bool
1.9 + prompt "4.4.7"
1.10 + select CC_GCC_4_4
1.11 +
1.12 config CC_V_4_4_6
1.13 bool
1.14 prompt "4.4.6"
1.15 @@ -363,6 +368,7 @@
1.16 default "4.5.1" if CC_V_4_5_1
1.17 default "4.5.0" if CC_V_4_5_0
1.18 default "linaro-4.4-2011.02-0" if CC_V_linaro_4_4_2011_02_0
1.19 + default "4.4.7" if CC_V_4_4_7
1.20 default "4.4.6" if CC_V_4_4_6
1.21 default "4.4.5" if CC_V_4_4_5
1.22 default "4.4.4" if CC_V_4_4_4
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/gcc/4.4.7/100-alpha-mieee-default.patch Fri Mar 23 01:36:42 2012 -0700
2.3 @@ -0,0 +1,24 @@
2.4 +diff -durN gcc-4.4.5.orig/gcc/config/alpha/alpha.h gcc-4.4.5/gcc/config/alpha/alpha.h
2.5 +--- gcc-4.4.5.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100
2.6 ++++ gcc-4.4.5/gcc/config/alpha/alpha.h 2010-10-09 22:57:31.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.5.orig/gcc/config/alpha/alpha.opt gcc-4.4.5/gcc/config/alpha/alpha.opt
2.17 +--- gcc-4.4.5.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
2.18 ++++ gcc-4.4.5/gcc/config/alpha/alpha.opt 2010-10-09 22:57:31.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.7/110-trampolinewarn.patch Fri Mar 23 01:36:42 2012 -0700
3.3 @@ -0,0 +1,27 @@
3.4 +diff -durN gcc-4.4.5.orig/gcc/builtins.c gcc-4.4.5/gcc/builtins.c
3.5 +--- gcc-4.4.5.orig/gcc/builtins.c 2010-03-22 16:00:20.000000000 +0100
3.6 ++++ gcc-4.4.5/gcc/builtins.c 2010-10-09 22:57:58.000000000 +0200
3.7 +@@ -5783,6 +5783,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.5.orig/gcc/common.opt gcc-4.4.5/gcc/common.opt
3.18 +--- gcc-4.4.5.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100
3.19 ++++ gcc-4.4.5/gcc/common.opt 2010-10-09 22:57:58.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.7/120-java-nomulti.patch Fri Mar 23 01:36:42 2012 -0700
4.3 @@ -0,0 +1,46 @@
4.4 +diff -durN gcc-4.4.5.orig/libjava/configure gcc-4.4.5/libjava/configure
4.5 +--- gcc-4.4.5.orig/libjava/configure 2010-10-01 10:26:18.000000000 +0200
4.6 ++++ gcc-4.4.5/libjava/configure 2010-10-09 22:58:04.000000000 +0200
4.7 +@@ -1022,6 +1022,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 +@@ -1974,6 +1976,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.5.orig/libjava/configure.ac gcc-4.4.5/libjava/configure.ac
4.34 +--- gcc-4.4.5.orig/libjava/configure.ac 2010-06-11 13:49:16.000000000 +0200
4.35 ++++ gcc-4.4.5/libjava/configure.ac 2010-10-09 22:58:04.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.7/130-cross-compile.patch Fri Mar 23 01:36:42 2012 -0700
5.3 @@ -0,0 +1,39 @@
5.4 +diff -durN gcc-4.4.5.orig/gcc/configure gcc-4.4.5/gcc/configure
5.5 +--- gcc-4.4.5.orig/gcc/configure 2010-06-20 17:43:53.000000000 +0200
5.6 ++++ gcc-4.4.5/gcc/configure 2010-10-09 22:58:36.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.5.orig/gcc/configure.ac gcc-4.4.5/gcc/configure.ac
5.17 +--- gcc-4.4.5.orig/gcc/configure.ac 2010-06-20 17:43:53.000000000 +0200
5.18 ++++ gcc-4.4.5/gcc/configure.ac 2010-10-09 22:58:36.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.5.orig/gcc/unwind-dw2.c gcc-4.4.5/gcc/unwind-dw2.c
5.29 +--- gcc-4.4.5.orig/gcc/unwind-dw2.c 2010-01-20 09:39:18.000000000 +0100
5.30 ++++ gcc-4.4.5/gcc/unwind-dw2.c 2010-10-09 22:58:36.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.7/140-default-format-security.patch Fri Mar 23 01:36:42 2012 -0700
6.3 @@ -0,0 +1,49 @@
6.4 +diff -durN gcc-4.4.5.orig/gcc/c-common.c gcc-4.4.5/gcc/c-common.c
6.5 +--- gcc-4.4.5.orig/gcc/c-common.c 2010-07-27 15:07:28.000000000 +0200
6.6 ++++ gcc-4.4.5/gcc/c-common.c 2010-10-09 22:59:03.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.5.orig/gcc/c.opt gcc-4.4.5/gcc/c.opt
6.17 +--- gcc-4.4.5.orig/gcc/c.opt 2009-09-18 23:53:23.000000000 +0200
6.18 ++++ gcc-4.4.5/gcc/c.opt 2010-10-09 22:59:03.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.5.orig/gcc/doc/invoke.texi gcc-4.4.5/gcc/doc/invoke.texi
6.29 +--- gcc-4.4.5.orig/gcc/doc/invoke.texi 2010-09-08 20:13:03.000000000 +0200
6.30 ++++ gcc-4.4.5/gcc/doc/invoke.texi 2010-10-09 22:59:03.000000000 +0200
6.31 +@@ -2888,6 +2888,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 +@@ -2941,6 +2944,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.7/150-default-fortify-source.patch Fri Mar 23 01:36:42 2012 -0700
7.3 @@ -0,0 +1,26 @@
7.4 +diff -durN gcc-4.4.5.orig/gcc/doc/invoke.texi gcc-4.4.5/gcc/doc/invoke.texi
7.5 +--- gcc-4.4.5.orig/gcc/doc/invoke.texi 2010-10-09 22:59:03.000000000 +0200
7.6 ++++ gcc-4.4.5/gcc/doc/invoke.texi 2010-10-09 22:59:33.000000000 +0200
7.7 +@@ -5432,6 +5432,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.5.orig/gcc/gcc.c gcc-4.4.5/gcc/gcc.c
7.20 +--- gcc-4.4.5.orig/gcc/gcc.c 2010-01-09 01:05:06.000000000 +0100
7.21 ++++ gcc-4.4.5/gcc/gcc.c 2010-10-09 22:59:33.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.7/160-netbsd-symbolic.patch Fri Mar 23 01:36:42 2012 -0700
8.3 @@ -0,0 +1,11 @@
8.4 +diff -durN gcc-4.4.5.orig/gcc/config/netbsd-elf.h gcc-4.4.5/gcc/config/netbsd-elf.h
8.5 +--- gcc-4.4.5.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
8.6 ++++ gcc-4.4.5/gcc/config/netbsd-elf.h 2010-10-09 22:59:57.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.7/170-sparc64-bsd.patch Fri Mar 23 01:36:42 2012 -0700
9.3 @@ -0,0 +1,29 @@
9.4 +diff -durN gcc-4.4.5.orig/gcc/config/sparc/freebsd.h gcc-4.4.5/gcc/config/sparc/freebsd.h
9.5 +--- gcc-4.4.5.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
9.6 ++++ gcc-4.4.5/gcc/config/sparc/freebsd.h 2010-10-09 23:00:03.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.7/180-libgomp-no-werror.patch Fri Mar 23 01:36:42 2012 -0700
10.3 @@ -0,0 +1,12 @@
10.4 +diff -durN gcc-4.4.5.orig/libgomp/configure gcc-4.4.5/libgomp/configure
10.5 +--- gcc-4.4.5.orig/libgomp/configure 2010-10-01 10:26:18.000000000 +0200
10.6 ++++ gcc-4.4.5/libgomp/configure 2010-10-09 23:00:33.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.7/190-flatten-switch-stmt-00.patch Fri Mar 23 01:36:42 2012 -0700
11.3 @@ -0,0 +1,24 @@
11.4 +diff -durN gcc-4.4.5.orig/gcc/stmt.c gcc-4.4.5/gcc/stmt.c
11.5 +--- gcc-4.4.5.orig/gcc/stmt.c 2010-03-08 12:46:28.000000000 +0100
11.6 ++++ gcc-4.4.5/gcc/stmt.c 2010-10-09 23:01:01.000000000 +0200
11.7 +@@ -2377,7 +2377,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 +@@ -2943,6 +2947,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.7/200-libiberty.h-asprintf.patch Fri Mar 23 01:36:42 2012 -0700
12.3 @@ -0,0 +1,15 @@
12.4 +diff -durN gcc-4.4.5.orig/include/libiberty.h gcc-4.4.5/include/libiberty.h
12.5 +--- gcc-4.4.5.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200
12.6 ++++ gcc-4.4.5/include/libiberty.h 2010-10-09 23:01:30.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.7/210-arm-unbreak-armv4t.patch Fri Mar 23 01:36:42 2012 -0700
13.3 @@ -0,0 +1,12 @@
13.4 +diff -durN gcc-4.4.5.orig/gcc/config/arm/linux-eabi.h gcc-4.4.5/gcc/config/arm/linux-eabi.h
13.5 +--- gcc-4.4.5.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100
13.6 ++++ gcc-4.4.5/gcc/config/arm/linux-eabi.h 2010-10-09 23:01:59.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.7/220-libiberty-pic.patch Fri Mar 23 01:36:42 2012 -0700
14.3 @@ -0,0 +1,11 @@
14.4 +diff -durN gcc-4.4.5.orig/libiberty/Makefile.in gcc-4.4.5/libiberty/Makefile.in
14.5 +--- gcc-4.4.5.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200
14.6 ++++ gcc-4.4.5/libiberty/Makefile.in 2010-10-09 23:02:28.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.7/230-superh-default-multilib.patch Fri Mar 23 01:36:42 2012 -0700
15.3 @@ -0,0 +1,12 @@
15.4 +diff -durN gcc-4.4.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc
15.5 +--- gcc-4.4.5.orig/gcc/config.gcc 2010-06-14 00:16:50.000000000 +0200
15.6 ++++ gcc-4.4.5/gcc/config.gcc 2010-10-09 23:02:56.000000000 +0200
15.7 +@@ -2140,7 +2140,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.7/240-libstdc++-pic.patch Fri Mar 23 01:36:42 2012 -0700
16.3 @@ -0,0 +1,53 @@
16.4 +diff -durN gcc-4.4.5.orig/libstdc++-v3/src/Makefile.am gcc-4.4.5/libstdc++-v3/src/Makefile.am
16.5 +--- gcc-4.4.5.orig/libstdc++-v3/src/Makefile.am 2009-08-26 21:04:11.000000000 +0200
16.6 ++++ gcc-4.4.5/libstdc++-v3/src/Makefile.am 2010-10-09 23:03:26.000000000 +0200
16.7 +@@ -356,6 +356,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.5.orig/libstdc++-v3/src/Makefile.in gcc-4.4.5/libstdc++-v3/src/Makefile.in
16.22 +--- gcc-4.4.5.orig/libstdc++-v3/src/Makefile.in 2009-08-26 21:04:11.000000000 +0200
16.23 ++++ gcc-4.4.5/libstdc++-v3/src/Makefile.in 2010-10-09 23:03:26.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 +@@ -947,6 +947,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.7/250-ia64-noteGNUstack.patch Fri Mar 23 01:36:42 2012 -0700
17.3 @@ -0,0 +1,79 @@
17.4 +diff -durN gcc-4.4.5.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.5/gcc/config/ia64/crtbegin.asm
17.5 +--- gcc-4.4.5.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200
17.6 ++++ gcc-4.4.5/gcc/config/ia64/crtbegin.asm 2010-10-09 23:03:55.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.5.orig/gcc/config/ia64/crtend.asm gcc-4.4.5/gcc/config/ia64/crtend.asm
17.16 +--- gcc-4.4.5.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200
17.17 ++++ gcc-4.4.5/gcc/config/ia64/crtend.asm 2010-10-09 23:03:55.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.5.orig/gcc/config/ia64/crti.asm gcc-4.4.5/gcc/config/ia64/crti.asm
17.27 +--- gcc-4.4.5.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200
17.28 ++++ gcc-4.4.5/gcc/config/ia64/crti.asm 2010-10-09 23:03:55.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.5.orig/gcc/config/ia64/crtn.asm gcc-4.4.5/gcc/config/ia64/crtn.asm
17.38 +--- gcc-4.4.5.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200
17.39 ++++ gcc-4.4.5/gcc/config/ia64/crtn.asm 2010-10-09 23:03:55.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.5.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.5/gcc/config/ia64/lib1funcs.asm
17.49 +--- gcc-4.4.5.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
17.50 ++++ gcc-4.4.5/gcc/config/ia64/lib1funcs.asm 2010-10-09 23:03:55.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.5.orig/gcc/config/ia64/linux.h gcc-4.4.5/gcc/config/ia64/linux.h
17.60 +--- gcc-4.4.5.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100
17.61 ++++ gcc-4.4.5/gcc/config/ia64/linux.h 2010-10-09 23:03:55.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.5.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.5/gcc/config/rs6000/ppc-asm.h
17.72 +--- gcc-4.4.5.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200
17.73 ++++ gcc-4.4.5/gcc/config/rs6000/ppc-asm.h 2010-10-09 23:03:55.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.7/260-sh-libgcc-stacks.patch Fri Mar 23 01:36:42 2012 -0700
18.3 @@ -0,0 +1,25 @@
18.4 +diff -durN gcc-4.4.5.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.5/gcc/config/sh/lib1funcs.asm
18.5 +--- gcc-4.4.5.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
18.6 ++++ gcc-4.4.5/gcc/config/sh/lib1funcs.asm 2010-10-09 23:04:22.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.5.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.5/gcc/config/sh/linux-atomic.asm
18.20 +--- gcc-4.4.5.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200
18.21 ++++ gcc-4.4.5/gcc/config/sh/linux-atomic.asm 2010-10-09 23:04:22.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.7/270-sh-pr24836.patch Fri Mar 23 01:36:42 2012 -0700
19.3 @@ -0,0 +1,24 @@
19.4 +diff -durN gcc-4.4.5.orig/gcc/configure gcc-4.4.5/gcc/configure
19.5 +--- gcc-4.4.5.orig/gcc/configure 2010-10-09 22:58:36.000000000 +0200
19.6 ++++ gcc-4.4.5/gcc/configure 2010-10-09 23:04:50.000000000 +0200
19.7 +@@ -22285,7 +22285,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.5.orig/gcc/configure.ac gcc-4.4.5/gcc/configure.ac
19.17 +--- gcc-4.4.5.orig/gcc/configure.ac 2010-10-09 22:58:36.000000000 +0200
19.18 ++++ gcc-4.4.5/gcc/configure.ac 2010-10-09 23:04:50.000000000 +0200
19.19 +@@ -2728,7 +2728,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.7/280-freebsd.patch Fri Mar 23 01:36:42 2012 -0700
20.3 @@ -0,0 +1,94 @@
20.4 +diff -durN gcc-4.4.5.orig/gcc/config/freebsd-spec.h gcc-4.4.5/gcc/config/freebsd-spec.h
20.5 +--- gcc-4.4.5.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200
20.6 ++++ gcc-4.4.5/gcc/config/freebsd-spec.h 2010-10-09 23:09:53.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.5.orig/gcc/config/t-freebsd-eh gcc-4.4.5/gcc/config/t-freebsd-eh
20.17 +--- gcc-4.4.5.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100
20.18 ++++ gcc-4.4.5/gcc/config/t-freebsd-eh 2010-10-09 23:09:53.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.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc
20.25 +--- gcc-4.4.5.orig/gcc/config.gcc 2010-10-09 23:02:56.000000000 +0200
20.26 ++++ gcc-4.4.5/gcc/config.gcc 2010-10-09 23:09:53.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 +@@ -1048,6 +1048,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.5.orig/gcc/crtstuff.c gcc-4.4.5/gcc/crtstuff.c
20.48 +--- gcc-4.4.5.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200
20.49 ++++ gcc-4.4.5/gcc/crtstuff.c 2010-10-09 23:09:53.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.5.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.5/gcc/unwind-dw2-fde-glibc.c
20.70 +--- gcc-4.4.5.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200
20.71 ++++ gcc-4.4.5/gcc/unwind-dw2-fde-glibc.c 2010-10-09 23:09:53.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.7/290-freebsd.patch Fri Mar 23 01:36:42 2012 -0700
21.3 @@ -0,0 +1,64 @@
21.4 +diff -durN gcc-4.4.5.orig/gcc/config/freebsd-spec.h gcc-4.4.5/gcc/config/freebsd-spec.h
21.5 +--- gcc-4.4.5.orig/gcc/config/freebsd-spec.h 2010-10-09 23:09:53.000000000 +0200
21.6 ++++ gcc-4.4.5/gcc/config/freebsd-spec.h 2010-10-09 23:10:02.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.7/300-uclibc-conf.patch Fri Mar 23 01:36:42 2012 -0700
22.3 @@ -0,0 +1,35 @@
22.4 +diff -durN gcc-4.4.5.orig/contrib/regression/objs-gcc.sh gcc-4.4.5/contrib/regression/objs-gcc.sh
22.5 +--- gcc-4.4.5.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200
22.6 ++++ gcc-4.4.5/contrib/regression/objs-gcc.sh 2010-10-09 23:10:32.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.5.orig/libjava/classpath/ltconfig gcc-4.4.5/libjava/classpath/ltconfig
22.19 +--- gcc-4.4.5.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200
22.20 ++++ gcc-4.4.5/libjava/classpath/ltconfig 2010-10-09 23:10:32.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.7/310-missing-execinfo_h.patch Fri Mar 23 01:36:42 2012 -0700
23.3 @@ -0,0 +1,12 @@
23.4 +diff -durN gcc-4.4.5.orig/boehm-gc/include/gc.h gcc-4.4.5/boehm-gc/include/gc.h
23.5 +--- gcc-4.4.5.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
23.6 ++++ gcc-4.4.5/boehm-gc/include/gc.h 2010-10-09 23:11:00.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.7/320-c99-snprintf.patch Fri Mar 23 01:36:42 2012 -0700
24.3 @@ -0,0 +1,12 @@
24.4 +diff -durN gcc-4.4.5.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.5/libstdc++-v3/include/c_global/cstdio
24.5 +--- gcc-4.4.5.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200
24.6 ++++ gcc-4.4.5/libstdc++-v3/include/c_global/cstdio 2010-10-09 23:11:27.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.7/330-libmudflap-susv3-legacy.patch Fri Mar 23 01:36:42 2012 -0700
25.3 @@ -0,0 +1,48 @@
25.4 +diff -durN gcc-4.4.5.orig/libmudflap/mf-hooks2.c gcc-4.4.5/libmudflap/mf-hooks2.c
25.5 +--- gcc-4.4.5.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200
25.6 ++++ gcc-4.4.5/libmudflap/mf-hooks2.c 2010-10-09 23:11:52.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.7/340-ecjx-host-cc.patch Fri Mar 23 01:36:42 2012 -0700
26.3 @@ -0,0 +1,13 @@
26.4 +diff -durN gcc-4.4.5.orig/libjava/Makefile.in gcc-4.4.5/libjava/Makefile.in
26.5 +--- gcc-4.4.5.orig/libjava/Makefile.in 2010-10-01 10:26:18.000000000 +0200
26.6 ++++ gcc-4.4.5/libjava/Makefile.in 2010-10-09 23:12:22.000000000 +0200
26.7 +@@ -9180,6 +9180,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.7/350-index_macro.patch Fri Mar 23 01:36:42 2012 -0700
27.3 @@ -0,0 +1,30 @@
27.4 +-= BEGIN original header =-
27.5 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_304-index_macro.patch
27.6 +-= END original header =-
27.7 +
27.8 +diff -durN gcc-4.4.5.orig/libstdc++-v3/include/ext/rope gcc-4.4.5/libstdc++-v3/include/ext/rope
27.9 +--- gcc-4.4.5.orig/libstdc++-v3/include/ext/rope 2009-04-10 01:23:07.000000000 +0200
27.10 ++++ gcc-4.4.5/libstdc++-v3/include/ext/rope 2010-10-09 23:12:51.000000000 +0200
27.11 +@@ -54,6 +54,9 @@
27.12 + #include <bits/gthr.h>
27.13 + #include <tr1/functional>
27.14 +
27.15 ++/* cope w/ index defined as macro, SuSv3 proposal */
27.16 ++#undef index
27.17 ++
27.18 + # ifdef __GC
27.19 + # define __GC_CONST const
27.20 + # else
27.21 +diff -durN gcc-4.4.5.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.4.5/libstdc++-v3/include/ext/ropeimpl.h
27.22 +--- gcc-4.4.5.orig/libstdc++-v3/include/ext/ropeimpl.h 2009-04-10 01:23:07.000000000 +0200
27.23 ++++ gcc-4.4.5/libstdc++-v3/include/ext/ropeimpl.h 2010-10-09 23:12:51.000000000 +0200
27.24 +@@ -49,6 +49,9 @@
27.25 + #include <ext/memory> // For uninitialized_copy_n
27.26 + #include <ext/numeric> // For power
27.27 +
27.28 ++/* cope w/ index defined as macro, SuSv3 proposal */
27.29 ++#undef index
27.30 ++
27.31 + _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
27.32 +
27.33 + using std::size_t;
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/patches/gcc/4.4.7/360-arm-bigendian.patch Fri Mar 23 01:36:42 2012 -0700
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.5.orig/gcc/config/arm/linux-elf.h gcc-4.4.5/gcc/config/arm/linux-elf.h
28.10 +--- gcc-4.4.5.orig/gcc/config/arm/linux-elf.h 2009-02-20 16:20:38.000000000 +0100
28.11 ++++ gcc-4.4.5/gcc/config/arm/linux-elf.h 2010-10-09 23:13:21.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.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc
28.22 +--- gcc-4.4.5.orig/gcc/config.gcc 2010-10-09 23:09:53.000000000 +0200
28.23 ++++ gcc-4.4.5/gcc/config.gcc 2010-10-09 23:13:21.000000000 +0200
28.24 +@@ -739,6 +739,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.7/370-bootstrap-target_lib_path.patch Fri Mar 23 01:36:42 2012 -0700
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.5.orig/Makefile.in gcc-4.4.5/Makefile.in
29.13 +--- gcc-4.4.5.orig/Makefile.in 2009-04-25 06:10:29.000000000 +0200
29.14 ++++ gcc-4.4.5/Makefile.in 2010-10-09 23:13:50.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.5.orig/Makefile.tpl gcc-4.4.5/Makefile.tpl
29.28 +--- gcc-4.4.5.orig/Makefile.tpl 2009-04-14 10:57:33.000000000 +0200
29.29 ++++ gcc-4.4.5/Makefile.tpl 2010-10-09 23:13:50.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.7/380-powerpc-libgcc_s-link-libm.patch Fri Mar 23 01:36:42 2012 -0700
30.3 @@ -0,0 +1,134 @@
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 +contains unresolved symbols, any attempt to link against libgcc_s
30.8 +without explicitely specifying -lm fails, resulting in a broken
30.9 +bootstrap of the compiler.
30.10 +
30.11 +
30.12 +diff -durN gcc-4.4.5.orig/gcc/config/t-slibgcc-elf-ver gcc-4.4.5/gcc/config/t-slibgcc-elf-ver
30.13 +--- gcc-4.4.5.orig/gcc/config/t-slibgcc-elf-ver 2010-01-04 16:13:08.000000000 +0100
30.14 ++++ gcc-4.4.5/gcc/config/t-slibgcc-elf-ver 2010-10-09 23:14:18.000000000 +0200
30.15 +@@ -9,7 +9,7 @@
30.16 + SHLIB_OBJS = @shlib_objs@
30.17 + SHLIB_DIR = @multilib_dir@
30.18 + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
30.19 +-SHLIB_LC = -lc
30.20 ++SHLIB_LC = @libgcc_libm@ -lc
30.21 + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
30.22 + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
30.23 + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
30.24 +diff -durN gcc-4.4.5.orig/libgcc/configure gcc-4.4.5/libgcc/configure
30.25 +--- gcc-4.4.5.orig/libgcc/configure 2008-11-20 18:13:01.000000000 +0100
30.26 ++++ gcc-4.4.5/libgcc/configure 2010-10-09 23:14:18.000000000 +0200
30.27 +@@ -272,7 +272,7 @@
30.28 + PACKAGE_BUGREPORT=''
30.29 +
30.30 + ac_unique_file="static-object.mk"
30.31 +-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.32 ++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.33 + ac_subst_files=''
30.34 + ac_pwd=`pwd`
30.35 +
30.36 +@@ -3547,6 +3547,39 @@
30.37 + fi
30.38 +
30.39 +
30.40 ++# On powerpc libgcc_s references copysignl which is a libm function but
30.41 ++# glibc apparently also provides it via libc as opposed to uClibc where
30.42 ++# it lives in libm.
30.43 ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5
30.44 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
30.45 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then
30.46 ++ echo $ECHO_N "(cached) $ECHO_C" >&6
30.47 ++else
30.48 ++
30.49 ++ echo '#include <features.h>' > conftest.c
30.50 ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
30.51 ++ libgcc_cv_copysignl_lib="-lc"
30.52 ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
30.53 ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
30.54 ++ (eval $ac_try) 2>&5
30.55 ++ ac_status=$?
30.56 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
30.57 ++ (exit $ac_status); }; }
30.58 ++ then
30.59 ++ libgcc_cv_copysignl_lib="-lm"
30.60 ++ fi
30.61 ++ rm -f conftest.*
30.62 ++
30.63 ++fi
30.64 ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5
30.65 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6
30.66 ++
30.67 ++case /${libgcc_cv_copysignl_lib}/ in
30.68 ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
30.69 ++ *) LIBGCC_LIBM= ;;
30.70 ++esac
30.71 ++
30.72 ++
30.73 + # Conditionalize the makefile for this target machine.
30.74 + tmake_file_=
30.75 + for f in ${tmake_file}
30.76 +@@ -4267,6 +4300,7 @@
30.77 + s,@fixed_point@,$fixed_point,;t t
30.78 + s,@vis_hide@,$vis_hide,;t t
30.79 + s,@set_have_cc_tls@,$set_have_cc_tls,;t t
30.80 ++s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t
30.81 + s,@tmake_file@,$tmake_file,;t t
30.82 + s,@extra_parts@,$extra_parts,;t t
30.83 + s,@asm_hidden_op@,$asm_hidden_op,;t t
30.84 +diff -durN gcc-4.4.5.orig/libgcc/configure.ac gcc-4.4.5/libgcc/configure.ac
30.85 +--- gcc-4.4.5.orig/libgcc/configure.ac 2008-11-20 18:13:01.000000000 +0100
30.86 ++++ gcc-4.4.5/libgcc/configure.ac 2010-10-09 23:14:18.000000000 +0200
30.87 +@@ -223,6 +223,27 @@
30.88 + fi
30.89 + AC_SUBST(set_have_cc_tls)
30.90 +
30.91 ++# On powerpc libgcc_s references copysignl which is a libm function but
30.92 ++# glibc apparently also provides it via libc as opposed to uClibc where
30.93 ++# it lives in libm.
30.94 ++AC_CACHE_CHECK
30.95 ++ libgcc_cv_copysignl_lib,
30.96 ++ echo '#include <features.h>' > conftest.c
30.97 ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c
30.98 ++ libgcc_cv_copysignl_lib="-lc"
30.99 ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD)
30.100 ++ then
30.101 ++ libgcc_cv_copysignl_lib="-lm"
30.102 ++ fi
30.103 ++ rm -f conftest.*
30.104 ++ ])
30.105 ++
30.106 ++case /${libgcc_cv_copysignl_lib}/ in
30.107 ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;;
30.108 ++ *) LIBGCC_LIBM= ;;
30.109 ++esac
30.110 ++AC_SUBST(LIBGCC_LIBM)
30.111 ++
30.112 + # Conditionalize the makefile for this target machine.
30.113 + tmake_file_=
30.114 + for f in ${tmake_file}
30.115 +diff -durN gcc-4.4.5.orig/libgcc/Makefile.in gcc-4.4.5/libgcc/Makefile.in
30.116 +--- gcc-4.4.5.orig/libgcc/Makefile.in 2009-04-10 01:23:07.000000000 +0200
30.117 ++++ gcc-4.4.5/libgcc/Makefile.in 2010-10-09 23:14:18.000000000 +0200
30.118 +@@ -39,6 +39,7 @@
30.119 + decimal_float = @decimal_float@
30.120 + enable_decimal_float = @enable_decimal_float@
30.121 + fixed_point = @fixed_point@
30.122 ++LIBGCC_LIBM = @LIBGCC_LIBM@
30.123 +
30.124 + host_noncanonical = @host_noncanonical@
30.125 +
30.126 +@@ -787,9 +788,10 @@
30.127 + @multilib_dir@,$(MULTIDIR),$(subst \
30.128 + @shlib_objs@,$(objects),$(subst \
30.129 + @shlib_base_name@,libgcc_s,$(subst \
30.130 ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
30.131 + @shlib_map_file@,$(mapfile),$(subst \
30.132 + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
30.133 +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
30.134 ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
30.135 +
30.136 + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
30.137 + # @multilib_flags@ is still needed because this may use
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/patches/gcc/4.4.7/390-arm-softfloat-libgcc.patch Fri Mar 23 01:36:42 2012 -0700
31.3 @@ -0,0 +1,38 @@
31.4 +[PATCH] add the correct symbols to libgcc for uclibc arm softfloat
31.5 +
31.6 +Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
31.7 +---
31.8 + gcc/config/arm/linux-elf.h | 2 +-
31.9 + gcc/config/arm/t-linux | 6 +++++-
31.10 + 2 files changed, 6 insertions(+), 2 deletions(-)
31.11 +
31.12 +Index: gcc-4.4.0/gcc/config/arm/t-linux
31.13 +===================================================================
31.14 +--- gcc-4.4.0.orig/gcc/config/arm/t-linux
31.15 ++++ gcc-4.4.0/gcc/config/arm/t-linux
31.16 +@@ -4,7 +4,11 @@
31.17 +
31.18 + LIB1ASMSRC = arm/lib1funcs.asm
31.19 + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
31.20 +- _arm_addsubdf3 _arm_addsubsf3
31.21 ++ _arm_addsubdf3 _arm_addsubsf3 \
31.22 ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
31.23 ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
31.24 ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
31.25 ++ _arm_fixsfsi _arm_fixunssfsi
31.26 +
31.27 + # MULTILIB_OPTIONS = mhard-float/msoft-float
31.28 + # MULTILIB_DIRNAMES = hard-float soft-float
31.29 +Index: gcc-4.4.0/gcc/config/arm/linux-elf.h
31.30 +===================================================================
31.31 +--- gcc-4.4.0.orig/gcc/config/arm/linux-elf.h
31.32 ++++ gcc-4.4.0/gcc/config/arm/linux-elf.h
31.33 +@@ -60,7 +60,7 @@
31.34 + %{shared:-lc} \
31.35 + %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
31.36 +
31.37 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
31.38 ++#define LIBGCC_SPEC "-lgcc"
31.39 +
31.40 + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
31.41 +
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/patches/gcc/4.4.7/400-pr42289-fix-libffi-build-on-arm-oabi.patch Fri Mar 23 01:36:42 2012 -0700
32.3 @@ -0,0 +1,11 @@
32.4 +--- gcc-4.3.4/libffi/src/arm/sysv.S
32.5 ++++ gcc-4.3.4/libffi/src/arm/sysv.S
32.6 +@@ -235,7 +235,7 @@ ARM_FUNC_START ffi_closure_SYSV
32.7 + stmfd sp!, {ip, lr}
32.8 + UNWIND .save {r0, lr}
32.9 + add r2, sp, #8
32.10 +- .pad #16
32.11 ++ UNWIND .pad #16
32.12 + sub sp, sp, #16
32.13 + str sp, [sp, #8]
32.14 + add r1, sp, #8
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/patches/gcc/4.4.7/410-libgcc_eh.a.patch Fri Mar 23 01:36:42 2012 -0700
33.3 @@ -0,0 +1,39 @@
33.4 +Highly inspired by:
33.5 + http://landley.net/hg/aboriginal/file/7e0747a665ab/sources/patches/gcc-core-libgcceh.patch
33.6 +
33.7 +diff -durN gcc-4.4.0.orig/libgcc/Makefile.in gcc-4.4.0/libgcc/Makefile.in
33.8 +--- gcc-4.4.0.orig/libgcc/Makefile.in 2009-04-10 01:23:07.000000000 +0200
33.9 ++++ gcc-4.4.0/libgcc/Makefile.in 2011-09-12 17:05:25.121124559 +0200
33.10 +@@ -754,8 +754,9 @@
33.11 + libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
33.12 + endif
33.13 +
33.14 ++all: libgcc_eh.a
33.15 + ifeq ($(enable_shared),yes)
33.16 +-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
33.17 ++all: libgcc_s$(SHLIB_EXT)
33.18 + ifneq ($(LIBUNWIND),)
33.19 + all: libunwind$(SHLIB_EXT)
33.20 + endif
33.21 +@@ -924,10 +925,6 @@
33.22 + install-shared:
33.23 + $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
33.24 +
33.25 +- $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
33.26 +- chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
33.27 +- $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
33.28 +-
33.29 + $(subst @multilib_dir@,$(MULTIDIR),$(subst \
33.30 + @shlib_base_name@,libgcc_s,$(subst \
33.31 + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
33.32 +@@ -942,6 +939,10 @@
33.33 + chmod 644 $(DESTDIR)$(inst_libdir)/libgcov.a
33.34 + $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcov.a
33.35 +
33.36 ++ $(INSTALL_DATA) libgcc_eh.a $(DESTDIR)$(inst_libdir)/
33.37 ++ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
33.38 ++ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
33.39 ++
33.40 + parts="$(INSTALL_PARTS)"; \
33.41 + for file in $$parts; do \
33.42 + rm -f $(DESTDIR)$(inst_libdir)/$$file; \