-- cgit v0.10.2-6-g49f6 From 7f4b7488c5199be2266f16bc187bfd5d55956104 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 21 May 2009 19:00:55 +0000 Subject: /devel/gcc-4.4: - trivial spelling fix in TODO -------- diffstat follows -------- /devel/gcc-4.4/TODO | 2 1 1 0 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO b/TODO index 7c7757d..663f41a 100644 --- a/TODO +++ b/TODO @@ -11,7 +11,7 @@ Non-recurring: - gcc-4.4 - requires some companion libs: - PPL - - CLoog + - CLooG - check that the patchset from 4.3.3 still applies - uClinux -- cgit v0.10.2-6-g49f6 From 3a85d55aa871ce85a17c9079ee42697b4546f2b6 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 21 May 2009 19:07:16 +0000 Subject: /devel/gcc-4.4: - add PPL download mirror at the gcc ftp site. -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh | 3 2 1 0 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index d3246f9..b26f1a4 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -14,7 +14,8 @@ if [ "${CT_PPL_CLOOG}" = "y" ]; then do_ppl_get() { CT_GetFile "ppl-${CT_PPL_VERSION}" \ http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION} \ - ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} + ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} \ + ftp://gcc.gnu.org/pub/gcc/infrastructure } # Extract PPL -- cgit v0.10.2-6-g49f6 From d18f4a9fef05a4872a13e3aac236309628e116c7 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 21:44:21 +0000 Subject: /trunk: - TODO: add MPC as a gcc-4.4 pre-requisite -------- diffstat follows -------- /devel/gcc-4.4/TODO | 1 1 0 0 + 1 file changed, 1 insertion(+) diff --git a/TODO b/TODO index 663f41a..ba16ee4 100644 --- a/TODO +++ b/TODO @@ -12,6 +12,7 @@ Non-recurring: - requires some companion libs: - PPL - CLooG + - MPC - check that the patchset from 4.3.3 still applies - uClinux -- cgit v0.10.2-6-g49f6 From 2614b1eb7b42c49ac4cccf268bdd9b8be7bc652d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 21:46:30 +0000 Subject: /devel/gcc-4.4: - build a shared gmp, don't build a static gmp -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/gmp.sh | 6 3 3 0 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index a3dd4a0..0acd086 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -34,7 +34,7 @@ do_gmp() { if [ "${CT_PPL_CLOOG}" = "y" ]; then opts="--enable-cxx" - cflags="-fexceptions" + cflags="-fexceptions -fPIC" fi CFLAGS="${CT_CFLAGS_FOR_HOST} ${cflags}" \ @@ -43,8 +43,8 @@ do_gmp() { --build=${CT_BUILD} \ --host=${CT_HOST} \ --prefix="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --enable-fft \ --enable-mpbsd \ ${opts} -- cgit v0.10.2-6-g49f6 From 3b72d01b5218e07bf1c6555da86b65326bc6e1b4 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 21:48:41 +0000 Subject: /devel/gcc-4.4: - build a shared mpfr, don't build a static mpfr -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/mpfr.sh | 4 2 2 0 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index e302ff7..8255591 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -77,8 +77,8 @@ do_mpfr() { --host=${CT_HOST} \ --prefix="${CT_PREFIX_DIR}" \ ${mpfr_opt} \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --with-gmp="${CT_PREFIX_DIR}" CT_DoLog EXTRA "Building MPFR" -- cgit v0.10.2-6-g49f6 From 6f04a46339d51b1735a9d147d3c22e20e7d2f5c1 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 21:49:30 +0000 Subject: /devel/gcc-4.4: - build a shared ppl, don't build a static ppl -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh | 7 4 3 0 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index b26f1a4..76e6bf5 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -31,7 +31,8 @@ do_ppl() { CT_DoStep INFO "Installing PPL" CT_DoLog EXTRA "Configuring PPL" - CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CFLAGS="${CT_CFLAGS_FOR_HOST} -fPIC" \ + CXXFLAGS="${CT_CFLAGS_FOR_HOST} -fPIC" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \ --build=${CT_BUILD} \ @@ -39,8 +40,8 @@ do_ppl() { --prefix="${CT_PREFIX_DIR}" \ --with-libgmp-prefix="${CT_PREFIX_DIR}" \ --with-libgmpxx-prefix="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --disable-debugging \ --disable-assertions \ --disable-ppl_lcdd \ -- cgit v0.10.2-6-g49f6 From e03219c3d6545859151440332bd2dee46f918b68 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 21:59:08 +0000 Subject: /devel/gcc-4.4: - cleanup GMP build -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/gmp.sh | 2 1 1 0 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index 0acd086..d5ffedc 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -34,7 +34,7 @@ do_gmp() { if [ "${CT_PPL_CLOOG}" = "y" ]; then opts="--enable-cxx" - cflags="-fexceptions -fPIC" + cflags="-fexceptions" fi CFLAGS="${CT_CFLAGS_FOR_HOST} ${cflags}" \ -- cgit v0.10.2-6-g49f6 From 6c5993d03892a8c541ec905426c6aab086fda2aa Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 22:02:30 +0000 Subject: /devel/gcc-4.4: - cleanup the PPL build -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh | 4 2 2 0 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 76e6bf5..0a48dba 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -31,8 +31,8 @@ do_ppl() { CT_DoStep INFO "Installing PPL" CT_DoLog EXTRA "Configuring PPL" - CFLAGS="${CT_CFLAGS_FOR_HOST} -fPIC" \ - CXXFLAGS="${CT_CFLAGS_FOR_HOST} -fPIC" \ + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CXXFLAGS="${CT_CFLAGS_FOR_HOST}" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \ --build=${CT_BUILD} \ -- cgit v0.10.2-6-g49f6 From 822fb9415e457383450c96d2432b76c8874ada49 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 24 May 2009 22:04:14 +0000 Subject: /devel/gcc-4.4: - add support for building CLooG -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh | 60 60 0 0 ++++++++++++++++++++++++++++++++++ /devel/gcc-4.4/scripts/addToolVersion.sh | 3 2 1 0 +- /devel/gcc-4.4/scripts/crosstool-NG.sh.in | 3 3 0 0 ++ /devel/gcc-4.4/steps.mk | 1 1 0 0 + /devel/gcc-4.4/config/companion_libs/cloog.in | 32 32 0 0 ++++++++++++++++++ /devel/gcc-4.4/config/companion_libs.in | 1 1 0 0 + 6 files changed, 99 insertions(+), 1 deletion(-) diff --git a/config/companion_libs.in b/config/companion_libs.in index d581d80..c95418b 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -49,6 +49,7 @@ config PPL_CLOOG if PPL_CLOOG source config/companion_libs/ppl.in +source config/companion_libs/cloog.in endif endmenu diff --git a/config/companion_libs/cloog.in b/config/companion_libs/cloog.in new file mode 100644 index 0000000..e67e79f --- /dev/null +++ b/config/companion_libs/cloog.in @@ -0,0 +1,32 @@ +# CLooG options + +choice + bool + prompt "CLooG/ppl version" + +config CLOOG_V_0_15_3 + bool + prompt "0.15.3" + +# CT_INSERT_VERSION_ABOVE +# Don't remove above line! +endchoice + +config CLOOG_VERSION + string + default "0.15.3" if CLOOG_V_0_15_3 +# CT_INSERT_VERSION_STRING_ABOVE +# Don't remove above line! + +config CLOOG_CHECK + bool + prompt "Check CLooG (!!! README !!!)" + default n + help + It is highly recommended to check the newly built CLooG library. + Unfortunately, this is a very intensive task, and takes a loooong time. + + Checking CLooG is thus disabled by default. + + If you suspect that your CLooG library is the cause for incorrectly + generated code, you should answer 'Y' here. diff --git a/scripts/addToolVersion.sh b/scripts/addToolVersion.sh index 8e0446e..337c656 100755 --- a/scripts/addToolVersion.sh +++ b/scripts/addToolVersion.sh @@ -13,7 +13,7 @@ Usage: ${myname} <[options] version [...]> ... 'tool' in one of: --gcc, --binutils, --glibc, --eglibc, --uClibc, --linux, --gdb, --dmalloc, --duma, --strace, --ltrace, --libelf - --gmp, --mpfr, --ppl + --gmp, --mpfr, --ppl, --cloog Valid options for all tools: --stable, -s, +x (default) @@ -134,6 +134,7 @@ while [ $# -gt 0 ]; do --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs;; --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs;; --ppl) EXP=; OBS=; cat=PPL; tool=ppl; tool_prefix=companion_libs;; + --cloog) EXP=; OBS=; cat=CLOOG; tool=cloog; tool_prefix=companion_libs;; # Tools options: -x|--experimental|+s) EXP=1;; diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh new file mode 100644 index 0000000..43ef648 --- /dev/null +++ b/scripts/build/companion_libs/cloog.sh @@ -0,0 +1,60 @@ +# This file adds the functions to build the CLooG library +# Copyright 2009 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_cloog_get() { :; } +do_cloog_extract() { :; } +do_cloog() { :; } +do_cloog_target() { :; } + +# Overide functions depending on configuration +if [ "${CT_PPL_CLOOG}" = "y" ]; then + +# Download CLooG +do_cloog_get() { + CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \ + ftp://gcc.gnu.org/pub/gcc/infrastructure +} + +# Extract CLooG +do_cloog_extract() { + CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}" + CT_Pushd "${CT_SRC_DIR}/cloog-ppl" + CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir + CT_Popd +} + +do_cloog() { + mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl" + cd "${CT_BUILD_DIR}/build-cloog-ppl" + + CT_DoStep INFO "Installing CLooG/ppl" + + CT_DoLog EXTRA "Configuring CLooG/ppl" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/cloog-ppl/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-ppl="${CT_PREFIX_DIR}" \ + --disable-shared \ + --enable-static \ + --with-bits=gmp + + CT_DoLog EXTRA "Building CLooG/ppl" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_CLOOG_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking CLooG/ppl" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing CLooG/ppl" + CT_DoExecLog ALL make install + + CT_EndStep +} + +fi # CT_PPL_CLOOG diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index a2032bc..2a9ff5a 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -91,6 +91,7 @@ CT_DoLog INFO "Building environment variables" . "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh" . "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh" . "${CT_LIB_DIR}/scripts/build/companion_libs/ppl.sh" +. "${CT_LIB_DIR}/scripts/build/companion_libs/cloog.sh" . "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh" . "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh" . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" @@ -447,6 +448,7 @@ if [ -z "${CT_RESTART}" ]; then do_gmp_get do_mpfr_get do_ppl_get + do_cloog_get do_binutils_get do_cc_get do_libc_get @@ -464,6 +466,7 @@ if [ -z "${CT_RESTART}" ]; then do_gmp_extract do_mpfr_extract do_ppl_extract + do_cloog_extract do_binutils_extract do_cc_extract do_libc_extract diff --git a/steps.mk b/steps.mk index bb25061..3386548 100644 --- a/steps.mk +++ b/steps.mk @@ -21,6 +21,7 @@ CT_STEPS := libc_check_config \ gmp \ mpfr \ ppl \ + cloog \ binutils \ elf2flt \ cc_core_pass_1 \ -- cgit v0.10.2-6-g49f6 From 2c2dd2e5fe03f82542a6b81c66cea857cbaf973d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 17:16:49 +0000 Subject: /devel/gcc-4.4: - GMP & MPFR: do not check the libraries by default, update the help entries accordingly -------- diffstat follows -------- /devel/gcc-4.4/config/companion_libs/gmp.in | 13 9 4 0 +++++++++---- /devel/gcc-4.4/config/companion_libs/mpfr.in | 14 10 4 0 ++++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/config/companion_libs/gmp.in b/config/companion_libs/gmp.in index 0ac2b2c..3690c97 100644 --- a/config/companion_libs/gmp.in +++ b/config/companion_libs/gmp.in @@ -25,8 +25,13 @@ config GMP_VERSION config GMP_CHECK bool - prompt "Check GMP" - default y + prompt "Check GMP (!!! README !!!)" + default n help - It is highly recommended that 'make check' is run against the newly built - GMP library. See http://gmplib.org/ + It is highly recommended to check the newly built GMP library. + Unfortunately, this is a very intensive task, and takes a loooong time. + + Checking GMP is thus disabled by default. + + If you suspect that your GMP library is the cause for incorrectly + generated code, you should answer 'Y' here. diff --git a/config/companion_libs/mpfr.in b/config/companion_libs/mpfr.in index dcea326..3917c9d 100644 --- a/config/companion_libs/mpfr.in +++ b/config/companion_libs/mpfr.in @@ -35,8 +35,14 @@ config MPFR_VERSION config MPFR_CHECK bool - prompt "Check MPFR" - default y + prompt "Check MPFR (!!! README !!!)" + default n help - It is highly recommended that 'make check' is run against the newly built - MPFR library. See http://gmplib.org/ + It is highly recommended to check the newly built MPFR library. + Unfortunately, this is a very intensive task, and takes a loooong time. + + Checking MPFR is thus disabled by default. + + If you suspect that your MPFR library is the cause for incorrectly + generated code, you should answer 'Y' here. + -- cgit v0.10.2-6-g49f6 From 17b97a21ba072460b393fe32ed672ff85aa7444b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 17:22:54 +0000 Subject: /devel/gcc-4.4: - TODO: add new item -------- diffstat follows -------- /devel/gcc-4.4/TODO | 1 1 0 0 + 1 file changed, 1 insertion(+) diff --git a/TODO b/TODO index ba16ee4..08a6c36 100644 --- a/TODO +++ b/TODO @@ -14,6 +14,7 @@ Non-recurring: - CLooG - MPC - check that the patchset from 4.3.3 still applies + - commonalise the companion library check box: check-all-or-check-none (?) - uClinux -- cgit v0.10.2-6-g49f6 From 843a16f70c09d9ae1ec5db5282608da39897242e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 17:26:21 +0000 Subject: /devel/gcc-4.4: - GMP: unconditionnaly build the C++ wrappers and use exceptions -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/gmp.sh | 11 2 9 0 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index d5ffedc..d89ebb5 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -22,8 +22,6 @@ do_gmp_extract() { } do_gmp() { - local opts - local cflags mkdir -p "${CT_BUILD_DIR}/build-gmp" cd "${CT_BUILD_DIR}/build-gmp" @@ -32,12 +30,7 @@ do_gmp() { CT_DoLog EXTRA "Configuring GMP" - if [ "${CT_PPL_CLOOG}" = "y" ]; then - opts="--enable-cxx" - cflags="-fexceptions" - fi - - CFLAGS="${CT_CFLAGS_FOR_HOST} ${cflags}" \ + CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ --build=${CT_BUILD} \ @@ -47,7 +40,7 @@ do_gmp() { --disable-static \ --enable-fft \ --enable-mpbsd \ - ${opts} + --enable-cxx CT_DoLog EXTRA "Building GMP" CT_DoExecLog ALL make ${PARALLELMFLAGS} -- cgit v0.10.2-6-g49f6 From 52e72144d782cc3fb1110aa5e6ce305a809841a9 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 18:22:26 +0000 Subject: /devel/gcc-4.4: - add support for building the MPC library. -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh | 4 2 2 0 +- /devel/gcc-4.4/scripts/build/companion_libs/mpc.sh | 57 57 0 0 ++++++++++++++++++++++++++++++++++ /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh | 4 2 2 0 +- /devel/gcc-4.4/scripts/crosstool-NG.sh.in | 3 3 0 0 ++ /devel/gcc-4.4/steps.mk | 1 1 0 0 + /devel/gcc-4.4/config/companion_libs/mpc.in | 32 32 0 0 +++++++++++++++++++ /devel/gcc-4.4/config/companion_libs.in | 15 10 5 0 ++++++--- 7 files changed, 107 insertions(+), 9 deletions(-) diff --git a/config/companion_libs.in b/config/companion_libs.in index c95418b..46a2ede 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -36,20 +36,25 @@ source config/companion_libs/gmp.in source config/companion_libs/mpfr.in endif -config PPL_CLOOG +config PPL_CLOOG_MPC bool - prompt "PPL and GLooG/PPL" + prompt "PPL, GLooG/PPL and MPC" help - gcc-4.4.0 and above requires both PPL and CLooG/PPL to build some - parts of the optimiser (GRAPHITE loop optimisation, to be precise). + gcc-4.4.0 and above requires PPL and CLooG/PPL to build some parts + of the optimiser (GRAPHITE loop optimisation, to be precise). + + In addition to those, gcc-4.4 also optionally uses MPC to enable + additional optimisations on complex numbers. Although MPC is optional, + crosstool-NG requires it and uses it to build gcc >= 4.4.0. These will be automatically selected if you choose gcc>=4.4.0, but you can say 'Y' here, although it is unknown yet if any other component can use them. -if PPL_CLOOG +if PPL_CLOOG_MPC source config/companion_libs/ppl.in source config/companion_libs/cloog.in +source config/companion_libs/mpc.in endif endmenu diff --git a/config/companion_libs/mpc.in b/config/companion_libs/mpc.in new file mode 100644 index 0000000..7ff2c26 --- /dev/null +++ b/config/companion_libs/mpc.in @@ -0,0 +1,32 @@ +# MPC options + +choice + bool + prompt "MPC version" + +config MPC_V_0_6 + bool + prompt "0.6" + +# CT_INSERT_VERSION_ABOVE +# Don't remove above line! +endchoice + +config MPC_VERSION + string + default "0.6" if MPC_V_0_6 +# CT_INSERT_VERSION_STRING_ABOVE +# Don't remove above line! + +config MPC_CHECK + bool + prompt "Check MPC (!!! README !!!)" + default n + help + It is highly recommended to check the newly built MPC library. + Unfortunately, this is a very intensive task, and takes a loooong time. + + Checking MPC is thus disabled by default. + + If you suspect that your MPC library is the cause for incorrectly + generated code, you should answer 'Y' here. diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 43ef648..a98f999 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -8,7 +8,7 @@ do_cloog() { :; } do_cloog_target() { :; } # Overide functions depending on configuration -if [ "${CT_PPL_CLOOG}" = "y" ]; then +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then # Download CLooG do_cloog_get() { @@ -57,4 +57,4 @@ do_cloog() { CT_EndStep } -fi # CT_PPL_CLOOG +fi # CT_PPL_CLOOG_MPC diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh new file mode 100644 index 0000000..f0f5ecd --- /dev/null +++ b/scripts/build/companion_libs/mpc.sh @@ -0,0 +1,57 @@ +# This file adds the functions to build the MPC library +# Copyright 2009 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_mpc_get() { :; } +do_mpc_extract() { :; } +do_mpc() { :; } +do_mpc_target() { :; } + +# Overide functions depending on configuration +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then + +# Download MPC +do_mpc_get() { + CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \ + http://www.multiprecision.org/mpc/download +} + +# Extract MPC +do_mpc_extract() { + CT_Extract "mpc-${CT_MPC_VERSION}" + CT_Patch "mpc-${CT_MPC_VERSION}" +} + +do_mpc() { + mkdir -p "${CT_BUILD_DIR}/build-mpc" + cd "${CT_BUILD_DIR}/build-mpc" + + CT_DoStep INFO "Installing MPC" + + CT_DoLog EXTRA "Configuring MPC" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-mpfr="${CT_PREFIX_DIR}" \ + --disable-shared \ + --enable-static \ + + CT_DoLog EXTRA "Building MPC" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_MPC_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking MPC" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing MPC" + CT_DoExecLog ALL make install + + CT_EndStep +} + +fi # CT_PPL_CLOOG_MPC diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 0a48dba..92d59de 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -8,7 +8,7 @@ do_ppl() { :; } do_ppl_target() { :; } # Overide functions depending on configuration -if [ "${CT_PPL_CLOOG}" = "y" ]; then +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then # Download PPL do_ppl_get() { @@ -65,4 +65,4 @@ do_ppl() { CT_EndStep } -fi # CT_PPL_CLOOG +fi # CT_PPL_CLOOG_MPC diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 2a9ff5a..0b9b00d 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -92,6 +92,7 @@ CT_DoLog INFO "Building environment variables" . "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh" . "${CT_LIB_DIR}/scripts/build/companion_libs/ppl.sh" . "${CT_LIB_DIR}/scripts/build/companion_libs/cloog.sh" +. "${CT_LIB_DIR}/scripts/build/companion_libs/mpc.sh" . "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh" . "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh" . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" @@ -449,6 +450,7 @@ if [ -z "${CT_RESTART}" ]; then do_mpfr_get do_ppl_get do_cloog_get + do_mpc_get do_binutils_get do_cc_get do_libc_get @@ -467,6 +469,7 @@ if [ -z "${CT_RESTART}" ]; then do_mpfr_extract do_ppl_extract do_cloog_extract + do_mpc_extract do_binutils_extract do_cc_extract do_libc_extract diff --git a/steps.mk b/steps.mk index 3386548..ba90f79 100644 --- a/steps.mk +++ b/steps.mk @@ -22,6 +22,7 @@ CT_STEPS := libc_check_config \ mpfr \ ppl \ cloog \ + mpc \ binutils \ elf2flt \ cc_core_pass_1 \ -- cgit v0.10.2-6-g49f6 From 87cf57e3ba2dbed18f3fdb4af4d2bce2d6df7541 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 18:23:38 +0000 Subject: /devel/gcc-4.4: - TODO: remove completed items (companion libs are now in). -------- diffstat follows -------- /devel/gcc-4.4/TODO | 6 1 5 0 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TODO b/TODO index 08a6c36..cbc4484 100644 --- a/TODO +++ b/TODO @@ -9,12 +9,8 @@ Recuring tasks: Non-recurring: - gcc-4.4 - - requires some companion libs: - - PPL - - CLooG - - MPC - - check that the patchset from 4.3.3 still applies - commonalise the companion library check box: check-all-or-check-none (?) + - check that the patchset from 4.3.3 still applies - uClinux -- cgit v0.10.2-6-g49f6 From 21649be4763884c0000ec61f468ce9d1be10616d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 19:46:58 +0000 Subject: /devel/gcc-4.4: - commonalise the config-knobs that: - enable checking the newly built companion libraries - enable building the companion libraries for the target -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh | 2 1 1 0 /devel/gcc-4.4/scripts/build/companion_libs/mpc.sh | 2 1 1 0 /devel/gcc-4.4/scripts/build/companion_libs/gmp.sh | 4 2 2 0 +- /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh | 2 1 1 0 /devel/gcc-4.4/scripts/build/companion_libs/mpfr.sh | 4 2 2 0 +- /devel/gcc-4.4/config/companion_libs/ppl.in | 14 0 14 0 ---------- /devel/gcc-4.4/config/companion_libs/mpc.in | 13 0 13 0 ---------- /devel/gcc-4.4/config/companion_libs/gmp.in | 13 0 13 0 ---------- /devel/gcc-4.4/config/companion_libs/cloog.in | 13 0 13 0 ---------- /devel/gcc-4.4/config/companion_libs/mpfr.in | 14 0 14 0 ---------- /devel/gcc-4.4/config/companion_libs.in | 46 35 11 0 ++++++++++++++++++++++++++-------- 11 files changed, 42 insertions(+), 85 deletions(-) diff --git a/config/companion_libs.in b/config/companion_libs.in index 46a2ede..3642713 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -20,17 +20,6 @@ config GMP_MPFR - gcc - gdb -config GMP_MPFR_TARGET - bool - prompt "Build libraries for the target" - depends on GMP_MPFR - depends on ! BARE_METAL - default n - help - Also build libraries for the target. This can be usefull if you want - to later build a compiler that will run on the target, or if you want - to run gdb natively on the target. - if GMP_MPFR source config/companion_libs/gmp.in source config/companion_libs/mpfr.in @@ -57,4 +46,39 @@ source config/companion_libs/cloog.in source config/companion_libs/mpc.in endif +comment "Common companion libraries options" + depends on GMP_MPFR || PPL_CLOOG_MPC + +config COMP_LIBS_CHECK + bool + prompt "Check the companion libraries builds (!!! READ HELP!!!)" + depends on GMP_MPFR || PPL_CLOOG_MPC + default n + help + It is highly recommended to check the newly built companion libraries. + Unfortunately, this is a very intensive task, and takes a loooong time. + + Checking the newly built companion libraries is thus disabled by default, + but it is suggested that you check them at least once or your machine, + and if they work, disable the check on subsequent builds. + + If you suspect that one (or more) of your companion libraries is the + cause for incorrectly generated code, you should answer 'Y' here. + Note however that this will take a really long time. For example, + building PPL on my machine takes roughly 1'40", while checking it takes + about 1h30"... + +config COMP_LIBS_TARGET + bool + prompt "Build companion libraries for the target" + depends on GMP_MPFR || PPL_CLOOG_MPC + depends on ! BARE_METAL + default n + help + Also build companion libraries for the target. This can be usefull if + you want to later build a compiler that will run on the target, or if + you want to run gdb natively on the target. + + Please note that for now, crosstool-NG can only build GMP and MPFR so. + endmenu diff --git a/config/companion_libs/cloog.in b/config/companion_libs/cloog.in index e67e79f..99779c9 100644 --- a/config/companion_libs/cloog.in +++ b/config/companion_libs/cloog.in @@ -17,16 +17,3 @@ config CLOOG_VERSION default "0.15.3" if CLOOG_V_0_15_3 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! - -config CLOOG_CHECK - bool - prompt "Check CLooG (!!! README !!!)" - default n - help - It is highly recommended to check the newly built CLooG library. - Unfortunately, this is a very intensive task, and takes a loooong time. - - Checking CLooG is thus disabled by default. - - If you suspect that your CLooG library is the cause for incorrectly - generated code, you should answer 'Y' here. diff --git a/config/companion_libs/gmp.in b/config/companion_libs/gmp.in index 3690c97..c4fc246 100644 --- a/config/companion_libs/gmp.in +++ b/config/companion_libs/gmp.in @@ -22,16 +22,3 @@ config GMP_VERSION default "4.2.4" if GMP_V_4_2_4 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! - -config GMP_CHECK - bool - prompt "Check GMP (!!! README !!!)" - default n - help - It is highly recommended to check the newly built GMP library. - Unfortunately, this is a very intensive task, and takes a loooong time. - - Checking GMP is thus disabled by default. - - If you suspect that your GMP library is the cause for incorrectly - generated code, you should answer 'Y' here. diff --git a/config/companion_libs/mpc.in b/config/companion_libs/mpc.in index 7ff2c26..0aa1369 100644 --- a/config/companion_libs/mpc.in +++ b/config/companion_libs/mpc.in @@ -17,16 +17,3 @@ config MPC_VERSION default "0.6" if MPC_V_0_6 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! - -config MPC_CHECK - bool - prompt "Check MPC (!!! README !!!)" - default n - help - It is highly recommended to check the newly built MPC library. - Unfortunately, this is a very intensive task, and takes a loooong time. - - Checking MPC is thus disabled by default. - - If you suspect that your MPC library is the cause for incorrectly - generated code, you should answer 'Y' here. diff --git a/config/companion_libs/mpfr.in b/config/companion_libs/mpfr.in index 3917c9d..910ab4e 100644 --- a/config/companion_libs/mpfr.in +++ b/config/companion_libs/mpfr.in @@ -32,17 +32,3 @@ config MPFR_VERSION default "2.4.1" if MPFR_V_2_4_1 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! - -config MPFR_CHECK - bool - prompt "Check MPFR (!!! README !!!)" - default n - help - It is highly recommended to check the newly built MPFR library. - Unfortunately, this is a very intensive task, and takes a loooong time. - - Checking MPFR is thus disabled by default. - - If you suspect that your MPFR library is the cause for incorrectly - generated code, you should answer 'Y' here. - diff --git a/config/companion_libs/ppl.in b/config/companion_libs/ppl.in index d8f5906..efdeabf 100644 --- a/config/companion_libs/ppl.in +++ b/config/companion_libs/ppl.in @@ -17,17 +17,3 @@ config PPL_VERSION default "0.10.2" if PPL_V_0_10_2 # CT_INSERT_VERSION_STRING_ABOVE # Don't remove above line! - -config PPL_CHECK - bool - prompt "Check PPL (!!! README !!!)" - default n - help - Checking PPL is very intensive and takes a loooong time. - The PPL folks do not recommend checking the library, but they do - not recommend not checking it, either. - - Checking PPL is thus disabled by default. - - If you suspect that your PPL library is the cause for incorrectly - generated code, you should answer 'Y' here. diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index a98f999..5822633 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -46,7 +46,7 @@ do_cloog() { CT_DoLog EXTRA "Building CLooG/ppl" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_CLOOG_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking CLooG/ppl" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index d89ebb5..6371b45 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -45,7 +45,7 @@ do_gmp() { CT_DoLog EXTRA "Building GMP" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_GMP_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking GMP" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi @@ -56,7 +56,7 @@ do_gmp() { CT_EndStep } -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then +if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then do_gmp_target() { mkdir -p "${CT_BUILD_DIR}/build-gmp-target" diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh index f0f5ecd..335609f 100644 --- a/scripts/build/companion_libs/mpc.sh +++ b/scripts/build/companion_libs/mpc.sh @@ -43,7 +43,7 @@ do_mpc() { CT_DoLog EXTRA "Building MPC" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_MPC_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking MPC" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index 8255591..85d0942 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -84,7 +84,7 @@ do_mpfr() { CT_DoLog EXTRA "Building MPFR" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_MPFR_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking MPFR" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi @@ -95,7 +95,7 @@ do_mpfr() { CT_EndStep } -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then +if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then do_mpfr_target() { mkdir -p "${CT_BUILD_DIR}/build-mpfr-target" diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 92d59de..686622f 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -54,7 +54,7 @@ do_ppl() { CT_DoLog EXTRA "Building PPL" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_PPL_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking PPL" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi -- cgit v0.10.2-6-g49f6 From 7ae18a8527c549e07b509ba47c00514bc31b933f Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 19:48:42 +0000 Subject: /devel/gcc-4.4: - TODO: remove completed items -------- diffstat follows -------- /devel/gcc-4.4/TODO | 1 0 1 0 - 1 file changed, 1 deletion(-) diff --git a/TODO b/TODO index cbc4484..cafd8a8 100644 --- a/TODO +++ b/TODO @@ -9,7 +9,6 @@ Recuring tasks: Non-recurring: - gcc-4.4 - - commonalise the companion library check box: check-all-or-check-none (?) - check that the patchset from 4.3.3 still applies - uClinux -- cgit v0.10.2-6-g49f6 From 51a84be9023dafc52f97b950b1999e9599e14fc5 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 20:04:12 +0000 Subject: /devel/gcc-4.4: - companion libraries: typo in help entry -------- diffstat follows -------- /devel/gcc-4.4/config/companion_libs.in | 2 1 1 0 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/companion_libs.in b/config/companion_libs.in index 3642713..636ca94 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -59,7 +59,7 @@ config COMP_LIBS_CHECK Unfortunately, this is a very intensive task, and takes a loooong time. Checking the newly built companion libraries is thus disabled by default, - but it is suggested that you check them at least once or your machine, + but it is suggested that you check them at least once on your machine, and if they work, disable the check on subsequent builds. If you suspect that one (or more) of your companion libraries is the -- cgit v0.10.2-6-g49f6 From f149116490b8064456c7a7a078e657c989dcb8b0 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 20:09:17 +0000 Subject: /devel/gcc-4.4: - gcc build script: no longer use the gcc-4.4 snapshot version -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/cc/gcc.sh | 33 13 20 0 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index c7e1712..17bedf7 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -4,18 +4,16 @@ # Download gcc do_cc_get() { - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}" - # Ah! gcc folks are kind of 'different': they store the tarballs in # subdirectories of the same name! That's because gcc is such /crap/ that # it is such /big/ that it needs being splitted for distribution! Sad. :-( # Arrgghh! Some of those versions does not follow this convention: # gcc-3.3.3 lives in releases/gcc-3.3.3, while gcc-2.95.* isn't in a # subdirectory! You bastard! - CT_GetFile "gcc-${version}" \ - {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${version}} \ - ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${version} \ - ftp://ftp.uvsq.fr/pub/gcc/snapshots/${version} + CT_GetFile "gcc-${CT_CC_VERSION}" \ + {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} \ + ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-${CT_CC_VERSION} \ + ftp://ftp.uvsq.fr/pub/gcc/snapshots/${CT_CC_VERSION} # Starting with GCC 4.3, ecj is used for Java, and will only be # built if the configure script finds ecj.jar at the top of the @@ -29,16 +27,14 @@ do_cc_get() { # Extract gcc do_cc_extract() { - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}" - - CT_Extract "gcc-${version}" - CT_Patch "gcc-${version}" + CT_Extract "gcc-${CT_CC_VERSION}" + CT_Patch "gcc-${CT_CC_VERSION}" # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree - if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \ - -a ! -f "${CT_SRC_DIR}/gcc-${version}/ecj.jar" \ + if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" \ + -a ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" \ ]; then - CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${version}/ecj.jar" + CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar" fi } @@ -90,7 +86,6 @@ do_cc_core() { local core_prefix_dir local extra_config local lang_opt - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}" eval $1 eval $2 @@ -150,7 +145,7 @@ do_cc_core() { CC_FOR_BUILD="${CT_BUILD}-gcc" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ CT_DoExecLog ALL \ - "${CT_SRC_DIR}/gcc-${version}/configure" \ + "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ --target=${CT_TARGET} \ @@ -182,7 +177,7 @@ do_cc_core() { # so we configure then build it. # Next we have to configure gcc, create libgcc.mk then edit it... # So much easier if we just edit the source tree, but hey... - if [ ! -f "${CT_SRC_DIR}/gcc-${version}/gcc/BASE-VER" ]; then + if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then CT_DoExecLog ALL make configure-libiberty CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libiberty libiberty.a CT_DoExecLog ALL make configure-gcc configure-libcpp @@ -192,7 +187,7 @@ do_cc_core() { CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp all-build-libiberty fi # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here. - if [ -d "${CT_SRC_DIR}/gcc-${version}/libdecnumber" ]; then + if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/libdecnumber" ]; then CT_DoExecLog ALL make configure-libdecnumber CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libdecnumber libdecnumber.a fi @@ -238,8 +233,6 @@ do_cc_core() { #------------------------------------------------------------------------------ # Build final gcc do_cc() { - local version="${CT_CC_VERSION}${CT_CC_GCC_4_4_snapshot_date}" - # If building for bare metal, nothing to be done here, the static core conpiler is enough! [ "${CT_BARE_METAL}" = "y" ] && return 0 @@ -296,7 +289,7 @@ do_cc() { CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ CT_DoExecLog ALL \ - "${CT_SRC_DIR}/gcc-${version}/configure" \ + "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ --target=${CT_TARGET} \ -- cgit v0.10.2-6-g49f6 From c1979b98ae2ba7066a57bc375c67e977e2b51e20 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 25 May 2009 20:27:14 +0000 Subject: /devel/gcc-4.4: - gdb: select the correct config knob to use GMP and MPFR -------- diffstat follows -------- /devel/gcc-4.4/config/debug/gdb.in | 8 4 4 0 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/debug/gdb.in b/config/debug/gdb.in index 865a5f8..f21123d 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -20,7 +20,7 @@ config GDB_CROSS_STATIC help A static cross gdb can be usefull if you debug on a machine that is not the one that is used to compile the toolchain. - + That way, you can share the cross-gdb without installing a toolchain on every machine that will be used to debug target programs. @@ -59,14 +59,14 @@ config GDB_NATIVE_USE_GMP_MPFR default n depends on GDB_NATIVE select GMP_MPFR - select GMP_MPFR_TARGET + select COMP_LIBS_TARGET help gdb can make use of the GMP and MPFR libraries. - + While the cross-gdb (above) can use the libraries compiled for the host, the native gdb needs the libraries for the target (where it will eventually run). - + Setting this option will force building the GMP and MPFR libraries for the target, and configure the native gdb to use them. -- cgit v0.10.2-6-g49f6 From 9a954cd1a2ac704c802224b476d5388a521215b2 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 27 May 2009 21:07:37 +0000 Subject: /devel/gcc-4.4: - functions: add a utility function that sets and exports LD_LIBRARY_PATH -------- diffstat follows -------- /devel/gcc-4.4/scripts/functions | 30 30 0 0 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/scripts/functions b/scripts/functions index 82bccab..738b400 100644 --- a/scripts/functions +++ b/scripts/functions @@ -265,6 +265,36 @@ CT_DoYes() { yes "$1" || true } +# Add the specified directory to LD_LIBRARY_PATH, and export it +# If the specified patch is already present, just export +# $1: path to add +# $2: add as 'first' or 'last' path, 'first' is assumed if $2 is empty +# Usage CT_SetLibPath /some/where/lib [first|last] +CT_SetLibPath() { + local path="$1" + local pos="$2" + + case ":${LD_LIBRARY_PATH}:" in + *:"${path}":*) ;; + *) case "${pos}" in + last) + CT_DoLog DEBUG "Adding '${path}' at end of LD_LIBRARY_PATH" + LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${path}" + ;; + first|"") + CT_DoLog DEBUG "Adding '${path}' at start of LD_LIBRARY_PATH" + LD_LIBRARY_PATH="${path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" + ;; + *) + CT_Abort "Incorrect position '${pos}' to add '${path}' to LD_LIBRARY_PATH" + ;; + esac + ;; + esac + CT_DoLog DEBUG "==> LD_LIBRARY_PATH='${LD_LIBRARY_PATH}'" + export LD_LIBRARY_PATH +} + # Get the file name extension of a component # Usage: CT_GetFileExtension [extension] # If found, echoes the extension to stdout -- cgit v0.10.2-6-g49f6 From 5801d8c588a878b05a80a78c5d4ac1752c5da470 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 27 May 2009 21:08:17 +0000 Subject: /devel/gcc-4.4: - crosstool-NG.sh.in: include prefix/lib in LD_LIBRARY_PATH -------- diffstat follows -------- /devel/gcc-4.4/scripts/crosstool-NG.sh.in | 4 4 0 0 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 0b9b00d..44c3023 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -127,6 +127,10 @@ CT_CONFIG_DIR="${CT_BUILD_DIR}/configs" CT_CC_CORE_STATIC_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-static" CT_CC_CORE_SHARED_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-shared" +# Set LD_LIBRARY_PATH to point to prefix/lib so we can find our own +# libraries; add as first path, so we get hit first by the dynamic linker +CT_SetLibPath "${CT_PREFIX_DIR}/lib" first + # We must ensure that we can restart if asked for! if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}" ]; then CT_DoLog ERROR "You asked to restart a non-restartable build" -- cgit v0.10.2-6-g49f6 From 637b137512fd9ff8e46c9c8b1e344e07ebb739bc Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 27 May 2009 21:16:01 +0000 Subject: /devel/gcc-4.4: - add gcc-4.4.0 patches, vampirised from the Gentoo patchset - gcc-4.4.0 auto-selects and uses appropriate companion linraries -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/cc/gcc.sh | 20 18 2 0 + /devel/gcc-4.4/patches/gcc/4.4.0/280-freebsd.patch | 188 188 0 0 ++++++++++ /devel/gcc-4.4/patches/gcc/4.4.0/140-default-format-security.patch | 98 98 0 0 +++++ /devel/gcc-4.4/patches/gcc/4.4.0/290-freebsd.patch | 128 128 0 0 +++++++ /devel/gcc-4.4/patches/gcc/4.4.0/310-uclibc-conf.patch | 70 70 0 0 ++++ /devel/gcc-4.4/patches/gcc/4.4.0/240-libstdc++-pic.patch | 106 106 0 0 ++++++ /devel/gcc-4.4/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch | 50 50 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/100-alpha-mieee-default.patch | 48 48 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/180-libgomp-no-werror.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/170-sparc64-bsd.patch | 58 58 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch | 30 30 0 0 ++ /devel/gcc-4.4/patches/gcc/4.4.0/220-libiberty-pic.patch | 22 22 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/110-trampolinewarn.patch | 54 54 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/160-netbsd-symbolic.patch | 22 22 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch | 48 48 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/150-default-fortify-source.patch | 52 52 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch | 96 96 0 0 +++++ /devel/gcc-4.4/patches/gcc/4.4.0/120-java-nomulti.patch | 92 92 0 0 +++++ /devel/gcc-4.4/patches/gcc/4.4.0/270-sh-pr24836.patch | 48 48 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/330-c99-snprintf.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/230-superh-default-multilib.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch | 158 158 0 0 +++++++++ /devel/gcc-4.4/patches/gcc/4.4.0/300-pr40105.patch | 360 360 0 0 ++++++++++++++++++++ /devel/gcc-4.4/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/130-cross-compile.patch | 78 78 0 0 ++++ /devel/gcc-4.4/patches/gcc/4.4.0/320-missing-execinfo_h.patch | 24 24 0 0 + /devel/gcc-4.4/config/cc/gcc.in | 1 1 0 0 + 27 files changed, 1945 insertions(+), 2 deletions(-) diff --git a/config/cc/gcc.in b/config/cc/gcc.in index f601c0d..3a672b0 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -130,6 +130,7 @@ config CC_GCC_4_3_or_later config CC_GCC_4_4_or_later bool default n + select PPL_CLOOG_MPC config CC_VERSION string diff --git a/patches/gcc/4.4.0/100-alpha-mieee-default.patch b/patches/gcc/4.4.0/100-alpha-mieee-default.patch new file mode 100644 index 0000000..7cf0dc4 --- /dev/null +++ b/patches/gcc/4.4.0/100-alpha-mieee-default.patch @@ -0,0 +1,24 @@ +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.h gcc-4.4.0/gcc/config/alpha/alpha.h +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.h 2009-02-20 16:20:38.000000000 +0100 ++++ gcc-4.4.0/gcc/config/alpha/alpha.h 2009-05-27 21:37:58.000000000 +0200 +@@ -95,6 +95,8 @@ + while (0) + #endif + ++#define CPP_SPEC "%{!no-ieee:-mieee}" ++ + #define WORD_SWITCH_TAKES_ARG(STR) \ + (!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR)) + +diff -durN gcc-4.4.0.orig/gcc/config/alpha/alpha.opt gcc-4.4.0/gcc/config/alpha/alpha.opt +--- gcc-4.4.0.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.0/gcc/config/alpha/alpha.opt 2009-05-27 21:37:58.000000000 +0200 +@@ -39,7 +39,7 @@ + Request IEEE-conformant math library routines (OSF/1) + + mieee +-Target Report RejectNegative Mask(IEEE) ++Target Report Mask(IEEE) + Emit IEEE-conformant code, without inexact exceptions + + mieee-with-inexact diff --git a/patches/gcc/4.4.0/110-trampolinewarn.patch b/patches/gcc/4.4.0/110-trampolinewarn.patch new file mode 100644 index 0000000..f3ef499 --- /dev/null +++ b/patches/gcc/4.4.0/110-trampolinewarn.patch @@ -0,0 +1,27 @@ +diff -durN gcc-4.4.0.orig/gcc/builtins.c gcc-4.4.0/gcc/builtins.c +--- gcc-4.4.0.orig/gcc/builtins.c 2009-03-30 19:42:27.000000000 +0200 ++++ gcc-4.4.0/gcc/builtins.c 2009-05-27 21:38:01.000000000 +0200 +@@ -5768,6 +5768,9 @@ + trampolines_created = 1; + INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain); + ++ if (warn_trampolines) ++ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)"); ++ + return const0_rtx; + } + +diff -durN gcc-4.4.0.orig/gcc/common.opt gcc-4.4.0/gcc/common.opt +--- gcc-4.4.0.orig/gcc/common.opt 2009-03-28 18:28:45.000000000 +0100 ++++ gcc-4.4.0/gcc/common.opt 2009-05-27 21:38:01.000000000 +0200 +@@ -197,6 +197,10 @@ + Common Var(warn_type_limits) Init(-1) Warning + Warn if a comparison is always true or always false due to the limited range of the data type + ++Wtrampolines ++Common Var(warn_trampolines) Init(1) ++Warn whenever a trampoline is generated ++ + Wuninitialized + Common Var(warn_uninitialized) Warning + Warn about uninitialized automatic variables diff --git a/patches/gcc/4.4.0/120-java-nomulti.patch b/patches/gcc/4.4.0/120-java-nomulti.patch new file mode 100644 index 0000000..645479c --- /dev/null +++ b/patches/gcc/4.4.0/120-java-nomulti.patch @@ -0,0 +1,46 @@ +diff -durN gcc-4.4.0.orig/libjava/configure gcc-4.4.0/libjava/configure +--- gcc-4.4.0.orig/libjava/configure 2009-04-21 11:08:08.000000000 +0200 ++++ gcc-4.4.0/libjava/configure 2009-05-27 21:38:03.000000000 +0200 +@@ -1021,6 +1021,8 @@ + default=yes + --enable-java-maintainer-mode + allow rebuilding of .class and .h files ++ --enable-libjava-multilib ++ build libjava as multilib + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --enable-maintainer-mode enable make rules and dependencies not useful +@@ -1973,6 +1975,16 @@ + fi + + ++# Check whether --enable-libjava-multilib was given. ++if test "${enable_libjava_multilib+set}" = set; then ++ enableval=$enable_libjava_multilib; ++fi ++ ++if test "$enable_libjava_multilib" = no; then ++ multilib=no ++ ac_configure_args="$ac_configure_args --disable-multilib" ++fi ++ + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. + + +diff -durN gcc-4.4.0.orig/libjava/configure.ac gcc-4.4.0/libjava/configure.ac +--- gcc-4.4.0.orig/libjava/configure.ac 2009-04-09 23:54:28.000000000 +0200 ++++ gcc-4.4.0/libjava/configure.ac 2009-05-27 21:38:03.000000000 +0200 +@@ -139,6 +139,13 @@ + [allow rebuilding of .class and .h files])) + AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes) + ++AC_ARG_ENABLE(libjava-multilib, ++ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib])) ++if test "$enable_libjava_multilib" = no; then ++ multilib=no ++ ac_configure_args="$ac_configure_args --disable-multilib" ++fi ++ + # It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX. + GCC_NO_EXECUTABLES + diff --git a/patches/gcc/4.4.0/130-cross-compile.patch b/patches/gcc/4.4.0/130-cross-compile.patch new file mode 100644 index 0000000..76fe7c8 --- /dev/null +++ b/patches/gcc/4.4.0/130-cross-compile.patch @@ -0,0 +1,39 @@ +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure +--- gcc-4.4.0.orig/gcc/configure 2009-03-24 18:46:03.000000000 +0100 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:06.000000000 +0200 +@@ -13997,7 +13997,7 @@ + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac +--- gcc-4.4.0.orig/gcc/configure.ac 2009-03-24 18:46:03.000000000 +0100 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:06.000000000 +0200 +@@ -1720,7 +1720,7 @@ + | powerpc*-*-*,powerpc64*-*-*) + CROSS="$CROSS -DNATIVE_CROSS" ;; + esac +-elif test "x$TARGET_SYSTEM_ROOT" != x; then ++elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then + SYSTEM_HEADER_DIR=$build_system_header_dir + fi + +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2.c gcc-4.4.0/gcc/unwind-dw2.c +--- gcc-4.4.0.orig/gcc/unwind-dw2.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/unwind-dw2.c 2009-05-27 21:38:06.000000000 +0200 +@@ -329,9 +329,11 @@ + } + #endif + ++#ifndef inhibit_libc + #ifdef MD_UNWIND_SUPPORT + #include MD_UNWIND_SUPPORT + #endif ++#endif + + /* Extract any interesting information from the CIE for the translation + unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/patches/gcc/4.4.0/140-default-format-security.patch b/patches/gcc/4.4.0/140-default-format-security.patch new file mode 100644 index 0000000..51942f5 --- /dev/null +++ b/patches/gcc/4.4.0/140-default-format-security.patch @@ -0,0 +1,49 @@ +diff -durN gcc-4.4.0.orig/gcc/c-common.c gcc-4.4.0/gcc/c-common.c +--- gcc-4.4.0.orig/gcc/c-common.c 2009-03-30 19:42:27.000000000 +0200 ++++ gcc-4.4.0/gcc/c-common.c 2009-05-27 21:38:08.000000000 +0200 +@@ -301,7 +301,7 @@ + /* Warn about format/argument anomalies in calls to formatted I/O functions + (*printf, *scanf, strftime, strfmon, etc.). */ + +-int warn_format; ++int warn_format = 1; + + /* Warn about using __null (as NULL in C++) as sentinel. For code compiled + with GCC this doesn't matter as __null is guaranteed to have the right +diff -durN gcc-4.4.0.orig/gcc/c.opt gcc-4.4.0/gcc/c.opt +--- gcc-4.4.0.orig/gcc/c.opt 2009-03-18 22:14:53.000000000 +0100 ++++ gcc-4.4.0/gcc/c.opt 2009-05-27 21:38:08.000000000 +0200 +@@ -236,7 +236,7 @@ + Warn about format strings that contain NUL bytes + + Wformat-security +-C ObjC C++ ObjC++ Var(warn_format_security) Warning ++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning + Warn about possible security problems with format functions + + Wformat-y2k +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-04-01 09:18:47.000000000 +0200 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:08.000000000 +0200 +@@ -2867,6 +2867,9 @@ + @option{-Wformat-nonliteral}, @option{-Wformat-security}, and + @option{-Wformat=2} are available, but are not included in @option{-Wall}. + ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. ++To disable, use @option{-Wformat=0}. ++ + @item -Wformat-y2k + @opindex Wformat-y2k + @opindex Wno-format-y2k +@@ -2920,6 +2923,11 @@ + in future warnings may be added to @option{-Wformat-security} that are not + included in @option{-Wformat-nonliteral}.) + ++NOTE: In Gentoo, this option is enabled by default for C, C++, ObjC, ObjC++. ++To disable, use @option{-Wno-format-security}, or disable all format warnings ++with @option{-Wformat=0}. To make format security warnings fatal, specify ++@option{-Werror=format-security}. ++ + @item -Wformat=2 + @opindex Wformat=2 + @opindex Wno-format=2 diff --git a/patches/gcc/4.4.0/150-default-fortify-source.patch b/patches/gcc/4.4.0/150-default-fortify-source.patch new file mode 100644 index 0000000..a68227f --- /dev/null +++ b/patches/gcc/4.4.0/150-default-fortify-source.patch @@ -0,0 +1,26 @@ +diff -durN gcc-4.4.0.orig/gcc/doc/invoke.texi gcc-4.4.0/gcc/doc/invoke.texi +--- gcc-4.4.0.orig/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200 ++++ gcc-4.4.0/gcc/doc/invoke.texi 2009-05-27 21:38:11.000000000 +0200 +@@ -5411,6 +5411,11 @@ + Please note the warning under @option{-fgcse} about + invoking @option{-O2} on programs that use computed gotos. + ++NOTE: In Gentoo, @option{-D_FORTIFY_SOURCE=2} is set by default, and is ++activated when @option{-O} is set to 2 or higher. This enables additional ++compile-time and run-time checks for several libc functions. To disable, ++specify either @option{-U_FORTIFY_SOURCE} or @option{-D_FORTIFY_SOURCE=0}. ++ + @item -O3 + @opindex O3 + Optimize yet more. @option{-O3} turns on all optimizations specified +diff -durN gcc-4.4.0.orig/gcc/gcc.c gcc-4.4.0/gcc/gcc.c +--- gcc-4.4.0.orig/gcc/gcc.c 2009-03-17 22:25:59.000000000 +0100 ++++ gcc-4.4.0/gcc/gcc.c 2009-05-27 21:38:11.000000000 +0200 +@@ -807,6 +807,7 @@ + %{H} %C %{D*&U*&A*} %{i*} %Z %i\ + %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ + %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ ++ %{!D_FORTIFY_SOURCE:%{!D_FORTIFY_SOURCE=*:%{!U_FORTIFY_SOURCE:-D_FORTIFY_SOURCE=2}}}\ + %{E|M|MM:%W{o*}}"; + + /* This contains cpp options which are common with cc1_options and are passed diff --git a/patches/gcc/4.4.0/160-netbsd-symbolic.patch b/patches/gcc/4.4.0/160-netbsd-symbolic.patch new file mode 100644 index 0000000..fe1f1cb --- /dev/null +++ b/patches/gcc/4.4.0/160-netbsd-symbolic.patch @@ -0,0 +1,11 @@ +diff -durN gcc-4.4.0.orig/gcc/config/netbsd-elf.h gcc-4.4.0/gcc/config/netbsd-elf.h +--- gcc-4.4.0.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200 ++++ gcc-4.4.0/gcc/config/netbsd-elf.h 2009-05-27 21:38:14.000000000 +0200 +@@ -82,6 +82,7 @@ + #define NETBSD_LINK_SPEC_ELF \ + "%{assert*} %{R*} %{rpath*} \ + %{shared:-shared} \ ++ %{symbolic:-Bsymbolic} \ + %{!shared: \ + -dc -dp \ + %{!nostdlib: \ diff --git a/patches/gcc/4.4.0/170-sparc64-bsd.patch b/patches/gcc/4.4.0/170-sparc64-bsd.patch new file mode 100644 index 0000000..99a5eea --- /dev/null +++ b/patches/gcc/4.4.0/170-sparc64-bsd.patch @@ -0,0 +1,29 @@ +diff -durN gcc-4.4.0.orig/gcc/config/sparc/freebsd.h gcc-4.4.0/gcc/config/sparc/freebsd.h +--- gcc-4.4.0.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.4.0/gcc/config/sparc/freebsd.h 2009-05-27 21:38:16.000000000 +0200 +@@ -25,9 +25,22 @@ + /* FreeBSD needs the platform name (sparc64) defined. + Emacs needs to know if the arch is 64 or 32-bits. */ + +-#undef CPP_CPU64_DEFAULT_SPEC +-#define CPP_CPU64_DEFAULT_SPEC \ +- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__" ++#undef FBSD_TARGET_CPU_CPP_BUILTINS ++#define FBSD_TARGET_CPU_CPP_BUILTINS() \ ++ do \ ++ { \ ++ if (TARGET_ARCH64) \ ++ { \ ++ builtin_define ("__sparc64__"); \ ++ builtin_define ("__sparc_v9__"); \ ++ builtin_define ("__sparcv9"); \ ++ } \ ++ else \ ++ builtin_define ("__sparc"); \ ++ builtin_define ("__sparc__"); \ ++ } \ ++ while (0) ++ + + #define LINK_SPEC "%(link_arch) \ + %{!mno-relax:%{!r:-relax}} \ diff --git a/patches/gcc/4.4.0/180-libgomp-no-werror.patch b/patches/gcc/4.4.0/180-libgomp-no-werror.patch new file mode 100644 index 0000000..9d2adf0 --- /dev/null +++ b/patches/gcc/4.4.0/180-libgomp-no-werror.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.0.orig/libgomp/configure gcc-4.4.0/libgomp/configure +--- gcc-4.4.0.orig/libgomp/configure 2009-04-21 11:08:08.000000000 +0200 ++++ gcc-4.4.0/libgomp/configure 2009-05-27 21:38:19.000000000 +0200 +@@ -3334,7 +3334,7 @@ + + # Add -Wall -Werror if we are using GCC. + if test "x$GCC" = "xyes"; then +- XCFLAGS="$XCFLAGS -Wall -Werror" ++ XCFLAGS="$XCFLAGS -Wall" + fi + + # Find other programs we need. diff --git a/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch b/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch new file mode 100644 index 0000000..8db1ccc --- /dev/null +++ b/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch @@ -0,0 +1,24 @@ +diff -durN gcc-4.4.0.orig/gcc/stmt.c gcc-4.4.0/gcc/stmt.c +--- gcc-4.4.0.orig/gcc/stmt.c 2009-02-27 20:49:42.000000000 +0100 ++++ gcc-4.4.0/gcc/stmt.c 2009-05-27 21:38:21.000000000 +0200 +@@ -2376,7 +2376,11 @@ + use_cost_table + = (TREE_CODE (orig_type) != ENUMERAL_TYPE + && estimate_case_costs (case_list)); +- balance_case_nodes (&case_list, NULL); ++ /* When optimizing for size, we want a straight list to avoid ++ jumps as much as possible. This basically creates an if-else ++ chain. */ ++ if (!optimize_size) ++ balance_case_nodes (&case_list, NULL); + emit_case_nodes (index, case_list, default_label, index_type); + if (default_label) + emit_jump (default_label); +@@ -2942,6 +2946,7 @@ + { + if (!node_has_low_bound (node, index_type)) + { ++ if (!optimize_size) /* don't jl to the .default_label. */ + emit_cmp_and_jump_insns (index, + convert_modes + (mode, imode, diff --git a/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch b/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch new file mode 100644 index 0000000..02784be --- /dev/null +++ b/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch @@ -0,0 +1,15 @@ +diff -durN gcc-4.4.0.orig/include/libiberty.h gcc-4.4.0/include/libiberty.h +--- gcc-4.4.0.orig/include/libiberty.h 2008-06-24 03:42:31.000000000 +0200 ++++ gcc-4.4.0/include/libiberty.h 2009-05-27 21:38:24.000000000 +0200 +@@ -595,8 +595,11 @@ + /* Like sprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. */ + ++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ ++#ifndef asprintf + extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; + #endif ++#endif + + #if !HAVE_DECL_VASPRINTF + /* Like vsprintf but provides a pointer to malloc'd storage, which diff --git a/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch b/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch new file mode 100644 index 0000000..06eafc5 --- /dev/null +++ b/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h gcc-4.4.0/gcc/config/arm/linux-eabi.h +--- gcc-4.4.0.orig/gcc/config/arm/linux-eabi.h 2007-11-08 14:44:09.000000000 +0100 ++++ gcc-4.4.0/gcc/config/arm/linux-eabi.h 2009-05-27 21:38:26.000000000 +0200 +@@ -44,7 +44,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/patches/gcc/4.4.0/220-libiberty-pic.patch b/patches/gcc/4.4.0/220-libiberty-pic.patch new file mode 100644 index 0000000..ff13a4f --- /dev/null +++ b/patches/gcc/4.4.0/220-libiberty-pic.patch @@ -0,0 +1,11 @@ +diff -durN gcc-4.4.0.orig/libiberty/Makefile.in gcc-4.4.0/libiberty/Makefile.in +--- gcc-4.4.0.orig/libiberty/Makefile.in 2008-10-22 15:30:19.000000000 +0200 ++++ gcc-4.4.0/libiberty/Makefile.in 2009-05-27 21:38:29.000000000 +0200 +@@ -227,6 +227,7 @@ + $(AR) $(AR_FLAGS) $(TARGETLIB) \ + $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ + $(RANLIB) $(TARGETLIB); \ ++ cp $(TARGETLIB) ../ ; \ + cd ..; \ + else true; fi + diff --git a/patches/gcc/4.4.0/230-superh-default-multilib.patch b/patches/gcc/4.4.0/230-superh-default-multilib.patch new file mode 100644 index 0000000..7c719e8 --- /dev/null +++ b/patches/gcc/4.4.0/230-superh-default-multilib.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc +--- gcc-4.4.0.orig/gcc/config.gcc 2009-04-17 13:58:41.000000000 +0200 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:31.000000000 +0200 +@@ -2121,7 +2121,7 @@ + if test x${sh_multilibs} = x ; then + case ${target} in + sh64-superh-linux* | \ +- sh[1234]*) sh_multilibs=${sh_cpu_target} ;; ++ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;; + sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;; + sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;; + sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;; diff --git a/patches/gcc/4.4.0/240-libstdc++-pic.patch b/patches/gcc/4.4.0/240-libstdc++-pic.patch new file mode 100644 index 0000000..b951dfc --- /dev/null +++ b/patches/gcc/4.4.0/240-libstdc++-pic.patch @@ -0,0 +1,53 @@ +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am gcc-4.4.0/libstdc++-v3/src/Makefile.am +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.am 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.am 2009-05-27 21:38:34.000000000 +0200 +@@ -351,6 +351,13 @@ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ + + ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Added bits to build debug library. + if GLIBCXX_BUILD_DEBUG + all-local: build_debug +diff -durN gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in gcc-4.4.0/libstdc++-v3/src/Makefile.in +--- gcc-4.4.0.orig/libstdc++-v3/src/Makefile.in 2009-01-17 03:03:25.000000000 +0100 ++++ gcc-4.4.0/libstdc++-v3/src/Makefile.in 2009-05-27 21:38:34.000000000 +0200 +@@ -726,7 +726,7 @@ + + install-data-am: install-data-local + +-install-exec-am: install-toolexeclibLTLIBRARIES ++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local + + install-info: install-info-am + +@@ -765,7 +765,7 @@ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ +- uninstall-toolexeclibLTLIBRARIES ++ uninstall-toolexeclibLTLIBRARIES install-exec-local + + + # Symbol versioning for shared libraries. +@@ -942,6 +942,14 @@ + install_debug: + (cd ${debugdir} && $(MAKE) \ + toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ++ ++install-exec-local: ++ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \ ++ if [ x"$$pic_objs" != x ]; then \ ++ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \ ++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \ ++ fi ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch b/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch new file mode 100644 index 0000000..9b80e6c --- /dev/null +++ b/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch @@ -0,0 +1,79 @@ +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.4.0/gcc/config/ia64/crtbegin.asm +--- gcc-4.4.0.orig/gcc/config/ia64/crtbegin.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/ia64/crtbegin.asm 2009-05-27 21:38:37.000000000 +0200 +@@ -252,3 +252,7 @@ + .weak __cxa_finalize + #endif + .weak _Jv_RegisterClasses ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtend.asm gcc-4.4.0/gcc/config/ia64/crtend.asm +--- gcc-4.4.0.orig/gcc/config/ia64/crtend.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/ia64/crtend.asm 2009-05-27 21:38:37.000000000 +0200 +@@ -119,3 +119,7 @@ + + br.ret.sptk.many rp + .endp __do_global_ctors_aux ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crti.asm gcc-4.4.0/gcc/config/ia64/crti.asm +--- gcc-4.4.0.orig/gcc/config/ia64/crti.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/ia64/crti.asm 2009-05-27 21:38:37.000000000 +0200 +@@ -51,3 +51,7 @@ + .body + + # end of crti.asm ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.0.orig/gcc/config/ia64/crtn.asm gcc-4.4.0/gcc/config/ia64/crtn.asm +--- gcc-4.4.0.orig/gcc/config/ia64/crtn.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/ia64/crtn.asm 2009-05-27 21:38:37.000000000 +0200 +@@ -41,3 +41,7 @@ + br.ret.sptk.many b0 + + # end of crtn.asm ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.4.0/gcc/config/ia64/lib1funcs.asm +--- gcc-4.4.0.orig/gcc/config/ia64/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/ia64/lib1funcs.asm 2009-05-27 21:38:37.000000000 +0200 +@@ -793,3 +793,7 @@ + .endp __floattitf + #endif + #endif ++ ++#ifdef __linux__ ++.section .note.GNU-stack; .previous ++#endif +diff -durN gcc-4.4.0.orig/gcc/config/ia64/linux.h gcc-4.4.0/gcc/config/ia64/linux.h +--- gcc-4.4.0.orig/gcc/config/ia64/linux.h 2009-02-12 17:30:53.000000000 +0100 ++++ gcc-4.4.0/gcc/config/ia64/linux.h 2009-05-27 21:38:37.000000000 +0200 +@@ -5,6 +5,8 @@ + + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux"); + ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack ++ + /* This is for -profile to use -lc_p instead of -lc. */ + #undef CC1_SPEC + #define CC1_SPEC "%{profile:-p} %{G*}" +diff -durN gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.4.0/gcc/config/rs6000/ppc-asm.h +--- gcc-4.4.0.orig/gcc/config/rs6000/ppc-asm.h 2008-10-13 17:44:26.000000000 +0200 ++++ gcc-4.4.0/gcc/config/rs6000/ppc-asm.h 2009-05-27 21:38:37.000000000 +0200 +@@ -172,7 +172,7 @@ + .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name) + #endif + +-#if defined __linux__ && !defined __powerpc64__ ++#if defined __linux__ + .section .note.GNU-stack + .previous + #endif diff --git a/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch b/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch new file mode 100644 index 0000000..62af2c9 --- /dev/null +++ b/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch @@ -0,0 +1,25 @@ +diff -durN gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm gcc-4.4.0/gcc/config/sh/lib1funcs.asm +--- gcc-4.4.0.orig/gcc/config/sh/lib1funcs.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/sh/lib1funcs.asm 2009-05-27 21:38:39.000000000 +0200 +@@ -30,6 +30,11 @@ + !! recoded in assembly by Toshiyasu Morita + !! tm@netcom.com + ++#if defined(__ELF__) && defined(__linux__) ++.section .note.GNU-stack,"",%progbits ++.previous ++#endif ++ + /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and + ELF local label prefixes by J"orn Rennecke + amylaar@cygnus.com */ +diff -durN gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm gcc-4.4.0/gcc/config/sh/linux-atomic.asm +--- gcc-4.4.0.orig/gcc/config/sh/linux-atomic.asm 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/sh/linux-atomic.asm 2009-05-27 21:38:39.000000000 +0200 +@@ -136,3 +136,6 @@ + ATOMIC_FETCH_AND_COMBOP(nand,and,not,4,l,mov) + + #endif /* ! __SH5__ */ ++ ++.section .note.GNU-stack,"",%progbits ++.previous diff --git a/patches/gcc/4.4.0/270-sh-pr24836.patch b/patches/gcc/4.4.0/270-sh-pr24836.patch new file mode 100644 index 0000000..3c745ab --- /dev/null +++ b/patches/gcc/4.4.0/270-sh-pr24836.patch @@ -0,0 +1,24 @@ +diff -durN gcc-4.4.0.orig/gcc/configure gcc-4.4.0/gcc/configure +--- gcc-4.4.0.orig/gcc/configure 2009-05-27 21:38:08.000000000 +0200 ++++ gcc-4.4.0/gcc/configure 2009-05-27 21:38:42.000000000 +0200 +@@ -22205,7 +22205,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 +diff -durN gcc-4.4.0.orig/gcc/configure.ac gcc-4.4.0/gcc/configure.ac +--- gcc-4.4.0.orig/gcc/configure.ac 2009-05-27 21:38:08.000000000 +0200 ++++ gcc-4.4.0/gcc/configure.ac 2009-05-27 21:38:42.000000000 +0200 +@@ -2673,7 +2673,7 @@ + tls_first_minor=14 + tls_as_opt="-m64 -Aesame --fatal-warnings" + ;; +- sh-*-* | sh[34]-*-*) ++ sh-*-* | sh[34]*-*-*) + conftest_s=' + .section ".tdata","awT",@progbits + foo: .long 25 diff --git a/patches/gcc/4.4.0/280-freebsd.patch b/patches/gcc/4.4.0/280-freebsd.patch new file mode 100644 index 0000000..39d9d0b --- /dev/null +++ b/patches/gcc/4.4.0/280-freebsd.patch @@ -0,0 +1,94 @@ +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:45.000000000 +0200 +@@ -61,6 +61,8 @@ + builtin_assert ("system=unix"); \ + builtin_assert ("system=bsd"); \ + builtin_assert ("system=FreeBSD"); \ ++ if(!(flag_iso && (c_dialect_cxx () ? cxx_dialect == cxx98 : !flag_isoc99))) \ ++ builtin_define("_LONGLONG"); \ + FBSD_TARGET_CPU_CPP_BUILTINS(); \ + } \ + while (0) +diff -durN gcc-4.4.0.orig/gcc/config/t-freebsd-eh gcc-4.4.0/gcc/config/t-freebsd-eh +--- gcc-4.4.0.orig/gcc/config/t-freebsd-eh 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.4.0/gcc/config/t-freebsd-eh 2009-05-27 21:38:45.000000000 +0200 +@@ -0,0 +1,4 @@ ++# Use unwind-dw2-fde-glibc ++LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ ++ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c ++LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c +diff -durN gcc-4.4.0.orig/gcc/config.gcc gcc-4.4.0/gcc/config.gcc +--- gcc-4.4.0.orig/gcc/config.gcc 2009-05-27 21:38:34.000000000 +0200 ++++ gcc-4.4.0/gcc/config.gcc 2009-05-27 21:38:45.000000000 +0200 +@@ -456,7 +456,7 @@ + # pleases around the provided core setting. + gas=yes + gnu_ld=yes +- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o" + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}" + tmake_file="t-slibgcc-elf-ver t-freebsd" +@@ -1042,6 +1042,10 @@ + ;; + i[34567]86-*-freebsd*) + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/freebsd.h" ++ fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` ++ if test ${fbsd_major} -ge 7; then ++ tmake_file="${tmake_file} t-freebsd-eh" ++ fi + ;; + x86_64-*-freebsd*) + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h" +diff -durN gcc-4.4.0.orig/gcc/crtstuff.c gcc-4.4.0/gcc/crtstuff.c +--- gcc-4.4.0.orig/gcc/crtstuff.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/crtstuff.c 2009-05-27 21:38:45.000000000 +0200 +@@ -85,13 +85,15 @@ + && !defined(OBJECT_FORMAT_FLAT) \ + && defined(HAVE_LD_EH_FRAME_HDR) \ + && !defined(inhibit_libc) && !defined(CRTSTUFFT_O) \ +- && defined(__GLIBC__) && __GLIBC__ >= 2 ++ && ((defined(__GLIBC__) && __GLIBC__ >= 2) \ ++ || (defined(__FreeBSD_version) && __FreeBSD_version >= 700022)) + #include + /* uClibc pretends to be glibc 2.2 and DT_CONFIG is defined in its link.h. + But it doesn't use PT_GNU_EH_FRAME ELF segment currently. */ + # if !defined(__UCLIBC__) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) ++ || (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ ++ || (__FreeBSD_version >= 700022) + # define USE_PT_GNU_EH_FRAME + # endif + #endif +diff -durN gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c +--- gcc-4.4.0.orig/gcc/unwind-dw2-fde-glibc.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/gcc/unwind-dw2-fde-glibc.c 2009-05-27 21:38:45.000000000 +0200 +@@ -46,8 +46,9 @@ + #include "gthr.h" + + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) ++ && ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ ++ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \ ++ || (__FreeBSD_version >= 700022 )) + + #ifndef __RELOC_POINTER + # define __RELOC_POINTER(ptr, base) ((ptr) + (base)) +@@ -63,6 +64,13 @@ + #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) + #endif + ++/* Support FreeBSD */ ++#ifndef ElfW ++# ifdef __ElfN ++# define ElfW __ElfN ++# endif ++#endif ++ + struct unw_eh_callback_data + { + _Unwind_Ptr pc; diff --git a/patches/gcc/4.4.0/290-freebsd.patch b/patches/gcc/4.4.0/290-freebsd.patch new file mode 100644 index 0000000..ad1564b --- /dev/null +++ b/patches/gcc/4.4.0/290-freebsd.patch @@ -0,0 +1,64 @@ +diff -durN gcc-4.4.0.orig/gcc/config/freebsd-spec.h gcc-4.4.0/gcc/config/freebsd-spec.h +--- gcc-4.4.0.orig/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200 ++++ gcc-4.4.0/gcc/config/freebsd-spec.h 2009-05-27 21:38:47.000000000 +0200 +@@ -86,9 +86,10 @@ + #define FBSD_STARTFILE_SPEC \ + "%{!shared: \ + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ +- %{!p:%{profile:gcrt1.o%s} \ +- %{!profile:crt1.o%s}}}} \ +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" ++ %{!p:%{profile:gcrt1.o%s} \ ++ %{!profile:crt1.o%s}}}} \ ++ crti.o%s \ ++ %{static:crtbeginT.o%s;shared:crtbeginS.o%s;:crtbegin.o%s}" + + /* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on + the magical crtend.o file (see crtstuff.c) which provides part of +@@ -126,7 +127,8 @@ + %{pg: -lc_p} \ + }" + #else +-#if FBSD_MAJOR < 5 ++#include ++#if __FreeBSD_version < 500016 + #define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: \ +@@ -136,17 +138,34 @@ + %{!pthread:-lc_p} \ + %{pthread:-lc_r_p}} \ + }" +-#else ++#elif __FreeBSD_version < 700022 + #define FBSD_LIB_SPEC " \ + %{!shared: \ + %{!pg: %{pthread:-lpthread} -lc} \ + %{pg: %{pthread:-lpthread_p} -lc_p} \ + }" ++#else ++#define FBSD_LIB_SPEC " \ ++ %{!shared: \ ++ %{!pg: %{pthread:-lpthread} -lc} \ ++ %{pg: %{pthread:-lpthread_p} -lc_p}} \ ++ %{shared: \ ++ %{pthread:-lpthread} -lc} \ ++ " + #endif + #endif + +-#if FBSD_MAJOR < 6 ++#if FBSD_MAJOR < 5 + #define FBSD_DYNAMIC_LINKER "/usr/libexec/ld-elf.so.1" + #else + #define FBSD_DYNAMIC_LINKER "/libexec/ld-elf.so.1" + #endif ++ ++#if defined(HAVE_LD_EH_FRAME_HDR) ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " ++#endif ++ ++/* Use --as-needed -lgcc_s for eh support. */ ++#ifdef HAVE_LD_AS_NEEDED ++#define USE_LD_AS_NEEDED 1 ++#endif diff --git a/patches/gcc/4.4.0/300-pr40105.patch b/patches/gcc/4.4.0/300-pr40105.patch new file mode 100644 index 0000000..1acbad6 --- /dev/null +++ b/patches/gcc/4.4.0/300-pr40105.patch @@ -0,0 +1,180 @@ +diff -durN gcc-4.4.0.orig/gcc/Makefile.in gcc-4.4.0/gcc/Makefile.in +--- gcc-4.4.0.orig/gcc/Makefile.in 2009-03-25 13:00:32.000000000 +0100 ++++ gcc-4.4.0/gcc/Makefile.in 2009-05-27 21:38:50.000000000 +0200 +@@ -2785,7 +2785,8 @@ + value-prof.h $(TREE_INLINE_H) $(TARGET_H) + cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ + $(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \ +- output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \ ++ output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) $(INSN_ATTR_H) \ ++ insn-config.h $(EXPR_H) \ + $(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \ + tree-pass.h $(DF_H) $(GGC_H) + cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ +diff -durN gcc-4.4.0.orig/gcc/cfgrtl.c gcc-4.4.0/gcc/cfgrtl.c +--- gcc-4.4.0.orig/gcc/cfgrtl.c 2008-12-12 22:16:09.000000000 +0100 ++++ gcc-4.4.0/gcc/cfgrtl.c 2009-05-27 21:38:50.000000000 +0200 +@@ -53,6 +53,7 @@ + #include "toplev.h" + #include "tm_p.h" + #include "obstack.h" ++#include "insn-attr.h" + #include "insn-config.h" + #include "cfglayout.h" + #include "expr.h" +@@ -427,13 +428,27 @@ + return 0; + } + ++static unsigned int ++rest_of_pass_free_cfg (void) ++{ ++#ifdef DELAY_SLOTS ++ /* The resource.c machinery uses DF but the CFG isn't guaranteed to be ++ valid at that point so it would be too late to call df_analyze. */ ++ if (optimize > 0 && flag_delayed_branch) ++ df_analyze (); ++#endif ++ ++ free_bb_for_insn (); ++ return 0; ++} ++ + struct rtl_opt_pass pass_free_cfg = + { + { + RTL_PASS, + NULL, /* name */ + NULL, /* gate */ +- free_bb_for_insn, /* execute */ ++ rest_of_pass_free_cfg, /* execute */ + NULL, /* sub */ + NULL, /* next */ + 0, /* static_pass_number */ +diff -durN gcc-4.4.0.orig/gcc/resource.c gcc-4.4.0/gcc/resource.c +--- gcc-4.4.0.orig/gcc/resource.c 2009-02-20 16:20:38.000000000 +0100 ++++ gcc-4.4.0/gcc/resource.c 2009-05-27 21:38:50.000000000 +0200 +@@ -135,8 +135,6 @@ + static int + find_basic_block (rtx insn, int search_limit) + { +- basic_block bb; +- + /* Scan backwards to the previous BARRIER. Then see if we can find a + label that starts a basic block. Return the basic block number. */ + for (insn = prev_nonnote_insn (insn); +@@ -157,11 +155,8 @@ + for (insn = next_nonnote_insn (insn); + insn && LABEL_P (insn); + insn = next_nonnote_insn (insn)) +- { +- FOR_EACH_BB (bb) +- if (insn == BB_HEAD (bb)) +- return bb->index; +- } ++ if (BLOCK_FOR_INSN (insn)) ++ return BLOCK_FOR_INSN (insn)->index; + + return -1; + } +@@ -848,13 +843,12 @@ + (with no intervening active insns) to see if any of them start a basic + block. If we hit the start of the function first, we use block 0. + +- Once we have found a basic block and a corresponding first insns, we can +- accurately compute the live status from basic_block_live_regs and +- reg_renumber. (By starting at a label following a BARRIER, we are immune +- to actions taken by reload and jump.) Then we scan all insns between +- that point and our target. For each CLOBBER (or for call-clobbered regs +- when we pass a CALL_INSN), mark the appropriate registers are dead. For +- a SET, mark them as live. ++ Once we have found a basic block and a corresponding first insn, we can ++ accurately compute the live status (by starting at a label following a ++ BARRIER, we are immune to actions taken by reload and jump.) Then we ++ scan all insns between that point and our target. For each CLOBBER (or ++ for call-clobbered regs when we pass a CALL_INSN), mark the appropriate ++ registers are dead. For a SET, mark them as live. + + We have to be careful when using REG_DEAD notes because they are not + updated by such things as find_equiv_reg. So keep track of registers +@@ -954,13 +948,10 @@ + TARGET. Otherwise, we must assume everything is live. */ + if (b != -1) + { +- regset regs_live = DF_LR_IN (BASIC_BLOCK (b)); ++ regset regs_live = df_get_live_in (BASIC_BLOCK (b)); + rtx start_insn, stop_insn; + +- /* Compute hard regs live at start of block -- this is the real hard regs +- marked live, plus live pseudo regs that have been renumbered to +- hard regs. */ +- ++ /* Compute hard regs live at start of block. */ + REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live); + + /* Get starting and ending insn, handling the case where each might +@@ -1046,10 +1037,24 @@ + + else if (LABEL_P (real_insn)) + { ++ basic_block bb; ++ + /* A label clobbers the pending dead registers since neither + reload nor jump will propagate a value across a label. */ + AND_COMPL_HARD_REG_SET (current_live_regs, pending_dead_regs); + CLEAR_HARD_REG_SET (pending_dead_regs); ++ ++ /* We must conservatively assume that all registers that used ++ to be live here still are. The fallthrough edge may have ++ left a live register uninitialized. */ ++ bb = BLOCK_FOR_INSN (real_insn); ++ if (bb) ++ { ++ HARD_REG_SET extra_live; ++ ++ REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb)); ++ IOR_HARD_REG_SET (current_live_regs, extra_live); ++ } + } + + /* The beginning of the epilogue corresponds to the end of the +@@ -1121,6 +1126,7 @@ + init_resource_info (rtx epilogue_insn) + { + int i; ++ basic_block bb; + + /* Indicate what resources are required to be valid at the end of the current + function. The condition code never is and memory always is. If the +@@ -1189,6 +1195,11 @@ + /* Allocate and initialize the tables used by mark_target_live_regs. */ + target_hash_table = XCNEWVEC (struct target_info *, TARGET_HASH_PRIME); + bb_ticks = XCNEWVEC (int, last_basic_block); ++ ++ /* Set the BLOCK_FOR_INSN of each label that starts a basic block. */ ++ FOR_EACH_BB (bb) ++ if (LABEL_P (BB_HEAD (bb))) ++ BLOCK_FOR_INSN (BB_HEAD (bb)) = bb; + } + + /* Free up the resources allocated to mark_target_live_regs (). This +@@ -1197,6 +1208,8 @@ + void + free_resource_info (void) + { ++ basic_block bb; ++ + if (target_hash_table != NULL) + { + int i; +@@ -1222,6 +1235,10 @@ + free (bb_ticks); + bb_ticks = NULL; + } ++ ++ FOR_EACH_BB (bb) ++ if (LABEL_P (BB_HEAD (bb))) ++ BLOCK_FOR_INSN (BB_HEAD (bb)) = NULL; + } + + /* Clear any hashed information that we have stored for INSN. */ diff --git a/patches/gcc/4.4.0/310-uclibc-conf.patch b/patches/gcc/4.4.0/310-uclibc-conf.patch new file mode 100644 index 0000000..e3f3b91 --- /dev/null +++ b/patches/gcc/4.4.0/310-uclibc-conf.patch @@ -0,0 +1,35 @@ +diff -durN gcc-4.4.0.orig/contrib/regression/objs-gcc.sh gcc-4.4.0/contrib/regression/objs-gcc.sh +--- gcc-4.4.0.orig/contrib/regression/objs-gcc.sh 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/contrib/regression/objs-gcc.sh 2009-05-27 21:38:53.000000000 +0200 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 +diff -durN gcc-4.4.0.orig/libjava/classpath/ltconfig gcc-4.4.0/libjava/classpath/ltconfig +--- gcc-4.4.0.orig/libjava/classpath/ltconfig 2007-06-04 01:18:43.000000000 +0200 ++++ gcc-4.4.0/libjava/classpath/ltconfig 2009-05-27 21:38:53.000000000 +0200 +@@ -603,7 +603,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in +-linux-gnu*) ;; ++linux-gnu*|linux-uclibc*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac + +@@ -1251,7 +1251,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux*) + version_type=linux + need_lib_prefix=no + need_version=no diff --git a/patches/gcc/4.4.0/320-missing-execinfo_h.patch b/patches/gcc/4.4.0/320-missing-execinfo_h.patch new file mode 100644 index 0000000..009335e --- /dev/null +++ b/patches/gcc/4.4.0/320-missing-execinfo_h.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.0.orig/boehm-gc/include/gc.h gcc-4.4.0/boehm-gc/include/gc.h +--- gcc-4.4.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.4.0/boehm-gc/include/gc.h 2009-05-27 21:38:55.000000000 +0200 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/patches/gcc/4.4.0/330-c99-snprintf.patch b/patches/gcc/4.4.0/330-c99-snprintf.patch new file mode 100644 index 0000000..4928f4b --- /dev/null +++ b/patches/gcc/4.4.0/330-c99-snprintf.patch @@ -0,0 +1,12 @@ +diff -durN gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio gcc-4.4.0/libstdc++-v3/include/c_global/cstdio +--- gcc-4.4.0.orig/libstdc++-v3/include/c_global/cstdio 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/libstdc++-v3/include/c_global/cstdio 2009-05-27 21:38:58.000000000 +0200 +@@ -139,7 +139,7 @@ + + _GLIBCXX_END_NAMESPACE + +-#if _GLIBCXX_USE_C99 ++#if _GLIBCXX_USE_C99 || defined __UCLIBC__ + + #undef snprintf + #undef vfscanf diff --git a/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch b/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000..f3a4e32 --- /dev/null +++ b/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch @@ -0,0 +1,48 @@ +diff -durN gcc-4.4.0.orig/libmudflap/mf-hooks2.c gcc-4.4.0/libmudflap/mf-hooks2.c +--- gcc-4.4.0.orig/libmudflap/mf-hooks2.c 2009-04-10 01:23:07.000000000 +0200 ++++ gcc-4.4.0/libmudflap/mf-hooks2.c 2009-05-27 21:39:00.000000000 +0200 +@@ -421,7 +421,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -431,7 +431,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -441,7 +441,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -450,7 +450,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -459,7 +459,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 17bedf7..15dc5a5 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -132,12 +132,20 @@ do_cc_core() { extra_config="${extra_config} ${CT_ARCH_WITH_TUNE}" extra_config="${extra_config} ${CT_ARCH_WITH_FPU}" extra_config="${extra_config} ${CT_ARCH_WITH_FLOAT}" - [ "${CT_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then extra_config="${extra_config} --enable-__cxa_atexit" else extra_config="${extra_config} --disable-__cxa_atexit" fi + if [ "${CT_GMP_MPFR}" = "y" ]; then + extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR}" + extra_config="${extra_config} --with-mpfr=${CT_PREFIX_DIR}" + fi + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then + extra_config="${extra_config} --with-ppl=${CT_PREFIX_DIR}" + extra_config="${extra_config} --with-cloog=${CT_PREFIX_DIR}" + extra_config="${extra_config} --with-mpc=${CT_PREFIX_DIR}" + fi CT_DoLog DEBUG "Extra config passed: '${extra_config}'" @@ -266,7 +274,6 @@ do_cc() { extra_config="${extra_config} ${CT_ARCH_WITH_FPU}" extra_config="${extra_config} ${CT_ARCH_WITH_FLOAT}" [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared" - [ "${CT_GMP_MPFR}" = "y" ] && extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" [ -n "${CT_CC_PKGVERSION}" ] && extra_config="${extra_config} --with-pkgversion=${CT_CC_PKGVERSION}" [ -n "${CT_CC_BUGURL}" ] && extra_config="${extra_config} --with-bugurl=${CT_CC_BUGURL}" [ "${CT_CC_SJLJ_EXCEPTIONS_USE}" = "y" ] && extra_config="${extra_config} --enable-sjlj-exceptions" @@ -276,6 +283,15 @@ do_cc() { else extra_config="${extra_config} --disable-__cxa_atexit" fi + if [ "${CT_GMP_MPFR}" = "y" ]; then + extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR}" + extra_config="${extra_config} --with-mpfr=${CT_PREFIX_DIR}" + fi + if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then + extra_config="${extra_config} --with-ppl=${CT_PREFIX_DIR}" + extra_config="${extra_config} --with-cloog=${CT_PREFIX_DIR}" + extra_config="${extra_config} --with-mpc=${CT_PREFIX_DIR}" + fi CT_DoLog DEBUG "Extra config passed: '${extra_config}'" -- cgit v0.10.2-6-g49f6 From 37f6f7ec43559aff5b6b514a0f01cc9671ba872b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 1 Jun 2009 09:23:23 +0000 Subject: /devel/gcc-4.4: - make glibc-2.9 build with gcc-4.4.0. -------- diffstat follows -------- /devel/gcc-4.4/patches/glibc/2.9/570-debug-readlink_chk-readklinkat_chk.patch | 24 24 0 0 ++++++++++ /devel/gcc-4.4/patches/glibc/2.9/560-syslog.patch | 12 12 0 0 +++++ 2 files changed, 36 insertions(+) diff --git a/patches/glibc/2.9/560-syslog.patch b/patches/glibc/2.9/560-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/patches/glibc/2.9/560-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/patches/glibc/2.9/570-debug-readlink_chk-readklinkat_chk.patch b/patches/glibc/2.9/570-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/patches/glibc/2.9/570-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) -- cgit v0.10.2-6-g49f6 From 5b6ee5d9a79177cc55da8391a3ac434b4d51fc7a Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 1 Jun 2009 11:34:57 +0000 Subject: /devel/gcc-4.4: - fix buildging glibc in // -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/libc/glibc.sh | 25 17 8 0 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 3fcda91..9af0135 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -172,6 +172,7 @@ do_libc_headers() { CT_DoExecLog ALL \ make CFLAGS="-O -DBOOTSTRAP_GCC" \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" \ sysdeps/gnu/errlist.c mkdir -p stdio-common @@ -189,6 +190,7 @@ do_libc_headers() { CFLAGS="-O -DBOOTSTRAP_GCC" \ ${LIBC_SYSROOT_ARG} \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" \ install-headers # Two headers -- stubs.h and features.h -- aren't installed by install-headers, @@ -331,11 +333,12 @@ do_libc_start_files() { ${extra_config} \ ${CT_LIBC_GLIBC_EXTRA_CONFIG} - #TODO: should check whether slibdir has been set in configparms to */lib64 # and copy the startfiles into the appropriate libdir. CT_DoLog EXTRA "Building C library start files" - CT_DoExecLog ALL make OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" csu/subdir_lib + CT_DoExecLog ALL make OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" \ + csu/subdir_lib CT_DoLog EXTRA "Installing C library start files" if [ "${CT_USE_SYSROOT}" = "y" ]; then @@ -499,18 +502,19 @@ do_libc() { # then you need to set the KERNELCONFIG variable to point to a .config file for this arch. # The following architectures are known to need kernel .config: alpha, arm, ia64, s390, sh, sparc # Note: LD and RANLIB needed by glibc-2.1.3's c_stub directory, at least on macosx - # No need for PARALLELMFLAGS here, Makefile already reads this environment variable CT_DoLog EXTRA "Building C library" CT_DoExecLog ALL make LD=${CT_TARGET}-ld \ - RANLIB=${CT_TARGET}-ranlib \ - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ - ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \ - ${GLIBC_INITIAL_BUILD_RULE} + RANLIB=${CT_TARGET}-ranlib \ + OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" \ + ${GLIBC_INITIAL_BUILD_RULE} CT_DoLog EXTRA "Installing C library" CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \ ${LIBC_SYSROOT_ARG} \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" \ ${GLIBC_INITIAL_INSTALL_RULE} # This doesn't seem to work when building a crosscompiler, @@ -553,7 +557,11 @@ do_libc_finish() { cd "${CT_BUILD_DIR}/build-libc" CT_DoLog EXTRA "Re-building C library" - CT_DoExecLog ALL make LD=${CT_TARGET}-ld RANLIB=${CT_TARGET}-ranlib + CT_DoExecLog ALL make LD=${CT_TARGET}-ld \ + RANLIB=${CT_TARGET}-ranlib \ + OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" CT_DoLog EXTRA "Installing missing C library components" # note: should do full install and then fix linker scripts, but this is faster @@ -561,6 +569,7 @@ do_libc_finish() { CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \ ${LIBC_SYSROOT_ARG} \ OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \ + PARALLELMFLAGS="${PARALLELMFLAGS}" \ install-${t} done -- cgit v0.10.2-6-g49f6 From 93e6bcb1c02a7fb30b39b9a0a11abf28a0ee0b69 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 1 Jun 2009 13:31:12 +0000 Subject: /devel/gcc-4.4: - fix building strace-4.5.18 -------- diffstat follows -------- /devel/gcc-4.4/patches/strace/4.5.18/180-arm-EABI-syscalls.patch | 23 23 0 0 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/patches/strace/4.5.18/180-arm-EABI-syscalls.patch b/patches/strace/4.5.18/180-arm-EABI-syscalls.patch new file mode 100644 index 0000000..1f28450 --- /dev/null +++ b/patches/strace/4.5.18/180-arm-EABI-syscalls.patch @@ -0,0 +1,23 @@ +Patch from upstream: +http://strace.cvs.sourceforge.net/viewvc/strace/strace/linux/arm/syscallent.h?r1=1.17&r2=1.18&sortby=file + +2008-11-13 Kirill A. Shutemov + + * linux/arm/syscallent.h: Fix build on ARM EABI which does not + provide syscalls socketcall and ipc. + +--- strace-4.5.18.orig/linux/arm/syscallent.h 2008/12/29 20:04:15 1.17 ++++ strace-4.5.18/linux/arm/syscallent.h 2009/01/01 23:20:38 1.18 +@@ -431,6 +431,7 @@ + { 5, 0, printargs, "SYS_398" }, /* 398 */ + { 5, 0, printargs, "SYS_399" }, /* 399 */ + ++#ifndef __ARM_EABI__ + #if SYS_socket_subcall != 400 + #error fix me + #endif +@@ -481,3 +482,4 @@ + { 4, TI, sys_shmdt, "shmdt" }, /* 440 */ + { 4, TI, sys_shmget, "shmget" }, /* 441 */ + { 4, TI, sys_shmctl, "shmctl" }, /* 442 */ ++#endif -- cgit v0.10.2-6-g49f6 From f05ecb83606c325eb7826a5a58457b5c3d34e9f0 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 1 Jun 2009 15:53:42 +0000 Subject: /devel/gcc-4.4: - PPL, CLooG/PPL: remove uselessly installed files. -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/ppl.sh | 3 3 0 0 +++ /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh | 3 3 0 0 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 5822633..93cd55c 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -54,6 +54,9 @@ do_cloog() { CT_DoLog EXTRA "Installing CLooG/ppl" CT_DoExecLog ALL make install + # Remove spuriously installed file + CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/cloog" + CT_EndStep } diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 686622f..4af080b 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -62,6 +62,9 @@ do_ppl() { CT_DoLog EXTRA "Installing PPL" CT_DoExecLog ALL make install + # Remove spuriously installed file + CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config" + CT_EndStep } -- cgit v0.10.2-6-g49f6 From 3e31171ceabc119523372da2825ad78efaa54fa4 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 1 Jun 2009 17:05:50 +0000 Subject: /devel/gcc-4.4: - just a slight menuconfig beautification in companion libraries menu -------- diffstat follows -------- /devel/gcc-4.4/config/companion_libs.in | 11 7 4 0 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/companion_libs.in b/config/companion_libs.in index 636ca94..1653215 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -46,12 +46,15 @@ source config/companion_libs/cloog.in source config/companion_libs/mpc.in endif -comment "Common companion libraries options" +config FOO + bool + +comment "Companion libraries common options" depends on GMP_MPFR || PPL_CLOOG_MPC config COMP_LIBS_CHECK bool - prompt "Check the companion libraries builds (!!! READ HELP!!!)" + prompt "| Check the companion libraries builds (!!! READ HELP!!!)" depends on GMP_MPFR || PPL_CLOOG_MPC default n help @@ -66,11 +69,11 @@ config COMP_LIBS_CHECK cause for incorrectly generated code, you should answer 'Y' here. Note however that this will take a really long time. For example, building PPL on my machine takes roughly 1'40", while checking it takes - about 1h30"... + about 1h40'... config COMP_LIBS_TARGET bool - prompt "Build companion libraries for the target" + prompt "| Build companion libraries for the target" depends on GMP_MPFR || PPL_CLOOG_MPC depends on ! BARE_METAL default n -- cgit v0.10.2-6-g49f6 From 1505eb762176e3a42ac41713edf27c8e408e75de Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 1 Jun 2009 18:03:23 +0000 Subject: /devel/gcc-4.4: - build shared CLooG/ppl and MPC libraries, don't build static ones. -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/companion_libs/mpc.sh | 4 2 2 0 ++-- /devel/gcc-4.4/scripts/build/companion_libs/cloog.sh | 4 2 2 0 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 93cd55c..0e6d74f 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -39,8 +39,8 @@ do_cloog() { --prefix="${CT_PREFIX_DIR}" \ --with-gmp="${CT_PREFIX_DIR}" \ --with-ppl="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --with-bits=gmp CT_DoLog EXTRA "Building CLooG/ppl" diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh index 335609f..18144a0 100644 --- a/scripts/build/companion_libs/mpc.sh +++ b/scripts/build/companion_libs/mpc.sh @@ -37,8 +37,8 @@ do_mpc() { --prefix="${CT_PREFIX_DIR}" \ --with-gmp="${CT_PREFIX_DIR}" \ --with-mpfr="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ CT_DoLog EXTRA "Building MPC" CT_DoExecLog ALL make ${PARALLELMFLAGS} -- cgit v0.10.2-6-g49f6 From d9ba421c7871e01dbc374d439cd5e6381fd0a8a3 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 2 Jun 2009 06:34:11 +0000 Subject: /devel/gcc-4.4: - populate.in: typo -------- diffstat follows -------- /devel/gcc-4.4/scripts/populate.in | 2 1 1 0 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/populate.in b/scripts/populate.in index e8a3718..53c764e 100644 --- a/scripts/populate.in +++ b/scripts/populate.in @@ -13,7 +13,7 @@ CT_SYSROOT_DIR="$(cd "${CT_BIN_DIR}/../@@CT_TARGET@@/sys-root"; pwd)" myname=$(basename "$0") -# Use the tols discovered by crosstool-NG's ./configure: +# Use the tools discovered by crosstool-NG's ./configure: install="@@CT_install@@" grep="@@CT_grep@@" sed="@@CT_sed@@" -- cgit v0.10.2-6-g49f6 From d9e898bdbc0828739425b25a6f23da198248f251 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 2 Jun 2009 17:33:04 +0000 Subject: /devel/gcc-4.4: - add a wrapper to correctly set LD_LIBRARY_PATH to find our companion libraries. -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/internals.sh | 19 19 0 0 +++++++++++++++++++ /devel/gcc-4.4/scripts/wrapper.in | 15 15 0 0 +++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index acaf864..51272e6 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -4,6 +4,8 @@ # un-wanted files, to add tuple aliases, and to add the final # crosstool-NG-provided files. do_finish() { + local _t + CT_DoStep INFO "Cleaning-up the toolchain's directory" CT_DoLog EXTRA "Removing access to the build system tools" @@ -39,6 +41,23 @@ do_finish() { done CT_Popd + # If using the companion libraries, we need a wrapper + # that will set LD_LIBRARY_PATH approriately + if [ "${CT_GMP_MPFR}" = "y" \ + -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then + CT_DoLog EXTRA "Installing toolchain wrappers" + CT_Pushd "${CT_PREFIX_DIR}/bin" + sed -r -e 's|@@CT_bash@@|'"${bash}"'|g;' \ + "${CT_LIB_DIR}/scripts/wrapper.in" \ + >".${CT_TARGET}-wrapper" + CT_DoExecLog ALL chmod 755 ".${CT_TARGET}-wrapper" + for t in "${CT_TARGET}-"*; do + CT_DoExecLog ALL mv "${t}" ".${t}" + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}" + done + CT_Popd + fi + # Remove the generated documentation files if [ "${CT_REMOVE_DOCS}" = "y" ]; then CT_DoLog EXTRA "Removing installed documentation" diff --git a/scripts/wrapper.in b/scripts/wrapper.in new file mode 100644 index 0000000..70cb5d3 --- /dev/null +++ b/scripts/wrapper.in @@ -0,0 +1,15 @@ +#!@@CT_bash@@ +# There are bashisms on the last line + +dirname="$(dirname "${0}")" +basename="$(basename "${0}")" + +ld_lib_path="$(dirname "${dirname}")/lib" + +case ":${LD_LIBRARY_PATH}:" in + *":${ld_lib_path}:"*) ;; + *) LD_LIBRARY_PATH="${ld_lib_path}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}";; +esac + +export LD_LIBRARY_PATH +exec -a "${basename}" "${dirname}/.${basename}" "$@" -- cgit v0.10.2-6-g49f6 From a07693b13cd0741fe0de2d6756a7a3c680f3f689 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 2 Jun 2009 21:01:19 +0000 Subject: /devel/gcc-4.4: - ./configure: check for 'stat', needing to install the tools wrapper - wrapper: make it a POSIX-compliant script, restore relocatability - don't install the wrapper for symlinks -------- diffstat follows -------- /devel/gcc-4.4/configure | 1 1 0 0 + /devel/gcc-4.4/scripts/build/internals.sh | 22 16 6 0 ++++++++++++++++------ /devel/gcc-4.4/scripts/wrapper.in | 5 2 3 0 ++--- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 518a3db..a43eb66 100755 --- a/configure +++ b/configure @@ -337,6 +337,7 @@ has_or_abort prog=automake has_or_abort prog=libtool \ ver='\(GNU libtool.*\) (2[[:digit:]]*\.|1\.6[[:digit:]]*\.|1\.5\.[2-9][[:digit:]]+)' \ err="'libtool' 1.5.26 or above was not found" +has_or_abort prog=stat ver='GNU coreutils' has_or_abort prog="curl wget" has_or_abort prog=cvs has_or_abort prog=patch diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index 51272e6..b8a80f2 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -47,14 +47,24 @@ do_finish() { -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then CT_DoLog EXTRA "Installing toolchain wrappers" CT_Pushd "${CT_PREFIX_DIR}/bin" - sed -r -e 's|@@CT_bash@@|'"${bash}"'|g;' \ - "${CT_LIB_DIR}/scripts/wrapper.in" \ - >".${CT_TARGET}-wrapper" - CT_DoExecLog ALL chmod 755 ".${CT_TARGET}-wrapper" + + # Copy the wrapper + CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/wrapper.in" \ + ".${CT_TARGET}-wrapper" + + # Replace every tools with the wrapper + # Do it unconditionally, even for those tools that happen to be shell + # scripts, we don't know if they would in the end spawn a binary... + # Just skip symlinks for t in "${CT_TARGET}-"*; do - CT_DoExecLog ALL mv "${t}" ".${t}" - CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}" + if [ "$( LANG=C stat -c '%F' "${t}" )" != "symbolic link" ]; then + CT_DoExecLog ALL mv "${t}" ".${t}" + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}" + fi done + + # Get rid of the wrapper, we're using hardlinks + CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper" CT_Popd fi diff --git a/scripts/wrapper.in b/scripts/wrapper.in index 70cb5d3..6222333 100644 --- a/scripts/wrapper.in +++ b/scripts/wrapper.in @@ -1,5 +1,4 @@ -#!@@CT_bash@@ -# There are bashisms on the last line +#!/bin/sh dirname="$(dirname "${0}")" basename="$(basename "${0}")" @@ -12,4 +11,4 @@ case ":${LD_LIBRARY_PATH}:" in esac export LD_LIBRARY_PATH -exec -a "${basename}" "${dirname}/.${basename}" "$@" +exec "${dirname}/.${basename}" "$@" -- cgit v0.10.2-6-g49f6 From ae0b568200e899f648c97edf64693d351ad9f5d9 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 2 Jun 2009 21:34:26 +0000 Subject: /devel/gcc-4.4: - TODO: remove completed items -------- diffstat follows -------- /devel/gcc-4.4/TODO | 6 1 5 0 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TODO b/TODO index cafd8a8..eadfc09 100644 --- a/TODO +++ b/TODO @@ -5,11 +5,7 @@ Recuring tasks: - update versions for every tools... - -Non-recurring: - -- gcc-4.4 - - check that the patchset from 4.3.3 still applies +Non-recurring tasks: - uClinux -- cgit v0.10.2-6-g49f6 From 75910da109c61b5bb589f3154ba322b2c9dee0a4 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 2 Jun 2009 21:36:25 +0000 Subject: /devel/gcc-4.4: - add first sample using gcc-4.4 -------- diffstat follows -------- /devel/gcc-4.4/samples/arm-cortex_a8-linux-gnueabi/crosstool.config | 852 852 0 0 +++++++++++++++++++ /devel/gcc-4.4/samples/arm-cortex_a8-linux-gnueabi/reported.by | 6 6 0 0 + 2 files changed, 858 insertions(+) diff --git a/samples/arm-cortex_a8-linux-gnueabi/crosstool.config b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config new file mode 100644 index 0000000..75f5264 --- /dev/null +++ b/samples/arm-cortex_a8-linux-gnueabi/crosstool.config @@ -0,0 +1,426 @@ +# +# Automatically generated make config: don't edit +# crosstool-NG version: svn_devel_gcc-4.4@1589 +# Tue Jun 2 23:13:19 2009 +# + +# +# Paths and misc options +# + +# +# crosstool-NG behavior +# +# CT_OBSOLETE is not set +CT_EXPERIMENTAL=y +# CT_DEBUG_CT is not set + +# +# Paths +# +CT_LOCAL_TARBALLS_DIR="${HOME}/src" +CT_SAVE_TARBALLS=y +CT_WORK_DIR="${CT_TOP_DIR}/targets" +CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}" +CT_INSTALL_DIR="${CT_PREFIX_DIR}" +# CT_CUSTOM_PATCH is not set +CT_REMOVE_DOCS=y +CT_INSTALL_DIR_RO=y + +# +# Downloading +# +# CT_FORBID_DOWNLOAD is not set +# CT_FORCE_DOWNLOAD is not set +# CT_USE_MIRROR is not set +CT_CONNECT_TIMEOUT=10 +# CT_ONLY_DOWNLOAD is not set + +# +# Extracting +# +# CT_FORCE_EXTRACT is not set +CT_OVERIDE_CONFIG_GUESS_SUB=y +# CT_ONLY_EXTRACT is not set + +# +# Build behavior +# +CT_PARALLEL_JOBS=1 +CT_LOAD=0 +CT_NICE=0 +CT_USE_PIPES=y +# CT_CONFIG_SHELL_ASH is not set + +# +# Logging +# +# CT_LOG_ERROR is not set +# CT_LOG_WARN is not set +# CT_LOG_INFO is not set +CT_LOG_EXTRA=y +# CT_LOG_DEBUG is not set +# CT_LOG_ALL is not set +CT_LOG_LEVEL_MAX="EXTRA" +# CT_LOG_SEE_TOOLS_WARN is not set +CT_LOG_PROGRESS_BAR=y +CT_LOG_TO_FILE=y +CT_LOG_FILE_COMPRESS=y + +# +# Target options +# +CT_ARCH="arm" +# CT_ARCH_64 is not set +# CT_ARCH_SUPPORTS_BOTH_MMU is not set +CT_ARCH_SUPPORTS_BOTH_ENDIAN=y +CT_ARCH_SUPPORT_ARCH=y +# CT_ARCH_SUPPORT_ABI is not set +CT_ARCH_SUPPORT_CPU=y +CT_ARCH_SUPPORT_TUNE=y +CT_ARCH_SUPPORT_FPU=y +# CT_ARCH_DEFAULT_HAS_MMU is not set +# CT_ARCH_DEFAULT_BE is not set +CT_ARCH_DEFAULT_LE=y +CT_ARCH_ARCH="armv7-a" +CT_ARCH_CPU="cortex-a8" +CT_ARCH_TUNE="cortex-a8" +CT_ARCH_FPU="" +# CT_ARCH_BE is not set +CT_ARCH_LE=y +# CT_ARCH_FLOAT_HW is not set +CT_ARCH_FLOAT_SW=y +CT_TARGET_CFLAGS="" +CT_TARGET_LDFLAGS="" + +# +# General target options +# +# CT_ARCH_alpha is not set +CT_ARCH_arm=y +# CT_ARCH_ia64 is not set +# CT_ARCH_mips is not set +# CT_ARCH_powerpc is not set +# CT_ARCH_powerpc64 is not set +# CT_ARCH_sh is not set +# CT_ARCH_x86 is not set +# CT_ARCH_x86_64 is not set +CT_ARCH_ARM_EABI=y +CT_ARCH_USE_MMU=y + +# +# Target optimisations +# + +# +# Toolchain options +# + +# +# General toolchain options +# +CT_USE_SYSROOT=y +CT_SYSROOT_DIR_PREFIX="" +CT_SHARED_LIBS=y + +# +# Tuple completion and aliasing +# +CT_TARGET_VENDOR="cortex_a8" +CT_TARGET_ALIAS_SED_EXPR="" +CT_TARGET_ALIAS="" + +# +# Toolchain type +# +# CT_NATIVE is not set +CT_CROSS=y +# CT_CROSS_NATIVE is not set +# CT_CANADIAN is not set +CT_TOOLCHAIN_TYPE="cross" + +# +# Build system +# +CT_BUILD="" +CT_BUILD_PREFIX="" +CT_BUILD_SUFFIX="" + +# +# Operating System +# +# CT_BARE_METAL is not set +CT_KERNEL="linux" +CT_KERNEL_VERSION="2.6.29.2" +# CT_KERNEL_bare_metal is not set +CT_KERNEL_linux=y +CT_KERNEL_LINUX_INSTALL=y +CT_KERNEL_LINUX_INSTALL_CHECK=y +# CT_KERNEL_V_2_6_18_8 is not set +# CT_KERNEL_V_2_6_19_7 is not set +# CT_KERNEL_V_2_6_20_21 is not set +# CT_KERNEL_V_2_6_21_7 is not set +# CT_KERNEL_V_2_6_22_19 is not set +# CT_KERNEL_V_2_6_23_17 is not set +# CT_KERNEL_V_2_6_24_7 is not set +# CT_KERNEL_V_2_6_25_20 is not set +# CT_KERNEL_V_2_6_26_8 is not set +# CT_KERNEL_V_2_6_27_22 is not set +# CT_KERNEL_V_2_6_28 is not set +# CT_KERNEL_V_2_6_28_1 is not set +# CT_KERNEL_V_2_6_28_2 is not set +# CT_KERNEL_V_2_6_28_3 is not set +# CT_KERNEL_V_2_6_28_4 is not set +# CT_KERNEL_V_2_6_28_5 is not set +# CT_KERNEL_V_2_6_28_6 is not set +# CT_KERNEL_V_2_6_28_7 is not set +# CT_KERNEL_V_2_6_28_8 is not set +# CT_KERNEL_V_2_6_28_9 is not set +# CT_KERNEL_V_2_6_28_10 is not set +# CT_KERNEL_V_2_6_29 is not set +# CT_KERNEL_V_2_6_29_1 is not set +CT_KERNEL_V_2_6_29_2=y +# CT_KERNEL_V_select is not set +CT_KERNEL_LINUX_VERBOSITY_0=y +# CT_KERNEL_LINUX_VERBOSITY_1 is not set +# CT_KERNEL_LINUX_VERBOSITY_2 is not set +CT_KERNEL_LINUX_VERBOSE_LEVEL=0 +# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set + +# +# Companion libraries +# +CT_GMP_MPFR=y +# CT_GMP_V_4_2_2 is not set +CT_GMP_V_4_2_4=y +CT_GMP_VERSION="4.2.4" +# CT_MPFR_V_2_3_1 is not set +# CT_MPFR_V_2_3_2 is not set +# CT_MPFR_V_2_4_0 is not set +CT_MPFR_V_2_4_1=y +CT_MPFR_VERSION="2.4.1" +CT_PPL_CLOOG_MPC=y +CT_PPL_V_0_10_2=y +CT_PPL_VERSION="0.10.2" +CT_CLOOG_V_0_15_3=y +CT_CLOOG_VERSION="0.15.3" +CT_MPC_V_0_6=y +CT_MPC_VERSION="0.6" + +# +# Companion libraries common options +# +# CT_COMP_LIBS_CHECK is not set +CT_COMP_LIBS_TARGET=y + +# +# Binary utilities +# +CT_ARCH_BINFMT_ELF=y +# CT_ARCH_BINFMT_FLAT is not set + +# +# GNU binutils +# +CT_BINUTILS_VERSION="2.19.1" +# CT_BINUTILS_V_2_14 is not set +# CT_BINUTILS_V_2_15 is not set +# CT_BINUTILS_V_2_16_1 is not set +# CT_BINUTILS_V_2_17 is not set +# CT_BINUTILS_V_2_18 is not set +# CT_BINUTILS_V_2_18_50_0_4 is not set +# CT_BINUTILS_V_2_18_50_0_6 is not set +# CT_BINUTILS_V_2_18_50_0_7 is not set +# CT_BINUTILS_V_2_18_50_0_8 is not set +# CT_BINUTILS_V_2_18_50_0_9 is not set +# CT_BINUTILS_V_2_18_90 is not set +# CT_BINUTILS_V_2_18_91 is not set +# CT_BINUTILS_V_2_18_92 is not set +# CT_BINUTILS_V_2_18_93 is not set +# CT_BINUTILS_V_2_19 is not set +CT_BINUTILS_V_2_19_1=y +# CT_BINUTILS_V_2_19_50_0_1 is not set +# CT_BINUTILS_V_2_19_51_0_1 is not set +# CT_BINUTILS_V_2_19_51_0_2 is not set +CT_BINUTILS_EXTRA_CONFIG="" +CT_BINUTILS_FOR_TARGET=y +CT_BINUTILS_FOR_TARGET_IBERTY=y +CT_BINUTILS_FOR_TARGET_BFD=y + +# +# C compiler +# +CT_CC="gcc" +CT_CC_VERSION="4.4.0" +CT_CC_gcc=y +# CT_CC_V_3_2_3 is not set +# CT_CC_V_3_3_6 is not set +# CT_CC_V_3_4_6 is not set +# CT_CC_V_4_0_0 is not set +# CT_CC_V_4_0_1 is not set +# CT_CC_V_4_0_2 is not set +# CT_CC_V_4_0_3 is not set +# CT_CC_V_4_0_4 is not set +# CT_CC_V_4_1_0 is not set +# CT_CC_V_4_1_1 is not set +# CT_CC_V_4_1_2 is not set +# CT_CC_V_4_2_0 is not set +# CT_CC_V_4_2_1 is not set +# CT_CC_V_4_2_2 is not set +# CT_CC_V_4_2_3 is not set +# CT_CC_V_4_2_4 is not set +# CT_CC_V_4_3_0 is not set +# CT_CC_V_4_3_1 is not set +# CT_CC_V_4_3_2 is not set +# CT_CC_V_4_3_3 is not set +CT_CC_V_4_4_0=y +CT_CC_GCC_4_3_or_later=y +CT_CC_GCC_4_4_or_later=y +CT_CC_CXA_ATEXIT=y +CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y +# CT_CC_SJLJ_EXCEPTIONS_USE is not set +# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set +CT_CC_CORE_EXTRA_CONFIG="" +CT_CC_EXTRA_CONFIG="" +CT_CC_PKGVERSION="crosstool-NG-${CT_VERSION}" +CT_CC_BUGURL="" +CT_CC_SUPPORT_CXX=y +CT_CC_SUPPORT_FORTRAN=y +CT_CC_SUPPORT_JAVA=y +CT_CC_SUPPORT_ADA=y +CT_CC_SUPPORT_OBJC=y +CT_CC_SUPPORT_OBJCXX=y + +# +# Additional supported languages: +# +CT_CC_LANG_CXX=y +# CT_CC_LANG_FORTRAN is not set +# CT_CC_LANG_JAVA is not set +# CT_CC_LANG_ADA is not set +# CT_CC_LANG_OBJC is not set +# CT_CC_LANG_OBJCXX is not set +CT_CC_LANG_OTHERS="" +CT_LIBC="glibc" + +# +# C-library +# +CT_LIBC_VERSION="2.9" +# CT_LIBC_eglibc is not set +CT_LIBC_glibc=y +# CT_LIBC_uClibc is not set +# CT_LIBC_V_2_3_6 is not set +# CT_LIBC_V_2_5 is not set +# CT_LIBC_V_2_5_1 is not set +# CT_LIBC_V_2_6 is not set +# CT_LIBC_V_2_6_1 is not set +# CT_LIBC_V_2_7 is not set +# CT_LIBC_V_2_8 is not set +CT_LIBC_V_2_9=y +# CT_LIBC_V_LATEST is not set +# CT_LIBC_V_date is not set +CT_LIBC_GLIBC_2_8_or_later=y +# CT_LIBC_GLIBC_TARBALL is not set +CT_LIBC_GLIBC_CVS=y +CT_LIBC_GLIBC_CVS_date="2009-05-27" + +# +# glibc/eglibc common options +# +CT_LIBC_GLIBC_EXTRA_CONFIG="" +CT_LIBC_GLIBC_CONFIGPARMS="" +CT_LIBC_GLIBC_EXTRA_CFLAGS="" +CT_LIBC_EXTRA_CC_ARGS="" +CT_LIBC_GLIBC_USE_PORTS=y +CT_LIBC_ADDONS_LIST="" + +# +# WARNING!!! +# + +# +# For glibc >= 2.8, addons are only available via a CVS checkout. +# + +# +# Be sure to review the associated options, above. +# +# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set +CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y +# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set +CT_LIBC_GLIBC_MIN_KERNEL="2.6.29.2" + +# +# Common C library options +# +CT_LIBC_SUPPORT_NPTL=y +CT_LIBC_SUPPORT_LINUXTHREADS=y +CT_THREADS="nptl" +CT_THREADS_NPTL=y +# CT_THREADS_LINUXTHREADS is not set +# CT_THREADS_NONE is not set + +# +# Tools facilities +# +CT_TOOL_libelf=y +CT_LIBELF_V_0_8_10=y +CT_LIBELF_VERSION="0.8.10" +CT_TOOL_sstrip=y +CT_SSTRIP_BUILDROOT=y +# CT_SSTRIP_ELFKICKERS is not set +CT_SSTRIP_FROM="buildroot" + +# +# Debug facilities +# +CT_DEBUG_dmalloc=y +# CT_DMALLOC_V_5_4_3 is not set +CT_DMALLOC_V_5_5_2=y +CT_DMALLOC_VERSION="5.5.2" +CT_DEBUG_duma=y +CT_DUMA_A=y +CT_DUMA_SO=y +# CT_DUMA_V_2_5_1 is not set +# CT_DUMA_V_2_5_8 is not set +# CT_DUMA_V_2_5_12 is not set +CT_DUMA_V_2_5_14=y +CT_DUMA_VERSION="2_5_14" +CT_DEBUG_gdb=y +CT_GDB_CROSS=y +# CT_GDB_CROSS_STATIC is not set +# CT_GDB_CROSS_INSIGHT is not set +CT_GDB_NATIVE=y +# CT_GDB_NATIVE_STATIC is not set +CT_GDB_NATIVE_USE_GMP_MPFR=y +CT_GDB_GDBSERVER=y +CT_GDB_GDBSERVER_STATIC=y +# CT_GDB_V_6_4 is not set +# CT_GDB_V_6_5 is not set +# CT_GDB_V_6_6 is not set +# CT_GDB_V_6_7 is not set +# CT_GDB_V_6_7_1 is not set +CT_GDB_V_6_8=y +# CT_GDB_V_snapshot is not set +CT_GDB_VERSION="6.8" + +# +# Native gdb needs a native ncurses library +# +# CT_NCURSES_V_5_6 is not set +CT_NCURSES_V_5_7=y +CT_NCURSES_VERSION="5.7" +CT_DEBUG_ltrace=y +# CT_LTRACE_V_0_4 is not set +# CT_LTRACE_V_0_5 is not set +CT_LTRACE_V_0_5_1=y +CT_LTRACE_VERSION="0.5.1" +CT_DEBUG_strace=y +# CT_STRACE_V_4_5 is not set +# CT_STRACE_V_4_5_14 is not set +# CT_STRACE_V_4_5_15 is not set +# CT_STRACE_V_4_5_16 is not set +# CT_STRACE_V_4_5_17 is not set +CT_STRACE_V_4_5_18=y +CT_STRACE_VERSION="4.5.18" diff --git a/samples/arm-cortex_a8-linux-gnueabi/reported.by b/samples/arm-cortex_a8-linux-gnueabi/reported.by new file mode 100644 index 0000000..edac2bb --- /dev/null +++ b/samples/arm-cortex_a8-linux-gnueabi/reported.by @@ -0,0 +1,3 @@ +reporter_name="Yann E. MORIN" +reporter_url="http://ymorin.is-a-geek.org/" +reporter_comment="" -- cgit v0.10.2-6-g49f6 From 008ae8e550eb8e7ed3811d3ab2c87a243e8f2d0b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 14 Jun 2009 22:56:26 +0200 Subject: [companion-libs] Fix spaces in help entries Some help entries were missing proper alignment-spaces. diff --git a/config/companion_libs.in b/config/companion_libs.in index 1653215..9b059f0 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -60,11 +60,11 @@ config COMP_LIBS_CHECK help It is highly recommended to check the newly built companion libraries. Unfortunately, this is a very intensive task, and takes a loooong time. - + Checking the newly built companion libraries is thus disabled by default, but it is suggested that you check them at least once on your machine, and if they work, disable the check on subsequent builds. - + If you suspect that one (or more) of your companion libraries is the cause for incorrectly generated code, you should answer 'Y' here. Note however that this will take a really long time. For example, -- cgit v0.10.2-6-g49f6 From a7ff05b022a8db08185486fa0fbf324f2ecd9d3e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 14 Jun 2009 22:57:57 +0200 Subject: [finish-step] Use local variable in finish-step When wrapping the tools, use a local variable when iterating. diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index b8a80f2..a262c1d 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -56,10 +56,10 @@ do_finish() { # Do it unconditionally, even for those tools that happen to be shell # scripts, we don't know if they would in the end spawn a binary... # Just skip symlinks - for t in "${CT_TARGET}-"*; do - if [ "$( LANG=C stat -c '%F' "${t}" )" != "symbolic link" ]; then - CT_DoExecLog ALL mv "${t}" ".${t}" - CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}" + for _t in "${CT_TARGET}-"*; do + if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then + CT_DoExecLog ALL mv "${t}" ".${_t}" + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}" fi done -- cgit v0.10.2-6-g49f6