1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/gcc/4.4.1/100-alpha-mieee-default.patch Sun Sep 27 11:35:43 2009 +0200
1.3 @@ -0,0 +1,24 @@
1.4 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.h gcc-4.4.0/gcc/config/alpha/alpha.h
1.5 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100
1.6 ++++ gcc-4.4.0/gcc/config/alpha/alpha.h 2009-05-27 21:37:58.000000000 +0200
1.7 +@@ -95,6 +95,8 @@
1.8 + while (0)
1.9 + #endif
1.10 +
1.11 ++#define CPP_SPEC "%{!no-ieee:-mieee}"
1.12 ++
1.13 + #define WORD_SWITCH_TAKES_ARG(STR) \
1.14 + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
1.15 +
1.16 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.opt gcc-4.4.0/gcc/config/alpha/alpha.opt
1.17 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
1.18 ++++ gcc-4.4.0/gcc/config/alpha/alpha.opt 2009-05-27 21:37:58.000000000 +0200
1.19 +@@ -39,7 +39,7 @@
1.20 + Request IEEE-conformant math library routines (OSF/1)
1.21 +
1.22 + mieee
1.23 +-Target Report RejectNegative Mask(IEEE)
1.24 ++Target Report Mask(IEEE)
1.25 + Emit IEEE-conformant code, without inexact exceptions
1.26 +
1.27 + mieee-with-inexact
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/gcc/4.4.1/110-trampolinewarn.patch Sun Sep 27 11:35:43 2009 +0200
2.3 @@ -0,0 +1,27 @@
2.4 +diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c
2.5 +--- gcc-4.4.0.orig/gcc/builtins.c 2009-03-30 19:42:27.000000000 +0200
2.6 ++++ gcc-4.4.0/gcc/builtins.c 2009-05-27 21:38:01.000000000 +0200
2.7 +@@ -5768,6 +5768,9 @@
2.8 + trampolines_created = 1;
2.9 + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
2.10 +
2.11 ++ if (warn_trampolines)
2.12 ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
2.13 ++
2.14 + return const0_rtx;
2.15 + }
2.16 +
2.17 +diff -durN gcc-4.4.0.orig/gcc/common.opt gcc-4.4.0/gcc/common.opt
2.18 +--- gcc-4.4.0.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100
2.19 ++++ gcc-4.4.0/gcc/common.opt 2009-05-27 21:38:01.000000000 +0200
2.20 +@@ -197,6 +197,10 @@
2.21 + Common Var(warn_type_limits) Init(-1) Warning
2.22 + Warn if a comparison is always true or always false due to the limited range of the data type
2.23 +
2.24 ++Wtrampolines
2.25 ++Common Var(warn_trampolines) Init(1)
2.26 ++Warn whenever a trampoline is generated
2.27 ++
2.28 + Wuninitialized
2.29 + Common Var(warn_uninitialized) Warning
2.30 + Warn about uninitialized automatic variables
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/gcc/4.4.1/120-java-nomulti.patch Sun Sep 27 11:35:43 2009 +0200
3.3 @@ -0,0 +1,46 @@
3.4 +diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure
3.5 +--- gcc-4.4.0.orig/libjava/configure 2009-04-21 11:08:08.000000000 +0200
3.6 ++++ gcc-4.4.0/libjava/configure 2009-05-27 21:38:03.000000000 +0200
3.7 +@@ -1021,6 +1021,8 @@
3.8 + default=yes
3.9 + --enable-java-maintainer-mode
3.10 + allow rebuilding of .class and .h files
3.11 ++ --enable-libjava-multilib
3.12 ++ build libjava as multilib
3.13 + --disable-dependency-tracking speeds up one-time build
3.14 + --enable-dependency-tracking do not reject slow dependency extractors
3.15 + --enable-maintainer-mode enable make rules and dependencies not useful
3.16 +@@ -1973,6 +1975,16 @@
3.17 + fi
3.18 +
3.19 +
3.20 ++# Check whether --enable-libjava-multilib was given.
3.21 ++if test "${enable_libjava_multilib+set}" = set; then
3.22 ++ enableval=$enable_libjava_multilib;
3.23 ++fi
3.24 ++
3.25 ++if test "$enable_libjava_multilib" = no; then
3.26 ++ multilib=no
3.27 ++ ac_configure_args="$ac_configure_args --disable-multilib"
3.28 ++fi
3.29 ++
3.30 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
3.31 +
3.32 +
3.33 +diff -durN gcc-4.4.0.orig/libjava/configure.ac gcc-4.4.0/libjava/configure.ac
3.34 +--- gcc-4.4.0.orig/libjava/configure.ac 2009-04-09 23:54:28.000000000 +0200
3.35 ++++ gcc-4.4.0/libjava/configure.ac 2009-05-27 21:38:03.000000000 +0200
3.36 +@@ -139,6 +139,13 @@
3.37 + [allow rebuilding of .class and .h files]))
3.38 + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
3.39 +
3.40 ++AC_ARG_ENABLE(libjava-multilib,
3.41 ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
3.42 ++if test "$enable_libjava_multilib" = no; then
3.43 ++ multilib=no
3.44 ++ ac_configure_args="$ac_configure_args --disable-multilib"
3.45 ++fi
3.46 ++
3.47 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
3.48 + GCC_NO_EXECUTABLES
3.49 +
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/gcc/4.4.1/130-cross-compile.patch Sun Sep 27 11:35:43 2009 +0200
4.3 @@ -0,0 +1,39 @@
4.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
4.5 +--- gcc-4.4.0.orig/gcc/configure 2009-03-24 18:46:03.000000000 +0100
4.6 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:06.000000000 +0200
4.7 +@@ -13997,7 +13997,7 @@
4.8 + | powerpc*-*-*,powerpc64*-*-*)
4.9 + CROSS="$CROSS -DNATIVE_CROSS" ;;
4.10 + esac
4.11 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
4.12 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
4.13 + SYSTEM_HEADER_DIR=$build_system_header_dir
4.14 + fi
4.15 +
4.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
4.17 +--- gcc-4.4.0.orig/gcc/configure.ac 2009-03-24 18:46:03.000000000 +0100
4.18 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:06.000000000 +0200
4.19 +@@ -1720,7 +1720,7 @@
4.20 + | powerpc*-*-*,powerpc64*-*-*)
4.21 + CROSS="$CROSS -DNATIVE_CROSS" ;;
4.22 + esac
4.23 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
4.24 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
4.25 + SYSTEM_HEADER_DIR=$build_system_header_dir
4.26 + fi
4.27 +
4.28 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2.c gcc-4.4.0/gcc/unwind-dw2.c
4.29 +--- gcc-4.4.0.orig/gcc/unwind-dw2.c 2009-04-10 01:23:07.000000000 +0200
4.30 ++++ gcc-4.4.0/gcc/unwind-dw2.c 2009-05-27 21:38:06.000000000 +0200
4.31 +@@ -329,9 +329,11 @@
4.32 + }
4.33 + #endif
4.34 +
4.35 ++#ifndef inhibit_libc
4.36 + #ifdef MD_UNWIND_SUPPORT
4.37 + #include MD_UNWIND_SUPPORT
4.38 + #endif
4.39 ++#endif
4.40 +
4.41 + /* Extract any interesting information from the CIE for the translation
4.42 + unit F belongs to. Return a pointer to the byte after the augmentation,
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/gcc/4.4.1/140-default-format-security.patch Sun Sep 27 11:35:43 2009 +0200
5.3 @@ -0,0 +1,49 @@
5.4 +diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c
5.5 +--- gcc-4.4.0.orig/gcc/c-common.c 2009-03-30 19:42:27.000000000 +0200
5.6 ++++ gcc-4.4.0/gcc/c-common.c 2009-05-27 21:38:08.000000000 +0200
5.7 +@@ -301,7 +301,7 @@
5.8 + /* Warn about format/argument anomalies in calls to formatted I/O functions
5.9 + (*printf, *scanf, strftime, strfmon, etc.). */
5.10 +
5.11 +-int warn_format;
5.12 ++int warn_format = 1;
5.13 +
5.14 + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled
5.15 + with GCC this doesn't matter as __null is guaranteed to have the right
5.16 +diff -durN gcc-4.4.0.orig/gcc/c.opt gcc-4.4.0/gcc/c.opt
5.17 +--- gcc-4.4.0.orig/gcc/c.opt 2009-03-18 22:14:53.000000000 +0100
5.18 ++++ gcc-4.4.0/gcc/c.opt 2009-05-27 21:38:08.000000000 +0200
5.19 +@@ -236,7 +236,7 @@
5.20 + Warn about format strings that contain NUL bytes
5.21 +
5.22 + Wformat-security
5.23 +-C ObjC C++ ObjC++ Var(warn_format_security) Warning
5.24 ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
5.25 + Warn about possible security problems with format functions
5.26 +
5.27 + Wformat-y2k
5.28 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
5.29 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
5.30 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:08.000000000 +0200
5.31 +@@ -2867,6 +2867,9 @@
5.32 + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
5.33 + @option{-Wformat=2} are available, but are not included in @option{-Wall}.
5.34 +
5.35 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
5.36 ++To disable, use @option{-Wformat=0}.
5.37 ++
5.38 + @item -Wformat-y2k
5.39 + @opindex Wformat-y2k
5.40 + @opindex Wno-format-y2k
5.41 +@@ -2920,6 +2923,11 @@
5.42 + in future warnings may be added to @option{-Wformat-security} that are not
5.43 + included in @option{-Wformat-nonliteral}.)
5.44 +
5.45 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
5.46 ++To disable, use @option{-Wno-format-security}, or disable all format warnings
5.47 ++with @option{-Wformat=0}. To make format security warnings fatal, specify
5.48 ++@option{-Werror=format-security}.
5.49 ++
5.50 + @item -Wformat=2
5.51 + @opindex Wformat=2
5.52 + @opindex Wno-format=2
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/gcc/4.4.1/150-default-fortify-source.patch Sun Sep 27 11:35:43 2009 +0200
6.3 @@ -0,0 +1,26 @@
6.4 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
6.5 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200
6.6 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200
6.7 +@@ -5411,6 +5411,11 @@
6.8 + Please note the warning under @option{-fgcse} about
6.9 + invoking @option{-O2} on programs that use computed gotos.
6.10 +
6.11 ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
6.12 ++activated when @option{-O} is set to 2 or higher. This enables additional
6.13 ++compile-time and run-time checks for several libc functions. To disable,
6.14 ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}.
6.15 ++
6.16 + @item -O3
6.17 + @opindex O3
6.18 + Optimize yet more. @option{-O3} turns on all optimizations specified
6.19 +diff -durN gcc-4.4.0.orig/gcc/gcc.c gcc-4.4.0/gcc/gcc.c
6.20 +--- gcc-4.4.0.orig/gcc/gcc.c 2009-03-17 22:25:59.000000000 +0100
6.21 ++++ gcc-4.4.0/gcc/gcc.c 2009-05-27 21:38:11.000000000 +0200
6.22 +@@ -807,6 +807,7 @@
6.23 + %{H} %C %{D*&U*&A*} %{i*} %Z %i\
6.24 + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
6.25 + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
6.26 ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
6.27 + %{E|M|MM:%W{o*}}";
6.28 +
6.29 + /* This contains cpp options which are common with cc1_options and are passed
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/patches/gcc/4.4.1/160-netbsd-symbolic.patch Sun Sep 27 11:35:43 2009 +0200
7.3 @@ -0,0 +1,11 @@
7.4 +diff -durN gcc-4.4.0.orig/gcc/config/netbsd-elf.h gcc-4.4.0/gcc/config/netbsd-elf.h
7.5 +--- gcc-4.4.0.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
7.6 ++++ gcc-4.4.0/gcc/config/netbsd-elf.h 2009-05-27 21:38:14.000000000 +0200
7.7 +@@ -82,6 +82,7 @@
7.8 + #define NETBSD_LINK_SPEC_ELF \
7.9 + "%{assert*} %{R*} %{rpath*} \
7.10 + %{shared:-shared} \
7.11 ++ %{symbolic:-Bsymbolic} \
7.12 + %{!shared: \
7.13 + -dc -dp \
7.14 + %{!nostdlib: \
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/patches/gcc/4.4.1/170-sparc64-bsd.patch Sun Sep 27 11:35:43 2009 +0200
8.3 @@ -0,0 +1,29 @@
8.4 +diff -durN gcc-4.4.0.orig/gcc/config/sparc/freebsd.h gcc-4.4.0/gcc/config/sparc/freebsd.h
8.5 +--- gcc-4.4.0.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
8.6 ++++ gcc-4.4.0/gcc/config/sparc/freebsd.h 2009-05-27 21:38:16.000000000 +0200
8.7 +@@ -25,9 +25,22 @@
8.8 + /* FreeBSD needs the platform name (sparc64) defined.
8.9 + Emacs needs to know if the arch is 64 or 32-bits. */
8.10 +
8.11 +-#undef CPP_CPU64_DEFAULT_SPEC
8.12 +-#define CPP_CPU64_DEFAULT_SPEC \
8.13 +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
8.14 ++#undef FBSD_TARGET_CPU_CPP_BUILTINS
8.15 ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \
8.16 ++ do \
8.17 ++ { \
8.18 ++ if (TARGET_ARCH64) \
8.19 ++ { \
8.20 ++ builtin_define ("__sparc64__"); \
8.21 ++ builtin_define ("__sparc_v9__"); \
8.22 ++ builtin_define ("__sparcv9"); \
8.23 ++ } \
8.24 ++ else \
8.25 ++ builtin_define ("__sparc"); \
8.26 ++ builtin_define ("__sparc__"); \
8.27 ++ } \
8.28 ++ while (0)
8.29 ++
8.30 +
8.31 + #define LINK_SPEC "%(link_arch) \
8.32 + %{!mno-relax:%{!r:-relax}} \
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/patches/gcc/4.4.1/180-libgomp-no-werror.patch Sun Sep 27 11:35:43 2009 +0200
9.3 @@ -0,0 +1,12 @@
9.4 +diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure
9.5 +--- gcc-4.4.0.orig/libgomp/configure 2009-04-21 11:08:08.000000000 +0200
9.6 ++++ gcc-4.4.0/libgomp/configure 2009-05-27 21:38:19.000000000 +0200
9.7 +@@ -3334,7 +3334,7 @@
9.8 +
9.9 + # Add -Wall -Werror if we are using GCC.
9.10 + if test "x$GCC" = "xyes"; then
9.11 +- XCFLAGS="$XCFLAGS -Wall -Werror"
9.12 ++ XCFLAGS="$XCFLAGS -Wall"
9.13 + fi
9.14 +
9.15 + # Find other programs we need.
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/patches/gcc/4.4.1/190-flatten-switch-stmt-00.patch Sun Sep 27 11:35:43 2009 +0200
10.3 @@ -0,0 +1,24 @@
10.4 +diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c
10.5 +--- gcc-4.4.0.orig/gcc/stmt.c 2009-02-27 20:49:42.000000000 +0100
10.6 ++++ gcc-4.4.0/gcc/stmt.c 2009-05-27 21:38:21.000000000 +0200
10.7 +@@ -2376,7 +2376,11 @@
10.8 + use_cost_table
10.9 + = (TREE_CODE (orig_type) != ENUMERAL_TYPE
10.10 + && estimate_case_costs (case_list));
10.11 +- balance_case_nodes (&case_list, NULL);
10.12 ++ /* When optimizing for size, we want a straight list to avoid
10.13 ++ jumps as much as possible. This basically creates an if-else
10.14 ++ chain. */
10.15 ++ if (!optimize_size)
10.16 ++ balance_case_nodes (&case_list, NULL);
10.17 + emit_case_nodes (index, case_list, default_label, index_type);
10.18 + if (default_label)
10.19 + emit_jump (default_label);
10.20 +@@ -2942,6 +2946,7 @@
10.21 + {
10.22 + if (!node_has_low_bound (node, index_type))
10.23 + {
10.24 ++ if (!optimize_size) /* don't jl to the .default_label. */
10.25 + emit_cmp_and_jump_insns (index,
10.26 + convert_modes
10.27 + (mode, imode,
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/patches/gcc/4.4.1/200-libiberty.h-asprintf.patch Sun Sep 27 11:35:43 2009 +0200
11.3 @@ -0,0 +1,15 @@
11.4 +diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h
11.5 +--- gcc-4.4.0.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200
11.6 ++++ gcc-4.4.0/include/libiberty.h 2009-05-27 21:38:24.000000000 +0200
11.7 +@@ -595,8 +595,11 @@
11.8 + /* Like sprintf but provides a pointer to malloc'd storage, which must
11.9 + be freed by the caller. */
11.10 +
11.11 ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
11.12 ++#ifndef asprintf
11.13 + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
11.14 + #endif
11.15 ++#endif
11.16 +
11.17 + #if !HAVE_DECL_VASPRINTF
11.18 + /* Like vsprintf but provides a pointer to malloc'd storage, which
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/patches/gcc/4.4.1/210-arm-unbreak-armv4t.patch Sun Sep 27 11:35:43 2009 +0200
12.3 @@ -0,0 +1,12 @@
12.4 +diff -durN gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h gcc-4.4.0/gcc/config/arm/linux-eabi.h
12.5 +--- gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100
12.6 ++++ gcc-4.4.0/gcc/config/arm/linux-eabi.h 2009-05-27 21:38:26.000000000 +0200
12.7 +@@ -44,7 +44,7 @@
12.8 + The ARM10TDMI core is the default for armv5t, so set
12.9 + SUBTARGET_CPU_DEFAULT to achieve this. */
12.10 + #undef SUBTARGET_CPU_DEFAULT
12.11 +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
12.12 ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
12.13 +
12.14 + /* TARGET_BIG_ENDIAN_DEFAULT is set in
12.15 + config.gcc for big endian configurations. */
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/patches/gcc/4.4.1/220-libiberty-pic.patch Sun Sep 27 11:35:43 2009 +0200
13.3 @@ -0,0 +1,11 @@
13.4 +diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in
13.5 +--- gcc-4.4.0.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200
13.6 ++++ gcc-4.4.0/libiberty/Makefile.in 2009-05-27 21:38:29.000000000 +0200
13.7 +@@ -227,6 +227,7 @@
13.8 + $(AR) $(AR_FLAGS) $(TARGETLIB) \
13.9 + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
13.10 + $(RANLIB) $(TARGETLIB); \
13.11 ++ cp $(TARGETLIB) ../ ; \
13.12 + cd ..; \
13.13 + else true; fi
13.14 +
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/patches/gcc/4.4.1/230-superh-default-multilib.patch Sun Sep 27 11:35:43 2009 +0200
14.3 @@ -0,0 +1,12 @@
14.4 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
14.5 +--- gcc-4.4.0.orig/gcc/config.gcc 2009-04-17 13:58:41.000000000 +0200
14.6 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:31.000000000 +0200
14.7 +@@ -2121,7 +2121,7 @@
14.8 + if test x${sh_multilibs} = x ; then
14.9 + case ${target} in
14.10 + sh64-superh-linux* | \
14.11 +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
14.12 ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
14.13 + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
14.14 + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
14.15 + sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/patches/gcc/4.4.1/240-libstdc++-pic.patch Sun Sep 27 11:35:43 2009 +0200
15.3 @@ -0,0 +1,53 @@
15.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am gcc-4.4.0/libstdc++-v3/src/Makefile.am
15.5 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am 2009-04-10 01:23:07.000000000 +0200
15.6 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.am 2009-05-27 21:38:34.000000000 +0200
15.7 +@@ -351,6 +351,13 @@
15.8 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
15.9 +
15.10 +
15.11 ++install-exec-local:
15.12 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
15.13 ++ if [ x"$$pic_objs" != x ]; then \
15.14 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
15.15 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
15.16 ++ fi
15.17 ++
15.18 + # Added bits to build debug library.
15.19 + if GLIBCXX_BUILD_DEBUG
15.20 + all-local: build_debug
15.21 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in gcc-4.4.0/libstdc++-v3/src/Makefile.in
15.22 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in 2009-01-17 03:03:25.000000000 +0100
15.23 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.in 2009-05-27 21:38:34.000000000 +0200
15.24 +@@ -726,7 +726,7 @@
15.25 +
15.26 + install-data-am: install-data-local
15.27 +
15.28 +-install-exec-am: install-toolexeclibLTLIBRARIES
15.29 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
15.30 +
15.31 + install-info: install-info-am
15.32 +
15.33 +@@ -765,7 +765,7 @@
15.34 + maintainer-clean-generic mostlyclean mostlyclean-compile \
15.35 + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
15.36 + tags uninstall uninstall-am uninstall-info-am \
15.37 +- uninstall-toolexeclibLTLIBRARIES
15.38 ++ uninstall-toolexeclibLTLIBRARIES install-exec-local
15.39 +
15.40 +
15.41 + # Symbol versioning for shared libraries.
15.42 +@@ -942,6 +942,14 @@
15.43 + install_debug:
15.44 + (cd ${debugdir} && $(MAKE) \
15.45 + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
15.46 ++
15.47 ++install-exec-local:
15.48 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
15.49 ++ if [ x"$$pic_objs" != x ]; then \
15.50 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
15.51 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
15.52 ++ fi
15.53 ++
15.54 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
15.55 + # Otherwise a system limit (for SysV at least) may be exceeded.
15.56 + .NOEXPORT:
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/patches/gcc/4.4.1/250-ia64-noteGNUstack.patch Sun Sep 27 11:35:43 2009 +0200
16.3 @@ -0,0 +1,79 @@
16.4 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.0/gcc/config/ia64/crtbegin.asm
16.5 +--- gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200
16.6 ++++ gcc-4.4.0/gcc/config/ia64/crtbegin.asm 2009-05-27 21:38:37.000000000 +0200
16.7 +@@ -252,3 +252,7 @@
16.8 + .weak __cxa_finalize
16.9 + #endif
16.10 + .weak _Jv_RegisterClasses
16.11 ++
16.12 ++#ifdef __linux__
16.13 ++.section .note.GNU-stack; .previous
16.14 ++#endif
16.15 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtend.asm gcc-4.4.0/gcc/config/ia64/crtend.asm
16.16 +--- gcc-4.4.0.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200
16.17 ++++ gcc-4.4.0/gcc/config/ia64/crtend.asm 2009-05-27 21:38:37.000000000 +0200
16.18 +@@ -119,3 +119,7 @@
16.19 +
16.20 + br.ret.sptk.many rp
16.21 + .endp __do_global_ctors_aux
16.22 ++
16.23 ++#ifdef __linux__
16.24 ++.section .note.GNU-stack; .previous
16.25 ++#endif
16.26 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crti.asm gcc-4.4.0/gcc/config/ia64/crti.asm
16.27 +--- gcc-4.4.0.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200
16.28 ++++ gcc-4.4.0/gcc/config/ia64/crti.asm 2009-05-27 21:38:37.000000000 +0200
16.29 +@@ -51,3 +51,7 @@
16.30 + .body
16.31 +
16.32 + # end of crti.asm
16.33 ++
16.34 ++#ifdef __linux__
16.35 ++.section .note.GNU-stack; .previous
16.36 ++#endif
16.37 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtn.asm gcc-4.4.0/gcc/config/ia64/crtn.asm
16.38 +--- gcc-4.4.0.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200
16.39 ++++ gcc-4.4.0/gcc/config/ia64/crtn.asm 2009-05-27 21:38:37.000000000 +0200
16.40 +@@ -41,3 +41,7 @@
16.41 + br.ret.sptk.many b0
16.42 +
16.43 + # end of crtn.asm
16.44 ++
16.45 ++#ifdef __linux__
16.46 ++.section .note.GNU-stack; .previous
16.47 ++#endif
16.48 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.0/gcc/config/ia64/lib1funcs.asm
16.49 +--- gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
16.50 ++++ gcc-4.4.0/gcc/config/ia64/lib1funcs.asm 2009-05-27 21:38:37.000000000 +0200
16.51 +@@ -793,3 +793,7 @@
16.52 + .endp __floattitf
16.53 + #endif
16.54 + #endif
16.55 ++
16.56 ++#ifdef __linux__
16.57 ++.section .note.GNU-stack; .previous
16.58 ++#endif
16.59 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/linux.h gcc-4.4.0/gcc/config/ia64/linux.h
16.60 +--- gcc-4.4.0.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100
16.61 ++++ gcc-4.4.0/gcc/config/ia64/linux.h 2009-05-27 21:38:37.000000000 +0200
16.62 +@@ -5,6 +5,8 @@
16.63 +
16.64 + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
16.65 +
16.66 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
16.67 ++
16.68 + /* This is for -profile to use -lc_p instead of -lc. */
16.69 + #undef CC1_SPEC
16.70 + #define CC1_SPEC "%{profile:-p} %{G*}"
16.71 +diff -durN gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.0/gcc/config/rs6000/ppc-asm.h
16.72 +--- gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200
16.73 ++++ gcc-4.4.0/gcc/config/rs6000/ppc-asm.h 2009-05-27 21:38:37.000000000 +0200
16.74 +@@ -172,7 +172,7 @@
16.75 + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
16.76 + #endif
16.77 +
16.78 +-#if defined __linux__ && !defined __powerpc64__
16.79 ++#if defined __linux__
16.80 + .section .note.GNU-stack
16.81 + .previous
16.82 + #endif
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/patches/gcc/4.4.1/260-sh-libgcc-stacks.patch Sun Sep 27 11:35:43 2009 +0200
17.3 @@ -0,0 +1,25 @@
17.4 +diff -durN gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.0/gcc/config/sh/lib1funcs.asm
17.5 +--- gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
17.6 ++++ gcc-4.4.0/gcc/config/sh/lib1funcs.asm 2009-05-27 21:38:39.000000000 +0200
17.7 +@@ -30,6 +30,11 @@
17.8 + !! recoded in assembly by Toshiyasu Morita
17.9 + !! tm@netcom.com
17.10 +
17.11 ++#if defined(__ELF__) && defined(__linux__)
17.12 ++.section .note.GNU-stack,"",%progbits
17.13 ++.previous
17.14 ++#endif
17.15 ++
17.16 + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
17.17 + ELF local label prefixes by J"orn Rennecke
17.18 + amylaar@cygnus.com */
17.19 +diff -durN gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.0/gcc/config/sh/linux-atomic.asm
17.20 +--- gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200
17.21 ++++ gcc-4.4.0/gcc/config/sh/linux-atomic.asm 2009-05-27 21:38:39.000000000 +0200
17.22 +@@ -136,3 +136,6 @@
17.23 + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov)
17.24 +
17.25 + #endif /* ! __SH5__ */
17.26 ++
17.27 ++.section .note.GNU-stack,"",%progbits
17.28 ++.previous
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/patches/gcc/4.4.1/270-sh-pr24836.patch Sun Sep 27 11:35:43 2009 +0200
18.3 @@ -0,0 +1,24 @@
18.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
18.5 +--- gcc-4.4.0.orig/gcc/configure 2009-05-27 21:38:08.000000000 +0200
18.6 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:42.000000000 +0200
18.7 +@@ -22205,7 +22205,7 @@
18.8 + tls_first_minor=14
18.9 + tls_as_opt="-m64 -Aesame --fatal-warnings"
18.10 + ;;
18.11 +- sh-*-* | sh[34]-*-*)
18.12 ++ sh-*-* | sh[34]*-*-*)
18.13 + conftest_s='
18.14 + .section ".tdata","awT",@progbits
18.15 + foo: .long 25
18.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
18.17 +--- gcc-4.4.0.orig/gcc/configure.ac 2009-05-27 21:38:08.000000000 +0200
18.18 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:42.000000000 +0200
18.19 +@@ -2673,7 +2673,7 @@
18.20 + tls_first_minor=14
18.21 + tls_as_opt="-m64 -Aesame --fatal-warnings"
18.22 + ;;
18.23 +- sh-*-* | sh[34]-*-*)
18.24 ++ sh-*-* | sh[34]*-*-*)
18.25 + conftest_s='
18.26 + .section ".tdata","awT",@progbits
18.27 + foo: .long 25
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/patches/gcc/4.4.1/280-freebsd.patch Sun Sep 27 11:35:43 2009 +0200
19.3 @@ -0,0 +1,94 @@
19.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
19.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200
19.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:45.000000000 +0200
19.7 +@@ -61,6 +61,8 @@
19.8 + builtin_assert ("system=unix"); \
19.9 + builtin_assert ("system=bsd"); \
19.10 + builtin_assert ("system=FreeBSD"); \
19.11 ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \
19.12 ++ builtin_define("_LONGLONG"); \
19.13 + FBSD_TARGET_CPU_CPP_BUILTINS(); \
19.14 + } \
19.15 + while (0)
19.16 +diff -durN gcc-4.4.0.orig/gcc/config/t-freebsd-eh gcc-4.4.0/gcc/config/t-freebsd-eh
19.17 +--- gcc-4.4.0.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100
19.18 ++++ gcc-4.4.0/gcc/config/t-freebsd-eh 2009-05-27 21:38:45.000000000 +0200
19.19 +@@ -0,0 +1,4 @@
19.20 ++# Use unwind-dw2-fde-glibc
19.21 ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
19.22 ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
19.23 ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
19.24 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
19.25 +--- gcc-4.4.0.orig/gcc/config.gcc 2009-05-27 21:38:34.000000000 +0200
19.26 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:45.000000000 +0200
19.27 +@@ -456,7 +456,7 @@
19.28 + # pleases around the provided core setting.
19.29 + gas=yes
19.30 + gnu_ld=yes
19.31 +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
19.32 ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
19.33 + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
19.34 + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
19.35 + tmake_file="t-slibgcc-elf-ver t-freebsd"
19.36 +@@ -1042,6 +1042,10 @@
19.37 + ;;
19.38 + i[34567]86-*-freebsd*)
19.39 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
19.40 ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
19.41 ++ if test ${fbsd_major} -ge 7; then
19.42 ++ tmake_file="${tmake_file} t-freebsd-eh"
19.43 ++ fi
19.44 + ;;
19.45 + x86_64-*-freebsd*)
19.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"
19.47 +diff -durN gcc-4.4.0.orig/gcc/crtstuff.c gcc-4.4.0/gcc/crtstuff.c
19.48 +--- gcc-4.4.0.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200
19.49 ++++ gcc-4.4.0/gcc/crtstuff.c 2009-05-27 21:38:45.000000000 +0200
19.50 +@@ -85,13 +85,15 @@
19.51 + && !defined(OBJECT_FORMAT_FLAT) \
19.52 + && defined(HAVE_LD_EH_FRAME_HDR) \
19.53 + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
19.54 +- && defined(__GLIBC__) && __GLIBC__ >= 2
19.55 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \
19.56 ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022))
19.57 + #include <link.h>
19.58 + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
19.59 + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */
19.60 + # if !defined(__UCLIBC__) \
19.61 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
19.62 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
19.63 ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
19.64 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
19.65 ++ || (__FreeBSD_version >= 700022)
19.66 + # define USE_PT_GNU_EH_FRAME
19.67 + # endif
19.68 + #endif
19.69 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c
19.70 +--- gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200
19.71 ++++ gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c 2009-05-27 21:38:45.000000000 +0200
19.72 +@@ -46,8 +46,9 @@
19.73 + #include "gthr.h"
19.74 +
19.75 + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
19.76 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
19.77 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
19.78 ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
19.79 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
19.80 ++ || (__FreeBSD_version >= 700022 ))
19.81 +
19.82 + #ifndef __RELOC_POINTER
19.83 + # define __RELOC_POINTER(ptr, base) ((ptr) + (base))
19.84 +@@ -63,6 +64,13 @@
19.85 + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
19.86 + #endif
19.87 +
19.88 ++/* Support FreeBSD */
19.89 ++#ifndef ElfW
19.90 ++# ifdef __ElfN
19.91 ++# define ElfW __ElfN
19.92 ++# endif
19.93 ++#endif
19.94 ++
19.95 + struct unw_eh_callback_data
19.96 + {
19.97 + _Unwind_Ptr pc;
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/patches/gcc/4.4.1/290-freebsd.patch Sun Sep 27 11:35:43 2009 +0200
20.3 @@ -0,0 +1,64 @@
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-05-27 21:38:47.000000000 +0200
20.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200
20.7 +@@ -86,9 +86,10 @@
20.8 + #define FBSD_STARTFILE_SPEC \
20.9 + "%{!shared: \
20.10 + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
20.11 +- %{!p:%{profile:gcrt1.o%s} \
20.12 +- %{!profile:crt1.o%s}}}} \
20.13 +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
20.14 ++ %{!p:%{profile:gcrt1.o%s} \
20.15 ++ %{!profile:crt1.o%s}}}} \
20.16 ++ crti.o%s \
20.17 ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
20.18 +
20.19 + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
20.20 + the magical crtend.o file (see crtstuff.c) which provides part of
20.21 +@@ -126,7 +127,8 @@
20.22 + %{pg: -lc_p} \
20.23 + }"
20.24 + #else
20.25 +-#if FBSD_MAJOR < 5
20.26 ++#include <sys/param.h>
20.27 ++#if __FreeBSD_version < 500016
20.28 + #define FBSD_LIB_SPEC " \
20.29 + %{!shared: \
20.30 + %{!pg: \
20.31 +@@ -136,17 +138,34 @@
20.32 + %{!pthread:-lc_p} \
20.33 + %{pthread:-lc_r_p}} \
20.34 + }"
20.35 +-#else
20.36 ++#elif __FreeBSD_version < 700022
20.37 + #define FBSD_LIB_SPEC " \
20.38 + %{!shared: \
20.39 + %{!pg: %{pthread:-lpthread} -lc} \
20.40 + %{pg: %{pthread:-lpthread_p} -lc_p} \
20.41 + }"
20.42 ++#else
20.43 ++#define FBSD_LIB_SPEC " \
20.44 ++ %{!shared: \
20.45 ++ %{!pg: %{pthread:-lpthread} -lc} \
20.46 ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \
20.47 ++ %{shared: \
20.48 ++ %{pthread:-lpthread} -lc} \
20.49 ++ "
20.50 + #endif
20.51 + #endif
20.52 +
20.53 +-#if FBSD_MAJOR < 6
20.54 ++#if FBSD_MAJOR < 5
20.55 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
20.56 + #else
20.57 + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
20.58 + #endif
20.59 ++
20.60 ++#if defined(HAVE_LD_EH_FRAME_HDR)
20.61 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
20.62 ++#endif
20.63 ++
20.64 ++/* Use --as-needed -lgcc_s for eh support. */
20.65 ++#ifdef HAVE_LD_AS_NEEDED
20.66 ++#define USE_LD_AS_NEEDED 1
20.67 ++#endif
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/patches/gcc/4.4.1/300-uclibc-conf.patch Sun Sep 27 11:35:43 2009 +0200
21.3 @@ -0,0 +1,35 @@
21.4 +diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh
21.5 +--- gcc-4.4.0.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200
21.6 ++++ gcc-4.4.0/contrib/regression/objs-gcc.sh 2009-05-27 21:38:53.000000000 +0200
21.7 +@@ -106,6 +106,10 @@
21.8 + then
21.9 + make all-gdb all-dejagnu all-ld || exit 1
21.10 + make install-gdb install-dejagnu install-ld || exit 1
21.11 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
21.12 ++ then
21.13 ++ make all-gdb all-dejagnu all-ld || exit 1
21.14 ++ make install-gdb install-dejagnu install-ld || exit 1
21.15 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
21.16 + make bootstrap || exit 1
21.17 + make install || exit 1
21.18 +diff -durN gcc-4.4.0.orig/libjava/classpath/ltconfig gcc-4.4.0/libjava/classpath/ltconfig
21.19 +--- gcc-4.4.0.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200
21.20 ++++ gcc-4.4.0/libjava/classpath/ltconfig 2009-05-27 21:38:53.000000000 +0200
21.21 +@@ -603,7 +603,7 @@
21.22 +
21.23 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
21.24 + case $host_os in
21.25 +-linux-gnu*) ;;
21.26 ++linux-gnu*|linux-uclibc*) ;;
21.27 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
21.28 + esac
21.29 +
21.30 +@@ -1251,7 +1251,7 @@
21.31 + ;;
21.32 +
21.33 + # This must be Linux ELF.
21.34 +-linux-gnu*)
21.35 ++linux*)
21.36 + version_type=linux
21.37 + need_lib_prefix=no
21.38 + need_version=no
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/patches/gcc/4.4.1/310-missing-execinfo_h.patch Sun Sep 27 11:35:43 2009 +0200
22.3 @@ -0,0 +1,12 @@
22.4 +diff -durN gcc-4.4.0.orig/boehm-gc/include/gc.h gcc-4.4.0/boehm-gc/include/gc.h
22.5 +--- gcc-4.4.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
22.6 ++++ gcc-4.4.0/boehm-gc/include/gc.h 2009-05-27 21:38:55.000000000 +0200
22.7 +@@ -503,7 +503,7 @@
22.8 + #if defined(__linux__) || defined(__GLIBC__)
22.9 + # include <features.h>
22.10 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
22.11 +- && !defined(__ia64__)
22.12 ++ && !defined(__ia64__) && !defined(__UCLIBC__)
22.13 + # ifndef GC_HAVE_BUILTIN_BACKTRACE
22.14 + # define GC_HAVE_BUILTIN_BACKTRACE
22.15 + # endif
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/patches/gcc/4.4.1/320-c99-snprintf.patch Sun Sep 27 11:35:43 2009 +0200
23.3 @@ -0,0 +1,12 @@
23.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.0/libstdc++-v3/include/c_global/cstdio
23.5 +--- gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200
23.6 ++++ gcc-4.4.0/libstdc++-v3/include/c_global/cstdio 2009-05-27 21:38:58.000000000 +0200
23.7 +@@ -139,7 +139,7 @@
23.8 +
23.9 + _GLIBCXX_END_NAMESPACE
23.10 +
23.11 +-#if _GLIBCXX_USE_C99
23.12 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
23.13 +
23.14 + #undef snprintf
23.15 + #undef vfscanf
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/patches/gcc/4.4.1/330-libmudflap-susv3-legacy.patch Sun Sep 27 11:35:43 2009 +0200
24.3 @@ -0,0 +1,48 @@
24.4 +diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c
24.5 +--- gcc-4.4.0.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200
24.6 ++++ gcc-4.4.0/libmudflap/mf-hooks2.c 2009-05-27 21:39:00.000000000 +0200
24.7 +@@ -421,7 +421,7 @@
24.8 + {
24.9 + TRACE ("%s\n", __PRETTY_FUNCTION__);
24.10 + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
24.11 +- bzero (s, n);
24.12 ++ memset (s, 0, n);
24.13 + }
24.14 +
24.15 +
24.16 +@@ -431,7 +431,7 @@
24.17 + TRACE ("%s\n", __PRETTY_FUNCTION__);
24.18 + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
24.19 + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
24.20 +- bcopy (src, dest, n);
24.21 ++ memmove (dest, src, n);
24.22 + }
24.23 +
24.24 +
24.25 +@@ -441,7 +441,7 @@
24.26 + TRACE ("%s\n", __PRETTY_FUNCTION__);
24.27 + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
24.28 + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
24.29 +- return bcmp (s1, s2, n);
24.30 ++ return n == 0 ? 0 : memcmp (s1, s2, n);
24.31 + }
24.32 +
24.33 +
24.34 +@@ -450,7 +450,7 @@
24.35 + size_t n = strlen (s);
24.36 + TRACE ("%s\n", __PRETTY_FUNCTION__);
24.37 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
24.38 +- return index (s, c);
24.39 ++ return strchr (s, c);
24.40 + }
24.41 +
24.42 +
24.43 +@@ -459,7 +459,7 @@
24.44 + size_t n = strlen (s);
24.45 + TRACE ("%s\n", __PRETTY_FUNCTION__);
24.46 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
24.47 +- return rindex (s, c);
24.48 ++ return strrchr (s, c);
24.49 + }
24.50 +
24.51 + /* XXX: stpcpy, memccpy */