diff options
122 files changed, 1240 insertions, 207 deletions
diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 979abaa4..77fc6d69 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -31,10 +31,14 @@ config CC_V_4_5_0 depends on EXPERIMENTAL select CC_GCC_4_5_or_later +config CC_V_4_4_5 + bool + prompt "4.4.5" + select CC_GCC_4_4_or_later + config CC_V_4_4_4 bool - prompt "4.4.4 (EXPERIMENTAL)" - depends on EXPERIMENTAL + prompt "4.4.4" select CC_GCC_4_4_or_later config CC_V_4_4_3 @@ -186,6 +190,7 @@ config CC_VERSION # CT_INSERT_VERSION_STRING_BELOW default "4.5.1" if CC_V_4_5_1 default "4.5.0" if CC_V_4_5_0 + default "4.4.5" if CC_V_4_4_5 default "4.4.4" if CC_V_4_4_4 default "4.4.3" if CC_V_4_4_3 default "4.4.2" if CC_V_4_4_2 diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2 index 1b4926b4..a87b3888 100644 --- a/config/cc/gcc.in.2 +++ b/config/cc/gcc.in.2 @@ -1,3 +1,5 @@ +# Misc library-related options + config CC_GCC_ENABLE_TARGET_OPTSPACE bool prompt "Optimize gcc libs for size" @@ -46,6 +48,43 @@ config CC_STATIC_LIBSTDCXX having to worry about distributing the matching version of libstdc++ along with it. +config CC_GCC_LIBMUDFLAP + bool + prompt "Compile libmudflap" + default n + help + libmudflap is a pointer-use checking tool, which can detect + various mis-usages of pointers in C and (to some extents) C++. + + You should say 'N' here, as libmduflap generates instrumented + code (thus it is a bit bigger and a bit slower) and requires + re-compilation and re-link, while it exists better run-time + alternatives (eg. DUMA, dmalloc...) that need neither re- + compilation nor re-link. + +config CC_GCC_LIBGOMP + bool + prompt "Compile libgomp" + default n + help + libgomp is "the GNU implementation of the OpenMP Application Programming + Interface (API) for multi-platform shared-memory parallel programming in + C/C++ and Fortran". See: + http://gcc.gnu.org/onlinedocs/libgomp/ + + The default is 'N'. Say 'Y' if you need it, and report success/failure. + +config CC_GCC_LIBSSP + bool + prompt "Compile libssp" + default n + help + libssp is the run-time Stack-Smashing Protection library. + + The default is 'N'. Say 'Y' if you need it, and report success/failure. + +#----------------------------------------------------------------------------- + comment "Misc. obscure options." config CC_CXA_ATEXIT @@ -92,16 +131,15 @@ config CC_GCC_SJLJ_EXCEPTIONS It can happen that ./configure is wrong in some cases. Known case is for ARM big endian, where you should say 'N'. -config CC_GCC_LIBMUDFLAP - bool - prompt "Compile libmudflap" - default n +config CC_GCC_LDBL_128 + tristate + prompt "Enable 128-bit long doubles" + default m + depends on CC_GCC_4_2_or_later help - libmudflap is a pointer-use checking tool, which can detect - various mis-usages of pointers in C and (to some extents) C++. + Saying 'Y' will force gcc to use 128-bit wide long doubles + Saying 'N' will force gcc to use 64-bit wide long doubles + Saying 'M' will let gcc choose (default is 128-bit for + glibc >= 2.4, 64-bit otherwise) - You should say 'N' here, as libmduflap generates instrumented - code (thus it is a bit bigger and a bit slower) and requires - re-compilation and re-link, while it exists better run-time - alternatives (eg. DUMA, dmalloc...) that need neither re- - compilation nor re-link. + If in doubt, keep the default, ie. 'M'. diff --git a/config/companion_libs/cloog.in b/config/companion_libs/cloog.in index 35edfed6..df29853f 100644 --- a/config/companion_libs/cloog.in +++ b/config/companion_libs/cloog.in @@ -6,6 +6,10 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +config CLOOG_V_0_15_10 + bool + prompt "0.15.10" + config CLOOG_V_0_15_9 bool prompt "0.15.9" @@ -43,6 +47,7 @@ config CLOOG_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "0.15.10" if CLOOG_V_0_15_10 default "0.15.9" if CLOOG_V_0_15_9 default "0.15.8" if CLOOG_V_0_15_8 default "0.15.7" if CLOOG_V_0_15_7 diff --git a/config/kernel/linux.in b/config/kernel/linux.in index 10597160..74b84368 100644 --- a/config/kernel/linux.in +++ b/config/kernel/linux.in @@ -26,37 +26,13 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config KERNEL_V_2_6_35_7 - bool - prompt "2.6.35.7" - -config KERNEL_V_2_6_35_6 - bool - prompt "2.6.35.6" - -config KERNEL_V_2_6_35_5 - bool - prompt "2.6.35.5" - -config KERNEL_V_2_6_35_4 +config KERNEL_V_2_6_36 bool - prompt "2.6.35.4" + prompt "2.6.36" -config KERNEL_V_2_6_35_3 - bool - prompt "2.6.35.3" - -config KERNEL_V_2_6_35_2 - bool - prompt "2.6.35.2" - -config KERNEL_V_2_6_35_1 - bool - prompt "2.6.35.1" - -config KERNEL_V_2_6_35 +config KERNEL_V_2_6_35_7 bool - prompt "2.6.35" + prompt "2.6.35.7" config KERNEL_V_2_6_34_7 bool @@ -125,14 +101,8 @@ config KERNEL_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "2.6.36" if KERNEL_V_2_6_36 default "2.6.35.7" if KERNEL_V_2_6_35_7 - default "2.6.35.6" if KERNEL_V_2_6_35_6 - default "2.6.35.5" if KERNEL_V_2_6_35_5 - default "2.6.35.4" if KERNEL_V_2_6_35_4 - default "2.6.35.3" if KERNEL_V_2_6_35_3 - default "2.6.35.2" if KERNEL_V_2_6_35_2 - default "2.6.35.1" if KERNEL_V_2_6_35_1 - default "2.6.35" if KERNEL_V_2_6_35 default "2.6.34.7" if KERNEL_V_2_6_34_7 default "2.6.33.7" if KERNEL_V_2_6_33_7 default "2.6.32.24" if KERNEL_V_2_6_32_24 diff --git a/config/libc/eglibc.in b/config/libc/eglibc.in index b13571b6..e25ef1a0 100644 --- a/config/libc/eglibc.in +++ b/config/libc/eglibc.in @@ -18,7 +18,17 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW -config LIBC_V_2_10 +config EGLIBC_V_2_12 + bool + prompt "2_12" + depends on EXPERIMENTAL + +config EGLIBC_V_2_11 + bool + prompt "2_11" + depends on EXPERIMENTAL + +config EGLIBC_V_2_10 bool prompt "2_10" @@ -58,7 +68,9 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW - default "2_10" if LIBC_V_2_10 + default "2_12" if EGLIBC_V_2_12 + default "2_11" if EGLIBC_V_2_11 + default "2_10" if EGLIBC_V_2_10 default "2_9" if EGLIBC_V_2_9 default "2_8" if EGLIBC_V_2_8 default "2_7" if EGLIBC_V_2_7 diff --git a/patches/gcc/4.4.4/100-alpha-mieee-default.patch b/patches/gcc/4.4.4/100-alpha-mieee-default.patch index 5b1b4c27..a5759cf6 100644 --- a/patches/gcc/4.4.4/100-alpha-mieee-default.patch +++ b/patches/gcc/4.4.4/100-alpha-mieee-default.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.h gcc-4.4.0/gcc/config/alpha/alpha.h - diff -durN gcc-4.4.4.orig/gcc/config/alpha/alpha.h gcc-4.4.4/gcc/config/alpha/alpha.h --- gcc-4.4.4.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100 +++ gcc-4.4.4/gcc/config/alpha/alpha.h 2010-05-16 19:10:19.000000000 +0200 diff --git a/patches/gcc/4.4.4/110-trampolinewarn.patch b/patches/gcc/4.4.4/110-trampolinewarn.patch index c7cf7141..3b221d94 100644 --- a/patches/gcc/4.4.4/110-trampolinewarn.patch +++ b/patches/gcc/4.4.4/110-trampolinewarn.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c - diff -durN gcc-4.4.4.orig/gcc/builtins.c gcc-4.4.4/gcc/builtins.c --- gcc-4.4.4.orig/gcc/builtins.c 2010-03-22 16:00:20.000000000 +0100 +++ gcc-4.4.4/gcc/builtins.c 2010-05-16 19:10:34.000000000 +0200 diff --git a/patches/gcc/4.4.4/120-java-nomulti.patch b/patches/gcc/4.4.4/120-java-nomulti.patch index c9814d67..44306370 100644 --- a/patches/gcc/4.4.4/120-java-nomulti.patch +++ b/patches/gcc/4.4.4/120-java-nomulti.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure - diff -durN gcc-4.4.4.orig/libjava/configure gcc-4.4.4/libjava/configure --- gcc-4.4.4.orig/libjava/configure 2010-04-29 10:26:54.000000000 +0200 +++ gcc-4.4.4/libjava/configure 2010-05-16 19:10:49.000000000 +0200 diff --git a/patches/gcc/4.4.4/130-cross-compile.patch b/patches/gcc/4.4.4/130-cross-compile.patch index ccb2bca9..18997160 100644 --- a/patches/gcc/4.4.4/130-cross-compile.patch +++ b/patches/gcc/4.4.4/130-cross-compile.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure - diff -durN gcc-4.4.4.orig/gcc/configure gcc-4.4.4/gcc/configure --- gcc-4.4.4.orig/gcc/configure 2009-10-19 14:15:27.000000000 +0200 +++ gcc-4.4.4/gcc/configure 2010-05-16 19:11:00.000000000 +0200 diff --git a/patches/gcc/4.4.4/140-default-format-security.patch b/patches/gcc/4.4.4/140-default-format-security.patch index 60c0d8ad..b94f520e 100644 --- a/patches/gcc/4.4.4/140-default-format-security.patch +++ b/patches/gcc/4.4.4/140-default-format-security.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c - diff -durN gcc-4.4.4.orig/gcc/c-common.c gcc-4.4.4/gcc/c-common.c --- gcc-4.4.4.orig/gcc/c-common.c 2009-11-05 15:57:57.000000000 +0100 +++ gcc-4.4.4/gcc/c-common.c 2010-05-16 19:11:21.000000000 +0200 diff --git a/patches/gcc/4.4.4/150-default-fortify-source.patch b/patches/gcc/4.4.4/150-default-fortify-source.patch index 1e49ac81..e39ca10b 100644 --- a/patches/gcc/4.4.4/150-default-fortify-source.patch +++ b/patches/gcc/4.4.4/150-default-fortify-source.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi - diff -durN gcc-4.4.4.orig/gcc/doc/invoke.texi gcc-4.4.4/gcc/doc/invoke.texi --- gcc-4.4.4.orig/gcc/doc/invoke.texi 2010-05-16 19:11:21.000000000 +0200 +++ gcc-4.4.4/gcc/doc/invoke.texi 2010-05-16 19:11:30.000000000 +0200 diff --git a/patches/gcc/4.4.4/160-netbsd-symbolic.patch b/patches/gcc/4.4.4/160-netbsd-symbolic.patch index 7ef54024..d6f3ce58 100644 --- a/patches/gcc/4.4.4/160-netbsd-symbolic.patch +++ b/patches/gcc/4.4.4/160-netbsd-symbolic.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/netbsd-elf.h gcc-4.4.0/gcc/config/netbsd-elf.h - diff -durN gcc-4.4.4.orig/gcc/config/netbsd-elf.h gcc-4.4.4/gcc/config/netbsd-elf.h --- gcc-4.4.4.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200 +++ gcc-4.4.4/gcc/config/netbsd-elf.h 2010-05-16 19:11:50.000000000 +0200 diff --git a/patches/gcc/4.4.4/170-sparc64-bsd.patch b/patches/gcc/4.4.4/170-sparc64-bsd.patch index 8ac9a1a7..089f51c5 100644 --- a/patches/gcc/4.4.4/170-sparc64-bsd.patch +++ b/patches/gcc/4.4.4/170-sparc64-bsd.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/sparc/freebsd.h gcc-4.4.0/gcc/config/sparc/freebsd.h - diff -durN gcc-4.4.4.orig/gcc/config/sparc/freebsd.h gcc-4.4.4/gcc/config/sparc/freebsd.h --- gcc-4.4.4.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200 +++ gcc-4.4.4/gcc/config/sparc/freebsd.h 2010-05-16 19:12:00.000000000 +0200 diff --git a/patches/gcc/4.4.4/180-libgomp-no-werror.patch b/patches/gcc/4.4.4/180-libgomp-no-werror.patch index b8b56bfd..0afbf559 100644 --- a/patches/gcc/4.4.4/180-libgomp-no-werror.patch +++ b/patches/gcc/4.4.4/180-libgomp-no-werror.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure - diff -durN gcc-4.4.4.orig/libgomp/configure gcc-4.4.4/libgomp/configure --- gcc-4.4.4.orig/libgomp/configure 2010-04-29 10:26:54.000000000 +0200 +++ gcc-4.4.4/libgomp/configure 2010-05-16 19:12:19.000000000 +0200 diff --git a/patches/gcc/4.4.4/190-flatten-switch-stmt-00.patch b/patches/gcc/4.4.4/190-flatten-switch-stmt-00.patch index 1d71c7ae..03b80605 100644 --- a/patches/gcc/4.4.4/190-flatten-switch-stmt-00.patch +++ b/patches/gcc/4.4.4/190-flatten-switch-stmt-00.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c - diff -durN gcc-4.4.4.orig/gcc/stmt.c gcc-4.4.4/gcc/stmt.c --- gcc-4.4.4.orig/gcc/stmt.c 2010-03-08 12:46:28.000000000 +0100 +++ gcc-4.4.4/gcc/stmt.c 2010-05-16 19:12:31.000000000 +0200 diff --git a/patches/gcc/4.4.4/200-libiberty.h-asprintf.patch b/patches/gcc/4.4.4/200-libiberty.h-asprintf.patch index 7c35ca8c..7e4fe1f1 100644 --- a/patches/gcc/4.4.4/200-libiberty.h-asprintf.patch +++ b/patches/gcc/4.4.4/200-libiberty.h-asprintf.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h - diff -durN gcc-4.4.4.orig/include/libiberty.h gcc-4.4.4/include/libiberty.h --- gcc-4.4.4.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200 +++ gcc-4.4.4/include/libiberty.h 2010-05-16 19:12:50.000000000 +0200 diff --git a/patches/gcc/4.4.4/210-arm-unbreak-armv4t.patch b/patches/gcc/4.4.4/210-arm-unbreak-armv4t.patch index 1792fdd3..6f0b4baf 100644 --- a/patches/gcc/4.4.4/210-arm-unbreak-armv4t.patch +++ b/patches/gcc/4.4.4/210-arm-unbreak-armv4t.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h gcc-4.4.0/gcc/config/arm/linux-eabi.h - diff -durN gcc-4.4.4.orig/gcc/config/arm/linux-eabi.h gcc-4.4.4/gcc/config/arm/linux-eabi.h --- gcc-4.4.4.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100 +++ gcc-4.4.4/gcc/config/arm/linux-eabi.h 2010-05-16 19:13:00.000000000 +0200 diff --git a/patches/gcc/4.4.4/220-libiberty-pic.patch b/patches/gcc/4.4.4/220-libiberty-pic.patch index d7fc57fc..6a291bb3 100644 --- a/patches/gcc/4.4.4/220-libiberty-pic.patch +++ b/patches/gcc/4.4.4/220-libiberty-pic.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in - diff -durN gcc-4.4.4.orig/libiberty/Makefile.in gcc-4.4.4/libiberty/Makefile.in --- gcc-4.4.4.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200 +++ gcc-4.4.4/libiberty/Makefile.in 2010-05-16 19:13:20.000000000 +0200 diff --git a/patches/gcc/4.4.4/230-superh-default-multilib.patch b/patches/gcc/4.4.4/230-superh-default-multilib.patch index 834b1808..2631c778 100644 --- a/patches/gcc/4.4.4/230-superh-default-multilib.patch +++ b/patches/gcc/4.4.4/230-superh-default-multilib.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc - diff -durN gcc-4.4.4.orig/gcc/config.gcc gcc-4.4.4/gcc/config.gcc --- gcc-4.4.4.orig/gcc/config.gcc 2010-02-18 05:24:04.000000000 +0100 +++ gcc-4.4.4/gcc/config.gcc 2010-05-16 19:13:30.000000000 +0200 diff --git a/patches/gcc/4.4.4/240-libstdc++-pic.patch b/patches/gcc/4.4.4/240-libstdc++-pic.patch index 4ebd913b..756d6205 100644 --- a/patches/gcc/4.4.4/240-libstdc++-pic.patch +++ b/patches/gcc/4.4.4/240-libstdc++-pic.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am gcc-4.4.0/libstdc++-v3/src/Makefile.am - diff -durN gcc-4.4.4.orig/libstdc++-v3/src/Makefile.am gcc-4.4.4/libstdc++-v3/src/Makefile.am --- gcc-4.4.4.orig/libstdc++-v3/src/Makefile.am 2009-08-26 21:04:11.000000000 +0200 +++ gcc-4.4.4/libstdc++-v3/src/Makefile.am 2010-05-16 19:13:50.000000000 +0200 diff --git a/patches/gcc/4.4.4/250-ia64-noteGNUstack.patch b/patches/gcc/4.4.4/250-ia64-noteGNUstack.patch index 8cf382a4..ce1bfe6e 100644 --- a/patches/gcc/4.4.4/250-ia64-noteGNUstack.patch +++ b/patches/gcc/4.4.4/250-ia64-noteGNUstack.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.0/gcc/config/ia64/crtbegin.asm - diff -durN gcc-4.4.4.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.4/gcc/config/ia64/crtbegin.asm --- gcc-4.4.4.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/gcc/config/ia64/crtbegin.asm 2010-05-16 19:13:59.000000000 +0200 diff --git a/patches/gcc/4.4.4/260-sh-libgcc-stacks.patch b/patches/gcc/4.4.4/260-sh-libgcc-stacks.patch index e14f4efe..1326b1c9 100644 --- a/patches/gcc/4.4.4/260-sh-libgcc-stacks.patch +++ b/patches/gcc/4.4.4/260-sh-libgcc-stacks.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.0/gcc/config/sh/lib1funcs.asm - diff -durN gcc-4.4.4.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.4/gcc/config/sh/lib1funcs.asm --- gcc-4.4.4.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/gcc/config/sh/lib1funcs.asm 2010-05-16 19:14:19.000000000 +0200 diff --git a/patches/gcc/4.4.4/270-sh-pr24836.patch b/patches/gcc/4.4.4/270-sh-pr24836.patch index 9f3419ac..15377215 100644 --- a/patches/gcc/4.4.4/270-sh-pr24836.patch +++ b/patches/gcc/4.4.4/270-sh-pr24836.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure - diff -durN gcc-4.4.4.orig/gcc/configure gcc-4.4.4/gcc/configure --- gcc-4.4.4.orig/gcc/configure 2010-05-16 19:11:00.000000000 +0200 +++ gcc-4.4.4/gcc/configure 2010-05-16 19:14:31.000000000 +0200 diff --git a/patches/gcc/4.4.4/280-freebsd.patch b/patches/gcc/4.4.4/280-freebsd.patch index 56766baf..ea7f63ba 100644 --- a/patches/gcc/4.4.4/280-freebsd.patch +++ b/patches/gcc/4.4.4/280-freebsd.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h - diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h --- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200 diff --git a/patches/gcc/4.4.4/290-freebsd.patch b/patches/gcc/4.4.4/290-freebsd.patch index 76577260..94fa03b5 100644 --- a/patches/gcc/4.4.4/290-freebsd.patch +++ b/patches/gcc/4.4.4/290-freebsd.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h - diff -durN gcc-4.4.4.orig/gcc/config/freebsd-spec.h gcc-4.4.4/gcc/config/freebsd-spec.h --- gcc-4.4.4.orig/gcc/config/freebsd-spec.h 2010-05-16 19:36:15.000000000 +0200 +++ gcc-4.4.4/gcc/config/freebsd-spec.h 2010-05-16 19:36:21.000000000 +0200 diff --git a/patches/gcc/4.4.4/300-uclibc-conf.patch b/patches/gcc/4.4.4/300-uclibc-conf.patch index b8980753..9418fa90 100644 --- a/patches/gcc/4.4.4/300-uclibc-conf.patch +++ b/patches/gcc/4.4.4/300-uclibc-conf.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh - diff -durN gcc-4.4.4.orig/contrib/regression/objs-gcc.sh gcc-4.4.4/contrib/regression/objs-gcc.sh --- gcc-4.4.4.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/contrib/regression/objs-gcc.sh 2010-05-16 19:36:36.000000000 +0200 diff --git a/patches/gcc/4.4.4/310-missing-execinfo_h.patch b/patches/gcc/4.4.4/310-missing-execinfo_h.patch index 01364926..de5cab4c 100644 --- a/patches/gcc/4.4.4/310-missing-execinfo_h.patch +++ b/patches/gcc/4.4.4/310-missing-execinfo_h.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/boehm-gc/include/gc.h gcc-4.4.0/boehm-gc/include/gc.h - diff -durN gcc-4.4.4.orig/boehm-gc/include/gc.h gcc-4.4.4/boehm-gc/include/gc.h --- gcc-4.4.4.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 +++ gcc-4.4.4/boehm-gc/include/gc.h 2010-05-16 19:36:48.000000000 +0200 diff --git a/patches/gcc/4.4.4/320-c99-snprintf.patch b/patches/gcc/4.4.4/320-c99-snprintf.patch index bb910607..93315649 100644 --- a/patches/gcc/4.4.4/320-c99-snprintf.patch +++ b/patches/gcc/4.4.4/320-c99-snprintf.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.0/libstdc++-v3/include/c_global/cstdio - diff -durN gcc-4.4.4.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.4/libstdc++-v3/include/c_global/cstdio --- gcc-4.4.4.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/libstdc++-v3/include/c_global/cstdio 2010-05-16 19:37:06.000000000 +0200 diff --git a/patches/gcc/4.4.4/330-libmudflap-susv3-legacy.patch b/patches/gcc/4.4.4/330-libmudflap-susv3-legacy.patch index cbba06af..e83e14eb 100644 --- a/patches/gcc/4.4.4/330-libmudflap-susv3-legacy.patch +++ b/patches/gcc/4.4.4/330-libmudflap-susv3-legacy.patch @@ -1,5 +1,3 @@ -diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c - diff -durN gcc-4.4.4.orig/libmudflap/mf-hooks2.c gcc-4.4.4/libmudflap/mf-hooks2.c --- gcc-4.4.4.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/libmudflap/mf-hooks2.c 2010-05-16 19:37:18.000000000 +0200 diff --git a/patches/gcc/4.4.4/340-ecjx-host-cc.patch b/patches/gcc/4.4.4/340-ecjx-host-cc.patch index 968d5b5c..e614eb5e 100644 --- a/patches/gcc/4.4.4/340-ecjx-host-cc.patch +++ b/patches/gcc/4.4.4/340-ecjx-host-cc.patch @@ -1,5 +1,3 @@ -diff -ur gcc-4.4.1-orig/libjava/Makefile.in gcc-4.4.1/libjava/Makefile.in - diff -durN gcc-4.4.4.orig/libjava/Makefile.in gcc-4.4.4/libjava/Makefile.in --- gcc-4.4.4.orig/libjava/Makefile.in 2010-04-29 10:26:54.000000000 +0200 +++ gcc-4.4.4/libjava/Makefile.in 2010-05-16 19:37:38.000000000 +0200 diff --git a/patches/gcc/4.4.4/350-index_macro.patch b/patches/gcc/4.4.4/350-index_macro.patch index ff99aca2..29c3c918 100644 --- a/patches/gcc/4.4.4/350-index_macro.patch +++ b/patches/gcc/4.4.4/350-index_macro.patch @@ -1,11 +1,7 @@ -Original patch from: ../4.3.2/290-index_macro.patch - -= BEGIN original header =- Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_304-index_macro.patch -= END original header =- -diff -durN gcc-4.3.3.orig/libstdc++-v3/include/ext/rope gcc-4.3.3/libstdc++-v3/include/ext/rope - diff -durN gcc-4.4.4.orig/libstdc++-v3/include/ext/rope gcc-4.4.4/libstdc++-v3/include/ext/rope --- gcc-4.4.4.orig/libstdc++-v3/include/ext/rope 2009-04-10 01:23:07.000000000 +0200 +++ gcc-4.4.4/libstdc++-v3/include/ext/rope 2010-05-16 19:37:47.000000000 +0200 diff --git a/patches/gcc/4.4.4/380-powerpc-libgcc_s-link-libm.patch b/patches/gcc/4.4.4/380-powerpc-libgcc_s-link-libm.patch index 3fe8757d..a47a308f 100644 --- a/patches/gcc/4.4.4/380-powerpc-libgcc_s-link-libm.patch +++ b/patches/gcc/4.4.4/380-powerpc-libgcc_s-link-libm.patch @@ -7,8 +7,6 @@ without explicitely specifying -lm fails, resulting in a broken bootstrap of the compiler. -diff -rdup gcc-4.4.0.old/gcc/config/t-slibgcc-elf-ver gcc-4.4.0/gcc/config/t-slibgcc-elf-ver - diff -durN gcc-4.4.4.orig/gcc/config/t-slibgcc-elf-ver gcc-4.4.4/gcc/config/t-slibgcc-elf-ver --- gcc-4.4.4.orig/gcc/config/t-slibgcc-elf-ver 2010-01-04 16:13:08.000000000 +0100 +++ gcc-4.4.4/gcc/config/t-slibgcc-elf-ver 2010-05-16 19:38:36.000000000 +0200 diff --git a/patches/gcc/4.4.5/100-alpha-mieee-default.patch b/patches/gcc/4.4.5/100-alpha-mieee-default.patch new file mode 100644 index 00000000..5f3acd81 --- /dev/null +++ b/patches/gcc/4.4.5/100-alpha-mieee-default.patch @@ -0,0 +1,24 @@ +diff -durN gcc-4.4.5.orig/gcc/config/alpha/alpha.h gcc-4.4.5/gcc/config/alpha/alpha.h +--- gcc-4.4.5.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100 ++++ gcc-4.4.5/gcc/config/alpha/alpha.h 2010-10-09 22:57:31.000000000 +0200 +@@ -95,6 +95,8 @@ + while (0) + #endif + ++#define CPP_SPEC "%{!no-ieee:-mieee}" ++ + #define WORD_SWITCH_TAKES_ARG(STR) \ + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR)) + +diff -durN gcc-4.4.5.orig/gcc/config/alpha/alpha.opt gcc-4.4.5/gcc/config/alpha/alpha.opt +--- gcc-4.4.5.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.5/gcc/config/alpha/alpha.opt 2010-10-09 22:57:31.000000000 +0200 +@@ -39,7 +39,7 @@ + Request IEEE-conformant math library routines (OSF/1) + + mieee +-Target Report RejectNegative Mask(IEEE) ++Target Report Mask(IEEE) + Emit IEEE-conformant code, without inexact exceptions + + mieee-with-inexact diff --git a/patches/gcc/4.4.5/110-trampolinewarn.patch b/patches/gcc/4.4.5/110-trampolinewarn.patch new file mode 100644 index 00000000..0bce8570 --- /dev/null +++ b/patches/gcc/4.4.5/110-trampolinewarn.patch @@ -0,0 +1,27 @@ +diff -durN gcc-4.4.5.orig/gcc/builtins.c gcc-4.4.5/gcc/builtins.c +--- gcc-4.4.5.orig/gcc/builtins.c 2010-03-22 16:00:20.000000000 +0100 ++++ gcc-4.4.5/gcc/builtins.c 2010-10-09 22:57:58.000000000 +0200 +@@ -5783,6 +5783,9 @@ + trampolines_created = 1; + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain); + ++ if (warn_trampolines) ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)"); ++ + return const0_rtx; + } + +diff -durN gcc-4.4.5.orig/gcc/common.opt gcc-4.4.5/gcc/common.opt +--- gcc-4.4.5.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100 ++++ gcc-4.4.5/gcc/common.opt 2010-10-09 22:57:58.000000000 +0200 +@@ -197,6 +197,10 @@ + Common Var(warn_type_limits) Init(-1) Warning + Warn if a comparison is always true or always false due to the limited range of the data type + ++Wtrampolines ++Common Var(warn_trampolines) Init(1) ++Warn whenever a trampoline is generated ++ + Wuninitialized + Common Var(warn_uninitialized) Warning + Warn about uninitialized automatic variables diff --git a/patches/gcc/4.4.5/120-java-nomulti.patch b/patches/gcc/4.4.5/120-java-nomulti.patch new file mode 100644 index 00000000..aded63e0 --- /dev/null +++ b/patches/gcc/4.4.5/120-java-nomulti.patch @@ -0,0 +1,46 @@ +diff -durN gcc-4.4.5.orig/libjava/configure gcc-4.4.5/libjava/configure +--- gcc-4.4.5.orig/libjava/configure 2010-10-01 10:26:18.000000000 +0200 ++++ gcc-4.4.5/libjava/configure 2010-10-09 22:58:04.000000000 +0200 +@@ -1022,6 +1022,8 @@ + default=yes + --enable-java-maintainer-mode + allow rebuilding of .class and .h files ++ --enable-libjava-multilib ++ build libjava as multilib + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful +@@ -1974,6 +1976,16 @@ + fi + + ++# Check whether --enable-libjava-multilib was given. ++if test "${enable_libjava_multilib+set}" = set; then ++ enableval=$enable_libjava_multilib; ++fi ++ ++if test "$enable_libjava_multilib" = no; then ++ multilib=no ++ ac_configure_args="$ac_configure_args --disable-multilib" ++fi ++ + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. + + +diff -durN gcc-4.4.5.orig/libjava/configure.ac gcc-4.4.5/libjava/configure.ac +--- gcc-4.4.5.orig/libjava/configure.ac 2010-06-11 13:49:16.000000000 +0200 ++++ gcc-4.4.5/libjava/configure.ac 2010-10-09 22:58:04.000000000 +0200 +@@ -139,6 +139,13 @@ + [allow rebuilding of .class and .h files])) + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes) + ++AC_ARG_ENABLE(libjava-multilib, ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib])) ++if test "$enable_libjava_multilib" = no; then ++ multilib=no ++ ac_configure_args="$ac_configure_args --disable-multilib" ++fi ++ + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. + GCC_NO_EXECUTABLES + diff --git a/patches/gcc/4.4.5/130-cross-compile.patch b/patches/gcc/4.4.5/130-cross-compile.patch new file mode 100644 index 00000000..72bc60ed --- /dev/null +++ b/patches/gcc/4.4.5/130-cross-compile.patch @@ -0,0 +1,39 @@ +diff -durN gcc-4.4.5.orig/gcc/configure gcc-4.4.5/gcc/configure +--- gcc-4.4.5.orig/gcc/configure 2010-06-20 17:43:53.000000000 +0200 ++++ gcc-4.4.5/gcc/configure 2010-10-09 22:58:36.000000000 +0200 +@@ -13997,7 +13997,7 @@ + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + +diff -durN gcc-4.4.5.orig/gcc/configure.ac gcc-4.4.5/gcc/configure.ac +--- gcc-4.4.5.orig/gcc/configure.ac 2010-06-20 17:43:53.000000000 +0200 ++++ gcc-4.4.5/gcc/configure.ac 2010-10-09 22:58:36.000000000 +0200 +@@ -1720,7 +1720,7 @@ + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + +diff -durN gcc-4.4.5.orig/gcc/unwind-dw2.c gcc-4.4.5/gcc/unwind-dw2.c +--- gcc-4.4.5.orig/gcc/unwind-dw2.c 2010-01-20 09:39:18.000000000 +0100 ++++ gcc-4.4.5/gcc/unwind-dw2.c 2010-10-09 22:58:36.000000000 +0200 +@@ -329,9 +329,11 @@ + } + #endif + ++#ifndef inhibit_libc + #ifdef MD_UNWIND_SUPPORT + #include MD_UNWIND_SUPPORT + #endif ++#endif + + /* Extract any interesting information from the CIE for the translation + unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/patches/gcc/4.4.5/140-default-format-security.patch b/patches/gcc/4.4.5/140-default-format-security.patch new file mode 100644 index 00000000..ac1d988d --- /dev/null +++ b/patches/gcc/4.4.5/140-default-format-security.patch @@ -0,0 +1,49 @@ +diff -durN gcc-4.4.5.orig/gcc/c-common.c gcc-4.4.5/gcc/c-common.c +--- gcc-4.4.5.orig/gcc/c-common.c 2010-07-27 15:07:28.000000000 +0200 ++++ gcc-4.4.5/gcc/c-common.c 2010-10-09 22:59:03.000000000 +0200 +@@ -301,7 +301,7 @@ + /* Warn about format/argument anomalies in calls to formatted I/O functions + (*printf, *scanf, strftime, strfmon, etc.). */ + +-int warn_format; ++int warn_format = 1; + + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled + with GCC this doesn't matter as __null is guaranteed to have the right +diff -durN gcc-4.4.5.orig/gcc/c.opt gcc-4.4.5/gcc/c.opt +--- gcc-4.4.5.orig/gcc/c.opt 2009-09-18 23:53:23.000000000 +0200 ++++ gcc-4.4.5/gcc/c.opt 2010-10-09 22:59:03.000000000 +0200 +@@ -236,7 +236,7 @@ + Warn about format strings that contain NUL bytes + + Wformat-security +-C ObjC C++ ObjC++ Var(warn_format_security) Warning ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning + Warn about possible security problems with format functions + + Wformat-y2k +diff -durN gcc-4.4.5.orig/gcc/doc/invoke.texi gcc-4.4.5/gcc/doc/invoke.texi +--- gcc-4.4.5.orig/gcc/doc/invoke.texi 2010-09-08 20:13:03.000000000 +0200 ++++ gcc-4.4.5/gcc/doc/invoke.texi 2010-10-09 22:59:03.000000000 +0200 +@@ -2888,6 +2888,9 @@ + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and + @option{-Wformat=2} are available, but are not included in @option{-Wall}. + ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. ++To disable, use @option{-Wformat=0}. ++ + @item -Wformat-y2k + @opindex Wformat-y2k + @opindex Wno-format-y2k +@@ -2941,6 +2944,11 @@ + in future warnings may be added to @option{-Wformat-security} that are not + included in @option{-Wformat-nonliteral}.) + ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. ++To disable, use @option{-Wno-format-security}, or disable all format warnings ++with @option{-Wformat=0}. To make format security warnings fatal, specify ++@option{-Werror=format-security}. ++ + @item -Wformat=2 + @opindex Wformat=2 + @opindex Wno-format=2 diff --git a/patches/gcc/4.4.5/150-default-fortify-source.patch b/patches/gcc/4.4.5/150-default-fortify-source.patch new file mode 100644 index 00000000..ad5a7e8a --- /dev/null +++ b/patches/gcc/4.4.5/150-default-fortify-source.patch @@ -0,0 +1,26 @@ +diff -durN gcc-4.4.5.orig/gcc/doc/invoke.texi gcc-4.4.5/gcc/doc/invoke.texi +--- gcc-4.4.5.orig/gcc/doc/invoke.texi 2010-10-09 22:59:03.000000000 +0200 ++++ gcc-4.4.5/gcc/doc/invoke.texi 2010-10-09 22:59:33.000000000 +0200 +@@ -5432,6 +5432,11 @@ + Please note the warning under @option{-fgcse} about + invoking @option{-O2} on programs that use computed gotos. + ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is ++activated when @option{-O} is set to 2 or higher. This enables additional ++compile-time and run-time checks for several libc functions. To disable, ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}. ++ + @item -O3 + @opindex O3 + Optimize yet more. @option{-O3} turns on all optimizations specified +diff -durN gcc-4.4.5.orig/gcc/gcc.c gcc-4.4.5/gcc/gcc.c +--- gcc-4.4.5.orig/gcc/gcc.c 2010-01-09 01:05:06.000000000 +0100 ++++ gcc-4.4.5/gcc/gcc.c 2010-10-09 22:59:33.000000000 +0200 +@@ -807,6 +807,7 @@ + %{H} %C %{D*&U*&A*} %{i*} %Z %i\ + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\ + %{E|M|MM:%W{o*}}"; + + /* This contains cpp options which are common with cc1_options and are passed diff --git a/patches/gcc/4.4.5/160-netbsd-symbolic.patch b/patches/gcc/4.4.5/160-netbsd-symbolic.patch new file mode 100644 index 00000000..a61b0784 --- /dev/null +++ b/patches/gcc/4.4.5/160-netbsd-symbolic.patch @@ -0,0 +1,11 @@ +diff -durN gcc-4.4.5.orig/gcc/config/netbsd-elf.h gcc-4.4.5/gcc/config/netbsd-elf.h +--- gcc-4.4.5.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200 ++++ gcc-4.4.5/gcc/config/netbsd-elf.h 2010-10-09 22:59:57.000000000 +0200 +@@ -82,6 +82,7 @@ + #define NETBSD_LINK_SPEC_ELF \ + "%{assert*} %{R*} %{rpath*} \ + %{shared:-shared} \ ++ %{symbolic:-Bsymbolic} \ + %{!shared: \ + -dc -dp \ + %{!nostdlib: \ diff --git a/patches/gcc/4.4.5/170-sparc64-bsd.patch b/patches/gcc/4.4.5/170-sparc64-bsd.patch new file mode 100644 index 00000000..85d9b525 --- /dev/null +++ b/patches/gcc/4.4.5/170-sparc64-bsd.patch @@ -0,0 +1,29 @@ +diff -durN gcc-4.4.5.orig/gcc/config/sparc/freebsd.h gcc-4.4.5/gcc/config/sparc/freebsd.h +--- gcc-4.4.5.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.5/gcc/config/sparc/freebsd.h 2010-10-09 23:00:03.000000000 +0200 +@@ -25,9 +25,22 @@ + /* FreeBSD needs the platform name (sparc64) defined. + Emacs needs to know if the arch is 64 or 32-bits. */ + +-#undef CPP_CPU64_DEFAULT_SPEC +-#define CPP_CPU64_DEFAULT_SPEC \ +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__" ++#undef FBSD_TARGET_CPU_CPP_BUILTINS ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \ ++ do \ ++ { \ ++ if (TARGET_ARCH64) \ ++ { \ ++ builtin_define ("__sparc64__"); \ ++ builtin_define ("__sparc_v9__"); \ ++ builtin_define ("__sparcv9"); \ ++ } \ ++ else \ ++ builtin_define ("__sparc"); \ ++ builtin_define ("__sparc__"); \ ++ } \ ++ while (0) ++ + + #define LINK_SPEC "%(link_arch) \ + %{!mno-relax:%{!r:-relax}} \ diff --git a/patches/gcc/4.4.5/180-libgomp-no-werror.patch b/patches/gcc/4.4.5/180-libgomp-no-werror.patch new file mode 100644 index 00000000..35d50633 --- /dev/null +++ b/patches/gcc/4.4.5/180-libgomp-no-werror.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.5.orig/libgomp/configure gcc-4.4.5/libgomp/configure +--- gcc-4.4.5.orig/libgomp/configure 2010-10-01 10:26:18.000000000 +0200 ++++ gcc-4.4.5/libgomp/configure 2010-10-09 23:00:33.000000000 +0200 +@@ -3334,7 +3334,7 @@ + + # Add -Wall -Werror if we are using GCC. + if test "x$GCC" = "xyes"; then +- XCFLAGS="$XCFLAGS -Wall -Werror" ++ XCFLAGS="$XCFLAGS -Wall" + fi + + # Find other programs we need. diff --git a/patches/gcc/4.4.5/190-flatten-switch-stmt-00.patch b/patches/gcc/4.4.5/190-flatten-switch-stmt-00.patch new file mode 100644 index 00000000..d4d68fe4 --- /dev/null +++ b/patches/gcc/4.4.5/190-flatten-switch-stmt-00.patch @@ -0,0 +1,24 @@ +diff -durN gcc-4.4.5.orig/gcc/stmt.c gcc-4.4.5/gcc/stmt.c +--- gcc-4.4.5.orig/gcc/stmt.c 2010-03-08 12:46:28.000000000 +0100 ++++ gcc-4.4.5/gcc/stmt.c 2010-10-09 23:01:01.000000000 +0200 +@@ -2377,7 +2377,11 @@ + use_cost_table + = (TREE_CODE (orig_type) != ENUMERAL_TYPE + && estimate_case_costs (case_list)); +- balance_case_nodes (&case_list, NULL); ++ /* When optimizing for size, we want a straight list to avoid ++ jumps as much as possible. This basically creates an if-else ++ chain. */ ++ if (!optimize_size) ++ balance_case_nodes (&case_list, NULL); + emit_case_nodes (index, case_list, default_label, index_type); + if (default_label) + emit_jump (default_label); +@@ -2943,6 +2947,7 @@ + { + if (!node_has_low_bound (node, index_type)) + { ++ if (!optimize_size) /* don't jl to the .default_label. */ + emit_cmp_and_jump_insns (index, + convert_modes + (mode, imode, diff --git a/patches/gcc/4.4.5/200-libiberty.h-asprintf.patch b/patches/gcc/4.4.5/200-libiberty.h-asprintf.patch new file mode 100644 index 00000000..19e45235 --- /dev/null +++ b/patches/gcc/4.4.5/200-libiberty.h-asprintf.patch @@ -0,0 +1,15 @@ +diff -durN gcc-4.4.5.orig/include/libiberty.h gcc-4.4.5/include/libiberty.h +--- gcc-4.4.5.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200 ++++ gcc-4.4.5/include/libiberty.h 2010-10-09 23:01:30.000000000 +0200 +@@ -595,8 +595,11 @@ + /* Like sprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. */ + ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ ++#ifndef asprintf + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; + #endif ++#endif + + #if !HAVE_DECL_VASPRINTF + /* Like vsprintf but provides a pointer to malloc'd storage, which diff --git a/patches/gcc/4.4.5/210-arm-unbreak-armv4t.patch b/patches/gcc/4.4.5/210-arm-unbreak-armv4t.patch new file mode 100644 index 00000000..396a80bc --- /dev/null +++ b/patches/gcc/4.4.5/210-arm-unbreak-armv4t.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.5.orig/gcc/config/arm/linux-eabi.h gcc-4.4.5/gcc/config/arm/linux-eabi.h +--- gcc-4.4.5.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100 ++++ gcc-4.4.5/gcc/config/arm/linux-eabi.h 2010-10-09 23:01:59.000000000 +0200 +@@ -44,7 +44,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/patches/gcc/4.4.5/220-libiberty-pic.patch b/patches/gcc/4.4.5/220-libiberty-pic.patch new file mode 100644 index 00000000..93b180a2 --- /dev/null +++ b/patches/gcc/4.4.5/220-libiberty-pic.patch @@ -0,0 +1,11 @@ +diff -durN gcc-4.4.5.orig/libiberty/Makefile.in gcc-4.4.5/libiberty/Makefile.in +--- gcc-4.4.5.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200 ++++ gcc-4.4.5/libiberty/Makefile.in 2010-10-09 23:02:28.000000000 +0200 +@@ -227,6 +227,7 @@ + $(AR) $(AR_FLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ + $(RANLIB) $(TARGETLIB); \ ++ cp $(TARGETLIB) ../ ; \ + cd ..; \ + else true; fi + diff --git a/patches/gcc/4.4.5/230-superh-default-multilib.patch b/patches/gcc/4.4.5/230-superh-default-multilib.patch new file mode 100644 index 00000000..0df23a9e --- /dev/null +++ b/patches/gcc/4.4.5/230-superh-default-multilib.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc +--- gcc-4.4.5.orig/gcc/config.gcc 2010-06-14 00:16:50.000000000 +0200 ++++ gcc-4.4.5/gcc/config.gcc 2010-10-09 23:02:56.000000000 +0200 +@@ -2140,7 +2140,7 @@ + if test x${sh_multilibs} = x ; then + case ${target} in + sh64-superh-linux* | \ +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;; + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; + sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; diff --git a/patches/gcc/4.4.5/240-libstdc++-pic.patch b/patches/gcc/4.4.5/240-libstdc++-pic.patch new file mode 100644 index 00000000..4dde5a15 --- /dev/null +++ b/patches/gcc/4.4.5/240-libstdc++-pic.patch @@ -0,0 +1,53 @@ +diff -durN gcc-4.4.5.orig/libstdc++-v3/src/Makefile.am gcc-4.4.5/libstdc++-v3/src/Makefile.am +--- gcc-4.4.5.orig/libstdc++-v3/src/Makefile.am 2009-08-26 21:04:11.000000000 +0200 ++++ gcc-4.4.5/libstdc++-v3/src/Makefile.am 2010-10-09 23:03:26.000000000 +0200 +@@ -356,6 +356,13 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ + + ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Added bits to build debug library. + if GLIBCXX_BUILD_DEBUG + all-local: build_debug +diff -durN gcc-4.4.5.orig/libstdc++-v3/src/Makefile.in gcc-4.4.5/libstdc++-v3/src/Makefile.in +--- gcc-4.4.5.orig/libstdc++-v3/src/Makefile.in 2009-08-26 21:04:11.000000000 +0200 ++++ gcc-4.4.5/libstdc++-v3/src/Makefile.in 2010-10-09 23:03:26.000000000 +0200 +@@ -726,7 +726,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -765,7 +765,7 @@ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ +- uninstall-toolexeclibLTLIBRARIES ++ uninstall-toolexeclibLTLIBRARIES install-exec-local + + + # Symbol versioning for shared libraries. +@@ -947,6 +947,14 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/patches/gcc/4.4.5/250-ia64-noteGNUstack.patch b/patches/gcc/4.4.5/250-ia64-noteGNUstack.patch new file mode 100644 index 00000000..6d128e4e --- /dev/null +++ b/patches/gcc/4.4.5/250-ia64-noteGNUstack.patch @@ -0,0 +1,79 @@ +diff -durN gcc-4.4.5.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.5/gcc/config/ia64/crtbegin.asm +--- gcc-4.4.5.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/ia64/crtbegin.asm 2010-10-09 23:03:55.000000000 +0200 +@@ -252,3 +252,7 @@ + .weak __cxa_finalize + #endif + .weak _Jv_RegisterClasses ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.5.orig/gcc/config/ia64/crtend.asm gcc-4.4.5/gcc/config/ia64/crtend.asm +--- gcc-4.4.5.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/ia64/crtend.asm 2010-10-09 23:03:55.000000000 +0200 +@@ -119,3 +119,7 @@ + + br.ret.sptk.many rp + .endp __do_global_ctors_aux ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.5.orig/gcc/config/ia64/crti.asm gcc-4.4.5/gcc/config/ia64/crti.asm +--- gcc-4.4.5.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/ia64/crti.asm 2010-10-09 23:03:55.000000000 +0200 +@@ -51,3 +51,7 @@ + .body + + # end of crti.asm ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.5.orig/gcc/config/ia64/crtn.asm gcc-4.4.5/gcc/config/ia64/crtn.asm +--- gcc-4.4.5.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/ia64/crtn.asm 2010-10-09 23:03:55.000000000 +0200 +@@ -41,3 +41,7 @@ + br.ret.sptk.many b0 + + # end of crtn.asm ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.5.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.5/gcc/config/ia64/lib1funcs.asm +--- gcc-4.4.5.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/ia64/lib1funcs.asm 2010-10-09 23:03:55.000000000 +0200 +@@ -793,3 +793,7 @@ + .endp __floattitf + #endif + #endif ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.5.orig/gcc/config/ia64/linux.h gcc-4.4.5/gcc/config/ia64/linux.h +--- gcc-4.4.5.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100 ++++ gcc-4.4.5/gcc/config/ia64/linux.h 2010-10-09 23:03:55.000000000 +0200 +@@ -5,6 +5,8 @@ + + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux"); + ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + /* This is for -profile to use -lc_p instead of -lc. */ + #undef CC1_SPEC + #define CC1_SPEC "%{profile:-p} %{G*}" +diff -durN gcc-4.4.5.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.5/gcc/config/rs6000/ppc-asm.h +--- gcc-4.4.5.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200 ++++ gcc-4.4.5/gcc/config/rs6000/ppc-asm.h 2010-10-09 23:03:55.000000000 +0200 +@@ -172,7 +172,7 @@ + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name) + #endif + +-#if defined __linux__ && !defined __powerpc64__ ++#if defined __linux__ + .section .note.GNU-stack + .previous + #endif diff --git a/patches/gcc/4.4.5/260-sh-libgcc-stacks.patch b/patches/gcc/4.4.5/260-sh-libgcc-stacks.patch new file mode 100644 index 00000000..cc6baf31 --- /dev/null +++ b/patches/gcc/4.4.5/260-sh-libgcc-stacks.patch @@ -0,0 +1,25 @@ +diff -durN gcc-4.4.5.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.5/gcc/config/sh/lib1funcs.asm +--- gcc-4.4.5.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/sh/lib1funcs.asm 2010-10-09 23:04:22.000000000 +0200 +@@ -30,6 +30,11 @@ + !! recoded in assembly by Toshiyasu Morita + !! tm@netcom.com + ++#if defined(__ELF__) && defined(__linux__) ++.section .note.GNU-stack,"",%progbits ++.previous ++#endif ++ + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and + ELF local label prefixes by J"orn Rennecke + amylaar@cygnus.com */ +diff -durN gcc-4.4.5.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.5/gcc/config/sh/linux-atomic.asm +--- gcc-4.4.5.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/sh/linux-atomic.asm 2010-10-09 23:04:22.000000000 +0200 +@@ -136,3 +136,6 @@ + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov) + + #endif /* ! __SH5__ */ ++ ++.section .note.GNU-stack,"",%progbits ++.previous diff --git a/patches/gcc/4.4.5/270-sh-pr24836.patch b/patches/gcc/4.4.5/270-sh-pr24836.patch new file mode 100644 index 00000000..11ca63d3 --- /dev/null +++ b/patches/gcc/4.4.5/270-sh-pr24836.patch @@ -0,0 +1,24 @@ +diff -durN gcc-4.4.5.orig/gcc/configure gcc-4.4.5/gcc/configure +--- gcc-4.4.5.orig/gcc/configure 2010-10-09 22:58:36.000000000 +0200 ++++ gcc-4.4.5/gcc/configure 2010-10-09 23:04:50.000000000 +0200 +@@ -22285,7 +22285,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 +diff -durN gcc-4.4.5.orig/gcc/configure.ac gcc-4.4.5/gcc/configure.ac +--- gcc-4.4.5.orig/gcc/configure.ac 2010-10-09 22:58:36.000000000 +0200 ++++ gcc-4.4.5/gcc/configure.ac 2010-10-09 23:04:50.000000000 +0200 +@@ -2728,7 +2728,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 diff --git a/patches/gcc/4.4.5/280-freebsd.patch b/patches/gcc/4.4.5/280-freebsd.patch new file mode 100644 index 00000000..e26b34aa --- /dev/null +++ b/patches/gcc/4.4.5/280-freebsd.patch @@ -0,0 +1,94 @@ +diff -durN gcc-4.4.5.orig/gcc/config/freebsd-spec.h gcc-4.4.5/gcc/config/freebsd-spec.h +--- gcc-4.4.5.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/config/freebsd-spec.h 2010-10-09 23:09:53.000000000 +0200 +@@ -61,6 +61,8 @@ + builtin_assert ("system=unix"); \ + builtin_assert ("system=bsd"); \ + builtin_assert ("system=FreeBSD"); \ ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \ ++ builtin_define("_LONGLONG"); \ + FBSD_TARGET_CPU_CPP_BUILTINS(); \ + } \ + while (0) +diff -durN gcc-4.4.5.orig/gcc/config/t-freebsd-eh gcc-4.4.5/gcc/config/t-freebsd-eh +--- gcc-4.4.5.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.5/gcc/config/t-freebsd-eh 2010-10-09 23:09:53.000000000 +0200 +@@ -0,0 +1,4 @@ ++# Use unwind-dw2-fde-glibc ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c +diff -durN gcc-4.4.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc +--- gcc-4.4.5.orig/gcc/config.gcc 2010-10-09 23:02:56.000000000 +0200 ++++ gcc-4.4.5/gcc/config.gcc 2010-10-09 23:09:53.000000000 +0200 +@@ -456,7 +456,7 @@ + # pleases around the provided core setting. + gas=yes + gnu_ld=yes +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}" + tmake_file="t-slibgcc-elf-ver t-freebsd" +@@ -1048,6 +1048,10 @@ + ;; + i[34567]86-*-freebsd*) + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` ++ if test ${fbsd_major} -ge 7; then ++ tmake_file="${tmake_file} t-freebsd-eh" ++ fi + ;; + x86_64-*-freebsd*) + 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" +diff -durN gcc-4.4.5.orig/gcc/crtstuff.c gcc-4.4.5/gcc/crtstuff.c +--- gcc-4.4.5.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/crtstuff.c 2010-10-09 23:09:53.000000000 +0200 +@@ -85,13 +85,15 @@ + && !defined(OBJECT_FORMAT_FLAT) \ + && defined(HAVE_LD_EH_FRAME_HDR) \ + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \ +- && defined(__GLIBC__) && __GLIBC__ >= 2 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \ ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022)) + #include <link.h> + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ + # if !defined(__UCLIBC__) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ ++ || (__FreeBSD_version >= 700022) + # define USE_PT_GNU_EH_FRAME + # endif + #endif +diff -durN gcc-4.4.5.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.5/gcc/unwind-dw2-fde-glibc.c +--- gcc-4.4.5.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/gcc/unwind-dw2-fde-glibc.c 2010-10-09 23:09:53.000000000 +0200 +@@ -46,8 +46,9 @@ + #include "gthr.h" + + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ ++ || (__FreeBSD_version >= 700022 )) + + #ifndef __RELOC_POINTER + # define __RELOC_POINTER(ptr, base) ((ptr) + (base)) +@@ -63,6 +64,13 @@ + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) + #endif + ++/* Support FreeBSD */ ++#ifndef ElfW ++# ifdef __ElfN ++# define ElfW __ElfN ++# endif ++#endif ++ + struct unw_eh_callback_data + { + _Unwind_Ptr pc; diff --git a/patches/gcc/4.4.5/290-freebsd.patch b/patches/gcc/4.4.5/290-freebsd.patch new file mode 100644 index 00000000..88d632ef --- /dev/null +++ b/patches/gcc/4.4.5/290-freebsd.patch @@ -0,0 +1,64 @@ +diff -durN gcc-4.4.5.orig/gcc/config/freebsd-spec.h gcc-4.4.5/gcc/config/freebsd-spec.h +--- gcc-4.4.5.orig/gcc/config/freebsd-spec.h 2010-10-09 23:09:53.000000000 +0200 ++++ gcc-4.4.5/gcc/config/freebsd-spec.h 2010-10-09 23:10:02.000000000 +0200 +@@ -86,9 +86,10 @@ + #define FBSD_STARTFILE_SPEC \ + "%{!shared: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ +- %{!p:%{profile:gcrt1.o%s} \ +- %{!profile:crt1.o%s}}}} \ +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ %{!p:%{profile:gcrt1.o%s} \ ++ %{!profile:crt1.o%s}}}} \ ++ crti.o%s \ ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" + + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on + the magical crtend.o file (see crtstuff.c) which provides part of +@@ -126,7 +127,8 @@ + %{pg: -lc_p} \ + }" + #else +-#if FBSD_MAJOR < 5 ++#include <sys/param.h> ++#if __FreeBSD_version < 500016 + #define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: \ +@@ -136,17 +138,34 @@ + %{!pthread:-lc_p} \ + %{pthread:-lc_r_p}} \ + }" +-#else ++#elif __FreeBSD_version < 700022 + #define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: %{pthread:-lpthread} -lc} \ + %{pg: %{pthread:-lpthread_p} -lc_p} \ + }" ++#else ++#define FBSD_LIB_SPEC " \ ++ %{!shared: \ ++ %{!pg: %{pthread:-lpthread} -lc} \ ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \ ++ %{shared: \ ++ %{pthread:-lpthread} -lc} \ ++ " + #endif + #endif + +-#if FBSD_MAJOR < 6 ++#if FBSD_MAJOR < 5 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" + #else + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" + #endif ++ ++#if defined(HAVE_LD_EH_FRAME_HDR) ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#endif ++ ++/* Use --as-needed -lgcc_s for eh support. */ ++#ifdef HAVE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 1 ++#endif diff --git a/patches/gcc/4.4.5/300-uclibc-conf.patch b/patches/gcc/4.4.5/300-uclibc-conf.patch new file mode 100644 index 00000000..b1465e06 --- /dev/null +++ b/patches/gcc/4.4.5/300-uclibc-conf.patch @@ -0,0 +1,35 @@ +diff -durN gcc-4.4.5.orig/contrib/regression/objs-gcc.sh gcc-4.4.5/contrib/regression/objs-gcc.sh +--- gcc-4.4.5.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/contrib/regression/objs-gcc.sh 2010-10-09 23:10:32.000000000 +0200 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +diff -durN gcc-4.4.5.orig/libjava/classpath/ltconfig gcc-4.4.5/libjava/classpath/ltconfig +--- gcc-4.4.5.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200 ++++ gcc-4.4.5/libjava/classpath/ltconfig 2010-10-09 23:10:32.000000000 +0200 +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/patches/gcc/4.4.5/310-missing-execinfo_h.patch b/patches/gcc/4.4.5/310-missing-execinfo_h.patch new file mode 100644 index 00000000..3d381daf --- /dev/null +++ b/patches/gcc/4.4.5/310-missing-execinfo_h.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.5.orig/boehm-gc/include/gc.h gcc-4.4.5/boehm-gc/include/gc.h +--- gcc-4.4.5.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.4.5/boehm-gc/include/gc.h 2010-10-09 23:11:00.000000000 +0200 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include <features.h> + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/patches/gcc/4.4.5/320-c99-snprintf.patch b/patches/gcc/4.4.5/320-c99-snprintf.patch new file mode 100644 index 00000000..c6aa06c3 --- /dev/null +++ b/patches/gcc/4.4.5/320-c99-snprintf.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.5.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.5/libstdc++-v3/include/c_global/cstdio +--- gcc-4.4.5.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/libstdc++-v3/include/c_global/cstdio 2010-10-09 23:11:27.000000000 +0200 +@@ -139,7 +139,7 @@ + + _GLIBCXX_END_NAMESPACE + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/patches/gcc/4.4.5/330-libmudflap-susv3-legacy.patch b/patches/gcc/4.4.5/330-libmudflap-susv3-legacy.patch new file mode 100644 index 00000000..95f77091 --- /dev/null +++ b/patches/gcc/4.4.5/330-libmudflap-susv3-legacy.patch @@ -0,0 +1,48 @@ +diff -durN gcc-4.4.5.orig/libmudflap/mf-hooks2.c gcc-4.4.5/libmudflap/mf-hooks2.c +--- gcc-4.4.5.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/libmudflap/mf-hooks2.c 2010-10-09 23:11:52.000000000 +0200 +@@ -421,7 +421,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -431,7 +431,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -441,7 +441,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -450,7 +450,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -459,7 +459,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/patches/gcc/4.4.5/340-ecjx-host-cc.patch b/patches/gcc/4.4.5/340-ecjx-host-cc.patch new file mode 100644 index 00000000..c7f6ae71 --- /dev/null +++ b/patches/gcc/4.4.5/340-ecjx-host-cc.patch @@ -0,0 +1,13 @@ +diff -durN gcc-4.4.5.orig/libjava/Makefile.in gcc-4.4.5/libjava/Makefile.in +--- gcc-4.4.5.orig/libjava/Makefile.in 2010-10-01 10:26:18.000000000 +0200 ++++ gcc-4.4.5/libjava/Makefile.in 2010-10-09 23:12:22.000000000 +0200 +@@ -9180,6 +9180,9 @@ + ecjx$(EXEEXT): $(ecjx_OBJECTS) $(ecjx_DEPENDENCIES) + @rm -f ecjx$(EXEEXT) + $(ecjx_LINK) $(ecjx_LDFLAGS) $(ecjx_OBJECTS) $(ecjx_LDADD) $(LIBS) ++ecjx.$(OBJEXT): $(ecjx_SOURCES) ++ @rm -f ecjx.$(OBJEXT) ++ $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c -o $@ $< + gappletviewer$(EXEEXT): $(gappletviewer_OBJECTS) $(gappletviewer_DEPENDENCIES) + @rm -f gappletviewer$(EXEEXT) + $(gappletviewer_LINK) $(gappletviewer_LDFLAGS) $(gappletviewer_OBJECTS) $(gappletviewer_LDADD) $(LIBS) diff --git a/patches/gcc/4.4.5/350-index_macro.patch b/patches/gcc/4.4.5/350-index_macro.patch new file mode 100644 index 00000000..0dda11e4 --- /dev/null +++ b/patches/gcc/4.4.5/350-index_macro.patch @@ -0,0 +1,30 @@ +-= BEGIN original header =- +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_304-index_macro.patch +-= END original header =- + +diff -durN gcc-4.4.5.orig/libstdc++-v3/include/ext/rope gcc-4.4.5/libstdc++-v3/include/ext/rope +--- gcc-4.4.5.orig/libstdc++-v3/include/ext/rope 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/libstdc++-v3/include/ext/rope 2010-10-09 23:12:51.000000000 +0200 +@@ -54,6 +54,9 @@ + #include <bits/gthr.h> + #include <tr1/functional> + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + # ifdef __GC + # define __GC_CONST const + # else +diff -durN gcc-4.4.5.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.4.5/libstdc++-v3/include/ext/ropeimpl.h +--- gcc-4.4.5.orig/libstdc++-v3/include/ext/ropeimpl.h 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/libstdc++-v3/include/ext/ropeimpl.h 2010-10-09 23:12:51.000000000 +0200 +@@ -49,6 +49,9 @@ + #include <ext/memory> // For uninitialized_copy_n + #include <ext/numeric> // For power + ++/* cope w/ index defined as macro, SuSv3 proposal */ ++#undef index ++ + _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) + + using std::size_t; diff --git a/patches/gcc/4.4.5/360-arm-bigendian.patch b/patches/gcc/4.4.5/360-arm-bigendian.patch new file mode 100644 index 00000000..5a642908 --- /dev/null +++ b/patches/gcc/4.4.5/360-arm-bigendian.patch @@ -0,0 +1,32 @@ +By Lennert Buytenhek <buytenh@wantstofly.org> +Adds support for arm*b-linux* big-endian ARM targets + +See http://gcc.gnu.org/PR16350 + +diff -durN gcc-4.4.5.orig/gcc/config/arm/linux-elf.h gcc-4.4.5/gcc/config/arm/linux-elf.h +--- gcc-4.4.5.orig/gcc/config/arm/linux-elf.h 2009-02-20 16:20:38.000000000 +0100 ++++ gcc-4.4.5/gcc/config/arm/linux-elf.h 2010-10-09 23:13:21.000000000 +0200 +@@ -51,7 +51,7 @@ + + #undef MULTILIB_DEFAULTS + #define MULTILIB_DEFAULTS \ +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } + + /* Now we define the strings used to build the spec file. */ + #undef LIB_SPEC +diff -durN gcc-4.4.5.orig/gcc/config.gcc gcc-4.4.5/gcc/config.gcc +--- gcc-4.4.5.orig/gcc/config.gcc 2010-10-09 23:09:53.000000000 +0200 ++++ gcc-4.4.5/gcc/config.gcc 2010-10-09 23:13:21.000000000 +0200 +@@ -739,6 +739,11 @@ + tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h" + tmake_file="arm/t-arm arm/t-arm-elf" + case ${target} in ++ arm*b-*) ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" ++ ;; ++ esac ++ case ${target} in + arm*-*-uclinux*eabi) + tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h" + tmake_file="$tmake_file arm/t-bpabi" diff --git a/patches/gcc/4.4.5/370-bootstrap-target_lib_path.patch b/patches/gcc/4.4.5/370-bootstrap-target_lib_path.patch new file mode 100644 index 00000000..84f62d4c --- /dev/null +++ b/patches/gcc/4.4.5/370-bootstrap-target_lib_path.patch @@ -0,0 +1,38 @@ +ChangeLog: +2010-01-06 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR bootstrap/41818 + * Makefile.tpl (BASE_TARGET_EXPORTS): Only add TARGET_LIB_PATH + to $(RPATH_ENVVAR) if bootstrapping. + * Makefile.in: Regenerate. + +diff -durN gcc-4.4.5.orig/Makefile.in gcc-4.4.5/Makefile.in +--- gcc-4.4.5.orig/Makefile.in 2009-04-25 06:10:29.000000000 +0200 ++++ gcc-4.4.5/Makefile.in 2010-10-09 23:13:50.000000000 +0200 +@@ -245,7 +245,10 @@ + STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \ +- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); ++@if gcc-bootstrap ++ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ ++@endif gcc-bootstrap ++ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + + RAW_CXX_TARGET_EXPORTS = \ + $(BASE_TARGET_EXPORTS) \ +diff -durN gcc-4.4.5.orig/Makefile.tpl gcc-4.4.5/Makefile.tpl +--- gcc-4.4.5.orig/Makefile.tpl 2009-04-14 10:57:33.000000000 +0200 ++++ gcc-4.4.5/Makefile.tpl 2010-10-09 23:13:50.000000000 +0200 +@@ -248,7 +248,10 @@ + STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \ + WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ + WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \ +- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); ++@if gcc-bootstrap ++ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \ ++@endif gcc-bootstrap ++ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); + + RAW_CXX_TARGET_EXPORTS = \ + $(BASE_TARGET_EXPORTS) \ diff --git a/patches/gcc/4.4.5/380-powerpc-libgcc_s-link-libm.patch b/patches/gcc/4.4.5/380-powerpc-libgcc_s-link-libm.patch new file mode 100644 index 00000000..06bc93d1 --- /dev/null +++ b/patches/gcc/4.4.5/380-powerpc-libgcc_s-link-libm.patch @@ -0,0 +1,134 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + + +diff -durN gcc-4.4.5.orig/gcc/config/t-slibgcc-elf-ver gcc-4.4.5/gcc/config/t-slibgcc-elf-ver +--- gcc-4.4.5.orig/gcc/config/t-slibgcc-elf-ver 2010-01-04 16:13:08.000000000 +0100 ++++ gcc-4.4.5/gcc/config/t-slibgcc-elf-ver 2010-10-09 23:14:18.000000000 +0200 +@@ -9,7 +9,7 @@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_DIR = @multilib_dir@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +-SHLIB_LC = -lc ++SHLIB_LC = @libgcc_libm@ -lc + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) +diff -durN gcc-4.4.5.orig/libgcc/configure gcc-4.4.5/libgcc/configure +--- gcc-4.4.5.orig/libgcc/configure 2008-11-20 18:13:01.000000000 +0100 ++++ gcc-4.4.5/libgcc/configure 2010-10-09 23:14:18.000000000 +0200 +@@ -272,7 +272,7 @@ + PACKAGE_BUGREPORT='' + + ac_unique_file="static-object.mk" +-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' ++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' + ac_subst_files='' + ac_pwd=`pwd` + +@@ -3547,6 +3547,39 @@ + fi + + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include <features.h>' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++ ++ + # Conditionalize the makefile for this target machine. + tmake_file_= + for f in ${tmake_file} +@@ -4267,6 +4300,7 @@ + s,@fixed_point@,$fixed_point,;t t + s,@vis_hide@,$vis_hide,;t t + s,@set_have_cc_tls@,$set_have_cc_tls,;t t ++s,@LIBGCC_LIBM@,$LIBGCC_LIBM,;t t + s,@tmake_file@,$tmake_file,;t t + s,@extra_parts@,$extra_parts,;t t + s,@asm_hidden_op@,$asm_hidden_op,;t t +diff -durN gcc-4.4.5.orig/libgcc/configure.ac gcc-4.4.5/libgcc/configure.ac +--- gcc-4.4.5.orig/libgcc/configure.ac 2008-11-20 18:13:01.000000000 +0100 ++++ gcc-4.4.5/libgcc/configure.ac 2010-10-09 23:14:18.000000000 +0200 +@@ -223,6 +223,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include <features.h>' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # Conditionalize the makefile for this target machine. + tmake_file_= + for f in ${tmake_file} +diff -durN gcc-4.4.5.orig/libgcc/Makefile.in gcc-4.4.5/libgcc/Makefile.in +--- gcc-4.4.5.orig/libgcc/Makefile.in 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.5/libgcc/Makefile.in 2010-10-09 23:14:18.000000000 +0200 +@@ -39,6 +39,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + +@@ -787,9 +788,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects),$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use diff --git a/samples/alphaev56-unknown-linux-gnu/crosstool.config b/samples/alphaev56-unknown-linux-gnu/crosstool.config index 28d08e68..6e66abee 100644 --- a/samples/alphaev56-unknown-linux-gnu/crosstool.config +++ b/samples/alphaev56-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config b/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config index 57a3f630..9f369f86 100644 --- a/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config +++ b/samples/arm-bare_newlib_cortex_m3_nommu-eabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config index 2da016ef..b1181124 100644 --- a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config +++ b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/arm-davinci-linux-gnueabi/crosstool.config b/samples/arm-davinci-linux-gnueabi/crosstool.config index d3599a37..46ca886c 100644 --- a/samples/arm-davinci-linux-gnueabi/crosstool.config +++ b/samples/arm-davinci-linux-gnueabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/arm-iphone-linux-gnueabi/crosstool.config b/samples/arm-iphone-linux-gnueabi/crosstool.config index 982bd932..35232e29 100644 --- a/samples/arm-iphone-linux-gnueabi/crosstool.config +++ b/samples/arm-iphone-linux-gnueabi/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/arm-unknown-linux-gnueabi/crosstool.config b/samples/arm-unknown-linux-gnueabi/crosstool.config index 82d7f9dd..ed87daeb 100644 --- a/samples/arm-unknown-linux-gnueabi/crosstool.config +++ b/samples/arm-unknown-linux-gnueabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config index 9468eb4a..f2332263 100644 --- a/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config +++ b/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/armeb-test_nptl-linux-uclibcgnueabi/crosstool.config b/samples/armeb-test_nptl-linux-uclibcgnueabi/crosstool.config index 8971a663..34a00e57 100644 --- a/samples/armeb-test_nptl-linux-uclibcgnueabi/crosstool.config +++ b/samples/armeb-test_nptl-linux-uclibcgnueabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/armeb-unknown-eabi/crosstool.config b/samples/armeb-unknown-eabi/crosstool.config index a1c8a22e..1d772a48 100644 --- a/samples/armeb-unknown-eabi/crosstool.config +++ b/samples/armeb-unknown-eabi/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/armeb-unknown-linux-gnueabi/crosstool.config b/samples/armeb-unknown-linux-gnueabi/crosstool.config index 2cd3ab1e..26c5a02f 100644 --- a/samples/armeb-unknown-linux-gnueabi/crosstool.config +++ b/samples/armeb-unknown-linux-gnueabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config index 3898835c..6c096e09 100644 --- a/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config +++ b/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/avr32-unknown-none/crosstool.config b/samples/avr32-unknown-none/crosstool.config index 06ce40d5..64f3225d 100644 --- a/samples/avr32-unknown-none/crosstool.config +++ b/samples/avr32-unknown-none/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/bfin-unknown-linux-uclibc/crosstool.config b/samples/bfin-unknown-linux-uclibc/crosstool.config index 01c1b12c..42cf8a08 100644 --- a/samples/bfin-unknown-linux-uclibc/crosstool.config +++ b/samples/bfin-unknown-linux-uclibc/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/i586-geode-linux-uclibc/crosstool.config b/samples/i586-geode-linux-uclibc/crosstool.config index 20441ebe..9b4b814c 100644 --- a/samples/i586-geode-linux-uclibc/crosstool.config +++ b/samples/i586-geode-linux-uclibc/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/i686-nptl-linux-gnu/crosstool.config b/samples/i686-nptl-linux-gnu/crosstool.config index 990abba6..cc019f5c 100644 --- a/samples/i686-nptl-linux-gnu/crosstool.config +++ b/samples/i686-nptl-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/i686-pc-mingw32/crosstool.config b/samples/i686-pc-mingw32/crosstool.config index e970fd64..d5b6b89f 100644 --- a/samples/i686-pc-mingw32/crosstool.config +++ b/samples/i686-pc-mingw32/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/ia64-unknown-linux-gnu/crosstool.config b/samples/ia64-unknown-linux-gnu/crosstool.config index 0d82aeb2..72f32db3 100644 --- a/samples/ia64-unknown-linux-gnu/crosstool.config +++ b/samples/ia64-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/m68k-unknown-elf/crosstool.config b/samples/m68k-unknown-elf/crosstool.config index 06d902df..8e233308 100644 --- a/samples/m68k-unknown-elf/crosstool.config +++ b/samples/m68k-unknown-elf/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mingw32,i686-none-linux-gnu/crosstool.config b/samples/mingw32,i686-none-linux-gnu/crosstool.config index 0a413207..5bbdf999 100644 --- a/samples/mingw32,i686-none-linux-gnu/crosstool.config +++ b/samples/mingw32,i686-none-linux-gnu/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mips-ar2315-linux-gnu/crosstool.config b/samples/mips-ar2315-linux-gnu/crosstool.config index 7adf598e..28f1da66 100644 --- a/samples/mips-ar2315-linux-gnu/crosstool.config +++ b/samples/mips-ar2315-linux-gnu/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mips-unknown-elf/crosstool.config b/samples/mips-unknown-elf/crosstool.config index 8de4f9b7..71008e39 100644 --- a/samples/mips-unknown-elf/crosstool.config +++ b/samples/mips-unknown-elf/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mips-unknown-linux-uclibc/crosstool.config b/samples/mips-unknown-linux-uclibc/crosstool.config index 22e55859..382292e6 100644 --- a/samples/mips-unknown-linux-uclibc/crosstool.config +++ b/samples/mips-unknown-linux-uclibc/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mips64el-n32-linux-uclibc/crosstool.config b/samples/mips64el-n32-linux-uclibc/crosstool.config index 81e4b632..a66378f3 100644 --- a/samples/mips64el-n32-linux-uclibc/crosstool.config +++ b/samples/mips64el-n32-linux-uclibc/crosstool.config @@ -38,7 +38,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mips64el-n64-linux-uclibc/crosstool.config b/samples/mips64el-n64-linux-uclibc/crosstool.config index 8496e5ff..225f48db 100644 --- a/samples/mips64el-n64-linux-uclibc/crosstool.config +++ b/samples/mips64el-n64-linux-uclibc/crosstool.config @@ -38,7 +38,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/mipsel-unknown-linux-gnu/crosstool.config b/samples/mipsel-unknown-linux-gnu/crosstool.config index b8666369..29208b6f 100644 --- a/samples/mipsel-unknown-linux-gnu/crosstool.config +++ b/samples/mipsel-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/powerpc-405-linux-gnu/crosstool.config b/samples/powerpc-405-linux-gnu/crosstool.config index 4f11a16e..14ffb07b 100644 --- a/samples/powerpc-405-linux-gnu/crosstool.config +++ b/samples/powerpc-405-linux-gnu/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/powerpc-860-linux-gnu/crosstool.config b/samples/powerpc-860-linux-gnu/crosstool.config index 43f31db0..ccabc936 100644 --- a/samples/powerpc-860-linux-gnu/crosstool.config +++ b/samples/powerpc-860-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/powerpc-unknown-linux-gnu/crosstool.config b/samples/powerpc-unknown-linux-gnu/crosstool.config index af0ba016..37610ab9 100644 --- a/samples/powerpc-unknown-linux-gnu/crosstool.config +++ b/samples/powerpc-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/powerpc-unknown-linux-uclibc/crosstool.config b/samples/powerpc-unknown-linux-uclibc/crosstool.config index 576895c2..9d93d63a 100644 --- a/samples/powerpc-unknown-linux-uclibc/crosstool.config +++ b/samples/powerpc-unknown-linux-uclibc/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config index 8855055c..af02ddd4 100644 --- a/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config +++ b/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/powerpc64-unknown-linux-gnu/crosstool.config b/samples/powerpc64-unknown-linux-gnu/crosstool.config index 9a773e13..64a91f3b 100644 --- a/samples/powerpc64-unknown-linux-gnu/crosstool.config +++ b/samples/powerpc64-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/s390-ibm-linux-gnu/crosstool.config b/samples/s390-ibm-linux-gnu/crosstool.config index 6f011471..fdf9dcd9 100644 --- a/samples/s390-ibm-linux-gnu/crosstool.config +++ b/samples/s390-ibm-linux-gnu/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/s390x-ibm-linux-gnu/crosstool.config b/samples/s390x-ibm-linux-gnu/crosstool.config index 108ca739..53eaac23 100644 --- a/samples/s390x-ibm-linux-gnu/crosstool.config +++ b/samples/s390x-ibm-linux-gnu/crosstool.config @@ -35,7 +35,7 @@ CT_INSTALL_DIR_RO=y # CT_FORCE_DOWNLOAD is not set # CT_USE_MIRROR is not set CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/sh4-unknown-linux-gnu/crosstool.config b/samples/sh4-unknown-linux-gnu/crosstool.config index 755c7e48..676e0427 100644 --- a/samples/sh4-unknown-linux-gnu/crosstool.config +++ b/samples/sh4-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/x86_64-unknown-linux-gnu/crosstool.config b/samples/x86_64-unknown-linux-gnu/crosstool.config index 930f7e46..8b546e28 100644 --- a/samples/x86_64-unknown-linux-gnu/crosstool.config +++ b/samples/x86_64-unknown-linux-gnu/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/samples/x86_64-unknown-linux-uclibc/crosstool.config b/samples/x86_64-unknown-linux-uclibc/crosstool.config index 9f085a38..4ebef696 100644 --- a/samples/x86_64-unknown-linux-uclibc/crosstool.config +++ b/samples/x86_64-unknown-linux-uclibc/crosstool.config @@ -37,7 +37,7 @@ CT_USE_MIRROR=y # CT_PREFER_MIRROR is not set CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/" CT_CONNECT_TIMEOUT=10 -CT_DOWNLOAD_MAX_CHUNKS=5 +CT_DOWNLOAD_MAX_CHUNKS=1 # CT_ONLY_DOWNLOAD is not set # diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 04598932..57d35a5e 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -26,7 +26,7 @@ do_binutils() { CT_DoLog EXTRA "Configuring binutils" CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/binutils/elf2flt.sh b/scripts/build/binutils/elf2flt.sh index 76d8b455..ec058e13 100644 --- a/scripts/build/binutils/elf2flt.sh +++ b/scripts/build/binutils/elf2flt.sh @@ -38,7 +38,7 @@ do_elf2flt() { CT_DoLog EXTRA "Configuring elf2flt" CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/elf2flt-cvs-${CT_ELF2FLT_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index e7e56f11..d3c5d747 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -181,21 +181,29 @@ do_cc_core() { fi if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then extra_config+=("--with-libelf=${CT_COMPLIBS_DIR}") + extra_config+=("--enable-lto") elif [ "${CT_CC_GCC_HAS_LTO}" = "y" ]; then extra_config+=("--with-libelf=no") + extra_config+=("--disable-lto") fi if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then extra_config+=("--enable-target-optspace") fi + case "${CT_CC_GCC_LDBL_128}" in + y) extra_config+=("--with-long-double-128");; + m) ;; + "") extra_config+=("--without-long-double-128");; + esac + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) CC_FOR_BUILD="${CT_BUILD}-gcc" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ LDFLAGS="${core_LDFLAGS}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ @@ -229,17 +237,17 @@ do_cc_core() { # Next we have to configure gcc, create libgcc.mk then edit it... # So much easier if we just edit the source tree, but hey... if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then - CT_DoExecLog ALL make configure-libiberty + CT_DoExecLog CFG make configure-libiberty CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libiberty libiberty.a - CT_DoExecLog ALL make configure-gcc configure-libcpp + CT_DoExecLog CFG make configure-gcc configure-libcpp CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp else - CT_DoExecLog ALL make configure-gcc configure-libcpp configure-build-libiberty + CT_DoExecLog CFG make configure-gcc configure-libcpp configure-build-libiberty CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp all-build-libiberty fi # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here. if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/libdecnumber" ]; then - CT_DoExecLog ALL make configure-libdecnumber + CT_DoExecLog CFG make configure-libdecnumber CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libdecnumber libdecnumber.a fi @@ -354,6 +362,16 @@ do_cc() { else extra_config+=(--disable-libmudflap) fi + if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then + extra_config+=(--enable-libgomp) + else + extra_config+=(--disable-libgomp) + fi + if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then + extra_config+=(--enable-libssp) + else + extra_config+=(--disable-libssp) + fi if [ "${CT_CC_STATIC_LIBSTDCXX}" = "y" ]; then # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2 @@ -391,6 +409,7 @@ do_cc() { if [ "${CT_THREADS}" = "none" ]; then extra_config+=("--disable-threads") if [ "${CT_CC_GCC_4_2_or_later}" = y ]; then + CT_Test "Disabling libgomp for no-thread gcc>=4.2" "${CT_CC_GCC_LIBGOMP}" = "Y" extra_config+=("--disable-libgomp") fi else @@ -409,6 +428,12 @@ do_cc() { extra_config+=("--disable-libstdcxx-pch") fi + case "${CT_CC_GCC_LDBL_128}" in + y) extra_config+=("--with-long-double-128");; + m) ;; + "") extra_config+=("--without-long-double-128");; + esac + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # --enable-symvers=gnu really only needed for sh4 to work around a @@ -421,7 +446,7 @@ do_cc() { CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 3ee17b5c..a0dbef89 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -60,7 +60,7 @@ do_cloog() { CFLAGS="${CT_CFLAGS_FOR_HOST}" \ LDFLAGS="${cloog_LDFLAGS}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index 6f416963..8aad56a7 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -37,7 +37,7 @@ do_gmp() { fi CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh index 8995a34c..b899908b 100644 --- a/scripts/build/companion_libs/libelf.sh +++ b/scripts/build/companion_libs/libelf.sh @@ -36,7 +36,7 @@ do_libelf() { libelf_opts+=( --disable-shared --enable-static ) fi - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh index 043fb39d..62e4dc36 100644 --- a/scripts/build/companion_libs/mpc.sh +++ b/scripts/build/companion_libs/mpc.sh @@ -38,7 +38,7 @@ do_mpc() { fi CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index 7088d169..e2631184 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -88,7 +88,7 @@ do_mpfr() { CT_DoLog EXTRA "Configuring MPFR" CC="${CT_HOST}-gcc" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 6807476e..e15727c6 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -41,7 +41,7 @@ do_ppl() { CFLAGS="${CT_CFLAGS_FOR_HOST}" \ CXXFLAGS="${CT_CFLAGS_FOR_HOST}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh index 6a16a1e2..04380a77 100644 --- a/scripts/build/companion_tools/100-m4.sh +++ b/scripts/build/companion_tools/100-m4.sh @@ -17,7 +17,7 @@ do_companion_tools_m4_build() { mkdir -p "${CT_BUILD_DIR}/build-m4" CT_Pushd "${CT_BUILD_DIR}/build-m4" - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \ --prefix="${CT_TOOLS_OVERIDE_DIR}" CT_DoExecLog ALL make diff --git a/scripts/build/companion_tools/200-autoconf.sh b/scripts/build/companion_tools/200-autoconf.sh index 9ed66b57..d90a3231 100644 --- a/scripts/build/companion_tools/200-autoconf.sh +++ b/scripts/build/companion_tools/200-autoconf.sh @@ -22,7 +22,7 @@ do_companion_tools_autoconf_build() { # For reference see: # http://www.gnu.org/software/autoconf/manual/autoconf.html#CONFIG_005fSHEL - CT_DoExecLog ALL ${CONFIG_SHELL} \ + CT_DoExecLog CFG ${CONFIG_SHELL} \ "${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}/configure" \ --prefix="${CT_TOOLS_OVERIDE_DIR}" CT_DoExecLog ALL make diff --git a/scripts/build/companion_tools/300-automake.sh b/scripts/build/companion_tools/300-automake.sh index 174b2a7d..e66f6ece 100644 --- a/scripts/build/companion_tools/300-automake.sh +++ b/scripts/build/companion_tools/300-automake.sh @@ -17,7 +17,7 @@ do_companion_tools_automake_build() { mkdir -p "${CT_BUILD_DIR}/build-automake" CT_Pushd "${CT_BUILD_DIR}/build-automake" - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}/configure" \ --prefix="${CT_TOOLS_OVERIDE_DIR}" CT_DoExecLog ALL make diff --git a/scripts/build/companion_tools/400-libtool.sh b/scripts/build/companion_tools/400-libtool.sh index eb9f82e2..6970a0f2 100644 --- a/scripts/build/companion_tools/400-libtool.sh +++ b/scripts/build/companion_tools/400-libtool.sh @@ -17,7 +17,7 @@ do_companion_tools_libtool_build() { mkdir -p "${CT_BUILD_DIR}/build-libtool" CT_Pushd "${CT_BUILD_DIR}/build-libtool" - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}/configure" \ --prefix="${CT_TOOLS_OVERIDE_DIR}" CT_DoExecLog ALL make diff --git a/scripts/build/debug/000-template.sh b/scripts/build/debug/000-template.sh index c76c972a..47d2caea 100644 --- a/scripts/build/debug/000-template.sh +++ b/scripts/build/debug/000-template.sh @@ -20,7 +20,7 @@ do_debug_foobar_build() { # For example: # mkdir -p "${CT_BUILD_DIR}/build-foobar" # CT_Pushd "${CT_BUILD_DIR}/build-foobar" - # CT_DoExecLog ALL \ + # CT_DoExecLog CFG \ # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure" \ # --build=${CT_BUILD} \ # --host=${CT_TARGET} \ diff --git a/scripts/build/debug/100-dmalloc.sh b/scripts/build/debug/100-dmalloc.sh index c567c40b..a5e4fa3a 100644 --- a/scripts/build/debug/100-dmalloc.sh +++ b/scripts/build/debug/100-dmalloc.sh @@ -36,7 +36,7 @@ do_debug_dmalloc_build() { LD="${CT_TARGET}-ld" \ AR="${CT_TARGET}-ar" \ CFLAGS=-fPIC \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure" \ --prefix=/usr \ --build="${CT_BUILD}" \ diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index a8229d46..5a7d87fc 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -112,7 +112,7 @@ do_debug_gdb_build() { CC="${CC_for_gdb}" \ LD="${LD_for_gdb}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${gdb_cross_configure}" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ @@ -153,7 +153,7 @@ do_debug_gdb_build() { # Use build = CT_REAL_BUILD so that configure thinks it is # cross-compiling, and thus will use the ${CT_BUILD}-* # tools instead of searching for the native ones... - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_BUILD} \ @@ -178,7 +178,7 @@ do_debug_gdb_build() { mkdir -p "${CT_BUILD_DIR}/build-ncurses" cd "${CT_BUILD_DIR}/build-ncurses" - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ @@ -211,7 +211,7 @@ do_debug_gdb_build() { mkdir -p "${CT_BUILD_DIR}/expat-build" cd "${CT_BUILD_DIR}/expat-build" - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/expat-${CT_DEBUG_GDB_EXPAT_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ @@ -251,7 +251,7 @@ do_debug_gdb_build() { CC="${CC_for_gdb}" \ LD="${LD_for_gdb}" \ CFLAGS="${gdb_native_CFLAGS[@]}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${gdb_src_dir}/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ @@ -313,7 +313,7 @@ do_debug_gdb_build() { gdbserver_extra_config=("${extra_config[@]}") LDFLAGS="${gdbserver_LDFLAGS}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${gdb_src_dir}/gdb/gdbserver/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh index dd0fe4ad..522756d3 100644 --- a/scripts/build/debug/400-ltrace.sh +++ b/scripts/build/debug/400-ltrace.sh @@ -38,9 +38,9 @@ do_debug_ltrace_build() { CC="${CT_TARGET}-${CT_CC}" \ HOST="${ltrace_host}" \ CFLAGS="${CT_TARGET_CFLAGS}" \ - CT_DoExecLog ALL ./configure --prefix=/usr + CT_DoExecLog CFG ./configure --prefix=/usr else - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ ./configure \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh index 3713da5e..65d40865 100644 --- a/scripts/build/debug/500-strace.sh +++ b/scripts/build/debug/500-strace.sh @@ -17,7 +17,7 @@ do_debug_strace_build() { CT_Pushd "${CT_BUILD_DIR}/build-strace" CT_DoLog EXTRA "Configuring strace" - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index c8f34c05..d1c07242 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -203,7 +203,7 @@ do_libc_start_files() { CXX=${cross_cxx} \ AR=${cross_ar} \ RANLIB=${cross_ranlib} \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/eglibc-${CT_LIBC_VERSION}/configure" \ --prefix=/usr \ --with-headers="${CT_HEADERS_DIR}" \ @@ -311,7 +311,7 @@ do_libc() { CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/eglibc-${CT_LIBC_VERSION}/configure" \ --prefix=/usr \ --with-headers="${CT_HEADERS_DIR}" \ diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index f739b88e..b2d89e42 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -130,7 +130,7 @@ do_libc_headers() { libc_cv_mlong_double_128=yes \ libc_cv_mlong_double_128ibm=yes \ CC=${cross_cc} \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/configure" \ --build="${CT_BUILD}" \ --host="${CT_TARGET}" \ @@ -302,7 +302,7 @@ do_libc_start_files() { CC="${cross_cc} ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/configure" \ --prefix=/usr \ --build="${CT_BUILD}" \ @@ -441,7 +441,7 @@ do_libc() { CC="${CT_TARGET}-gcc ${CT_LIBC_EXTRA_CC_ARGS} ${extra_cc_args}" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/configure" \ --prefix=/usr \ --build=${CT_BUILD} \ diff --git a/scripts/build/libc/mingw.sh b/scripts/build/libc/mingw.sh index dcf5b6ec..303f1c2b 100644 --- a/scripts/build/libc/mingw.sh +++ b/scripts/build/libc/mingw.sh @@ -63,7 +63,7 @@ do_libc() { CFLAGS="-I${CT_HEADERS_DIR}" \ LDFLAGS="-L${CT_SYSROOT_DIR}/lib" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/configure" \ --prefix=${CT_SYSROOT_DIR} \ --includedir=${CT_HEADERS_DIR} \ @@ -82,7 +82,7 @@ do_libc() { CFLAGS="-I${CT_HEADERS_DIR}" \ LDFLAGS="-L${CT_SYSROOT_DIR}/lib" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/mingwrt-${CT_MINGWRT_VERSION}-mingw32/configure" \ --prefix=${CT_SYSROOT_DIR}/ \ --includedir=${CT_HEADERS_DIR} \ @@ -138,7 +138,7 @@ do_libc_finish() { cd "${CT_BUILD_DIR}/build-gnurx" CFLAGS="${CT_CFLAGS_FOR_TARGET}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/mingw-libgnurx-${CT_MINGW_GNURX_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index aa679c3d..7e11fcd1 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -75,7 +75,7 @@ do_libc_start_files() { CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS} -O" \ AR=${CT_TARGET}-ar \ RANLIB=${CT_TARGET}-ranlib \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/newlib-$(libc_newlib_version)/configure" \ --host=${CT_BUILD} \ --target=${CT_TARGET} \ diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index a4928700..35f11262 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -190,7 +190,7 @@ do_libc() { # to best fit the target. So it is useless and seems to be a bad thing to # use LIBC_EXTRA_CFLAGS here. CT_DoLog EXTRA "Applying configuration" - CT_DoYes "" |CT_DoExecLog ALL \ + CT_DoYes "" |CT_DoExecLog CFG \ make CROSS=${CT_TARGET}- \ PREFIX="${CT_SYSROOT_DIR}/" \ LOCALE_DATA_FILENAME="${uclibc_local_tarball}.tgz" \ diff --git a/scripts/functions b/scripts/functions index a5e124c7..fc71715a 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,4 +1,4 @@ -# This file contains some usefull common functions +# This file contains some usefull common functions -*- sh -*- # Copyright 2007 Yann E. MORIN # Licensed under the GPL v2. See COPYING in the root of this package @@ -49,8 +49,11 @@ CT_LOG_LEVEL_ERROR=0 CT_LOG_LEVEL_WARN=1 CT_LOG_LEVEL_INFO=2 CT_LOG_LEVEL_EXTRA=3 -CT_LOG_LEVEL_ALL=4 -CT_LOG_LEVEL_DEBUG=5 +CT_LOG_LEVEL_CFG=4 +CT_LOG_LEVEL_FILE=5 +CT_LOG_LEVEL_STATE=6 +CT_LOG_LEVEL_ALL=7 +CT_LOG_LEVEL_DEBUG=8 # Make it easy to use \n and ! CR=$(printf "\n") @@ -62,8 +65,11 @@ BANG='!' # - WARN: A non fatal, non serious error occurred, take your responsbility with the generated build # - INFO: Informational messages # - EXTRA: Extra informational messages -# - DEBUG: Debug messages +# - CFG: Output of various "./configure"-type scripts +# - FILE: File / archive unpacking. +# - STATE: State save & restore # - ALL: Component's build messages +# - DEBUG: Internal debug messages # Usage: CT_DoLog <level> [message] # If message is empty, then stdin will be logged. CT_DoLog() { @@ -671,9 +677,9 @@ CT_Extract() { CT_DoLog EXTRA "Extracting '${basename}'" case "${ext}" in - .tar.bz2) CT_DoExecLog ALL tar xvjf "${full_file}";; - .tar.gz|.tgz) CT_DoExecLog ALL tar xvzf "${full_file}";; - .tar) CT_DoExecLog ALL tar xvf "${full_file}";; + .tar.bz2) CT_DoExecLog FILE tar xvjf "${full_file}";; + .tar.gz|.tgz) CT_DoExecLog FILE tar xvzf "${full_file}";; + .tar) CT_DoExecLog FILE tar xvf "${full_file}";; /.git) CT_ExtractGit "${basename}" "${@}";; *) CT_Abort "Don't know how to handle '${basename}${ext}': unknown extension";; esac @@ -729,7 +735,7 @@ CT_ExtractGit() { case "${ref_type}" in none) ;; - *) CT_DoExecLog ALL git checkout "${ref}";; + *) CT_DoExecLog FILE git checkout "${ref}";; esac CT_Popd @@ -957,15 +963,15 @@ CT_DoTarballIfExists() { CT_DoLog DEBUG " Saving '${dir}'" { tar c -C "${dir}" -v -f - "${extra_tar_opts[@]}" . \ |"${compress[@]}" >"${tarball}.tar${tar_ext}" ; - } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog DEBUG + } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog STATE else - CT_DoLog DEBUG " Not saving '${dir}': does not exist" + CT_DoLog STATE " Not saving '${dir}': does not exist" fi } # This function extracts a tarball to the specified directory, but # only if the tarball exists -# Usage: CT_DoTarballIfExists <tarball_basename> <dir> [extra_tar_options [...]] +# Usage: CT_DoExtractTarballIfExists <tarball_basename> <dir> [extra_tar_options [...]] CT_DoExtractTarballIfExists() { local tarball="$1" local dir="$2" @@ -984,9 +990,9 @@ CT_DoExtractTarballIfExists() { CT_DoExecLog DEBUG mkdir -p "${dir}" { "${uncompress[@]}" "${tarball}.tar${tar_ext}" \ |tar x -C "${dir}" -v -f - "${extra_tar_opts[@]}" ; - } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog DEBUG + } 2>&1 |sed -r -e 's/^/ /;' |CT_DoLog STATE else - CT_DoLog DEBUG " Not restoring '${dir}': does not exist" + CT_DoLog STATE " Not restoring '${dir}': does not exist" fi } @@ -1004,7 +1010,7 @@ CT_DoSaveState() { rm -rf "${state_dir}" mkdir -p "${state_dir}" - CT_DoLog DEBUG " Saving environment and aliases" + CT_DoLog STATE " Saving environment and aliases" # We must omit shell functions, and some specific bash variables # that break when restoring the environment, later. We could do # all the processing in the awk script, but a sed is easier... @@ -1026,7 +1032,7 @@ CT_DoSaveState() { CT_DoTarballIfExists "${CT_PREFIX_DIR}" "${state_dir}/prefix_dir" --exclude '*.log' if [ "${CT_LOG_TO_FILE}" = "y" ]; then - CT_DoLog DEBUG " Saving log file" + CT_DoLog STATE " Saving log file" exec >/dev/null case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in y) gzip -3 -c "${CT_LOG_FILE}" >"${state_dir}/log.gz";; @@ -1064,7 +1070,7 @@ CT_DoLoadState(){ # Restore the environment, discarding any error message # (for example, read-only bash internals) - CT_DoLog DEBUG " Restoring environment" + CT_DoLog STATE " Restoring environment" . "${state_dir}/env.sh" >/dev/null 2>&1 || true # Restore the new RESTART and STOP steps @@ -1073,7 +1079,7 @@ CT_DoLoadState(){ unset old_stop old_restart if [ "${CT_LOG_TO_FILE}" = "y" ]; then - CT_DoLog DEBUG " Restoring log file" + CT_DoLog STATE " Restoring log file" exec >/dev/null case "${CT_DEBUG_CT_SAVE_STEPS_GZIP}" in y) zcat "${state_dir}/log.gz" >"${CT_LOG_FILE}";; diff --git a/scripts/patch-rework.sh b/scripts/patch-rework.sh index 795c3c3e..5c239779 100755 --- a/scripts/patch-rework.sh +++ b/scripts/patch-rework.sh @@ -31,6 +31,8 @@ do_check_files_at_depth() { } mkdir -p "${dst}" +base="${base%%/}" +src="$( cd "${src}"; pwd )" dst="$( cd "${dst}"; pwd )" # Iterate through patches @@ -87,21 +89,14 @@ $1=="+++" && mark==1 { nextfile; } # contain multiple accumulated patches onto a single file. printf " applying patch..." if ! patch -g0 -F1 -f -p${d} <"${p}" >"../patch.out" 2>&1; then - printf " ERROR\n" - # Revert the patch + printf " ERROR\n\n" popd >/dev/null 2>&1 - printf " restoring '${base}'..." - rm -f "diffstat.tmp" - rm -rf "${base}" - mv "${base}.orig" "${base}" - printf " done\n\n" printf "There was an error while applying:\n --> ${p} <--\n" printf "'${base}' was restored to the state it was prior to applying this faulty patch.\n" printf "Here's the 'patch' command, and its output:\n" printf " ----8<----\n" printf " patch -g0 -F1 -f -p${d} <'${p}'\n" - cat "patch.out" |(IFS=$(printf "\n"); while read line; do printf " ${line}\n"; done) - rm -f "patch.out" + sed -r -e 's/^/ /;' "patch.out" printf " ----8<----\n" exit 1 fi @@ -136,6 +131,7 @@ $1=="+++" && mark==1 { nextfile; } printf " removing temporary files/dirs..." rm -f "patch.out" rm -f "diffstat.tmp" + rm -f "diffstat.orig" rm -rf "${base}.orig" printf " done\n" done @@ -148,6 +144,8 @@ for p in "${dst}/"*.patch; do if ! cmp "${p}.diffstat.orig" "${p}.diffstat.new" >/dev/null; then printf " --> '${pname}' differ in touched files <--\n" + else + rm -f "${p}.diffstat.orig" "${p}.diffstat.new" fi done printf " done.\n" |