1.1 --- a/config/cc/gcc.in Wed May 27 21:08:17 2009 +0000
1.2 +++ b/config/cc/gcc.in Wed May 27 21:16:01 2009 +0000
1.3 @@ -130,6 +130,7 @@
1.4 config CC_GCC_4_4_or_later
1.5 bool
1.6 default n
1.7 + select PPL_CLOOG_MPC
1.8
1.9 config CC_VERSION
1.10 string
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/gcc/4.4.0/100-alpha-mieee-default.patch Wed May 27 21:16:01 2009 +0000
2.3 @@ -0,0 +1,24 @@
2.4 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.h gcc-4.4.0/gcc/config/alpha/alpha.h
2.5 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100
2.6 ++++ gcc-4.4.0/gcc/config/alpha/alpha.h 2009-05-27 21:37:58.000000000 +0200
2.7 +@@ -95,6 +95,8 @@
2.8 + while (0)
2.9 + #endif
2.10 +
2.11 ++#define CPP_SPEC "%{!no-ieee:-mieee}"
2.12 ++
2.13 + #define WORD_SWITCH_TAKES_ARG(STR) \
2.14 + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
2.15 +
2.16 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.opt gcc-4.4.0/gcc/config/alpha/alpha.opt
2.17 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
2.18 ++++ gcc-4.4.0/gcc/config/alpha/alpha.opt 2009-05-27 21:37:58.000000000 +0200
2.19 +@@ -39,7 +39,7 @@
2.20 + Request IEEE-conformant math library routines (OSF/1)
2.21 +
2.22 + mieee
2.23 +-Target Report RejectNegative Mask(IEEE)
2.24 ++Target Report Mask(IEEE)
2.25 + Emit IEEE-conformant code, without inexact exceptions
2.26 +
2.27 + mieee-with-inexact
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/gcc/4.4.0/110-trampolinewarn.patch Wed May 27 21:16:01 2009 +0000
3.3 @@ -0,0 +1,27 @@
3.4 +diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c
3.5 +--- gcc-4.4.0.orig/gcc/builtins.c 2009-03-30 19:42:27.000000000 +0200
3.6 ++++ gcc-4.4.0/gcc/builtins.c 2009-05-27 21:38:01.000000000 +0200
3.7 +@@ -5768,6 +5768,9 @@
3.8 + trampolines_created = 1;
3.9 + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
3.10 +
3.11 ++ if (warn_trampolines)
3.12 ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
3.13 ++
3.14 + return const0_rtx;
3.15 + }
3.16 +
3.17 +diff -durN gcc-4.4.0.orig/gcc/common.opt gcc-4.4.0/gcc/common.opt
3.18 +--- gcc-4.4.0.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100
3.19 ++++ gcc-4.4.0/gcc/common.opt 2009-05-27 21:38:01.000000000 +0200
3.20 +@@ -197,6 +197,10 @@
3.21 + Common Var(warn_type_limits) Init(-1) Warning
3.22 + Warn if a comparison is always true or always false due to the limited range of the data type
3.23 +
3.24 ++Wtrampolines
3.25 ++Common Var(warn_trampolines) Init(1)
3.26 ++Warn whenever a trampoline is generated
3.27 ++
3.28 + Wuninitialized
3.29 + Common Var(warn_uninitialized) Warning
3.30 + Warn about uninitialized automatic variables
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/gcc/4.4.0/120-java-nomulti.patch Wed May 27 21:16:01 2009 +0000
4.3 @@ -0,0 +1,46 @@
4.4 +diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure
4.5 +--- gcc-4.4.0.orig/libjava/configure 2009-04-21 11:08:08.000000000 +0200
4.6 ++++ gcc-4.4.0/libjava/configure 2009-05-27 21:38:03.000000000 +0200
4.7 +@@ -1021,6 +1021,8 @@
4.8 + default=yes
4.9 + --enable-java-maintainer-mode
4.10 + allow rebuilding of .class and .h files
4.11 ++ --enable-libjava-multilib
4.12 ++ build libjava as multilib
4.13 + --disable-dependency-tracking speeds up one-time build
4.14 + --enable-dependency-tracking do not reject slow dependency extractors
4.15 + --enable-maintainer-mode enable make rules and dependencies not useful
4.16 +@@ -1973,6 +1975,16 @@
4.17 + fi
4.18 +
4.19 +
4.20 ++# Check whether --enable-libjava-multilib was given.
4.21 ++if test "${enable_libjava_multilib+set}" = set; then
4.22 ++ enableval=$enable_libjava_multilib;
4.23 ++fi
4.24 ++
4.25 ++if test "$enable_libjava_multilib" = no; then
4.26 ++ multilib=no
4.27 ++ ac_configure_args="$ac_configure_args --disable-multilib"
4.28 ++fi
4.29 ++
4.30 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
4.31 +
4.32 +
4.33 +diff -durN gcc-4.4.0.orig/libjava/configure.ac gcc-4.4.0/libjava/configure.ac
4.34 +--- gcc-4.4.0.orig/libjava/configure.ac 2009-04-09 23:54:28.000000000 +0200
4.35 ++++ gcc-4.4.0/libjava/configure.ac 2009-05-27 21:38:03.000000000 +0200
4.36 +@@ -139,6 +139,13 @@
4.37 + [allow rebuilding of .class and .h files]))
4.38 + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
4.39 +
4.40 ++AC_ARG_ENABLE(libjava-multilib,
4.41 ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
4.42 ++if test "$enable_libjava_multilib" = no; then
4.43 ++ multilib=no
4.44 ++ ac_configure_args="$ac_configure_args --disable-multilib"
4.45 ++fi
4.46 ++
4.47 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
4.48 + GCC_NO_EXECUTABLES
4.49 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/gcc/4.4.0/130-cross-compile.patch Wed May 27 21:16:01 2009 +0000
5.3 @@ -0,0 +1,39 @@
5.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
5.5 +--- gcc-4.4.0.orig/gcc/configure 2009-03-24 18:46:03.000000000 +0100
5.6 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:06.000000000 +0200
5.7 +@@ -13997,7 +13997,7 @@
5.8 + | powerpc*-*-*,powerpc64*-*-*)
5.9 + CROSS="$CROSS -DNATIVE_CROSS" ;;
5.10 + esac
5.11 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
5.12 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
5.13 + SYSTEM_HEADER_DIR=$build_system_header_dir
5.14 + fi
5.15 +
5.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
5.17 +--- gcc-4.4.0.orig/gcc/configure.ac 2009-03-24 18:46:03.000000000 +0100
5.18 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:06.000000000 +0200
5.19 +@@ -1720,7 +1720,7 @@
5.20 + | powerpc*-*-*,powerpc64*-*-*)
5.21 + CROSS="$CROSS -DNATIVE_CROSS" ;;
5.22 + esac
5.23 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
5.24 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
5.25 + SYSTEM_HEADER_DIR=$build_system_header_dir
5.26 + fi
5.27 +
5.28 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2.c gcc-4.4.0/gcc/unwind-dw2.c
5.29 +--- gcc-4.4.0.orig/gcc/unwind-dw2.c 2009-04-10 01:23:07.000000000 +0200
5.30 ++++ gcc-4.4.0/gcc/unwind-dw2.c 2009-05-27 21:38:06.000000000 +0200
5.31 +@@ -329,9 +329,11 @@
5.32 + }
5.33 + #endif
5.34 +
5.35 ++#ifndef inhibit_libc
5.36 + #ifdef MD_UNWIND_SUPPORT
5.37 + #include MD_UNWIND_SUPPORT
5.38 + #endif
5.39 ++#endif
5.40 +
5.41 + /* Extract any interesting information from the CIE for the translation
5.42 + unit F belongs to. Return a pointer to the byte after the augmentation,
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/gcc/4.4.0/140-default-format-security.patch Wed May 27 21:16:01 2009 +0000
6.3 @@ -0,0 +1,49 @@
6.4 +diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c
6.5 +--- gcc-4.4.0.orig/gcc/c-common.c 2009-03-30 19:42:27.000000000 +0200
6.6 ++++ gcc-4.4.0/gcc/c-common.c 2009-05-27 21:38:08.000000000 +0200
6.7 +@@ -301,7 +301,7 @@
6.8 + /* Warn about format/argument anomalies in calls to formatted I/O functions
6.9 + (*printf, *scanf, strftime, strfmon, etc.). */
6.10 +
6.11 +-int warn_format;
6.12 ++int warn_format = 1;
6.13 +
6.14 + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled
6.15 + with GCC this doesn't matter as __null is guaranteed to have the right
6.16 +diff -durN gcc-4.4.0.orig/gcc/c.opt gcc-4.4.0/gcc/c.opt
6.17 +--- gcc-4.4.0.orig/gcc/c.opt 2009-03-18 22:14:53.000000000 +0100
6.18 ++++ gcc-4.4.0/gcc/c.opt 2009-05-27 21:38:08.000000000 +0200
6.19 +@@ -236,7 +236,7 @@
6.20 + Warn about format strings that contain NUL bytes
6.21 +
6.22 + Wformat-security
6.23 +-C ObjC C++ ObjC++ Var(warn_format_security) Warning
6.24 ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
6.25 + Warn about possible security problems with format functions
6.26 +
6.27 + Wformat-y2k
6.28 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
6.29 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
6.30 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:08.000000000 +0200
6.31 +@@ -2867,6 +2867,9 @@
6.32 + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
6.33 + @option{-Wformat=2} are available, but are not included in @option{-Wall}.
6.34 +
6.35 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
6.36 ++To disable, use @option{-Wformat=0}.
6.37 ++
6.38 + @item -Wformat-y2k
6.39 + @opindex Wformat-y2k
6.40 + @opindex Wno-format-y2k
6.41 +@@ -2920,6 +2923,11 @@
6.42 + in future warnings may be added to @option{-Wformat-security} that are not
6.43 + included in @option{-Wformat-nonliteral}.)
6.44 +
6.45 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
6.46 ++To disable, use @option{-Wno-format-security}, or disable all format warnings
6.47 ++with @option{-Wformat=0}. To make format security warnings fatal, specify
6.48 ++@option{-Werror=format-security}.
6.49 ++
6.50 + @item -Wformat=2
6.51 + @opindex Wformat=2
6.52 + @opindex Wno-format=2
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/patches/gcc/4.4.0/150-default-fortify-source.patch Wed May 27 21:16:01 2009 +0000
7.3 @@ -0,0 +1,26 @@
7.4 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
7.5 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200
7.6 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200
7.7 +@@ -5411,6 +5411,11 @@
7.8 + Please note the warning under @option{-fgcse} about
7.9 + invoking @option{-O2} on programs that use computed gotos.
7.10 +
7.11 ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
7.12 ++activated when @option{-O} is set to 2 or higher. This enables additional
7.13 ++compile-time and run-time checks for several libc functions. To disable,
7.14 ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}.
7.15 ++
7.16 + @item -O3
7.17 + @opindex O3
7.18 + Optimize yet more. @option{-O3} turns on all optimizations specified
7.19 +diff -durN gcc-4.4.0.orig/gcc/gcc.c gcc-4.4.0/gcc/gcc.c
7.20 +--- gcc-4.4.0.orig/gcc/gcc.c 2009-03-17 22:25:59.000000000 +0100
7.21 ++++ gcc-4.4.0/gcc/gcc.c 2009-05-27 21:38:11.000000000 +0200
7.22 +@@ -807,6 +807,7 @@
7.23 + %{H} %C %{D*&U*&A*} %{i*} %Z %i\
7.24 + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
7.25 + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
7.26 ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
7.27 + %{E|M|MM:%W{o*}}";
7.28 +
7.29 + /* This contains cpp options which are common with cc1_options and are passed
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/patches/gcc/4.4.0/160-netbsd-symbolic.patch Wed May 27 21:16:01 2009 +0000
8.3 @@ -0,0 +1,11 @@
8.4 +diff -durN gcc-4.4.0.orig/gcc/config/netbsd-elf.h gcc-4.4.0/gcc/config/netbsd-elf.h
8.5 +--- gcc-4.4.0.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
8.6 ++++ gcc-4.4.0/gcc/config/netbsd-elf.h 2009-05-27 21:38:14.000000000 +0200
8.7 +@@ -82,6 +82,7 @@
8.8 + #define NETBSD_LINK_SPEC_ELF \
8.9 + "%{assert*} %{R*} %{rpath*} \
8.10 + %{shared:-shared} \
8.11 ++ %{symbolic:-Bsymbolic} \
8.12 + %{!shared: \
8.13 + -dc -dp \
8.14 + %{!nostdlib: \
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/patches/gcc/4.4.0/170-sparc64-bsd.patch Wed May 27 21:16:01 2009 +0000
9.3 @@ -0,0 +1,29 @@
9.4 +diff -durN gcc-4.4.0.orig/gcc/config/sparc/freebsd.h gcc-4.4.0/gcc/config/sparc/freebsd.h
9.5 +--- gcc-4.4.0.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
9.6 ++++ gcc-4.4.0/gcc/config/sparc/freebsd.h 2009-05-27 21:38:16.000000000 +0200
9.7 +@@ -25,9 +25,22 @@
9.8 + /* FreeBSD needs the platform name (sparc64) defined.
9.9 + Emacs needs to know if the arch is 64 or 32-bits. */
9.10 +
9.11 +-#undef CPP_CPU64_DEFAULT_SPEC
9.12 +-#define CPP_CPU64_DEFAULT_SPEC \
9.13 +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
9.14 ++#undef FBSD_TARGET_CPU_CPP_BUILTINS
9.15 ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \
9.16 ++ do \
9.17 ++ { \
9.18 ++ if (TARGET_ARCH64) \
9.19 ++ { \
9.20 ++ builtin_define ("__sparc64__"); \
9.21 ++ builtin_define ("__sparc_v9__"); \
9.22 ++ builtin_define ("__sparcv9"); \
9.23 ++ } \
9.24 ++ else \
9.25 ++ builtin_define ("__sparc"); \
9.26 ++ builtin_define ("__sparc__"); \
9.27 ++ } \
9.28 ++ while (0)
9.29 ++
9.30 +
9.31 + #define LINK_SPEC "%(link_arch) \
9.32 + %{!mno-relax:%{!r:-relax}} \
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/patches/gcc/4.4.0/180-libgomp-no-werror.patch Wed May 27 21:16:01 2009 +0000
10.3 @@ -0,0 +1,12 @@
10.4 +diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure
10.5 +--- gcc-4.4.0.orig/libgomp/configure 2009-04-21 11:08:08.000000000 +0200
10.6 ++++ gcc-4.4.0/libgomp/configure 2009-05-27 21:38:19.000000000 +0200
10.7 +@@ -3334,7 +3334,7 @@
10.8 +
10.9 + # Add -Wall -Werror if we are using GCC.
10.10 + if test "x$GCC" = "xyes"; then
10.11 +- XCFLAGS="$XCFLAGS -Wall -Werror"
10.12 ++ XCFLAGS="$XCFLAGS -Wall"
10.13 + fi
10.14 +
10.15 + # Find other programs we need.
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch Wed May 27 21:16:01 2009 +0000
11.3 @@ -0,0 +1,24 @@
11.4 +diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c
11.5 +--- gcc-4.4.0.orig/gcc/stmt.c 2009-02-27 20:49:42.000000000 +0100
11.6 ++++ gcc-4.4.0/gcc/stmt.c 2009-05-27 21:38:21.000000000 +0200
11.7 +@@ -2376,7 +2376,11 @@
11.8 + use_cost_table
11.9 + = (TREE_CODE (orig_type) != ENUMERAL_TYPE
11.10 + && estimate_case_costs (case_list));
11.11 +- balance_case_nodes (&case_list, NULL);
11.12 ++ /* When optimizing for size, we want a straight list to avoid
11.13 ++ jumps as much as possible. This basically creates an if-else
11.14 ++ chain. */
11.15 ++ if (!optimize_size)
11.16 ++ balance_case_nodes (&case_list, NULL);
11.17 + emit_case_nodes (index, case_list, default_label, index_type);
11.18 + if (default_label)
11.19 + emit_jump (default_label);
11.20 +@@ -2942,6 +2946,7 @@
11.21 + {
11.22 + if (!node_has_low_bound (node, index_type))
11.23 + {
11.24 ++ if (!optimize_size) /* don't jl to the .default_label. */
11.25 + emit_cmp_and_jump_insns (index,
11.26 + convert_modes
11.27 + (mode, imode,
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch Wed May 27 21:16:01 2009 +0000
12.3 @@ -0,0 +1,15 @@
12.4 +diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h
12.5 +--- gcc-4.4.0.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200
12.6 ++++ gcc-4.4.0/include/libiberty.h 2009-05-27 21:38:24.000000000 +0200
12.7 +@@ -595,8 +595,11 @@
12.8 + /* Like sprintf but provides a pointer to malloc'd storage, which must
12.9 + be freed by the caller. */
12.10 +
12.11 ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
12.12 ++#ifndef asprintf
12.13 + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
12.14 + #endif
12.15 ++#endif
12.16 +
12.17 + #if !HAVE_DECL_VASPRINTF
12.18 + /* Like vsprintf but provides a pointer to malloc'd storage, which
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch Wed May 27 21:16:01 2009 +0000
13.3 @@ -0,0 +1,12 @@
13.4 +diff -durN gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h gcc-4.4.0/gcc/config/arm/linux-eabi.h
13.5 +--- gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100
13.6 ++++ gcc-4.4.0/gcc/config/arm/linux-eabi.h 2009-05-27 21:38:26.000000000 +0200
13.7 +@@ -44,7 +44,7 @@
13.8 + The ARM10TDMI core is the default for armv5t, so set
13.9 + SUBTARGET_CPU_DEFAULT to achieve this. */
13.10 + #undef SUBTARGET_CPU_DEFAULT
13.11 +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
13.12 ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
13.13 +
13.14 + /* TARGET_BIG_ENDIAN_DEFAULT is set in
13.15 + config.gcc for big endian configurations. */
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/patches/gcc/4.4.0/220-libiberty-pic.patch Wed May 27 21:16:01 2009 +0000
14.3 @@ -0,0 +1,11 @@
14.4 +diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in
14.5 +--- gcc-4.4.0.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200
14.6 ++++ gcc-4.4.0/libiberty/Makefile.in 2009-05-27 21:38:29.000000000 +0200
14.7 +@@ -227,6 +227,7 @@
14.8 + $(AR) $(AR_FLAGS) $(TARGETLIB) \
14.9 + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
14.10 + $(RANLIB) $(TARGETLIB); \
14.11 ++ cp $(TARGETLIB) ../ ; \
14.12 + cd ..; \
14.13 + else true; fi
14.14 +
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/patches/gcc/4.4.0/230-superh-default-multilib.patch Wed May 27 21:16:01 2009 +0000
15.3 @@ -0,0 +1,12 @@
15.4 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
15.5 +--- gcc-4.4.0.orig/gcc/config.gcc 2009-04-17 13:58:41.000000000 +0200
15.6 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:31.000000000 +0200
15.7 +@@ -2121,7 +2121,7 @@
15.8 + if test x${sh_multilibs} = x ; then
15.9 + case ${target} in
15.10 + sh64-superh-linux* | \
15.11 +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
15.12 ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
15.13 + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
15.14 + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
15.15 + sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/patches/gcc/4.4.0/240-libstdc++-pic.patch Wed May 27 21:16:01 2009 +0000
16.3 @@ -0,0 +1,53 @@
16.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am gcc-4.4.0/libstdc++-v3/src/Makefile.am
16.5 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am 2009-04-10 01:23:07.000000000 +0200
16.6 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.am 2009-05-27 21:38:34.000000000 +0200
16.7 +@@ -351,6 +351,13 @@
16.8 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
16.9 +
16.10 +
16.11 ++install-exec-local:
16.12 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
16.13 ++ if [ x"$$pic_objs" != x ]; then \
16.14 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
16.15 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
16.16 ++ fi
16.17 ++
16.18 + # Added bits to build debug library.
16.19 + if GLIBCXX_BUILD_DEBUG
16.20 + all-local: build_debug
16.21 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in gcc-4.4.0/libstdc++-v3/src/Makefile.in
16.22 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in 2009-01-17 03:03:25.000000000 +0100
16.23 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.in 2009-05-27 21:38:34.000000000 +0200
16.24 +@@ -726,7 +726,7 @@
16.25 +
16.26 + install-data-am: install-data-local
16.27 +
16.28 +-install-exec-am: install-toolexeclibLTLIBRARIES
16.29 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
16.30 +
16.31 + install-info: install-info-am
16.32 +
16.33 +@@ -765,7 +765,7 @@
16.34 + maintainer-clean-generic mostlyclean mostlyclean-compile \
16.35 + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
16.36 + tags uninstall uninstall-am uninstall-info-am \
16.37 +- uninstall-toolexeclibLTLIBRARIES
16.38 ++ uninstall-toolexeclibLTLIBRARIES install-exec-local
16.39 +
16.40 +
16.41 + # Symbol versioning for shared libraries.
16.42 +@@ -942,6 +942,14 @@
16.43 + install_debug:
16.44 + (cd ${debugdir} && $(MAKE) \
16.45 + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
16.46 ++
16.47 ++install-exec-local:
16.48 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
16.49 ++ if [ x"$$pic_objs" != x ]; then \
16.50 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
16.51 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
16.52 ++ fi
16.53 ++
16.54 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
16.55 + # Otherwise a system limit (for SysV at least) may be exceeded.
16.56 + .NOEXPORT:
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch Wed May 27 21:16:01 2009 +0000
17.3 @@ -0,0 +1,79 @@
17.4 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.0/gcc/config/ia64/crtbegin.asm
17.5 +--- gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200
17.6 ++++ gcc-4.4.0/gcc/config/ia64/crtbegin.asm 2009-05-27 21:38:37.000000000 +0200
17.7 +@@ -252,3 +252,7 @@
17.8 + .weak __cxa_finalize
17.9 + #endif
17.10 + .weak _Jv_RegisterClasses
17.11 ++
17.12 ++#ifdef __linux__
17.13 ++.section .note.GNU-stack; .previous
17.14 ++#endif
17.15 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtend.asm gcc-4.4.0/gcc/config/ia64/crtend.asm
17.16 +--- gcc-4.4.0.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200
17.17 ++++ gcc-4.4.0/gcc/config/ia64/crtend.asm 2009-05-27 21:38:37.000000000 +0200
17.18 +@@ -119,3 +119,7 @@
17.19 +
17.20 + br.ret.sptk.many rp
17.21 + .endp __do_global_ctors_aux
17.22 ++
17.23 ++#ifdef __linux__
17.24 ++.section .note.GNU-stack; .previous
17.25 ++#endif
17.26 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crti.asm gcc-4.4.0/gcc/config/ia64/crti.asm
17.27 +--- gcc-4.4.0.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200
17.28 ++++ gcc-4.4.0/gcc/config/ia64/crti.asm 2009-05-27 21:38:37.000000000 +0200
17.29 +@@ -51,3 +51,7 @@
17.30 + .body
17.31 +
17.32 + # end of crti.asm
17.33 ++
17.34 ++#ifdef __linux__
17.35 ++.section .note.GNU-stack; .previous
17.36 ++#endif
17.37 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtn.asm gcc-4.4.0/gcc/config/ia64/crtn.asm
17.38 +--- gcc-4.4.0.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200
17.39 ++++ gcc-4.4.0/gcc/config/ia64/crtn.asm 2009-05-27 21:38:37.000000000 +0200
17.40 +@@ -41,3 +41,7 @@
17.41 + br.ret.sptk.many b0
17.42 +
17.43 + # end of crtn.asm
17.44 ++
17.45 ++#ifdef __linux__
17.46 ++.section .note.GNU-stack; .previous
17.47 ++#endif
17.48 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.0/gcc/config/ia64/lib1funcs.asm
17.49 +--- gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
17.50 ++++ gcc-4.4.0/gcc/config/ia64/lib1funcs.asm 2009-05-27 21:38:37.000000000 +0200
17.51 +@@ -793,3 +793,7 @@
17.52 + .endp __floattitf
17.53 + #endif
17.54 + #endif
17.55 ++
17.56 ++#ifdef __linux__
17.57 ++.section .note.GNU-stack; .previous
17.58 ++#endif
17.59 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/linux.h gcc-4.4.0/gcc/config/ia64/linux.h
17.60 +--- gcc-4.4.0.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100
17.61 ++++ gcc-4.4.0/gcc/config/ia64/linux.h 2009-05-27 21:38:37.000000000 +0200
17.62 +@@ -5,6 +5,8 @@
17.63 +
17.64 + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
17.65 +
17.66 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
17.67 ++
17.68 + /* This is for -profile to use -lc_p instead of -lc. */
17.69 + #undef CC1_SPEC
17.70 + #define CC1_SPEC "%{profile:-p} %{G*}"
17.71 +diff -durN gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.0/gcc/config/rs6000/ppc-asm.h
17.72 +--- gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200
17.73 ++++ gcc-4.4.0/gcc/config/rs6000/ppc-asm.h 2009-05-27 21:38:37.000000000 +0200
17.74 +@@ -172,7 +172,7 @@
17.75 + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
17.76 + #endif
17.77 +
17.78 +-#if defined __linux__ && !defined __powerpc64__
17.79 ++#if defined __linux__
17.80 + .section .note.GNU-stack
17.81 + .previous
17.82 + #endif
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch Wed May 27 21:16:01 2009 +0000
18.3 @@ -0,0 +1,25 @@
18.4 +diff -durN gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.0/gcc/config/sh/lib1funcs.asm
18.5 +--- gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
18.6 ++++ gcc-4.4.0/gcc/config/sh/lib1funcs.asm 2009-05-27 21:38:39.000000000 +0200
18.7 +@@ -30,6 +30,11 @@
18.8 + !! recoded in assembly by Toshiyasu Morita
18.9 + !! tm@netcom.com
18.10 +
18.11 ++#if defined(__ELF__) && defined(__linux__)
18.12 ++.section .note.GNU-stack,"",%progbits
18.13 ++.previous
18.14 ++#endif
18.15 ++
18.16 + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
18.17 + ELF local label prefixes by J"orn Rennecke
18.18 + amylaar@cygnus.com */
18.19 +diff -durN gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.0/gcc/config/sh/linux-atomic.asm
18.20 +--- gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200
18.21 ++++ gcc-4.4.0/gcc/config/sh/linux-atomic.asm 2009-05-27 21:38:39.000000000 +0200
18.22 +@@ -136,3 +136,6 @@
18.23 + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov)
18.24 +
18.25 + #endif /* ! __SH5__ */
18.26 ++
18.27 ++.section .note.GNU-stack,"",%progbits
18.28 ++.previous
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/patches/gcc/4.4.0/270-sh-pr24836.patch Wed May 27 21:16:01 2009 +0000
19.3 @@ -0,0 +1,24 @@
19.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
19.5 +--- gcc-4.4.0.orig/gcc/configure 2009-05-27 21:38:08.000000000 +0200
19.6 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:42.000000000 +0200
19.7 +@@ -22205,7 +22205,7 @@
19.8 + tls_first_minor=14
19.9 + tls_as_opt="-m64 -Aesame --fatal-warnings"
19.10 + ;;
19.11 +- sh-*-* | sh[34]-*-*)
19.12 ++ sh-*-* | sh[34]*-*-*)
19.13 + conftest_s='
19.14 + .section ".tdata","awT",@progbits
19.15 + foo: .long 25
19.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
19.17 +--- gcc-4.4.0.orig/gcc/configure.ac 2009-05-27 21:38:08.000000000 +0200
19.18 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:42.000000000 +0200
19.19 +@@ -2673,7 +2673,7 @@
19.20 + tls_first_minor=14
19.21 + tls_as_opt="-m64 -Aesame --fatal-warnings"
19.22 + ;;
19.23 +- sh-*-* | sh[34]-*-*)
19.24 ++ sh-*-* | sh[34]*-*-*)
19.25 + conftest_s='
19.26 + .section ".tdata","awT",@progbits
19.27 + foo: .long 25
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/patches/gcc/4.4.0/280-freebsd.patch Wed May 27 21:16:01 2009 +0000
20.3 @@ -0,0 +1,94 @@
20.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
20.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200
20.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:45.000000000 +0200
20.7 +@@ -61,6 +61,8 @@
20.8 + builtin_assert ("system=unix"); \
20.9 + builtin_assert ("system=bsd"); \
20.10 + builtin_assert ("system=FreeBSD"); \
20.11 ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \
20.12 ++ builtin_define("_LONGLONG"); \
20.13 + FBSD_TARGET_CPU_CPP_BUILTINS(); \
20.14 + } \
20.15 + while (0)
20.16 +diff -durN gcc-4.4.0.orig/gcc/config/t-freebsd-eh gcc-4.4.0/gcc/config/t-freebsd-eh
20.17 +--- gcc-4.4.0.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100
20.18 ++++ gcc-4.4.0/gcc/config/t-freebsd-eh 2009-05-27 21:38:45.000000000 +0200
20.19 +@@ -0,0 +1,4 @@
20.20 ++# Use unwind-dw2-fde-glibc
20.21 ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
20.22 ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
20.23 ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
20.24 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
20.25 +--- gcc-4.4.0.orig/gcc/config.gcc 2009-05-27 21:38:34.000000000 +0200
20.26 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:45.000000000 +0200
20.27 +@@ -456,7 +456,7 @@
20.28 + # pleases around the provided core setting.
20.29 + gas=yes
20.30 + gnu_ld=yes
20.31 +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
20.32 ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
20.33 + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
20.34 + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
20.35 + tmake_file="t-slibgcc-elf-ver t-freebsd"
20.36 +@@ -1042,6 +1042,10 @@
20.37 + ;;
20.38 + i[34567]86-*-freebsd*)
20.39 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
20.40 ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
20.41 ++ if test ${fbsd_major} -ge 7; then
20.42 ++ tmake_file="${tmake_file} t-freebsd-eh"
20.43 ++ fi
20.44 + ;;
20.45 + x86_64-*-freebsd*)
20.46 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
20.47 +diff -durN gcc-4.4.0.orig/gcc/crtstuff.c gcc-4.4.0/gcc/crtstuff.c
20.48 +--- gcc-4.4.0.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200
20.49 ++++ gcc-4.4.0/gcc/crtstuff.c 2009-05-27 21:38:45.000000000 +0200
20.50 +@@ -85,13 +85,15 @@
20.51 + && !defined(OBJECT_FORMAT_FLAT) \
20.52 + && defined(HAVE_LD_EH_FRAME_HDR) \
20.53 + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
20.54 +- && defined(__GLIBC__) && __GLIBC__ >= 2
20.55 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \
20.56 ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022))
20.57 + #include <link.h>
20.58 + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
20.59 + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */
20.60 + # if !defined(__UCLIBC__) \
20.61 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.62 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
20.63 ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.64 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
20.65 ++ || (__FreeBSD_version >= 700022)
20.66 + # define USE_PT_GNU_EH_FRAME
20.67 + # endif
20.68 + #endif
20.69 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c
20.70 +--- gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200
20.71 ++++ gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c 2009-05-27 21:38:45.000000000 +0200
20.72 +@@ -46,8 +46,9 @@
20.73 + #include "gthr.h"
20.74 +
20.75 + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
20.76 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.77 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
20.78 ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
20.79 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
20.80 ++ || (__FreeBSD_version >= 700022 ))
20.81 +
20.82 + #ifndef __RELOC_POINTER
20.83 + # define __RELOC_POINTER(ptr, base) ((ptr) + (base))
20.84 +@@ -63,6 +64,13 @@
20.85 + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
20.86 + #endif
20.87 +
20.88 ++/* Support FreeBSD */
20.89 ++#ifndef ElfW
20.90 ++# ifdef __ElfN
20.91 ++# define ElfW __ElfN
20.92 ++# endif
20.93 ++#endif
20.94 ++
20.95 + struct unw_eh_callback_data
20.96 + {
20.97 + _Unwind_Ptr pc;
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/patches/gcc/4.4.0/290-freebsd.patch Wed May 27 21:16:01 2009 +0000
21.3 @@ -0,0 +1,64 @@
21.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
21.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200
21.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200
21.7 +@@ -86,9 +86,10 @@
21.8 + #define FBSD_STARTFILE_SPEC \
21.9 + "%{!shared: \
21.10 + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
21.11 +- %{!p:%{profile:gcrt1.o%s} \
21.12 +- %{!profile:crt1.o%s}}}} \
21.13 +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
21.14 ++ %{!p:%{profile:gcrt1.o%s} \
21.15 ++ %{!profile:crt1.o%s}}}} \
21.16 ++ crti.o%s \
21.17 ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
21.18 +
21.19 + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
21.20 + the magical crtend.o file (see crtstuff.c) which provides part of
21.21 +@@ -126,7 +127,8 @@
21.22 + %{pg: -lc_p} \
21.23 + }"
21.24 + #else
21.25 +-#if FBSD_MAJOR < 5
21.26 ++#include <sys/param.h>
21.27 ++#if __FreeBSD_version < 500016
21.28 + #define FBSD_LIB_SPEC " \
21.29 + %{!shared: \
21.30 + %{!pg: \
21.31 +@@ -136,17 +138,34 @@
21.32 + %{!pthread:-lc_p} \
21.33 + %{pthread:-lc_r_p}} \
21.34 + }"
21.35 +-#else
21.36 ++#elif __FreeBSD_version < 700022
21.37 + #define FBSD_LIB_SPEC " \
21.38 + %{!shared: \
21.39 + %{!pg: %{pthread:-lpthread} -lc} \
21.40 + %{pg: %{pthread:-lpthread_p} -lc_p} \
21.41 + }"
21.42 ++#else
21.43 ++#define FBSD_LIB_SPEC " \
21.44 ++ %{!shared: \
21.45 ++ %{!pg: %{pthread:-lpthread} -lc} \
21.46 ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \
21.47 ++ %{shared: \
21.48 ++ %{pthread:-lpthread} -lc} \
21.49 ++ "
21.50 + #endif
21.51 + #endif
21.52 +
21.53 +-#if FBSD_MAJOR < 6
21.54 ++#if FBSD_MAJOR < 5
21.55 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
21.56 + #else
21.57 + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
21.58 + #endif
21.59 ++
21.60 ++#if defined(HAVE_LD_EH_FRAME_HDR)
21.61 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
21.62 ++#endif
21.63 ++
21.64 ++/* Use --as-needed -lgcc_s for eh support. */
21.65 ++#ifdef HAVE_LD_AS_NEEDED
21.66 ++#define USE_LD_AS_NEEDED 1
21.67 ++#endif
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/patches/gcc/4.4.0/300-pr40105.patch Wed May 27 21:16:01 2009 +0000
22.3 @@ -0,0 +1,180 @@
22.4 +diff -durN gcc-4.4.0.orig/gcc/Makefile.in gcc-4.4.0/gcc/Makefile.in
22.5 +--- gcc-4.4.0.orig/gcc/Makefile.in 2009-03-25 13:00:32.000000000 +0100
22.6 ++++ gcc-4.4.0/gcc/Makefile.in 2009-05-27 21:38:50.000000000 +0200
22.7 +@@ -2785,7 +2785,8 @@
22.8 + value-prof.h $(TREE_INLINE_H) $(TARGET_H)
22.9 + cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
22.10 + $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
22.11 +- output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \
22.12 ++ output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) $(INSN_ATTR_H) \
22.13 ++ insn-config.h $(EXPR_H) \
22.14 + $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
22.15 + tree-pass.h $(DF_H) $(GGC_H)
22.16 + cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
22.17 +diff -durN gcc-4.4.0.orig/gcc/cfgrtl.c gcc-4.4.0/gcc/cfgrtl.c
22.18 +--- gcc-4.4.0.orig/gcc/cfgrtl.c 2008-12-12 22:16:09.000000000 +0100
22.19 ++++ gcc-4.4.0/gcc/cfgrtl.c 2009-05-27 21:38:50.000000000 +0200
22.20 +@@ -53,6 +53,7 @@
22.21 + #include "toplev.h"
22.22 + #include "tm_p.h"
22.23 + #include "obstack.h"
22.24 ++#include "insn-attr.h"
22.25 + #include "insn-config.h"
22.26 + #include "cfglayout.h"
22.27 + #include "expr.h"
22.28 +@@ -427,13 +428,27 @@
22.29 + return 0;
22.30 + }
22.31 +
22.32 ++static unsigned int
22.33 ++rest_of_pass_free_cfg (void)
22.34 ++{
22.35 ++#ifdef DELAY_SLOTS
22.36 ++ /* The resource.c machinery uses DF but the CFG isn't guaranteed to be
22.37 ++ valid at that point so it would be too late to call df_analyze. */
22.38 ++ if (optimize > 0 && flag_delayed_branch)
22.39 ++ df_analyze ();
22.40 ++#endif
22.41 ++
22.42 ++ free_bb_for_insn ();
22.43 ++ return 0;
22.44 ++}
22.45 ++
22.46 + struct rtl_opt_pass pass_free_cfg =
22.47 + {
22.48 + {
22.49 + RTL_PASS,
22.50 + NULL, /* name */
22.51 + NULL, /* gate */
22.52 +- free_bb_for_insn, /* execute */
22.53 ++ rest_of_pass_free_cfg, /* execute */
22.54 + NULL, /* sub */
22.55 + NULL, /* next */
22.56 + 0, /* static_pass_number */
22.57 +diff -durN gcc-4.4.0.orig/gcc/resource.c gcc-4.4.0/gcc/resource.c
22.58 +--- gcc-4.4.0.orig/gcc/resource.c 2009-02-20 16:20:38.000000000 +0100
22.59 ++++ gcc-4.4.0/gcc/resource.c 2009-05-27 21:38:50.000000000 +0200
22.60 +@@ -135,8 +135,6 @@
22.61 + static int
22.62 + find_basic_block (rtx insn, int search_limit)
22.63 + {
22.64 +- basic_block bb;
22.65 +-
22.66 + /* Scan backwards to the previous BARRIER. Then see if we can find a
22.67 + label that starts a basic block. Return the basic block number. */
22.68 + for (insn = prev_nonnote_insn (insn);
22.69 +@@ -157,11 +155,8 @@
22.70 + for (insn = next_nonnote_insn (insn);
22.71 + insn && LABEL_P (insn);
22.72 + insn = next_nonnote_insn (insn))
22.73 +- {
22.74 +- FOR_EACH_BB (bb)
22.75 +- if (insn == BB_HEAD (bb))
22.76 +- return bb->index;
22.77 +- }
22.78 ++ if (BLOCK_FOR_INSN (insn))
22.79 ++ return BLOCK_FOR_INSN (insn)->index;
22.80 +
22.81 + return -1;
22.82 + }
22.83 +@@ -848,13 +843,12 @@
22.84 + (with no intervening active insns) to see if any of them start a basic
22.85 + block. If we hit the start of the function first, we use block 0.
22.86 +
22.87 +- Once we have found a basic block and a corresponding first insns, we can
22.88 +- accurately compute the live status from basic_block_live_regs and
22.89 +- reg_renumber. (By starting at a label following a BARRIER, we are immune
22.90 +- to actions taken by reload and jump.) Then we scan all insns between
22.91 +- that point and our target. For each CLOBBER (or for call-clobbered regs
22.92 +- when we pass a CALL_INSN), mark the appropriate registers are dead. For
22.93 +- a SET, mark them as live.
22.94 ++ Once we have found a basic block and a corresponding first insn, we can
22.95 ++ accurately compute the live status (by starting at a label following a
22.96 ++ BARRIER, we are immune to actions taken by reload and jump.) Then we
22.97 ++ scan all insns between that point and our target. For each CLOBBER (or
22.98 ++ for call-clobbered regs when we pass a CALL_INSN), mark the appropriate
22.99 ++ registers are dead. For a SET, mark them as live.
22.100 +
22.101 + We have to be careful when using REG_DEAD notes because they are not
22.102 + updated by such things as find_equiv_reg. So keep track of registers
22.103 +@@ -954,13 +948,10 @@
22.104 + TARGET. Otherwise, we must assume everything is live. */
22.105 + if (b != -1)
22.106 + {
22.107 +- regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
22.108 ++ regset regs_live = df_get_live_in (BASIC_BLOCK (b));
22.109 + rtx start_insn, stop_insn;
22.110 +
22.111 +- /* Compute hard regs live at start of block -- this is the real hard regs
22.112 +- marked live, plus live pseudo regs that have been renumbered to
22.113 +- hard regs. */
22.114 +-
22.115 ++ /* Compute hard regs live at start of block. */
22.116 + REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live);
22.117 +
22.118 + /* Get starting and ending insn, handling the case where each might
22.119 +@@ -1046,10 +1037,24 @@
22.120 +
22.121 + else if (LABEL_P (real_insn))
22.122 + {
22.123 ++ basic_block bb;
22.124 ++
22.125 + /* A label clobbers the pending dead registers since neither
22.126 + reload nor jump will propagate a value across a label. */
22.127 + AND_COMPL_HARD_REG_SET (current_live_regs, pending_dead_regs);
22.128 + CLEAR_HARD_REG_SET (pending_dead_regs);
22.129 ++
22.130 ++ /* We must conservatively assume that all registers that used
22.131 ++ to be live here still are. The fallthrough edge may have
22.132 ++ left a live register uninitialized. */
22.133 ++ bb = BLOCK_FOR_INSN (real_insn);
22.134 ++ if (bb)
22.135 ++ {
22.136 ++ HARD_REG_SET extra_live;
22.137 ++
22.138 ++ REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
22.139 ++ IOR_HARD_REG_SET (current_live_regs, extra_live);
22.140 ++ }
22.141 + }
22.142 +
22.143 + /* The beginning of the epilogue corresponds to the end of the
22.144 +@@ -1121,6 +1126,7 @@
22.145 + init_resource_info (rtx epilogue_insn)
22.146 + {
22.147 + int i;
22.148 ++ basic_block bb;
22.149 +
22.150 + /* Indicate what resources are required to be valid at the end of the current
22.151 + function. The condition code never is and memory always is. If the
22.152 +@@ -1189,6 +1195,11 @@
22.153 + /* Allocate and initialize the tables used by mark_target_live_regs. */
22.154 + target_hash_table = XCNEWVEC (struct target_info *, TARGET_HASH_PRIME);
22.155 + bb_ticks = XCNEWVEC (int, last_basic_block);
22.156 ++
22.157 ++ /* Set the BLOCK_FOR_INSN of each label that starts a basic block. */
22.158 ++ FOR_EACH_BB (bb)
22.159 ++ if (LABEL_P (BB_HEAD (bb)))
22.160 ++ BLOCK_FOR_INSN (BB_HEAD (bb)) = bb;
22.161 + }
22.162 +
22.163 + /* Free up the resources allocated to mark_target_live_regs (). This
22.164 +@@ -1197,6 +1208,8 @@
22.165 + void
22.166 + free_resource_info (void)
22.167 + {
22.168 ++ basic_block bb;
22.169 ++
22.170 + if (target_hash_table != NULL)
22.171 + {
22.172 + int i;
22.173 +@@ -1222,6 +1235,10 @@
22.174 + free (bb_ticks);
22.175 + bb_ticks = NULL;
22.176 + }
22.177 ++
22.178 ++ FOR_EACH_BB (bb)
22.179 ++ if (LABEL_P (BB_HEAD (bb)))
22.180 ++ BLOCK_FOR_INSN (BB_HEAD (bb)) = NULL;
22.181 + }
22.182 +
22.183 + /* Clear any hashed information that we have stored for INSN. */
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/patches/gcc/4.4.0/310-uclibc-conf.patch Wed May 27 21:16:01 2009 +0000
23.3 @@ -0,0 +1,35 @@
23.4 +diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh
23.5 +--- gcc-4.4.0.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200
23.6 ++++ gcc-4.4.0/contrib/regression/objs-gcc.sh 2009-05-27 21:38:53.000000000 +0200
23.7 +@@ -106,6 +106,10 @@
23.8 + then
23.9 + make all-gdb all-dejagnu all-ld || exit 1
23.10 + make install-gdb install-dejagnu install-ld || exit 1
23.11 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
23.12 ++ then
23.13 ++ make all-gdb all-dejagnu all-ld || exit 1
23.14 ++ make install-gdb install-dejagnu install-ld || exit 1
23.15 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
23.16 + make bootstrap || exit 1
23.17 + make install || exit 1
23.18 +diff -durN gcc-4.4.0.orig/libjava/classpath/ltconfig gcc-4.4.0/libjava/classpath/ltconfig
23.19 +--- gcc-4.4.0.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200
23.20 ++++ gcc-4.4.0/libjava/classpath/ltconfig 2009-05-27 21:38:53.000000000 +0200
23.21 +@@ -603,7 +603,7 @@
23.22 +
23.23 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
23.24 + case $host_os in
23.25 +-linux-gnu*) ;;
23.26 ++linux-gnu*|linux-uclibc*) ;;
23.27 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
23.28 + esac
23.29 +
23.30 +@@ -1251,7 +1251,7 @@
23.31 + ;;
23.32 +
23.33 + # This must be Linux ELF.
23.34 +-linux-gnu*)
23.35 ++linux*)
23.36 + version_type=linux
23.37 + need_lib_prefix=no
23.38 + need_version=no
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/patches/gcc/4.4.0/320-missing-execinfo_h.patch Wed May 27 21:16:01 2009 +0000
24.3 @@ -0,0 +1,12 @@
24.4 +diff -durN gcc-4.4.0.orig/boehm-gc/include/gc.h gcc-4.4.0/boehm-gc/include/gc.h
24.5 +--- gcc-4.4.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
24.6 ++++ gcc-4.4.0/boehm-gc/include/gc.h 2009-05-27 21:38:55.000000000 +0200
24.7 +@@ -503,7 +503,7 @@
24.8 + #if defined(__linux__) || defined(__GLIBC__)
24.9 + # include <features.h>
24.10 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
24.11 +- && !defined(__ia64__)
24.12 ++ && !defined(__ia64__) && !defined(__UCLIBC__)
24.13 + # ifndef GC_HAVE_BUILTIN_BACKTRACE
24.14 + # define GC_HAVE_BUILTIN_BACKTRACE
24.15 + # endif
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/patches/gcc/4.4.0/330-c99-snprintf.patch Wed May 27 21:16:01 2009 +0000
25.3 @@ -0,0 +1,12 @@
25.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.0/libstdc++-v3/include/c_global/cstdio
25.5 +--- gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200
25.6 ++++ gcc-4.4.0/libstdc++-v3/include/c_global/cstdio 2009-05-27 21:38:58.000000000 +0200
25.7 +@@ -139,7 +139,7 @@
25.8 +
25.9 + _GLIBCXX_END_NAMESPACE
25.10 +
25.11 +-#if _GLIBCXX_USE_C99
25.12 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
25.13 +
25.14 + #undef snprintf
25.15 + #undef vfscanf
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26.2 +++ b/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch Wed May 27 21:16:01 2009 +0000
26.3 @@ -0,0 +1,48 @@
26.4 +diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c
26.5 +--- gcc-4.4.0.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200
26.6 ++++ gcc-4.4.0/libmudflap/mf-hooks2.c 2009-05-27 21:39:00.000000000 +0200
26.7 +@@ -421,7 +421,7 @@
26.8 + {
26.9 + TRACE ("%s\n", __PRETTY_FUNCTION__);
26.10 + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
26.11 +- bzero (s, n);
26.12 ++ memset (s, 0, n);
26.13 + }
26.14 +
26.15 +
26.16 +@@ -431,7 +431,7 @@
26.17 + TRACE ("%s\n", __PRETTY_FUNCTION__);
26.18 + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
26.19 + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
26.20 +- bcopy (src, dest, n);
26.21 ++ memmove (dest, src, n);
26.22 + }
26.23 +
26.24 +
26.25 +@@ -441,7 +441,7 @@
26.26 + TRACE ("%s\n", __PRETTY_FUNCTION__);
26.27 + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
26.28 + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
26.29 +- return bcmp (s1, s2, n);
26.30 ++ return n == 0 ? 0 : memcmp (s1, s2, n);
26.31 + }
26.32 +
26.33 +
26.34 +@@ -450,7 +450,7 @@
26.35 + size_t n = strlen (s);
26.36 + TRACE ("%s\n", __PRETTY_FUNCTION__);
26.37 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
26.38 +- return index (s, c);
26.39 ++ return strchr (s, c);
26.40 + }
26.41 +
26.42 +
26.43 +@@ -459,7 +459,7 @@
26.44 + size_t n = strlen (s);
26.45 + TRACE ("%s\n", __PRETTY_FUNCTION__);
26.46 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
26.47 +- return rindex (s, c);
26.48 ++ return strrchr (s, c);
26.49 + }
26.50 +
26.51 + /* XXX: stpcpy, memccpy */
27.1 --- a/scripts/build/cc/gcc.sh Wed May 27 21:08:17 2009 +0000
27.2 +++ b/scripts/build/cc/gcc.sh Wed May 27 21:16:01 2009 +0000
27.3 @@ -132,12 +132,20 @@
27.4 extra_config="${extra_config} ${CT_ARCH_WITH_TUNE}"
27.5 extra_config="${extra_config} ${CT_ARCH_WITH_FPU}"
27.6 extra_config="${extra_config} ${CT_ARCH_WITH_FLOAT}"
27.7 - [ "${CT_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
27.8 if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
27.9 extra_config="${extra_config} --enable-__cxa_atexit"
27.10 else
27.11 extra_config="${extra_config} --disable-__cxa_atexit"
27.12 fi
27.13 + if [ "${CT_GMP_MPFR}" = "y" ]; then
27.14 + extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR}"
27.15 + extra_config="${extra_config} --with-mpfr=${CT_PREFIX_DIR}"
27.16 + fi
27.17 + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
27.18 + extra_config="${extra_config} --with-ppl=${CT_PREFIX_DIR}"
27.19 + extra_config="${extra_config} --with-cloog=${CT_PREFIX_DIR}"
27.20 + extra_config="${extra_config} --with-mpc=${CT_PREFIX_DIR}"
27.21 + fi
27.22
27.23 CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
27.24
27.25 @@ -266,7 +274,6 @@
27.26 extra_config="${extra_config} ${CT_ARCH_WITH_FPU}"
27.27 extra_config="${extra_config} ${CT_ARCH_WITH_FLOAT}"
27.28 [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared"
27.29 - [ "${CT_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
27.30 [ -n "${CT_CC_PKGVERSION}" ] && extra_config="${extra_config} --with-pkgversion=${CT_CC_PKGVERSION}"
27.31 [ -n "${CT_CC_BUGURL}" ] && extra_config="${extra_config} --with-bugurl=${CT_CC_BUGURL}"
27.32 [ "${CT_CC_SJLJ_EXCEPTIONS_USE}" = "y" ] && extra_config="${extra_config} --enable-sjlj-exceptions"
27.33 @@ -276,6 +283,15 @@
27.34 else
27.35 extra_config="${extra_config} --disable-__cxa_atexit"
27.36 fi
27.37 + if [ "${CT_GMP_MPFR}" = "y" ]; then
27.38 + extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR}"
27.39 + extra_config="${extra_config} --with-mpfr=${CT_PREFIX_DIR}"
27.40 + fi
27.41 + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
27.42 + extra_config="${extra_config} --with-ppl=${CT_PREFIX_DIR}"
27.43 + extra_config="${extra_config} --with-cloog=${CT_PREFIX_DIR}"
27.44 + extra_config="${extra_config} --with-mpc=${CT_PREFIX_DIR}"
27.45 + fi
27.46
27.47 CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
27.48