Merge the gcc-4.4 support.
1.1 --- a/TODO Wed Jun 17 10:46:28 2009 +0200
1.2 +++ b/TODO Wed Jun 17 12:32:01 2009 +0200
1.3 @@ -5,14 +5,7 @@
1.4 - update versions for every tools...
1.5
1.6
1.7 -
1.8 -Non-recurring:
1.9 -
1.10 -- gcc-4.4
1.11 - - requires some companion libs:
1.12 - - PPL
1.13 - - CLoog
1.14 - - check that the patchset from 4.3.3 still applies
1.15 +Non-recurring tasks:
1.16
1.17 - uClinux
1.18
2.1 --- a/config/cc/gcc.in Wed Jun 17 10:46:28 2009 +0200
2.2 +++ b/config/cc/gcc.in Wed Jun 17 12:32:01 2009 +0200
2.3 @@ -130,6 +130,7 @@
2.4 config CC_GCC_4_4_or_later
2.5 bool
2.6 default n
2.7 + select PPL_CLOOG_MPC
2.8
2.9 config CC_VERSION
2.10 string
3.1 --- a/config/companion_libs.in Wed Jun 17 10:46:28 2009 +0200
3.2 +++ b/config/companion_libs.in Wed Jun 17 12:32:01 2009 +0200
3.3 @@ -20,35 +20,68 @@
3.4 - gcc
3.5 - gdb
3.6
3.7 -config GMP_MPFR_TARGET
3.8 - bool
3.9 - prompt "Build libraries for the target"
3.10 - depends on GMP_MPFR
3.11 - depends on ! BARE_METAL
3.12 - default n
3.13 - help
3.14 - Also build libraries for the target. This can be usefull if you want
3.15 - to later build a compiler that will run on the target, or if you want
3.16 - to run gdb natively on the target.
3.17 -
3.18 if GMP_MPFR
3.19 source config/companion_libs/gmp.in
3.20 source config/companion_libs/mpfr.in
3.21 endif
3.22
3.23 -config PPL_CLOOG
3.24 +config PPL_CLOOG_MPC
3.25 bool
3.26 - prompt "PPL and GLooG/PPL"
3.27 + prompt "PPL, GLooG/PPL and MPC"
3.28 help
3.29 - gcc-4.4.0 and above requires both PPL and CLooG/PPL to build some
3.30 - parts of the optimiser (GRAPHITE loop optimisation, to be precise).
3.31 + gcc-4.4.0 and above requires PPL and CLooG/PPL to build some parts
3.32 + of the optimiser (GRAPHITE loop optimisation, to be precise).
3.33 +
3.34 + In addition to those, gcc-4.4 also optionally uses MPC to enable
3.35 + additional optimisations on complex numbers. Although MPC is optional,
3.36 + crosstool-NG requires it and uses it to build gcc >= 4.4.0.
3.37
3.38 These will be automatically selected if you choose gcc>=4.4.0, but you
3.39 can say 'Y' here, although it is unknown yet if any other component
3.40 can use them.
3.41
3.42 -if PPL_CLOOG
3.43 +if PPL_CLOOG_MPC
3.44 source config/companion_libs/ppl.in
3.45 +source config/companion_libs/cloog.in
3.46 +source config/companion_libs/mpc.in
3.47 endif
3.48
3.49 +config FOO
3.50 + bool
3.51 +
3.52 +comment "Companion libraries common options"
3.53 + depends on GMP_MPFR || PPL_CLOOG_MPC
3.54 +
3.55 +config COMP_LIBS_CHECK
3.56 + bool
3.57 + prompt "| Check the companion libraries builds (!!! READ HELP!!!)"
3.58 + depends on GMP_MPFR || PPL_CLOOG_MPC
3.59 + default n
3.60 + help
3.61 + It is highly recommended to check the newly built companion libraries.
3.62 + Unfortunately, this is a very intensive task, and takes a loooong time.
3.63 +
3.64 + Checking the newly built companion libraries is thus disabled by default,
3.65 + but it is suggested that you check them at least once on your machine,
3.66 + and if they work, disable the check on subsequent builds.
3.67 +
3.68 + If you suspect that one (or more) of your companion libraries is the
3.69 + cause for incorrectly generated code, you should answer 'Y' here.
3.70 + Note however that this will take a really long time. For example,
3.71 + building PPL on my machine takes roughly 1'40", while checking it takes
3.72 + about 1h40'...
3.73 +
3.74 +config COMP_LIBS_TARGET
3.75 + bool
3.76 + prompt "| Build companion libraries for the target"
3.77 + depends on GMP_MPFR || PPL_CLOOG_MPC
3.78 + depends on ! BARE_METAL
3.79 + default n
3.80 + help
3.81 + Also build companion libraries for the target. This can be usefull if
3.82 + you want to later build a compiler that will run on the target, or if
3.83 + you want to run gdb natively on the target.
3.84 +
3.85 + Please note that for now, crosstool-NG can only build GMP and MPFR so.
3.86 +
3.87 endmenu
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/config/companion_libs/cloog.in Wed Jun 17 12:32:01 2009 +0200
4.3 @@ -0,0 +1,19 @@
4.4 +# CLooG options
4.5 +
4.6 +choice
4.7 + bool
4.8 + prompt "CLooG/ppl version"
4.9 +
4.10 +config CLOOG_V_0_15_3
4.11 + bool
4.12 + prompt "0.15.3"
4.13 +
4.14 +# CT_INSERT_VERSION_ABOVE
4.15 +# Don't remove above line!
4.16 +endchoice
4.17 +
4.18 +config CLOOG_VERSION
4.19 + string
4.20 + default "0.15.3" if CLOOG_V_0_15_3
4.21 +# CT_INSERT_VERSION_STRING_ABOVE
4.22 +# Don't remove above line!
5.1 --- a/config/companion_libs/gmp.in Wed Jun 17 10:46:28 2009 +0200
5.2 +++ b/config/companion_libs/gmp.in Wed Jun 17 12:32:01 2009 +0200
5.3 @@ -22,11 +22,3 @@
5.4 default "4.2.4" if GMP_V_4_2_4
5.5 # CT_INSERT_VERSION_STRING_ABOVE
5.6 # Don't remove above line!
5.7 -
5.8 -config GMP_CHECK
5.9 - bool
5.10 - prompt "Check GMP"
5.11 - default y
5.12 - help
5.13 - It is highly recommended that 'make check' is run against the newly built
5.14 - GMP library. See http://gmplib.org/
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/config/companion_libs/mpc.in Wed Jun 17 12:32:01 2009 +0200
6.3 @@ -0,0 +1,19 @@
6.4 +# MPC options
6.5 +
6.6 +choice
6.7 + bool
6.8 + prompt "MPC version"
6.9 +
6.10 +config MPC_V_0_6
6.11 + bool
6.12 + prompt "0.6"
6.13 +
6.14 +# CT_INSERT_VERSION_ABOVE
6.15 +# Don't remove above line!
6.16 +endchoice
6.17 +
6.18 +config MPC_VERSION
6.19 + string
6.20 + default "0.6" if MPC_V_0_6
6.21 +# CT_INSERT_VERSION_STRING_ABOVE
6.22 +# Don't remove above line!
7.1 --- a/config/companion_libs/mpfr.in Wed Jun 17 10:46:28 2009 +0200
7.2 +++ b/config/companion_libs/mpfr.in Wed Jun 17 12:32:01 2009 +0200
7.3 @@ -32,11 +32,3 @@
7.4 default "2.4.1" if MPFR_V_2_4_1
7.5 # CT_INSERT_VERSION_STRING_ABOVE
7.6 # Don't remove above line!
7.7 -
7.8 -config MPFR_CHECK
7.9 - bool
7.10 - prompt "Check MPFR"
7.11 - default y
7.12 - help
7.13 - It is highly recommended that 'make check' is run against the newly built
7.14 - MPFR library. See http://gmplib.org/
8.1 --- a/config/companion_libs/ppl.in Wed Jun 17 10:46:28 2009 +0200
8.2 +++ b/config/companion_libs/ppl.in Wed Jun 17 12:32:01 2009 +0200
8.3 @@ -17,17 +17,3 @@
8.4 default "0.10.2" if PPL_V_0_10_2
8.5 # CT_INSERT_VERSION_STRING_ABOVE
8.6 # Don't remove above line!
8.7 -
8.8 -config PPL_CHECK
8.9 - bool
8.10 - prompt "Check PPL (!!! README !!!)"
8.11 - default n
8.12 - help
8.13 - Checking PPL is very intensive and takes a loooong time.
8.14 - The PPL folks do not recommend checking the library, but they do
8.15 - not recommend not checking it, either.
8.16 -
8.17 - Checking PPL is thus disabled by default.
8.18 -
8.19 - If you suspect that your PPL library is the cause for incorrectly
8.20 - generated code, you should answer 'Y' here.
9.1 --- a/config/debug/gdb.in Wed Jun 17 10:46:28 2009 +0200
9.2 +++ b/config/debug/gdb.in Wed Jun 17 12:32:01 2009 +0200
9.3 @@ -20,7 +20,7 @@
9.4 help
9.5 A static cross gdb can be usefull if you debug on a machine that is
9.6 not the one that is used to compile the toolchain.
9.7 -
9.8 +
9.9 That way, you can share the cross-gdb without installing a toolchain
9.10 on every machine that will be used to debug target programs.
9.11
9.12 @@ -59,14 +59,14 @@
9.13 default n
9.14 depends on GDB_NATIVE
9.15 select GMP_MPFR
9.16 - select GMP_MPFR_TARGET
9.17 + select COMP_LIBS_TARGET
9.18 help
9.19 gdb can make use of the GMP and MPFR libraries.
9.20 -
9.21 +
9.22 While the cross-gdb (above) can use the libraries compiled for the
9.23 host, the native gdb needs the libraries for the target (where it will
9.24 eventually run).
9.25 -
9.26 +
9.27 Setting this option will force building the GMP and MPFR libraries for
9.28 the target, and configure the native gdb to use them.
9.29
10.1 --- a/configure Wed Jun 17 10:46:28 2009 +0200
10.2 +++ b/configure Wed Jun 17 12:32:01 2009 +0200
10.3 @@ -337,6 +337,7 @@
10.4 has_or_abort prog=libtool \
10.5 ver='\(GNU libtool.*\) (2[[:digit:]]*\.|1\.6[[:digit:]]*\.|1\.5\.[2-9][[:digit:]]+)' \
10.6 err="'libtool' 1.5.26 or above was not found"
10.7 +has_or_abort prog=stat ver='GNU coreutils'
10.8 has_or_abort prog="curl wget"
10.9 has_or_abort prog=cvs
10.10 has_or_abort prog=patch
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/patches/gcc/4.4.0/100-alpha-mieee-default.patch Wed Jun 17 12:32:01 2009 +0200
11.3 @@ -0,0 +1,24 @@
11.4 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.h gcc-4.4.0/gcc/config/alpha/alpha.h
11.5 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100
11.6 ++++ gcc-4.4.0/gcc/config/alpha/alpha.h 2009-05-27 21:37:58.000000000 +0200
11.7 +@@ -95,6 +95,8 @@
11.8 + while (0)
11.9 + #endif
11.10 +
11.11 ++#define CPP_SPEC "%{!no-ieee:-mieee}"
11.12 ++
11.13 + #define WORD_SWITCH_TAKES_ARG(STR) \
11.14 + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
11.15 +
11.16 +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.opt gcc-4.4.0/gcc/config/alpha/alpha.opt
11.17 +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
11.18 ++++ gcc-4.4.0/gcc/config/alpha/alpha.opt 2009-05-27 21:37:58.000000000 +0200
11.19 +@@ -39,7 +39,7 @@
11.20 + Request IEEE-conformant math library routines (OSF/1)
11.21 +
11.22 + mieee
11.23 +-Target Report RejectNegative Mask(IEEE)
11.24 ++Target Report Mask(IEEE)
11.25 + Emit IEEE-conformant code, without inexact exceptions
11.26 +
11.27 + mieee-with-inexact
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/patches/gcc/4.4.0/110-trampolinewarn.patch Wed Jun 17 12:32:01 2009 +0200
12.3 @@ -0,0 +1,27 @@
12.4 +diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c
12.5 +--- gcc-4.4.0.orig/gcc/builtins.c 2009-03-30 19:42:27.000000000 +0200
12.6 ++++ gcc-4.4.0/gcc/builtins.c 2009-05-27 21:38:01.000000000 +0200
12.7 +@@ -5768,6 +5768,9 @@
12.8 + trampolines_created = 1;
12.9 + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
12.10 +
12.11 ++ if (warn_trampolines)
12.12 ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
12.13 ++
12.14 + return const0_rtx;
12.15 + }
12.16 +
12.17 +diff -durN gcc-4.4.0.orig/gcc/common.opt gcc-4.4.0/gcc/common.opt
12.18 +--- gcc-4.4.0.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100
12.19 ++++ gcc-4.4.0/gcc/common.opt 2009-05-27 21:38:01.000000000 +0200
12.20 +@@ -197,6 +197,10 @@
12.21 + Common Var(warn_type_limits) Init(-1) Warning
12.22 + Warn if a comparison is always true or always false due to the limited range of the data type
12.23 +
12.24 ++Wtrampolines
12.25 ++Common Var(warn_trampolines) Init(1)
12.26 ++Warn whenever a trampoline is generated
12.27 ++
12.28 + Wuninitialized
12.29 + Common Var(warn_uninitialized) Warning
12.30 + Warn about uninitialized automatic variables
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/patches/gcc/4.4.0/120-java-nomulti.patch Wed Jun 17 12:32:01 2009 +0200
13.3 @@ -0,0 +1,46 @@
13.4 +diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure
13.5 +--- gcc-4.4.0.orig/libjava/configure 2009-04-21 11:08:08.000000000 +0200
13.6 ++++ gcc-4.4.0/libjava/configure 2009-05-27 21:38:03.000000000 +0200
13.7 +@@ -1021,6 +1021,8 @@
13.8 + default=yes
13.9 + --enable-java-maintainer-mode
13.10 + allow rebuilding of .class and .h files
13.11 ++ --enable-libjava-multilib
13.12 ++ build libjava as multilib
13.13 + --disable-dependency-tracking speeds up one-time build
13.14 + --enable-dependency-tracking do not reject slow dependency extractors
13.15 + --enable-maintainer-mode enable make rules and dependencies not useful
13.16 +@@ -1973,6 +1975,16 @@
13.17 + fi
13.18 +
13.19 +
13.20 ++# Check whether --enable-libjava-multilib was given.
13.21 ++if test "${enable_libjava_multilib+set}" = set; then
13.22 ++ enableval=$enable_libjava_multilib;
13.23 ++fi
13.24 ++
13.25 ++if test "$enable_libjava_multilib" = no; then
13.26 ++ multilib=no
13.27 ++ ac_configure_args="$ac_configure_args --disable-multilib"
13.28 ++fi
13.29 ++
13.30 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
13.31 +
13.32 +
13.33 +diff -durN gcc-4.4.0.orig/libjava/configure.ac gcc-4.4.0/libjava/configure.ac
13.34 +--- gcc-4.4.0.orig/libjava/configure.ac 2009-04-09 23:54:28.000000000 +0200
13.35 ++++ gcc-4.4.0/libjava/configure.ac 2009-05-27 21:38:03.000000000 +0200
13.36 +@@ -139,6 +139,13 @@
13.37 + [allow rebuilding of .class and .h files]))
13.38 + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
13.39 +
13.40 ++AC_ARG_ENABLE(libjava-multilib,
13.41 ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
13.42 ++if test "$enable_libjava_multilib" = no; then
13.43 ++ multilib=no
13.44 ++ ac_configure_args="$ac_configure_args --disable-multilib"
13.45 ++fi
13.46 ++
13.47 + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
13.48 + GCC_NO_EXECUTABLES
13.49 +
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/patches/gcc/4.4.0/130-cross-compile.patch Wed Jun 17 12:32:01 2009 +0200
14.3 @@ -0,0 +1,39 @@
14.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
14.5 +--- gcc-4.4.0.orig/gcc/configure 2009-03-24 18:46:03.000000000 +0100
14.6 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:06.000000000 +0200
14.7 +@@ -13997,7 +13997,7 @@
14.8 + | powerpc*-*-*,powerpc64*-*-*)
14.9 + CROSS="$CROSS -DNATIVE_CROSS" ;;
14.10 + esac
14.11 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
14.12 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
14.13 + SYSTEM_HEADER_DIR=$build_system_header_dir
14.14 + fi
14.15 +
14.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
14.17 +--- gcc-4.4.0.orig/gcc/configure.ac 2009-03-24 18:46:03.000000000 +0100
14.18 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:06.000000000 +0200
14.19 +@@ -1720,7 +1720,7 @@
14.20 + | powerpc*-*-*,powerpc64*-*-*)
14.21 + CROSS="$CROSS -DNATIVE_CROSS" ;;
14.22 + esac
14.23 +-elif test "x$TARGET_SYSTEM_ROOT" != x; then
14.24 ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
14.25 + SYSTEM_HEADER_DIR=$build_system_header_dir
14.26 + fi
14.27 +
14.28 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2.c gcc-4.4.0/gcc/unwind-dw2.c
14.29 +--- gcc-4.4.0.orig/gcc/unwind-dw2.c 2009-04-10 01:23:07.000000000 +0200
14.30 ++++ gcc-4.4.0/gcc/unwind-dw2.c 2009-05-27 21:38:06.000000000 +0200
14.31 +@@ -329,9 +329,11 @@
14.32 + }
14.33 + #endif
14.34 +
14.35 ++#ifndef inhibit_libc
14.36 + #ifdef MD_UNWIND_SUPPORT
14.37 + #include MD_UNWIND_SUPPORT
14.38 + #endif
14.39 ++#endif
14.40 +
14.41 + /* Extract any interesting information from the CIE for the translation
14.42 + unit F belongs to. Return a pointer to the byte after the augmentation,
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/patches/gcc/4.4.0/140-default-format-security.patch Wed Jun 17 12:32:01 2009 +0200
15.3 @@ -0,0 +1,49 @@
15.4 +diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c
15.5 +--- gcc-4.4.0.orig/gcc/c-common.c 2009-03-30 19:42:27.000000000 +0200
15.6 ++++ gcc-4.4.0/gcc/c-common.c 2009-05-27 21:38:08.000000000 +0200
15.7 +@@ -301,7 +301,7 @@
15.8 + /* Warn about format/argument anomalies in calls to formatted I/O functions
15.9 + (*printf, *scanf, strftime, strfmon, etc.). */
15.10 +
15.11 +-int warn_format;
15.12 ++int warn_format = 1;
15.13 +
15.14 + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled
15.15 + with GCC this doesn't matter as __null is guaranteed to have the right
15.16 +diff -durN gcc-4.4.0.orig/gcc/c.opt gcc-4.4.0/gcc/c.opt
15.17 +--- gcc-4.4.0.orig/gcc/c.opt 2009-03-18 22:14:53.000000000 +0100
15.18 ++++ gcc-4.4.0/gcc/c.opt 2009-05-27 21:38:08.000000000 +0200
15.19 +@@ -236,7 +236,7 @@
15.20 + Warn about format strings that contain NUL bytes
15.21 +
15.22 + Wformat-security
15.23 +-C ObjC C++ ObjC++ Var(warn_format_security) Warning
15.24 ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
15.25 + Warn about possible security problems with format functions
15.26 +
15.27 + Wformat-y2k
15.28 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
15.29 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200
15.30 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:08.000000000 +0200
15.31 +@@ -2867,6 +2867,9 @@
15.32 + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
15.33 + @option{-Wformat=2} are available, but are not included in @option{-Wall}.
15.34 +
15.35 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
15.36 ++To disable, use @option{-Wformat=0}.
15.37 ++
15.38 + @item -Wformat-y2k
15.39 + @opindex Wformat-y2k
15.40 + @opindex Wno-format-y2k
15.41 +@@ -2920,6 +2923,11 @@
15.42 + in future warnings may be added to @option{-Wformat-security} that are not
15.43 + included in @option{-Wformat-nonliteral}.)
15.44 +
15.45 ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++.
15.46 ++To disable, use @option{-Wno-format-security}, or disable all format warnings
15.47 ++with @option{-Wformat=0}. To make format security warnings fatal, specify
15.48 ++@option{-Werror=format-security}.
15.49 ++
15.50 + @item -Wformat=2
15.51 + @opindex Wformat=2
15.52 + @opindex Wno-format=2
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/patches/gcc/4.4.0/150-default-fortify-source.patch Wed Jun 17 12:32:01 2009 +0200
16.3 @@ -0,0 +1,26 @@
16.4 +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi
16.5 +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200
16.6 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200
16.7 +@@ -5411,6 +5411,11 @@
16.8 + Please note the warning under @option{-fgcse} about
16.9 + invoking @option{-O2} on programs that use computed gotos.
16.10 +
16.11 ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is
16.12 ++activated when @option{-O} is set to 2 or higher. This enables additional
16.13 ++compile-time and run-time checks for several libc functions. To disable,
16.14 ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}.
16.15 ++
16.16 + @item -O3
16.17 + @opindex O3
16.18 + Optimize yet more. @option{-O3} turns on all optimizations specified
16.19 +diff -durN gcc-4.4.0.orig/gcc/gcc.c gcc-4.4.0/gcc/gcc.c
16.20 +--- gcc-4.4.0.orig/gcc/gcc.c 2009-03-17 22:25:59.000000000 +0100
16.21 ++++ gcc-4.4.0/gcc/gcc.c 2009-05-27 21:38:11.000000000 +0200
16.22 +@@ -807,6 +807,7 @@
16.23 + %{H} %C %{D*&U*&A*} %{i*} %Z %i\
16.24 + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\
16.25 + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\
16.26 ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\
16.27 + %{E|M|MM:%W{o*}}";
16.28 +
16.29 + /* This contains cpp options which are common with cc1_options and are passed
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/patches/gcc/4.4.0/160-netbsd-symbolic.patch Wed Jun 17 12:32:01 2009 +0200
17.3 @@ -0,0 +1,11 @@
17.4 +diff -durN gcc-4.4.0.orig/gcc/config/netbsd-elf.h gcc-4.4.0/gcc/config/netbsd-elf.h
17.5 +--- gcc-4.4.0.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
17.6 ++++ gcc-4.4.0/gcc/config/netbsd-elf.h 2009-05-27 21:38:14.000000000 +0200
17.7 +@@ -82,6 +82,7 @@
17.8 + #define NETBSD_LINK_SPEC_ELF \
17.9 + "%{assert*} %{R*} %{rpath*} \
17.10 + %{shared:-shared} \
17.11 ++ %{symbolic:-Bsymbolic} \
17.12 + %{!shared: \
17.13 + -dc -dp \
17.14 + %{!nostdlib: \
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/patches/gcc/4.4.0/170-sparc64-bsd.patch Wed Jun 17 12:32:01 2009 +0200
18.3 @@ -0,0 +1,29 @@
18.4 +diff -durN gcc-4.4.0.orig/gcc/config/sparc/freebsd.h gcc-4.4.0/gcc/config/sparc/freebsd.h
18.5 +--- gcc-4.4.0.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
18.6 ++++ gcc-4.4.0/gcc/config/sparc/freebsd.h 2009-05-27 21:38:16.000000000 +0200
18.7 +@@ -25,9 +25,22 @@
18.8 + /* FreeBSD needs the platform name (sparc64) defined.
18.9 + Emacs needs to know if the arch is 64 or 32-bits. */
18.10 +
18.11 +-#undef CPP_CPU64_DEFAULT_SPEC
18.12 +-#define CPP_CPU64_DEFAULT_SPEC \
18.13 +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
18.14 ++#undef FBSD_TARGET_CPU_CPP_BUILTINS
18.15 ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \
18.16 ++ do \
18.17 ++ { \
18.18 ++ if (TARGET_ARCH64) \
18.19 ++ { \
18.20 ++ builtin_define ("__sparc64__"); \
18.21 ++ builtin_define ("__sparc_v9__"); \
18.22 ++ builtin_define ("__sparcv9"); \
18.23 ++ } \
18.24 ++ else \
18.25 ++ builtin_define ("__sparc"); \
18.26 ++ builtin_define ("__sparc__"); \
18.27 ++ } \
18.28 ++ while (0)
18.29 ++
18.30 +
18.31 + #define LINK_SPEC "%(link_arch) \
18.32 + %{!mno-relax:%{!r:-relax}} \
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/patches/gcc/4.4.0/180-libgomp-no-werror.patch Wed Jun 17 12:32:01 2009 +0200
19.3 @@ -0,0 +1,12 @@
19.4 +diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure
19.5 +--- gcc-4.4.0.orig/libgomp/configure 2009-04-21 11:08:08.000000000 +0200
19.6 ++++ gcc-4.4.0/libgomp/configure 2009-05-27 21:38:19.000000000 +0200
19.7 +@@ -3334,7 +3334,7 @@
19.8 +
19.9 + # Add -Wall -Werror if we are using GCC.
19.10 + if test "x$GCC" = "xyes"; then
19.11 +- XCFLAGS="$XCFLAGS -Wall -Werror"
19.12 ++ XCFLAGS="$XCFLAGS -Wall"
19.13 + fi
19.14 +
19.15 + # Find other programs we need.
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch Wed Jun 17 12:32:01 2009 +0200
20.3 @@ -0,0 +1,24 @@
20.4 +diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c
20.5 +--- gcc-4.4.0.orig/gcc/stmt.c 2009-02-27 20:49:42.000000000 +0100
20.6 ++++ gcc-4.4.0/gcc/stmt.c 2009-05-27 21:38:21.000000000 +0200
20.7 +@@ -2376,7 +2376,11 @@
20.8 + use_cost_table
20.9 + = (TREE_CODE (orig_type) != ENUMERAL_TYPE
20.10 + && estimate_case_costs (case_list));
20.11 +- balance_case_nodes (&case_list, NULL);
20.12 ++ /* When optimizing for size, we want a straight list to avoid
20.13 ++ jumps as much as possible. This basically creates an if-else
20.14 ++ chain. */
20.15 ++ if (!optimize_size)
20.16 ++ balance_case_nodes (&case_list, NULL);
20.17 + emit_case_nodes (index, case_list, default_label, index_type);
20.18 + if (default_label)
20.19 + emit_jump (default_label);
20.20 +@@ -2942,6 +2946,7 @@
20.21 + {
20.22 + if (!node_has_low_bound (node, index_type))
20.23 + {
20.24 ++ if (!optimize_size) /* don't jl to the .default_label. */
20.25 + emit_cmp_and_jump_insns (index,
20.26 + convert_modes
20.27 + (mode, imode,
21.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
21.2 +++ b/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch Wed Jun 17 12:32:01 2009 +0200
21.3 @@ -0,0 +1,15 @@
21.4 +diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h
21.5 +--- gcc-4.4.0.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200
21.6 ++++ gcc-4.4.0/include/libiberty.h 2009-05-27 21:38:24.000000000 +0200
21.7 +@@ -595,8 +595,11 @@
21.8 + /* Like sprintf but provides a pointer to malloc'd storage, which must
21.9 + be freed by the caller. */
21.10 +
21.11 ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
21.12 ++#ifndef asprintf
21.13 + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
21.14 + #endif
21.15 ++#endif
21.16 +
21.17 + #if !HAVE_DECL_VASPRINTF
21.18 + /* Like vsprintf but provides a pointer to malloc'd storage, which
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
22.2 +++ b/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch Wed Jun 17 12:32:01 2009 +0200
22.3 @@ -0,0 +1,12 @@
22.4 +diff -durN gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h gcc-4.4.0/gcc/config/arm/linux-eabi.h
22.5 +--- gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100
22.6 ++++ gcc-4.4.0/gcc/config/arm/linux-eabi.h 2009-05-27 21:38:26.000000000 +0200
22.7 +@@ -44,7 +44,7 @@
22.8 + The ARM10TDMI core is the default for armv5t, so set
22.9 + SUBTARGET_CPU_DEFAULT to achieve this. */
22.10 + #undef SUBTARGET_CPU_DEFAULT
22.11 +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
22.12 ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
22.13 +
22.14 + /* TARGET_BIG_ENDIAN_DEFAULT is set in
22.15 + config.gcc for big endian configurations. */
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
23.2 +++ b/patches/gcc/4.4.0/220-libiberty-pic.patch Wed Jun 17 12:32:01 2009 +0200
23.3 @@ -0,0 +1,11 @@
23.4 +diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in
23.5 +--- gcc-4.4.0.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200
23.6 ++++ gcc-4.4.0/libiberty/Makefile.in 2009-05-27 21:38:29.000000000 +0200
23.7 +@@ -227,6 +227,7 @@
23.8 + $(AR) $(AR_FLAGS) $(TARGETLIB) \
23.9 + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
23.10 + $(RANLIB) $(TARGETLIB); \
23.11 ++ cp $(TARGETLIB) ../ ; \
23.12 + cd ..; \
23.13 + else true; fi
23.14 +
24.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
24.2 +++ b/patches/gcc/4.4.0/230-superh-default-multilib.patch Wed Jun 17 12:32:01 2009 +0200
24.3 @@ -0,0 +1,12 @@
24.4 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
24.5 +--- gcc-4.4.0.orig/gcc/config.gcc 2009-04-17 13:58:41.000000000 +0200
24.6 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:31.000000000 +0200
24.7 +@@ -2121,7 +2121,7 @@
24.8 + if test x${sh_multilibs} = x ; then
24.9 + case ${target} in
24.10 + sh64-superh-linux* | \
24.11 +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
24.12 ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
24.13 + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
24.14 + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
24.15 + sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
25.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
25.2 +++ b/patches/gcc/4.4.0/240-libstdc++-pic.patch Wed Jun 17 12:32:01 2009 +0200
25.3 @@ -0,0 +1,53 @@
25.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am gcc-4.4.0/libstdc++-v3/src/Makefile.am
25.5 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am 2009-04-10 01:23:07.000000000 +0200
25.6 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.am 2009-05-27 21:38:34.000000000 +0200
25.7 +@@ -351,6 +351,13 @@
25.8 + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
25.9 +
25.10 +
25.11 ++install-exec-local:
25.12 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
25.13 ++ if [ x"$$pic_objs" != x ]; then \
25.14 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
25.15 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
25.16 ++ fi
25.17 ++
25.18 + # Added bits to build debug library.
25.19 + if GLIBCXX_BUILD_DEBUG
25.20 + all-local: build_debug
25.21 +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in gcc-4.4.0/libstdc++-v3/src/Makefile.in
25.22 +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in 2009-01-17 03:03:25.000000000 +0100
25.23 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.in 2009-05-27 21:38:34.000000000 +0200
25.24 +@@ -726,7 +726,7 @@
25.25 +
25.26 + install-data-am: install-data-local
25.27 +
25.28 +-install-exec-am: install-toolexeclibLTLIBRARIES
25.29 ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
25.30 +
25.31 + install-info: install-info-am
25.32 +
25.33 +@@ -765,7 +765,7 @@
25.34 + maintainer-clean-generic mostlyclean mostlyclean-compile \
25.35 + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
25.36 + tags uninstall uninstall-am uninstall-info-am \
25.37 +- uninstall-toolexeclibLTLIBRARIES
25.38 ++ uninstall-toolexeclibLTLIBRARIES install-exec-local
25.39 +
25.40 +
25.41 + # Symbol versioning for shared libraries.
25.42 +@@ -942,6 +942,14 @@
25.43 + install_debug:
25.44 + (cd ${debugdir} && $(MAKE) \
25.45 + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
25.46 ++
25.47 ++install-exec-local:
25.48 ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
25.49 ++ if [ x"$$pic_objs" != x ]; then \
25.50 ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
25.51 ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
25.52 ++ fi
25.53 ++
25.54 + # Tell versions [3.59,3.63) of GNU make to not export all variables.
25.55 + # Otherwise a system limit (for SysV at least) may be exceeded.
25.56 + .NOEXPORT:
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
26.2 +++ b/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch Wed Jun 17 12:32:01 2009 +0200
26.3 @@ -0,0 +1,79 @@
26.4 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.0/gcc/config/ia64/crtbegin.asm
26.5 +--- gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200
26.6 ++++ gcc-4.4.0/gcc/config/ia64/crtbegin.asm 2009-05-27 21:38:37.000000000 +0200
26.7 +@@ -252,3 +252,7 @@
26.8 + .weak __cxa_finalize
26.9 + #endif
26.10 + .weak _Jv_RegisterClasses
26.11 ++
26.12 ++#ifdef __linux__
26.13 ++.section .note.GNU-stack; .previous
26.14 ++#endif
26.15 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtend.asm gcc-4.4.0/gcc/config/ia64/crtend.asm
26.16 +--- gcc-4.4.0.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200
26.17 ++++ gcc-4.4.0/gcc/config/ia64/crtend.asm 2009-05-27 21:38:37.000000000 +0200
26.18 +@@ -119,3 +119,7 @@
26.19 +
26.20 + br.ret.sptk.many rp
26.21 + .endp __do_global_ctors_aux
26.22 ++
26.23 ++#ifdef __linux__
26.24 ++.section .note.GNU-stack; .previous
26.25 ++#endif
26.26 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crti.asm gcc-4.4.0/gcc/config/ia64/crti.asm
26.27 +--- gcc-4.4.0.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200
26.28 ++++ gcc-4.4.0/gcc/config/ia64/crti.asm 2009-05-27 21:38:37.000000000 +0200
26.29 +@@ -51,3 +51,7 @@
26.30 + .body
26.31 +
26.32 + # end of crti.asm
26.33 ++
26.34 ++#ifdef __linux__
26.35 ++.section .note.GNU-stack; .previous
26.36 ++#endif
26.37 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtn.asm gcc-4.4.0/gcc/config/ia64/crtn.asm
26.38 +--- gcc-4.4.0.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200
26.39 ++++ gcc-4.4.0/gcc/config/ia64/crtn.asm 2009-05-27 21:38:37.000000000 +0200
26.40 +@@ -41,3 +41,7 @@
26.41 + br.ret.sptk.many b0
26.42 +
26.43 + # end of crtn.asm
26.44 ++
26.45 ++#ifdef __linux__
26.46 ++.section .note.GNU-stack; .previous
26.47 ++#endif
26.48 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.0/gcc/config/ia64/lib1funcs.asm
26.49 +--- gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
26.50 ++++ gcc-4.4.0/gcc/config/ia64/lib1funcs.asm 2009-05-27 21:38:37.000000000 +0200
26.51 +@@ -793,3 +793,7 @@
26.52 + .endp __floattitf
26.53 + #endif
26.54 + #endif
26.55 ++
26.56 ++#ifdef __linux__
26.57 ++.section .note.GNU-stack; .previous
26.58 ++#endif
26.59 +diff -durN gcc-4.4.0.orig/gcc/config/ia64/linux.h gcc-4.4.0/gcc/config/ia64/linux.h
26.60 +--- gcc-4.4.0.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100
26.61 ++++ gcc-4.4.0/gcc/config/ia64/linux.h 2009-05-27 21:38:37.000000000 +0200
26.62 +@@ -5,6 +5,8 @@
26.63 +
26.64 + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
26.65 +
26.66 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
26.67 ++
26.68 + /* This is for -profile to use -lc_p instead of -lc. */
26.69 + #undef CC1_SPEC
26.70 + #define CC1_SPEC "%{profile:-p} %{G*}"
26.71 +diff -durN gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.0/gcc/config/rs6000/ppc-asm.h
26.72 +--- gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200
26.73 ++++ gcc-4.4.0/gcc/config/rs6000/ppc-asm.h 2009-05-27 21:38:37.000000000 +0200
26.74 +@@ -172,7 +172,7 @@
26.75 + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
26.76 + #endif
26.77 +
26.78 +-#if defined __linux__ && !defined __powerpc64__
26.79 ++#if defined __linux__
26.80 + .section .note.GNU-stack
26.81 + .previous
26.82 + #endif
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
27.2 +++ b/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch Wed Jun 17 12:32:01 2009 +0200
27.3 @@ -0,0 +1,25 @@
27.4 +diff -durN gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.0/gcc/config/sh/lib1funcs.asm
27.5 +--- gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200
27.6 ++++ gcc-4.4.0/gcc/config/sh/lib1funcs.asm 2009-05-27 21:38:39.000000000 +0200
27.7 +@@ -30,6 +30,11 @@
27.8 + !! recoded in assembly by Toshiyasu Morita
27.9 + !! tm@netcom.com
27.10 +
27.11 ++#if defined(__ELF__) && defined(__linux__)
27.12 ++.section .note.GNU-stack,"",%progbits
27.13 ++.previous
27.14 ++#endif
27.15 ++
27.16 + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
27.17 + ELF local label prefixes by J"orn Rennecke
27.18 + amylaar@cygnus.com */
27.19 +diff -durN gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.0/gcc/config/sh/linux-atomic.asm
27.20 +--- gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200
27.21 ++++ gcc-4.4.0/gcc/config/sh/linux-atomic.asm 2009-05-27 21:38:39.000000000 +0200
27.22 +@@ -136,3 +136,6 @@
27.23 + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov)
27.24 +
27.25 + #endif /* ! __SH5__ */
27.26 ++
27.27 ++.section .note.GNU-stack,"",%progbits
27.28 ++.previous
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/patches/gcc/4.4.0/270-sh-pr24836.patch Wed Jun 17 12:32:01 2009 +0200
28.3 @@ -0,0 +1,24 @@
28.4 +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure
28.5 +--- gcc-4.4.0.orig/gcc/configure 2009-05-27 21:38:08.000000000 +0200
28.6 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:42.000000000 +0200
28.7 +@@ -22205,7 +22205,7 @@
28.8 + tls_first_minor=14
28.9 + tls_as_opt="-m64 -Aesame --fatal-warnings"
28.10 + ;;
28.11 +- sh-*-* | sh[34]-*-*)
28.12 ++ sh-*-* | sh[34]*-*-*)
28.13 + conftest_s='
28.14 + .section ".tdata","awT",@progbits
28.15 + foo: .long 25
28.16 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac
28.17 +--- gcc-4.4.0.orig/gcc/configure.ac 2009-05-27 21:38:08.000000000 +0200
28.18 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:42.000000000 +0200
28.19 +@@ -2673,7 +2673,7 @@
28.20 + tls_first_minor=14
28.21 + tls_as_opt="-m64 -Aesame --fatal-warnings"
28.22 + ;;
28.23 +- sh-*-* | sh[34]-*-*)
28.24 ++ sh-*-* | sh[34]*-*-*)
28.25 + conftest_s='
28.26 + .section ".tdata","awT",@progbits
28.27 + foo: .long 25
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/patches/gcc/4.4.0/280-freebsd.patch Wed Jun 17 12:32:01 2009 +0200
29.3 @@ -0,0 +1,94 @@
29.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
29.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200
29.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:45.000000000 +0200
29.7 +@@ -61,6 +61,8 @@
29.8 + builtin_assert ("system=unix"); \
29.9 + builtin_assert ("system=bsd"); \
29.10 + builtin_assert ("system=FreeBSD"); \
29.11 ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \
29.12 ++ builtin_define("_LONGLONG"); \
29.13 + FBSD_TARGET_CPU_CPP_BUILTINS(); \
29.14 + } \
29.15 + while (0)
29.16 +diff -durN gcc-4.4.0.orig/gcc/config/t-freebsd-eh gcc-4.4.0/gcc/config/t-freebsd-eh
29.17 +--- gcc-4.4.0.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100
29.18 ++++ gcc-4.4.0/gcc/config/t-freebsd-eh 2009-05-27 21:38:45.000000000 +0200
29.19 +@@ -0,0 +1,4 @@
29.20 ++# Use unwind-dw2-fde-glibc
29.21 ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
29.22 ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
29.23 ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
29.24 +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc
29.25 +--- gcc-4.4.0.orig/gcc/config.gcc 2009-05-27 21:38:34.000000000 +0200
29.26 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:45.000000000 +0200
29.27 +@@ -456,7 +456,7 @@
29.28 + # pleases around the provided core setting.
29.29 + gas=yes
29.30 + gnu_ld=yes
29.31 +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
29.32 ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
29.33 + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
29.34 + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
29.35 + tmake_file="t-slibgcc-elf-ver t-freebsd"
29.36 +@@ -1042,6 +1042,10 @@
29.37 + ;;
29.38 + i[34567]86-*-freebsd*)
29.39 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h"
29.40 ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
29.41 ++ if test ${fbsd_major} -ge 7; then
29.42 ++ tmake_file="${tmake_file} t-freebsd-eh"
29.43 ++ fi
29.44 + ;;
29.45 + x86_64-*-freebsd*)
29.46 + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
29.47 +diff -durN gcc-4.4.0.orig/gcc/crtstuff.c gcc-4.4.0/gcc/crtstuff.c
29.48 +--- gcc-4.4.0.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200
29.49 ++++ gcc-4.4.0/gcc/crtstuff.c 2009-05-27 21:38:45.000000000 +0200
29.50 +@@ -85,13 +85,15 @@
29.51 + && !defined(OBJECT_FORMAT_FLAT) \
29.52 + && defined(HAVE_LD_EH_FRAME_HDR) \
29.53 + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \
29.54 +- && defined(__GLIBC__) && __GLIBC__ >= 2
29.55 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \
29.56 ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022))
29.57 + #include <link.h>
29.58 + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h.
29.59 + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */
29.60 + # if !defined(__UCLIBC__) \
29.61 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
29.62 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
29.63 ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
29.64 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
29.65 ++ || (__FreeBSD_version >= 700022)
29.66 + # define USE_PT_GNU_EH_FRAME
29.67 + # endif
29.68 + #endif
29.69 +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c
29.70 +--- gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200
29.71 ++++ gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c 2009-05-27 21:38:45.000000000 +0200
29.72 +@@ -46,8 +46,9 @@
29.73 + #include "gthr.h"
29.74 +
29.75 + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
29.76 +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
29.77 +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
29.78 ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
29.79 ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
29.80 ++ || (__FreeBSD_version >= 700022 ))
29.81 +
29.82 + #ifndef __RELOC_POINTER
29.83 + # define __RELOC_POINTER(ptr, base) ((ptr) + (base))
29.84 +@@ -63,6 +64,13 @@
29.85 + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
29.86 + #endif
29.87 +
29.88 ++/* Support FreeBSD */
29.89 ++#ifndef ElfW
29.90 ++# ifdef __ElfN
29.91 ++# define ElfW __ElfN
29.92 ++# endif
29.93 ++#endif
29.94 ++
29.95 + struct unw_eh_callback_data
29.96 + {
29.97 + _Unwind_Ptr pc;
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/patches/gcc/4.4.0/290-freebsd.patch Wed Jun 17 12:32:01 2009 +0200
30.3 @@ -0,0 +1,64 @@
30.4 +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h
30.5 +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200
30.6 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200
30.7 +@@ -86,9 +86,10 @@
30.8 + #define FBSD_STARTFILE_SPEC \
30.9 + "%{!shared: \
30.10 + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
30.11 +- %{!p:%{profile:gcrt1.o%s} \
30.12 +- %{!profile:crt1.o%s}}}} \
30.13 +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
30.14 ++ %{!p:%{profile:gcrt1.o%s} \
30.15 ++ %{!profile:crt1.o%s}}}} \
30.16 ++ crti.o%s \
30.17 ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}"
30.18 +
30.19 + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
30.20 + the magical crtend.o file (see crtstuff.c) which provides part of
30.21 +@@ -126,7 +127,8 @@
30.22 + %{pg: -lc_p} \
30.23 + }"
30.24 + #else
30.25 +-#if FBSD_MAJOR < 5
30.26 ++#include <sys/param.h>
30.27 ++#if __FreeBSD_version < 500016
30.28 + #define FBSD_LIB_SPEC " \
30.29 + %{!shared: \
30.30 + %{!pg: \
30.31 +@@ -136,17 +138,34 @@
30.32 + %{!pthread:-lc_p} \
30.33 + %{pthread:-lc_r_p}} \
30.34 + }"
30.35 +-#else
30.36 ++#elif __FreeBSD_version < 700022
30.37 + #define FBSD_LIB_SPEC " \
30.38 + %{!shared: \
30.39 + %{!pg: %{pthread:-lpthread} -lc} \
30.40 + %{pg: %{pthread:-lpthread_p} -lc_p} \
30.41 + }"
30.42 ++#else
30.43 ++#define FBSD_LIB_SPEC " \
30.44 ++ %{!shared: \
30.45 ++ %{!pg: %{pthread:-lpthread} -lc} \
30.46 ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \
30.47 ++ %{shared: \
30.48 ++ %{pthread:-lpthread} -lc} \
30.49 ++ "
30.50 + #endif
30.51 + #endif
30.52 +
30.53 +-#if FBSD_MAJOR < 6
30.54 ++#if FBSD_MAJOR < 5
30.55 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1"
30.56 + #else
30.57 + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1"
30.58 + #endif
30.59 ++
30.60 ++#if defined(HAVE_LD_EH_FRAME_HDR)
30.61 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
30.62 ++#endif
30.63 ++
30.64 ++/* Use --as-needed -lgcc_s for eh support. */
30.65 ++#ifdef HAVE_LD_AS_NEEDED
30.66 ++#define USE_LD_AS_NEEDED 1
30.67 ++#endif
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/patches/gcc/4.4.0/300-pr40105.patch Wed Jun 17 12:32:01 2009 +0200
31.3 @@ -0,0 +1,180 @@
31.4 +diff -durN gcc-4.4.0.orig/gcc/Makefile.in gcc-4.4.0/gcc/Makefile.in
31.5 +--- gcc-4.4.0.orig/gcc/Makefile.in 2009-03-25 13:00:32.000000000 +0100
31.6 ++++ gcc-4.4.0/gcc/Makefile.in 2009-05-27 21:38:50.000000000 +0200
31.7 +@@ -2785,7 +2785,8 @@
31.8 + value-prof.h $(TREE_INLINE_H) $(TARGET_H)
31.9 + cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
31.10 + $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
31.11 +- output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \
31.12 ++ output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) $(INSN_ATTR_H) \
31.13 ++ insn-config.h $(EXPR_H) \
31.14 + $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
31.15 + tree-pass.h $(DF_H) $(GGC_H)
31.16 + cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
31.17 +diff -durN gcc-4.4.0.orig/gcc/cfgrtl.c gcc-4.4.0/gcc/cfgrtl.c
31.18 +--- gcc-4.4.0.orig/gcc/cfgrtl.c 2008-12-12 22:16:09.000000000 +0100
31.19 ++++ gcc-4.4.0/gcc/cfgrtl.c 2009-05-27 21:38:50.000000000 +0200
31.20 +@@ -53,6 +53,7 @@
31.21 + #include "toplev.h"
31.22 + #include "tm_p.h"
31.23 + #include "obstack.h"
31.24 ++#include "insn-attr.h"
31.25 + #include "insn-config.h"
31.26 + #include "cfglayout.h"
31.27 + #include "expr.h"
31.28 +@@ -427,13 +428,27 @@
31.29 + return 0;
31.30 + }
31.31 +
31.32 ++static unsigned int
31.33 ++rest_of_pass_free_cfg (void)
31.34 ++{
31.35 ++#ifdef DELAY_SLOTS
31.36 ++ /* The resource.c machinery uses DF but the CFG isn't guaranteed to be
31.37 ++ valid at that point so it would be too late to call df_analyze. */
31.38 ++ if (optimize > 0 && flag_delayed_branch)
31.39 ++ df_analyze ();
31.40 ++#endif
31.41 ++
31.42 ++ free_bb_for_insn ();
31.43 ++ return 0;
31.44 ++}
31.45 ++
31.46 + struct rtl_opt_pass pass_free_cfg =
31.47 + {
31.48 + {
31.49 + RTL_PASS,
31.50 + NULL, /* name */
31.51 + NULL, /* gate */
31.52 +- free_bb_for_insn, /* execute */
31.53 ++ rest_of_pass_free_cfg, /* execute */
31.54 + NULL, /* sub */
31.55 + NULL, /* next */
31.56 + 0, /* static_pass_number */
31.57 +diff -durN gcc-4.4.0.orig/gcc/resource.c gcc-4.4.0/gcc/resource.c
31.58 +--- gcc-4.4.0.orig/gcc/resource.c 2009-02-20 16:20:38.000000000 +0100
31.59 ++++ gcc-4.4.0/gcc/resource.c 2009-05-27 21:38:50.000000000 +0200
31.60 +@@ -135,8 +135,6 @@
31.61 + static int
31.62 + find_basic_block (rtx insn, int search_limit)
31.63 + {
31.64 +- basic_block bb;
31.65 +-
31.66 + /* Scan backwards to the previous BARRIER. Then see if we can find a
31.67 + label that starts a basic block. Return the basic block number. */
31.68 + for (insn = prev_nonnote_insn (insn);
31.69 +@@ -157,11 +155,8 @@
31.70 + for (insn = next_nonnote_insn (insn);
31.71 + insn && LABEL_P (insn);
31.72 + insn = next_nonnote_insn (insn))
31.73 +- {
31.74 +- FOR_EACH_BB (bb)
31.75 +- if (insn == BB_HEAD (bb))
31.76 +- return bb->index;
31.77 +- }
31.78 ++ if (BLOCK_FOR_INSN (insn))
31.79 ++ return BLOCK_FOR_INSN (insn)->index;
31.80 +
31.81 + return -1;
31.82 + }
31.83 +@@ -848,13 +843,12 @@
31.84 + (with no intervening active insns) to see if any of them start a basic
31.85 + block. If we hit the start of the function first, we use block 0.
31.86 +
31.87 +- Once we have found a basic block and a corresponding first insns, we can
31.88 +- accurately compute the live status from basic_block_live_regs and
31.89 +- reg_renumber. (By starting at a label following a BARRIER, we are immune
31.90 +- to actions taken by reload and jump.) Then we scan all insns between
31.91 +- that point and our target. For each CLOBBER (or for call-clobbered regs
31.92 +- when we pass a CALL_INSN), mark the appropriate registers are dead. For
31.93 +- a SET, mark them as live.
31.94 ++ Once we have found a basic block and a corresponding first insn, we can
31.95 ++ accurately compute the live status (by starting at a label following a
31.96 ++ BARRIER, we are immune to actions taken by reload and jump.) Then we
31.97 ++ scan all insns between that point and our target. For each CLOBBER (or
31.98 ++ for call-clobbered regs when we pass a CALL_INSN), mark the appropriate
31.99 ++ registers are dead. For a SET, mark them as live.
31.100 +
31.101 + We have to be careful when using REG_DEAD notes because they are not
31.102 + updated by such things as find_equiv_reg. So keep track of registers
31.103 +@@ -954,13 +948,10 @@
31.104 + TARGET. Otherwise, we must assume everything is live. */
31.105 + if (b != -1)
31.106 + {
31.107 +- regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
31.108 ++ regset regs_live = df_get_live_in (BASIC_BLOCK (b));
31.109 + rtx start_insn, stop_insn;
31.110 +
31.111 +- /* Compute hard regs live at start of block -- this is the real hard regs
31.112 +- marked live, plus live pseudo regs that have been renumbered to
31.113 +- hard regs. */
31.114 +-
31.115 ++ /* Compute hard regs live at start of block. */
31.116 + REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live);
31.117 +
31.118 + /* Get starting and ending insn, handling the case where each might
31.119 +@@ -1046,10 +1037,24 @@
31.120 +
31.121 + else if (LABEL_P (real_insn))
31.122 + {
31.123 ++ basic_block bb;
31.124 ++
31.125 + /* A label clobbers the pending dead registers since neither
31.126 + reload nor jump will propagate a value across a label. */
31.127 + AND_COMPL_HARD_REG_SET (current_live_regs, pending_dead_regs);
31.128 + CLEAR_HARD_REG_SET (pending_dead_regs);
31.129 ++
31.130 ++ /* We must conservatively assume that all registers that used
31.131 ++ to be live here still are. The fallthrough edge may have
31.132 ++ left a live register uninitialized. */
31.133 ++ bb = BLOCK_FOR_INSN (real_insn);
31.134 ++ if (bb)
31.135 ++ {
31.136 ++ HARD_REG_SET extra_live;
31.137 ++
31.138 ++ REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
31.139 ++ IOR_HARD_REG_SET (current_live_regs, extra_live);
31.140 ++ }
31.141 + }
31.142 +
31.143 + /* The beginning of the epilogue corresponds to the end of the
31.144 +@@ -1121,6 +1126,7 @@
31.145 + init_resource_info (rtx epilogue_insn)
31.146 + {
31.147 + int i;
31.148 ++ basic_block bb;
31.149 +
31.150 + /* Indicate what resources are required to be valid at the end of the current
31.151 + function. The condition code never is and memory always is. If the
31.152 +@@ -1189,6 +1195,11 @@
31.153 + /* Allocate and initialize the tables used by mark_target_live_regs. */
31.154 + target_hash_table = XCNEWVEC (struct target_info *, TARGET_HASH_PRIME);
31.155 + bb_ticks = XCNEWVEC (int, last_basic_block);
31.156 ++
31.157 ++ /* Set the BLOCK_FOR_INSN of each label that starts a basic block. */
31.158 ++ FOR_EACH_BB (bb)
31.159 ++ if (LABEL_P (BB_HEAD (bb)))
31.160 ++ BLOCK_FOR_INSN (BB_HEAD (bb)) = bb;
31.161 + }
31.162 +
31.163 + /* Free up the resources allocated to mark_target_live_regs (). This
31.164 +@@ -1197,6 +1208,8 @@
31.165 + void
31.166 + free_resource_info (void)
31.167 + {
31.168 ++ basic_block bb;
31.169 ++
31.170 + if (target_hash_table != NULL)
31.171 + {
31.172 + int i;
31.173 +@@ -1222,6 +1235,10 @@
31.174 + free (bb_ticks);
31.175 + bb_ticks = NULL;
31.176 + }
31.177 ++
31.178 ++ FOR_EACH_BB (bb)
31.179 ++ if (LABEL_P (BB_HEAD (bb)))
31.180 ++ BLOCK_FOR_INSN (BB_HEAD (bb)) = NULL;
31.181 + }
31.182 +
31.183 + /* Clear any hashed information that we have stored for INSN. */
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/patches/gcc/4.4.0/310-uclibc-conf.patch Wed Jun 17 12:32:01 2009 +0200
32.3 @@ -0,0 +1,35 @@
32.4 +diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh
32.5 +--- gcc-4.4.0.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200
32.6 ++++ gcc-4.4.0/contrib/regression/objs-gcc.sh 2009-05-27 21:38:53.000000000 +0200
32.7 +@@ -106,6 +106,10 @@
32.8 + then
32.9 + make all-gdb all-dejagnu all-ld || exit 1
32.10 + make install-gdb install-dejagnu install-ld || exit 1
32.11 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
32.12 ++ then
32.13 ++ make all-gdb all-dejagnu all-ld || exit 1
32.14 ++ make install-gdb install-dejagnu install-ld || exit 1
32.15 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
32.16 + make bootstrap || exit 1
32.17 + make install || exit 1
32.18 +diff -durN gcc-4.4.0.orig/libjava/classpath/ltconfig gcc-4.4.0/libjava/classpath/ltconfig
32.19 +--- gcc-4.4.0.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200
32.20 ++++ gcc-4.4.0/libjava/classpath/ltconfig 2009-05-27 21:38:53.000000000 +0200
32.21 +@@ -603,7 +603,7 @@
32.22 +
32.23 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
32.24 + case $host_os in
32.25 +-linux-gnu*) ;;
32.26 ++linux-gnu*|linux-uclibc*) ;;
32.27 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
32.28 + esac
32.29 +
32.30 +@@ -1251,7 +1251,7 @@
32.31 + ;;
32.32 +
32.33 + # This must be Linux ELF.
32.34 +-linux-gnu*)
32.35 ++linux*)
32.36 + version_type=linux
32.37 + need_lib_prefix=no
32.38 + need_version=no
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/patches/gcc/4.4.0/320-missing-execinfo_h.patch Wed Jun 17 12:32:01 2009 +0200
33.3 @@ -0,0 +1,12 @@
33.4 +diff -durN gcc-4.4.0.orig/boehm-gc/include/gc.h gcc-4.4.0/boehm-gc/include/gc.h
33.5 +--- gcc-4.4.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
33.6 ++++ gcc-4.4.0/boehm-gc/include/gc.h 2009-05-27 21:38:55.000000000 +0200
33.7 +@@ -503,7 +503,7 @@
33.8 + #if defined(__linux__) || defined(__GLIBC__)
33.9 + # include <features.h>
33.10 + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
33.11 +- && !defined(__ia64__)
33.12 ++ && !defined(__ia64__) && !defined(__UCLIBC__)
33.13 + # ifndef GC_HAVE_BUILTIN_BACKTRACE
33.14 + # define GC_HAVE_BUILTIN_BACKTRACE
33.15 + # endif
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
34.2 +++ b/patches/gcc/4.4.0/330-c99-snprintf.patch Wed Jun 17 12:32:01 2009 +0200
34.3 @@ -0,0 +1,12 @@
34.4 +diff -durN gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.0/libstdc++-v3/include/c_global/cstdio
34.5 +--- gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200
34.6 ++++ gcc-4.4.0/libstdc++-v3/include/c_global/cstdio 2009-05-27 21:38:58.000000000 +0200
34.7 +@@ -139,7 +139,7 @@
34.8 +
34.9 + _GLIBCXX_END_NAMESPACE
34.10 +
34.11 +-#if _GLIBCXX_USE_C99
34.12 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__
34.13 +
34.14 + #undef snprintf
34.15 + #undef vfscanf
35.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
35.2 +++ b/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch Wed Jun 17 12:32:01 2009 +0200
35.3 @@ -0,0 +1,48 @@
35.4 +diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c
35.5 +--- gcc-4.4.0.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200
35.6 ++++ gcc-4.4.0/libmudflap/mf-hooks2.c 2009-05-27 21:39:00.000000000 +0200
35.7 +@@ -421,7 +421,7 @@
35.8 + {
35.9 + TRACE ("%s\n", __PRETTY_FUNCTION__);
35.10 + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
35.11 +- bzero (s, n);
35.12 ++ memset (s, 0, n);
35.13 + }
35.14 +
35.15 +
35.16 +@@ -431,7 +431,7 @@
35.17 + TRACE ("%s\n", __PRETTY_FUNCTION__);
35.18 + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
35.19 + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
35.20 +- bcopy (src, dest, n);
35.21 ++ memmove (dest, src, n);
35.22 + }
35.23 +
35.24 +
35.25 +@@ -441,7 +441,7 @@
35.26 + TRACE ("%s\n", __PRETTY_FUNCTION__);
35.27 + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
35.28 + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
35.29 +- return bcmp (s1, s2, n);
35.30 ++ return n == 0 ? 0 : memcmp (s1, s2, n);
35.31 + }
35.32 +
35.33 +
35.34 +@@ -450,7 +450,7 @@
35.35 + size_t n = strlen (s);
35.36 + TRACE ("%s\n", __PRETTY_FUNCTION__);
35.37 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
35.38 +- return index (s, c);
35.39 ++ return strchr (s, c);
35.40 + }
35.41 +
35.42 +
35.43 +@@ -459,7 +459,7 @@
35.44 + size_t n = strlen (s);
35.45 + TRACE ("%s\n", __PRETTY_FUNCTION__);
35.46 + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
35.47 +- return rindex (s, c);
35.48 ++ return strrchr (s, c);
35.49 + }
35.50 +
35.51 + /* XXX: stpcpy, memccpy */
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
36.2 +++ b/patches/glibc/2.9/560-syslog.patch Wed Jun 17 12:32:01 2009 +0200
36.3 @@ -0,0 +1,12 @@
36.4 +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c
36.5 +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200
36.6 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200
36.7 +@@ -152,7 +152,7 @@
36.8 + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID
36.9 + /* Check for invalid bits. */
36.10 + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) {
36.11 +- syslog(INTERNALLOG,
36.12 ++ __syslog(INTERNALLOG,
36.13 + "syslog: unknown facility/priority: %x", pri);
36.14 + pri &= LOG_PRIMASK|LOG_FACMASK;
36.15 + }
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
37.2 +++ b/patches/glibc/2.9/570-debug-readlink_chk-readklinkat_chk.patch Wed Jun 17 12:32:01 2009 +0200
37.3 @@ -0,0 +1,24 @@
37.4 +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c
37.5 +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100
37.6 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200
37.7 +@@ -25,7 +25,7 @@
37.8 +
37.9 +
37.10 + ssize_t
37.11 +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen)
37.12 ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen)
37.13 + {
37.14 + if (len > buflen)
37.15 + __chk_fail ();
37.16 +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c
37.17 +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200
37.18 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200
37.19 +@@ -21,7 +21,7 @@
37.20 +
37.21 +
37.22 + ssize_t
37.23 +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len,
37.24 ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len,
37.25 + size_t buflen)
37.26 + {
37.27 + if (len > buflen)
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
38.2 +++ b/patches/strace/4.5.18/180-arm-EABI-syscalls.patch Wed Jun 17 12:32:01 2009 +0200
38.3 @@ -0,0 +1,23 @@
38.4 +Patch from upstream:
38.5 +http://strace.cvs.sourceforge.net/viewvc/strace/strace/linux/arm/syscallent.h?r1=1.17&r2=1.18&sortby=file
38.6 +
38.7 +2008-11-13 Kirill A. Shutemov <kirill@shutemov.name>
38.8 +
38.9 + * linux/arm/syscallent.h: Fix build on ARM EABI which does not
38.10 + provide syscalls socketcall and ipc.
38.11 +
38.12 +--- strace-4.5.18.orig/linux/arm/syscallent.h 2008/12/29 20:04:15 1.17
38.13 ++++ strace-4.5.18/linux/arm/syscallent.h 2009/01/01 23:20:38 1.18
38.14 +@@ -431,6 +431,7 @@
38.15 + { 5, 0, printargs, "SYS_398" }, /* 398 */
38.16 + { 5, 0, printargs, "SYS_399" }, /* 399 */
38.17 +
38.18 ++#ifndef __ARM_EABI__
38.19 + #if SYS_socket_subcall != 400
38.20 + #error fix me
38.21 + #endif
38.22 +@@ -481,3 +482,4 @@
38.23 + { 4, TI, sys_shmdt, "shmdt" }, /* 440 */
38.24 + { 4, TI, sys_shmget, "shmget" }, /* 441 */
38.25 + { 4, TI, sys_shmctl, "shmctl" }, /* 442 */
38.26 ++#endif
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
39.2 +++ b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config Wed Jun 17 12:32:01 2009 +0200
39.3 @@ -0,0 +1,426 @@
39.4 +#
39.5 +# Automatically generated make config: don't edit
39.6 +# crosstool-NG version: svn_devel_gcc-4.4@1589
39.7 +# Tue Jun 2 23:13:19 2009
39.8 +#
39.9 +
39.10 +#
39.11 +# Paths and misc options
39.12 +#
39.13 +
39.14 +#
39.15 +# crosstool-NG behavior
39.16 +#
39.17 +# CT_OBSOLETE is not set
39.18 +CT_EXPERIMENTAL=y
39.19 +# CT_DEBUG_CT is not set
39.20 +
39.21 +#
39.22 +# Paths
39.23 +#
39.24 +CT_LOCAL_TARBALLS_DIR="${HOME}/src"
39.25 +CT_SAVE_TARBALLS=y
39.26 +CT_WORK_DIR="${CT_TOP_DIR}/targets"
39.27 +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
39.28 +CT_INSTALL_DIR="${CT_PREFIX_DIR}"
39.29 +# CT_CUSTOM_PATCH is not set
39.30 +CT_REMOVE_DOCS=y
39.31 +CT_INSTALL_DIR_RO=y
39.32 +
39.33 +#
39.34 +# Downloading
39.35 +#
39.36 +# CT_FORBID_DOWNLOAD is not set
39.37 +# CT_FORCE_DOWNLOAD is not set
39.38 +# CT_USE_MIRROR is not set
39.39 +CT_CONNECT_TIMEOUT=10
39.40 +# CT_ONLY_DOWNLOAD is not set
39.41 +
39.42 +#
39.43 +# Extracting
39.44 +#
39.45 +# CT_FORCE_EXTRACT is not set
39.46 +CT_OVERIDE_CONFIG_GUESS_SUB=y
39.47 +# CT_ONLY_EXTRACT is not set
39.48 +
39.49 +#
39.50 +# Build behavior
39.51 +#
39.52 +CT_PARALLEL_JOBS=1
39.53 +CT_LOAD=0
39.54 +CT_NICE=0
39.55 +CT_USE_PIPES=y
39.56 +# CT_CONFIG_SHELL_ASH is not set
39.57 +
39.58 +#
39.59 +# Logging
39.60 +#
39.61 +# CT_LOG_ERROR is not set
39.62 +# CT_LOG_WARN is not set
39.63 +# CT_LOG_INFO is not set
39.64 +CT_LOG_EXTRA=y
39.65 +# CT_LOG_DEBUG is not set
39.66 +# CT_LOG_ALL is not set
39.67 +CT_LOG_LEVEL_MAX="EXTRA"
39.68 +# CT_LOG_SEE_TOOLS_WARN is not set
39.69 +CT_LOG_PROGRESS_BAR=y
39.70 +CT_LOG_TO_FILE=y
39.71 +CT_LOG_FILE_COMPRESS=y
39.72 +
39.73 +#
39.74 +# Target options
39.75 +#
39.76 +CT_ARCH="arm"
39.77 +# CT_ARCH_64 is not set
39.78 +# CT_ARCH_SUPPORTS_BOTH_MMU is not set
39.79 +CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
39.80 +CT_ARCH_SUPPORT_ARCH=y
39.81 +# CT_ARCH_SUPPORT_ABI is not set
39.82 +CT_ARCH_SUPPORT_CPU=y
39.83 +CT_ARCH_SUPPORT_TUNE=y
39.84 +CT_ARCH_SUPPORT_FPU=y
39.85 +# CT_ARCH_DEFAULT_HAS_MMU is not set
39.86 +# CT_ARCH_DEFAULT_BE is not set
39.87 +CT_ARCH_DEFAULT_LE=y
39.88 +CT_ARCH_ARCH="armv7-a"
39.89 +CT_ARCH_CPU="cortex-a8"
39.90 +CT_ARCH_TUNE="cortex-a8"
39.91 +CT_ARCH_FPU=""
39.92 +# CT_ARCH_BE is not set
39.93 +CT_ARCH_LE=y
39.94 +# CT_ARCH_FLOAT_HW is not set
39.95 +CT_ARCH_FLOAT_SW=y
39.96 +CT_TARGET_CFLAGS=""
39.97 +CT_TARGET_LDFLAGS=""
39.98 +
39.99 +#
39.100 +# General target options
39.101 +#
39.102 +# CT_ARCH_alpha is not set
39.103 +CT_ARCH_arm=y
39.104 +# CT_ARCH_ia64 is not set
39.105 +# CT_ARCH_mips is not set
39.106 +# CT_ARCH_powerpc is not set
39.107 +# CT_ARCH_powerpc64 is not set
39.108 +# CT_ARCH_sh is not set
39.109 +# CT_ARCH_x86 is not set
39.110 +# CT_ARCH_x86_64 is not set
39.111 +CT_ARCH_ARM_EABI=y
39.112 +CT_ARCH_USE_MMU=y
39.113 +
39.114 +#
39.115 +# Target optimisations
39.116 +#
39.117 +
39.118 +#
39.119 +# Toolchain options
39.120 +#
39.121 +
39.122 +#
39.123 +# General toolchain options
39.124 +#
39.125 +CT_USE_SYSROOT=y
39.126 +CT_SYSROOT_DIR_PREFIX=""
39.127 +CT_SHARED_LIBS=y
39.128 +
39.129 +#
39.130 +# Tuple completion and aliasing
39.131 +#
39.132 +CT_TARGET_VENDOR="cortex_a8"
39.133 +CT_TARGET_ALIAS_SED_EXPR=""
39.134 +CT_TARGET_ALIAS=""
39.135 +
39.136 +#
39.137 +# Toolchain type
39.138 +#
39.139 +# CT_NATIVE is not set
39.140 +CT_CROSS=y
39.141 +# CT_CROSS_NATIVE is not set
39.142 +# CT_CANADIAN is not set
39.143 +CT_TOOLCHAIN_TYPE="cross"
39.144 +
39.145 +#
39.146 +# Build system
39.147 +#
39.148 +CT_BUILD=""
39.149 +CT_BUILD_PREFIX=""
39.150 +CT_BUILD_SUFFIX=""
39.151 +
39.152 +#
39.153 +# Operating System
39.154 +#
39.155 +# CT_BARE_METAL is not set
39.156 +CT_KERNEL="linux"
39.157 +CT_KERNEL_VERSION="2.6.29.2"
39.158 +# CT_KERNEL_bare_metal is not set
39.159 +CT_KERNEL_linux=y
39.160 +CT_KERNEL_LINUX_INSTALL=y
39.161 +CT_KERNEL_LINUX_INSTALL_CHECK=y
39.162 +# CT_KERNEL_V_2_6_18_8 is not set
39.163 +# CT_KERNEL_V_2_6_19_7 is not set
39.164 +# CT_KERNEL_V_2_6_20_21 is not set
39.165 +# CT_KERNEL_V_2_6_21_7 is not set
39.166 +# CT_KERNEL_V_2_6_22_19 is not set
39.167 +# CT_KERNEL_V_2_6_23_17 is not set
39.168 +# CT_KERNEL_V_2_6_24_7 is not set
39.169 +# CT_KERNEL_V_2_6_25_20 is not set
39.170 +# CT_KERNEL_V_2_6_26_8 is not set
39.171 +# CT_KERNEL_V_2_6_27_22 is not set
39.172 +# CT_KERNEL_V_2_6_28 is not set
39.173 +# CT_KERNEL_V_2_6_28_1 is not set
39.174 +# CT_KERNEL_V_2_6_28_2 is not set
39.175 +# CT_KERNEL_V_2_6_28_3 is not set
39.176 +# CT_KERNEL_V_2_6_28_4 is not set
39.177 +# CT_KERNEL_V_2_6_28_5 is not set
39.178 +# CT_KERNEL_V_2_6_28_6 is not set
39.179 +# CT_KERNEL_V_2_6_28_7 is not set
39.180 +# CT_KERNEL_V_2_6_28_8 is not set
39.181 +# CT_KERNEL_V_2_6_28_9 is not set
39.182 +# CT_KERNEL_V_2_6_28_10 is not set
39.183 +# CT_KERNEL_V_2_6_29 is not set
39.184 +# CT_KERNEL_V_2_6_29_1 is not set
39.185 +CT_KERNEL_V_2_6_29_2=y
39.186 +# CT_KERNEL_V_select is not set
39.187 +CT_KERNEL_LINUX_VERBOSITY_0=y
39.188 +# CT_KERNEL_LINUX_VERBOSITY_1 is not set
39.189 +# CT_KERNEL_LINUX_VERBOSITY_2 is not set
39.190 +CT_KERNEL_LINUX_VERBOSE_LEVEL=0
39.191 +# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set
39.192 +
39.193 +#
39.194 +# Companion libraries
39.195 +#
39.196 +CT_GMP_MPFR=y
39.197 +# CT_GMP_V_4_2_2 is not set
39.198 +CT_GMP_V_4_2_4=y
39.199 +CT_GMP_VERSION="4.2.4"
39.200 +# CT_MPFR_V_2_3_1 is not set
39.201 +# CT_MPFR_V_2_3_2 is not set
39.202 +# CT_MPFR_V_2_4_0 is not set
39.203 +CT_MPFR_V_2_4_1=y
39.204 +CT_MPFR_VERSION="2.4.1"
39.205 +CT_PPL_CLOOG_MPC=y
39.206 +CT_PPL_V_0_10_2=y
39.207 +CT_PPL_VERSION="0.10.2"
39.208 +CT_CLOOG_V_0_15_3=y
39.209 +CT_CLOOG_VERSION="0.15.3"
39.210 +CT_MPC_V_0_6=y
39.211 +CT_MPC_VERSION="0.6"
39.212 +
39.213 +#
39.214 +# Companion libraries common options
39.215 +#
39.216 +# CT_COMP_LIBS_CHECK is not set
39.217 +CT_COMP_LIBS_TARGET=y
39.218 +
39.219 +#
39.220 +# Binary utilities
39.221 +#
39.222 +CT_ARCH_BINFMT_ELF=y
39.223 +# CT_ARCH_BINFMT_FLAT is not set
39.224 +
39.225 +#
39.226 +# GNU binutils
39.227 +#
39.228 +CT_BINUTILS_VERSION="2.19.1"
39.229 +# CT_BINUTILS_V_2_14 is not set
39.230 +# CT_BINUTILS_V_2_15 is not set
39.231 +# CT_BINUTILS_V_2_16_1 is not set
39.232 +# CT_BINUTILS_V_2_17 is not set
39.233 +# CT_BINUTILS_V_2_18 is not set
39.234 +# CT_BINUTILS_V_2_18_50_0_4 is not set
39.235 +# CT_BINUTILS_V_2_18_50_0_6 is not set
39.236 +# CT_BINUTILS_V_2_18_50_0_7 is not set
39.237 +# CT_BINUTILS_V_2_18_50_0_8 is not set
39.238 +# CT_BINUTILS_V_2_18_50_0_9 is not set
39.239 +# CT_BINUTILS_V_2_18_90 is not set
39.240 +# CT_BINUTILS_V_2_18_91 is not set
39.241 +# CT_BINUTILS_V_2_18_92 is not set
39.242 +# CT_BINUTILS_V_2_18_93 is not set
39.243 +# CT_BINUTILS_V_2_19 is not set
39.244 +CT_BINUTILS_V_2_19_1=y
39.245 +# CT_BINUTILS_V_2_19_50_0_1 is not set
39.246 +# CT_BINUTILS_V_2_19_51_0_1 is not set
39.247 +# CT_BINUTILS_V_2_19_51_0_2 is not set
39.248 +CT_BINUTILS_EXTRA_CONFIG=""
39.249 +CT_BINUTILS_FOR_TARGET=y
39.250 +CT_BINUTILS_FOR_TARGET_IBERTY=y
39.251 +CT_BINUTILS_FOR_TARGET_BFD=y
39.252 +
39.253 +#
39.254 +# C compiler
39.255 +#
39.256 +CT_CC="gcc"
39.257 +CT_CC_VERSION="4.4.0"
39.258 +CT_CC_gcc=y
39.259 +# CT_CC_V_3_2_3 is not set
39.260 +# CT_CC_V_3_3_6 is not set
39.261 +# CT_CC_V_3_4_6 is not set
39.262 +# CT_CC_V_4_0_0 is not set
39.263 +# CT_CC_V_4_0_1 is not set
39.264 +# CT_CC_V_4_0_2 is not set
39.265 +# CT_CC_V_4_0_3 is not set
39.266 +# CT_CC_V_4_0_4 is not set
39.267 +# CT_CC_V_4_1_0 is not set
39.268 +# CT_CC_V_4_1_1 is not set
39.269 +# CT_CC_V_4_1_2 is not set
39.270 +# CT_CC_V_4_2_0 is not set
39.271 +# CT_CC_V_4_2_1 is not set
39.272 +# CT_CC_V_4_2_2 is not set
39.273 +# CT_CC_V_4_2_3 is not set
39.274 +# CT_CC_V_4_2_4 is not set
39.275 +# CT_CC_V_4_3_0 is not set
39.276 +# CT_CC_V_4_3_1 is not set
39.277 +# CT_CC_V_4_3_2 is not set
39.278 +# CT_CC_V_4_3_3 is not set
39.279 +CT_CC_V_4_4_0=y
39.280 +CT_CC_GCC_4_3_or_later=y
39.281 +CT_CC_GCC_4_4_or_later=y
39.282 +CT_CC_CXA_ATEXIT=y
39.283 +CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
39.284 +# CT_CC_SJLJ_EXCEPTIONS_USE is not set
39.285 +# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
39.286 +CT_CC_CORE_EXTRA_CONFIG=""
39.287 +CT_CC_EXTRA_CONFIG=""
39.288 +CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}"
39.289 +CT_CC_BUGURL=""
39.290 +CT_CC_SUPPORT_CXX=y
39.291 +CT_CC_SUPPORT_FORTRAN=y
39.292 +CT_CC_SUPPORT_JAVA=y
39.293 +CT_CC_SUPPORT_ADA=y
39.294 +CT_CC_SUPPORT_OBJC=y
39.295 +CT_CC_SUPPORT_OBJCXX=y
39.296 +
39.297 +#
39.298 +# Additional supported languages:
39.299 +#
39.300 +CT_CC_LANG_CXX=y
39.301 +# CT_CC_LANG_FORTRAN is not set
39.302 +# CT_CC_LANG_JAVA is not set
39.303 +# CT_CC_LANG_ADA is not set
39.304 +# CT_CC_LANG_OBJC is not set
39.305 +# CT_CC_LANG_OBJCXX is not set
39.306 +CT_CC_LANG_OTHERS=""
39.307 +CT_LIBC="glibc"
39.308 +
39.309 +#
39.310 +# C-library
39.311 +#
39.312 +CT_LIBC_VERSION="2.9"
39.313 +# CT_LIBC_eglibc is not set
39.314 +CT_LIBC_glibc=y
39.315 +# CT_LIBC_uClibc is not set
39.316 +# CT_LIBC_V_2_3_6 is not set
39.317 +# CT_LIBC_V_2_5 is not set
39.318 +# CT_LIBC_V_2_5_1 is not set
39.319 +# CT_LIBC_V_2_6 is not set
39.320 +# CT_LIBC_V_2_6_1 is not set
39.321 +# CT_LIBC_V_2_7 is not set
39.322 +# CT_LIBC_V_2_8 is not set
39.323 +CT_LIBC_V_2_9=y
39.324 +# CT_LIBC_V_LATEST is not set
39.325 +# CT_LIBC_V_date is not set
39.326 +CT_LIBC_GLIBC_2_8_or_later=y
39.327 +# CT_LIBC_GLIBC_TARBALL is not set
39.328 +CT_LIBC_GLIBC_CVS=y
39.329 +CT_LIBC_GLIBC_CVS_date="2009-05-27"
39.330 +
39.331 +#
39.332 +# glibc/eglibc common options
39.333 +#
39.334 +CT_LIBC_GLIBC_EXTRA_CONFIG=""
39.335 +CT_LIBC_GLIBC_CONFIGPARMS=""
39.336 +CT_LIBC_GLIBC_EXTRA_CFLAGS=""
39.337 +CT_LIBC_EXTRA_CC_ARGS=""
39.338 +CT_LIBC_GLIBC_USE_PORTS=y
39.339 +CT_LIBC_ADDONS_LIST=""
39.340 +
39.341 +#
39.342 +# WARNING!!!
39.343 +#
39.344 +
39.345 +#
39.346 +# For glibc >= 2.8, addons are only available via a CVS checkout.
39.347 +#
39.348 +
39.349 +#
39.350 +# Be sure to review the associated options, above.
39.351 +#
39.352 +# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
39.353 +CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
39.354 +# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
39.355 +CT_LIBC_GLIBC_MIN_KERNEL="2.6.29.2"
39.356 +
39.357 +#
39.358 +# Common C library options
39.359 +#
39.360 +CT_LIBC_SUPPORT_NPTL=y
39.361 +CT_LIBC_SUPPORT_LINUXTHREADS=y
39.362 +CT_THREADS="nptl"
39.363 +CT_THREADS_NPTL=y
39.364 +# CT_THREADS_LINUXTHREADS is not set
39.365 +# CT_THREADS_NONE is not set
39.366 +
39.367 +#
39.368 +# Tools facilities
39.369 +#
39.370 +CT_TOOL_libelf=y
39.371 +CT_LIBELF_V_0_8_10=y
39.372 +CT_LIBELF_VERSION="0.8.10"
39.373 +CT_TOOL_sstrip=y
39.374 +CT_SSTRIP_BUILDROOT=y
39.375 +# CT_SSTRIP_ELFKICKERS is not set
39.376 +CT_SSTRIP_FROM="buildroot"
39.377 +
39.378 +#
39.379 +# Debug facilities
39.380 +#
39.381 +CT_DEBUG_dmalloc=y
39.382 +# CT_DMALLOC_V_5_4_3 is not set
39.383 +CT_DMALLOC_V_5_5_2=y
39.384 +CT_DMALLOC_VERSION="5.5.2"
39.385 +CT_DEBUG_duma=y
39.386 +CT_DUMA_A=y
39.387 +CT_DUMA_SO=y
39.388 +# CT_DUMA_V_2_5_1 is not set
39.389 +# CT_DUMA_V_2_5_8 is not set
39.390 +# CT_DUMA_V_2_5_12 is not set
39.391 +CT_DUMA_V_2_5_14=y
39.392 +CT_DUMA_VERSION="2_5_14"
39.393 +CT_DEBUG_gdb=y
39.394 +CT_GDB_CROSS=y
39.395 +# CT_GDB_CROSS_STATIC is not set
39.396 +# CT_GDB_CROSS_INSIGHT is not set
39.397 +CT_GDB_NATIVE=y
39.398 +# CT_GDB_NATIVE_STATIC is not set
39.399 +CT_GDB_NATIVE_USE_GMP_MPFR=y
39.400 +CT_GDB_GDBSERVER=y
39.401 +CT_GDB_GDBSERVER_STATIC=y
39.402 +# CT_GDB_V_6_4 is not set
39.403 +# CT_GDB_V_6_5 is not set
39.404 +# CT_GDB_V_6_6 is not set
39.405 +# CT_GDB_V_6_7 is not set
39.406 +# CT_GDB_V_6_7_1 is not set
39.407 +CT_GDB_V_6_8=y
39.408 +# CT_GDB_V_snapshot is not set
39.409 +CT_GDB_VERSION="6.8"
39.410 +
39.411 +#
39.412 +# Native gdb needs a native ncurses library
39.413 +#
39.414 +# CT_NCURSES_V_5_6 is not set
39.415 +CT_NCURSES_V_5_7=y
39.416 +CT_NCURSES_VERSION="5.7"
39.417 +CT_DEBUG_ltrace=y
39.418 +# CT_LTRACE_V_0_4 is not set
39.419 +# CT_LTRACE_V_0_5 is not set
39.420 +CT_LTRACE_V_0_5_1=y
39.421 +CT_LTRACE_VERSION="0.5.1"
39.422 +CT_DEBUG_strace=y
39.423 +# CT_STRACE_V_4_5 is not set
39.424 +# CT_STRACE_V_4_5_14 is not set
39.425 +# CT_STRACE_V_4_5_15 is not set
39.426 +# CT_STRACE_V_4_5_16 is not set
39.427 +# CT_STRACE_V_4_5_17 is not set
39.428 +CT_STRACE_V_4_5_18=y
39.429 +CT_STRACE_VERSION="4.5.18"
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
40.2 +++ b/samples/arm-cortex_a8-linux-gnueabi/reported.by Wed Jun 17 12:32:01 2009 +0200
40.3 @@ -0,0 +1,3 @@
40.4 +reporter_name="Yann E. MORIN"
40.5 +reporter_url="http://ymorin.is-a-geek.org/"
40.6 +reporter_comment=""
41.1 --- a/scripts/addToolVersion.sh Wed Jun 17 10:46:28 2009 +0200
41.2 +++ b/scripts/addToolVersion.sh Wed Jun 17 12:32:01 2009 +0200
41.3 @@ -13,7 +13,7 @@
41.4 'tool' in one of:
41.5 --gcc, --binutils, --glibc, --eglibc, --uClibc, --linux,
41.6 --gdb, --dmalloc, --duma, --strace, --ltrace, --libelf
41.7 - --gmp, --mpfr, --ppl
41.8 + --gmp, --mpfr, --ppl, --cloog
41.9
41.10 Valid options for all tools:
41.11 --stable, -s, +x (default)
41.12 @@ -134,6 +134,7 @@
41.13 --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs;;
41.14 --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs;;
41.15 --ppl) EXP=; OBS=; cat=PPL; tool=ppl; tool_prefix=companion_libs;;
41.16 + --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs;;
41.17
41.18 # Tools options:
41.19 -x|--experimental|+s) EXP=1;;
42.1 --- a/scripts/build/cc/gcc.sh Wed Jun 17 10:46:28 2009 +0200
42.2 +++ b/scripts/build/cc/gcc.sh Wed Jun 17 12:32:01 2009 +0200
42.3 @@ -4,18 +4,16 @@
42.4
42.5 # Download gcc
42.6 do_cc_get() {
42.7 - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}"
42.8 -
42.9 # Ah! gcc folks are kind of 'different': they store the tarballs in
42.10 # subdirectories of the same name! That's because gcc is such /crap/ that
42.11 # it is such /big/ that it needs being splitted for distribution! Sad. :-(
42.12 # Arrgghh! Some of those versions does not follow this convention:
42.13 # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a
42.14 # subdirectory! You bastard!
42.15 - CT_GetFile "gcc-${version}" \
42.16 - {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${version}} \
42.17 - ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${version} \
42.18 - ftp://ftp.uvsq.fr/pub/gcc/snapshots/${version}
42.19 + CT_GetFile "gcc-${CT_CC_VERSION}" \
42.20 + {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \
42.21 + ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \
42.22 + ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION}
42.23
42.24 # Starting with GCC 4.3, ecj is used for Java, and will only be
42.25 # built if the configure script finds ecj.jar at the top of the
42.26 @@ -29,16 +27,14 @@
42.27
42.28 # Extract gcc
42.29 do_cc_extract() {
42.30 - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}"
42.31 -
42.32 - CT_Extract "gcc-${version}"
42.33 - CT_Patch "gcc-${version}"
42.34 + CT_Extract "gcc-${CT_CC_VERSION}"
42.35 + CT_Patch "gcc-${CT_CC_VERSION}"
42.36
42.37 # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree
42.38 - if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \
42.39 - -a ! -f "${CT_SRC_DIR}/gcc-${version}/ecj.jar" \
42.40 + if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \
42.41 + -a ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" \
42.42 ]; then
42.43 - CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${version}/ecj.jar"
42.44 + CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar"
42.45 fi
42.46 }
42.47
42.48 @@ -90,7 +86,6 @@
42.49 local core_prefix_dir
42.50 local extra_config
42.51 local lang_opt
42.52 - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}"
42.53
42.54 eval $1
42.55 eval $2
42.56 @@ -137,12 +132,20 @@
42.57 extra_config="${extra_config} ${CT_ARCH_WITH_TUNE}"
42.58 extra_config="${extra_config} ${CT_ARCH_WITH_FPU}"
42.59 extra_config="${extra_config} ${CT_ARCH_WITH_FLOAT}"
42.60 - [ "${CT_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
42.61 if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
42.62 extra_config="${extra_config} --enable-__cxa_atexit"
42.63 else
42.64 extra_config="${extra_config} --disable-__cxa_atexit"
42.65 fi
42.66 + if [ "${CT_GMP_MPFR}" = "y" ]; then
42.67 + extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR}"
42.68 + extra_config="${extra_config} --with-mpfr=${CT_PREFIX_DIR}"
42.69 + fi
42.70 + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
42.71 + extra_config="${extra_config} --with-ppl=${CT_PREFIX_DIR}"
42.72 + extra_config="${extra_config} --with-cloog=${CT_PREFIX_DIR}"
42.73 + extra_config="${extra_config} --with-mpc=${CT_PREFIX_DIR}"
42.74 + fi
42.75
42.76 CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
42.77
42.78 @@ -150,7 +153,7 @@
42.79 CC_FOR_BUILD="${CT_BUILD}-gcc" \
42.80 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
42.81 CT_DoExecLog ALL \
42.82 - "${CT_SRC_DIR}/gcc-${version}/configure" \
42.83 + "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \
42.84 --build=${CT_BUILD} \
42.85 --host=${CT_HOST} \
42.86 --target=${CT_TARGET} \
42.87 @@ -182,7 +185,7 @@
42.88 # so we configure then build it.
42.89 # Next we have to configure gcc, create libgcc.mk then edit it...
42.90 # So much easier if we just edit the source tree, but hey...
42.91 - if [ ! -f "${CT_SRC_DIR}/gcc-${version}/gcc/BASE-VER" ]; then
42.92 + if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then
42.93 CT_DoExecLog ALL make configure-libiberty
42.94 CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libiberty libiberty.a
42.95 CT_DoExecLog ALL make configure-gcc configure-libcpp
42.96 @@ -192,7 +195,7 @@
42.97 CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp all-build-libiberty
42.98 fi
42.99 # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here.
42.100 - if [ -d "${CT_SRC_DIR}/gcc-${version}/libdecnumber" ]; then
42.101 + if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/libdecnumber" ]; then
42.102 CT_DoExecLog ALL make configure-libdecnumber
42.103 CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libdecnumber libdecnumber.a
42.104 fi
42.105 @@ -238,8 +241,6 @@
42.106 #------------------------------------------------------------------------------
42.107 # Build final gcc
42.108 do_cc() {
42.109 - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}"
42.110 -
42.111 # If building for bare metal, nothing to be done here, the static core conpiler is enough!
42.112 [ "${CT_BARE_METAL}" = "y" ] && return 0
42.113
42.114 @@ -273,7 +274,6 @@
42.115 extra_config="${extra_config} ${CT_ARCH_WITH_FPU}"
42.116 extra_config="${extra_config} ${CT_ARCH_WITH_FLOAT}"
42.117 [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared"
42.118 - [ "${CT_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
42.119 [ -n "${CT_CC_PKGVERSION}" ] && extra_config="${extra_config} --with-pkgversion=${CT_CC_PKGVERSION}"
42.120 [ -n "${CT_CC_BUGURL}" ] && extra_config="${extra_config} --with-bugurl=${CT_CC_BUGURL}"
42.121 [ "${CT_CC_SJLJ_EXCEPTIONS_USE}" = "y" ] && extra_config="${extra_config} --enable-sjlj-exceptions"
42.122 @@ -283,6 +283,15 @@
42.123 else
42.124 extra_config="${extra_config} --disable-__cxa_atexit"
42.125 fi
42.126 + if [ "${CT_GMP_MPFR}" = "y" ]; then
42.127 + extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR}"
42.128 + extra_config="${extra_config} --with-mpfr=${CT_PREFIX_DIR}"
42.129 + fi
42.130 + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
42.131 + extra_config="${extra_config} --with-ppl=${CT_PREFIX_DIR}"
42.132 + extra_config="${extra_config} --with-cloog=${CT_PREFIX_DIR}"
42.133 + extra_config="${extra_config} --with-mpc=${CT_PREFIX_DIR}"
42.134 + fi
42.135
42.136 CT_DoLog DEBUG "Extra config passed: '${extra_config}'"
42.137
42.138 @@ -296,7 +305,7 @@
42.139 CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \
42.140 LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \
42.141 CT_DoExecLog ALL \
42.142 - "${CT_SRC_DIR}/gcc-${version}/configure" \
42.143 + "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \
42.144 --build=${CT_BUILD} \
42.145 --host=${CT_HOST} \
42.146 --target=${CT_TARGET} \
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
43.2 +++ b/scripts/build/companion_libs/cloog.sh Wed Jun 17 12:32:01 2009 +0200
43.3 @@ -0,0 +1,63 @@
43.4 +# This file adds the functions to build the CLooG library
43.5 +# Copyright 2009 Yann E. MORIN
43.6 +# Licensed under the GPL v2. See COPYING in the root of this package
43.7 +
43.8 +do_cloog_get() { :; }
43.9 +do_cloog_extract() { :; }
43.10 +do_cloog() { :; }
43.11 +do_cloog_target() { :; }
43.12 +
43.13 +# Overide functions depending on configuration
43.14 +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
43.15 +
43.16 +# Download CLooG
43.17 +do_cloog_get() {
43.18 + CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \
43.19 + ftp://gcc.gnu.org/pub/gcc/infrastructure
43.20 +}
43.21 +
43.22 +# Extract CLooG
43.23 +do_cloog_extract() {
43.24 + CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
43.25 + CT_Pushd "${CT_SRC_DIR}/cloog-ppl"
43.26 + CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir
43.27 + CT_Popd
43.28 +}
43.29 +
43.30 +do_cloog() {
43.31 + mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl"
43.32 + cd "${CT_BUILD_DIR}/build-cloog-ppl"
43.33 +
43.34 + CT_DoStep INFO "Installing CLooG/ppl"
43.35 +
43.36 + CT_DoLog EXTRA "Configuring CLooG/ppl"
43.37 + CFLAGS="${CT_CFLAGS_FOR_HOST}" \
43.38 + CT_DoExecLog ALL \
43.39 + "${CT_SRC_DIR}/cloog-ppl/configure" \
43.40 + --build=${CT_BUILD} \
43.41 + --host=${CT_HOST} \
43.42 + --prefix="${CT_PREFIX_DIR}" \
43.43 + --with-gmp="${CT_PREFIX_DIR}" \
43.44 + --with-ppl="${CT_PREFIX_DIR}" \
43.45 + --enable-shared \
43.46 + --disable-static \
43.47 + --with-bits=gmp
43.48 +
43.49 + CT_DoLog EXTRA "Building CLooG/ppl"
43.50 + CT_DoExecLog ALL make ${PARALLELMFLAGS}
43.51 +
43.52 + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then
43.53 + CT_DoLog EXTRA "Checking CLooG/ppl"
43.54 + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
43.55 + fi
43.56 +
43.57 + CT_DoLog EXTRA "Installing CLooG/ppl"
43.58 + CT_DoExecLog ALL make install
43.59 +
43.60 + # Remove spuriously installed file
43.61 + CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/cloog"
43.62 +
43.63 + CT_EndStep
43.64 +}
43.65 +
43.66 +fi # CT_PPL_CLOOG_MPC
44.1 --- a/scripts/build/companion_libs/gmp.sh Wed Jun 17 10:46:28 2009 +0200
44.2 +++ b/scripts/build/companion_libs/gmp.sh Wed Jun 17 12:32:01 2009 +0200
44.3 @@ -22,8 +22,6 @@
44.4 }
44.5
44.6 do_gmp() {
44.7 - local opts
44.8 - local cflags
44.9
44.10 mkdir -p "${CT_BUILD_DIR}/build-gmp"
44.11 cd "${CT_BUILD_DIR}/build-gmp"
44.12 @@ -32,27 +30,22 @@
44.13
44.14 CT_DoLog EXTRA "Configuring GMP"
44.15
44.16 - if [ "${CT_PPL_CLOOG}" = "y" ]; then
44.17 - opts="--enable-cxx"
44.18 - cflags="-fexceptions"
44.19 - fi
44.20 -
44.21 - CFLAGS="${CT_CFLAGS_FOR_HOST} ${cflags}" \
44.22 + CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \
44.23 CT_DoExecLog ALL \
44.24 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
44.25 --build=${CT_BUILD} \
44.26 --host=${CT_HOST} \
44.27 --prefix="${CT_PREFIX_DIR}" \
44.28 - --disable-shared \
44.29 - --enable-static \
44.30 + --enable-shared \
44.31 + --disable-static \
44.32 --enable-fft \
44.33 --enable-mpbsd \
44.34 - ${opts}
44.35 + --enable-cxx
44.36
44.37 CT_DoLog EXTRA "Building GMP"
44.38 CT_DoExecLog ALL make ${PARALLELMFLAGS}
44.39
44.40 - if [ "${CT_GMP_CHECK}" = "y" ]; then
44.41 + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then
44.42 CT_DoLog EXTRA "Checking GMP"
44.43 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
44.44 fi
44.45 @@ -63,7 +56,7 @@
44.46 CT_EndStep
44.47 }
44.48
44.49 -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
44.50 +if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then
44.51
44.52 do_gmp_target() {
44.53 mkdir -p "${CT_BUILD_DIR}/build-gmp-target"
45.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
45.2 +++ b/scripts/build/companion_libs/mpc.sh Wed Jun 17 12:32:01 2009 +0200
45.3 @@ -0,0 +1,57 @@
45.4 +# This file adds the functions to build the MPC library
45.5 +# Copyright 2009 Yann E. MORIN
45.6 +# Licensed under the GPL v2. See COPYING in the root of this package
45.7 +
45.8 +do_mpc_get() { :; }
45.9 +do_mpc_extract() { :; }
45.10 +do_mpc() { :; }
45.11 +do_mpc_target() { :; }
45.12 +
45.13 +# Overide functions depending on configuration
45.14 +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
45.15 +
45.16 +# Download MPC
45.17 +do_mpc_get() {
45.18 + CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \
45.19 + http://www.multiprecision.org/mpc/download
45.20 +}
45.21 +
45.22 +# Extract MPC
45.23 +do_mpc_extract() {
45.24 + CT_Extract "mpc-${CT_MPC_VERSION}"
45.25 + CT_Patch "mpc-${CT_MPC_VERSION}"
45.26 +}
45.27 +
45.28 +do_mpc() {
45.29 + mkdir -p "${CT_BUILD_DIR}/build-mpc"
45.30 + cd "${CT_BUILD_DIR}/build-mpc"
45.31 +
45.32 + CT_DoStep INFO "Installing MPC"
45.33 +
45.34 + CT_DoLog EXTRA "Configuring MPC"
45.35 + CFLAGS="${CT_CFLAGS_FOR_HOST}" \
45.36 + CT_DoExecLog ALL \
45.37 + "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
45.38 + --build=${CT_BUILD} \
45.39 + --host=${CT_HOST} \
45.40 + --prefix="${CT_PREFIX_DIR}" \
45.41 + --with-gmp="${CT_PREFIX_DIR}" \
45.42 + --with-mpfr="${CT_PREFIX_DIR}" \
45.43 + --enable-shared \
45.44 + --disable-static \
45.45 +
45.46 + CT_DoLog EXTRA "Building MPC"
45.47 + CT_DoExecLog ALL make ${PARALLELMFLAGS}
45.48 +
45.49 + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then
45.50 + CT_DoLog EXTRA "Checking MPC"
45.51 + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
45.52 + fi
45.53 +
45.54 + CT_DoLog EXTRA "Installing MPC"
45.55 + CT_DoExecLog ALL make install
45.56 +
45.57 + CT_EndStep
45.58 +}
45.59 +
45.60 +fi # CT_PPL_CLOOG_MPC
46.1 --- a/scripts/build/companion_libs/mpfr.sh Wed Jun 17 10:46:28 2009 +0200
46.2 +++ b/scripts/build/companion_libs/mpfr.sh Wed Jun 17 12:32:01 2009 +0200
46.3 @@ -77,14 +77,14 @@
46.4 --host=${CT_HOST} \
46.5 --prefix="${CT_PREFIX_DIR}" \
46.6 ${mpfr_opt} \
46.7 - --disable-shared \
46.8 - --enable-static \
46.9 + --enable-shared \
46.10 + --disable-static \
46.11 --with-gmp="${CT_PREFIX_DIR}"
46.12
46.13 CT_DoLog EXTRA "Building MPFR"
46.14 CT_DoExecLog ALL make ${PARALLELMFLAGS}
46.15
46.16 - if [ "${CT_MPFR_CHECK}" = "y" ]; then
46.17 + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then
46.18 CT_DoLog EXTRA "Checking MPFR"
46.19 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
46.20 fi
46.21 @@ -95,7 +95,7 @@
46.22 CT_EndStep
46.23 }
46.24
46.25 -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
46.26 +if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then
46.27
46.28 do_mpfr_target() {
46.29 mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
47.1 --- a/scripts/build/companion_libs/ppl.sh Wed Jun 17 10:46:28 2009 +0200
47.2 +++ b/scripts/build/companion_libs/ppl.sh Wed Jun 17 12:32:01 2009 +0200
47.3 @@ -8,13 +8,14 @@
47.4 do_ppl_target() { :; }
47.5
47.6 # Overide functions depending on configuration
47.7 -if [ "${CT_PPL_CLOOG}" = "y" ]; then
47.8 +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then
47.9
47.10 # Download PPL
47.11 do_ppl_get() {
47.12 CT_GetFile "ppl-${CT_PPL_VERSION}" \
47.13 http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION} \
47.14 - ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION}
47.15 + ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} \
47.16 + ftp://gcc.gnu.org/pub/gcc/infrastructure
47.17 }
47.18
47.19 # Extract PPL
47.20 @@ -31,6 +32,7 @@
47.21
47.22 CT_DoLog EXTRA "Configuring PPL"
47.23 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
47.24 + CXXFLAGS="${CT_CFLAGS_FOR_HOST}" \
47.25 CT_DoExecLog ALL \
47.26 "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
47.27 --build=${CT_BUILD} \
47.28 @@ -38,8 +40,8 @@
47.29 --prefix="${CT_PREFIX_DIR}" \
47.30 --with-libgmp-prefix="${CT_PREFIX_DIR}" \
47.31 --with-libgmpxx-prefix="${CT_PREFIX_DIR}" \
47.32 - --disable-shared \
47.33 - --enable-static \
47.34 + --enable-shared \
47.35 + --disable-static \
47.36 --disable-debugging \
47.37 --disable-assertions \
47.38 --disable-ppl_lcdd \
47.39 @@ -52,7 +54,7 @@
47.40 CT_DoLog EXTRA "Building PPL"
47.41 CT_DoExecLog ALL make ${PARALLELMFLAGS}
47.42
47.43 - if [ "${CT_PPL_CHECK}" = "y" ]; then
47.44 + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then
47.45 CT_DoLog EXTRA "Checking PPL"
47.46 CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
47.47 fi
47.48 @@ -60,7 +62,10 @@
47.49 CT_DoLog EXTRA "Installing PPL"
47.50 CT_DoExecLog ALL make install
47.51
47.52 + # Remove spuriously installed file
47.53 + CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config"
47.54 +
47.55 CT_EndStep
47.56 }
47.57
47.58 -fi # CT_PPL_CLOOG
47.59 +fi # CT_PPL_CLOOG_MPC
48.1 --- a/scripts/build/internals.sh Wed Jun 17 10:46:28 2009 +0200
48.2 +++ b/scripts/build/internals.sh Wed Jun 17 12:32:01 2009 +0200
48.3 @@ -4,6 +4,8 @@
48.4 # un-wanted files, to add tuple aliases, and to add the final
48.5 # crosstool-NG-provided files.
48.6 do_finish() {
48.7 + local _t
48.8 +
48.9 CT_DoStep INFO "Cleaning-up the toolchain's directory"
48.10
48.11 CT_DoLog EXTRA "Removing access to the build system tools"
48.12 @@ -39,6 +41,33 @@
48.13 done
48.14 CT_Popd
48.15
48.16 + # If using the companion libraries, we need a wrapper
48.17 + # that will set LD_LIBRARY_PATH approriately
48.18 + if [ "${CT_GMP_MPFR}" = "y" \
48.19 + -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then
48.20 + CT_DoLog EXTRA "Installing toolchain wrappers"
48.21 + CT_Pushd "${CT_PREFIX_DIR}/bin"
48.22 +
48.23 + # Copy the wrapper
48.24 + CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/wrapper.in" \
48.25 + ".${CT_TARGET}-wrapper"
48.26 +
48.27 + # Replace every tools with the wrapper
48.28 + # Do it unconditionally, even for those tools that happen to be shell
48.29 + # scripts, we don't know if they would in the end spawn a binary...
48.30 + # Just skip symlinks
48.31 + for _t in "${CT_TARGET}-"*; do
48.32 + if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
48.33 + CT_DoExecLog ALL mv "${t}" ".${_t}"
48.34 + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
48.35 + fi
48.36 + done
48.37 +
48.38 + # Get rid of the wrapper, we're using hardlinks
48.39 + CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper"
48.40 + CT_Popd
48.41 + fi
48.42 +
48.43 # Remove the generated documentation files
48.44 if [ "${CT_REMOVE_DOCS}" = "y" ]; then
48.45 CT_DoLog EXTRA "Removing installed documentation"
49.1 --- a/scripts/build/libc/glibc.sh Wed Jun 17 10:46:28 2009 +0200
49.2 +++ b/scripts/build/libc/glibc.sh Wed Jun 17 12:32:01 2009 +0200
49.3 @@ -172,6 +172,7 @@
49.4 CT_DoExecLog ALL \
49.5 make CFLAGS="-O -DBOOTSTRAP_GCC" \
49.6 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.7 + PARALLELMFLAGS="${PARALLELMFLAGS}" \
49.8 sysdeps/gnu/errlist.c
49.9 mkdir -p stdio-common
49.10
49.11 @@ -189,6 +190,7 @@
49.12 CFLAGS="-O -DBOOTSTRAP_GCC" \
49.13 ${LIBC_SYSROOT_ARG} \
49.14 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.15 + PARALLELMFLAGS="${PARALLELMFLAGS}" \
49.16 install-headers
49.17
49.18 # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
49.19 @@ -331,11 +333,12 @@
49.20 ${extra_config} \
49.21 ${CT_LIBC_GLIBC_EXTRA_CONFIG}
49.22
49.23 -
49.24 #TODO: should check whether slibdir has been set in configparms to */lib64
49.25 # and copy the startfiles into the appropriate libdir.
49.26 CT_DoLog EXTRA "Building C library start files"
49.27 - CT_DoExecLog ALL make OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" csu/subdir_lib
49.28 + CT_DoExecLog ALL make OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.29 + PARALLELMFLAGS="${PARALLELMFLAGS}" \
49.30 + csu/subdir_lib
49.31
49.32 CT_DoLog EXTRA "Installing C library start files"
49.33 if [ "${CT_USE_SYSROOT}" = "y" ]; then
49.34 @@ -499,18 +502,19 @@
49.35 # then you need to set the KERNELCONFIG variable to point to a .config file for this arch.
49.36 # The following architectures are known to need kernel .config: alpha, arm, ia64, s390, sh, sparc
49.37 # Note: LD and RANLIB needed by glibc-2.1.3's c_stub directory, at least on macosx
49.38 - # No need for PARALLELMFLAGS here, Makefile already reads this environment variable
49.39 CT_DoLog EXTRA "Building C library"
49.40 CT_DoExecLog ALL make LD=${CT_TARGET}-ld \
49.41 - RANLIB=${CT_TARGET}-ranlib \
49.42 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.43 - ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
49.44 - ${GLIBC_INITIAL_BUILD_RULE}
49.45 + RANLIB=${CT_TARGET}-ranlib \
49.46 + OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.47 + ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
49.48 + PARALLELMFLAGS="${PARALLELMFLAGS}" \
49.49 + ${GLIBC_INITIAL_BUILD_RULE}
49.50
49.51 CT_DoLog EXTRA "Installing C library"
49.52 CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
49.53 ${LIBC_SYSROOT_ARG} \
49.54 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.55 + PARALLELMFLAGS="${PARALLELMFLAGS}" \
49.56 ${GLIBC_INITIAL_INSTALL_RULE}
49.57
49.58 # This doesn't seem to work when building a crosscompiler,
49.59 @@ -553,7 +557,11 @@
49.60 cd "${CT_BUILD_DIR}/build-libc"
49.61
49.62 CT_DoLog EXTRA "Re-building C library"
49.63 - CT_DoExecLog ALL make LD=${CT_TARGET}-ld RANLIB=${CT_TARGET}-ranlib
49.64 + CT_DoExecLog ALL make LD=${CT_TARGET}-ld \
49.65 + RANLIB=${CT_TARGET}-ranlib \
49.66 + OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.67 + ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
49.68 + PARALLELMFLAGS="${PARALLELMFLAGS}"
49.69
49.70 CT_DoLog EXTRA "Installing missing C library components"
49.71 # note: should do full install and then fix linker scripts, but this is faster
49.72 @@ -561,6 +569,7 @@
49.73 CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
49.74 ${LIBC_SYSROOT_ARG} \
49.75 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
49.76 + PARALLELMFLAGS="${PARALLELMFLAGS}" \
49.77 install-${t}
49.78 done
49.79
50.1 --- a/scripts/crosstool-NG.sh.in Wed Jun 17 10:46:28 2009 +0200
50.2 +++ b/scripts/crosstool-NG.sh.in Wed Jun 17 12:32:01 2009 +0200
50.3 @@ -91,6 +91,8 @@
50.4 . "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh"
50.5 . "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh"
50.6 . "${CT_LIB_DIR}/scripts/build/companion_libs/ppl.sh"
50.7 +. "${CT_LIB_DIR}/scripts/build/companion_libs/cloog.sh"
50.8 +. "${CT_LIB_DIR}/scripts/build/companion_libs/mpc.sh"
50.9 . "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh"
50.10 . "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh"
50.11 . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
50.12 @@ -125,6 +127,10 @@
50.13 CT_CC_CORE_STATIC_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-static"
50.14 CT_CC_CORE_SHARED_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-shared"
50.15
50.16 +# Set LD_LIBRARY_PATH to point to prefix/lib so we can find our own
50.17 +# libraries; add as first path, so we get hit first by the dynamic linker
50.18 +CT_SetLibPath "${CT_PREFIX_DIR}/lib" first
50.19 +
50.20 # We must ensure that we can restart if asked for!
50.21 if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}" ]; then
50.22 CT_DoLog ERROR "You asked to restart a non-restartable build"
50.23 @@ -447,6 +453,8 @@
50.24 do_gmp_get
50.25 do_mpfr_get
50.26 do_ppl_get
50.27 + do_cloog_get
50.28 + do_mpc_get
50.29 do_binutils_get
50.30 do_cc_get
50.31 do_libc_get
50.32 @@ -464,6 +472,8 @@
50.33 do_gmp_extract
50.34 do_mpfr_extract
50.35 do_ppl_extract
50.36 + do_cloog_extract
50.37 + do_mpc_extract
50.38 do_binutils_extract
50.39 do_cc_extract
50.40 do_libc_extract
51.1 --- a/scripts/functions Wed Jun 17 10:46:28 2009 +0200
51.2 +++ b/scripts/functions Wed Jun 17 12:32:01 2009 +0200
51.3 @@ -265,6 +265,36 @@
51.4 yes "$1" || true
51.5 }
51.6
51.7 +# Add the specified directory to LD_LIBRARY_PATH, and export it
51.8 +# If the specified patch is already present, just export
51.9 +# $1: path to add
51.10 +# $2: add as 'first' or 'last' path, 'first' is assumed if $2 is empty
51.11 +# Usage CT_SetLibPath /some/where/lib [first|last]
51.12 +CT_SetLibPath() {
51.13 + local path="$1"
51.14 + local pos="$2"
51.15 +
51.16 + case ":${LD_LIBRARY_PATH}:" in
51.17 + *:"${path}":*) ;;
51.18 + *) case "${pos}" in
51.19 + last)
51.20 + CT_DoLog DEBUG "Adding '${path}' at end of LD_LIBRARY_PATH"
51.21 + LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${path}"
51.22 + ;;
51.23 + first|"")
51.24 + CT_DoLog DEBUG "Adding '${path}' at start of LD_LIBRARY_PATH"
51.25 + LD_LIBRARY_PATH="${path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
51.26 + ;;
51.27 + *)
51.28 + CT_Abort "Incorrect position '${pos}' to add '${path}' to LD_LIBRARY_PATH"
51.29 + ;;
51.30 + esac
51.31 + ;;
51.32 + esac
51.33 + CT_DoLog DEBUG "==> LD_LIBRARY_PATH='${LD_LIBRARY_PATH}'"
51.34 + export LD_LIBRARY_PATH
51.35 +}
51.36 +
51.37 # Get the file name extension of a component
51.38 # Usage: CT_GetFileExtension <component_name-component_version> [extension]
51.39 # If found, echoes the extension to stdout
52.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
52.2 +++ b/scripts/wrapper.in Wed Jun 17 12:32:01 2009 +0200
52.3 @@ -0,0 +1,14 @@
52.4 +#!/bin/sh
52.5 +
52.6 +dirname="$(dirname "${0}")"
52.7 +basename="$(basename "${0}")"
52.8 +
52.9 +ld_lib_path="$(dirname "${dirname}")/lib"
52.10 +
52.11 +case ":${LD_LIBRARY_PATH}:" in
52.12 + *":${ld_lib_path}:"*) ;;
52.13 + *) LD_LIBRARY_PATH="${ld_lib_path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}";;
52.14 +esac
52.15 +
52.16 +export LD_LIBRARY_PATH
52.17 +exec "${dirname}/.${basename}" "$@"
53.1 --- a/steps.mk Wed Jun 17 10:46:28 2009 +0200
53.2 +++ b/steps.mk Wed Jun 17 12:32:01 2009 +0200
53.3 @@ -21,6 +21,8 @@
53.4 gmp \
53.5 mpfr \
53.6 ppl \
53.7 + cloog \
53.8 + mpc \
53.9 binutils \
53.10 elf2flt \
53.11 cc_core_pass_1 \