1.1 --- a/config/companion_libs.in Tue May 05 21:16:37 2009 +0000
1.2 +++ b/config/companion_libs.in Tue May 05 22:04:20 2009 +0000
1.3 @@ -9,10 +9,11 @@
1.4 prompt "GMP and MPFR"
1.5 help
1.6 gcc 4.3.0 and above requires both GMP and MPFR to build some frontends,
1.7 - and some other components can use them as well (eg. binutils and gdb).
1.8 + and some other components can use them as well.
1.9
1.10 - Say 'Y' here if you want to build those two libraries specifically
1.11 - for crosstool-NG.
1.12 + These will be automatically selected if you choose gcc>=4.3.0, but you
1.13 + can say 'Y' here if you want to build those two libraries for the other
1.14 + components (that don't select them by default).
1.15
1.16 The packages that can use GMP and MPFR are:
1.17 - binutils
1.18 @@ -35,4 +36,19 @@
1.19 source config/companion_libs/mpfr.in
1.20 endif
1.21
1.22 +config PPL_CLOOG
1.23 + bool
1.24 + prompt "PPL and GLooG/PPL"
1.25 + help
1.26 + gcc-4.4.0 and above requires both PPL and CLooG/PPL to build some
1.27 + parts of the optimiser (GRAPHITE loop optimisation, to be precise).
1.28 +
1.29 + These will be automatically selected if you choose gcc>=4.4.0, but you
1.30 + can say 'Y' here, although it is unknown yet if any other component
1.31 + can use them.
1.32 +
1.33 +if PPL_CLOOG
1.34 +source config/companion_libs/ppl.in
1.35 +endif
1.36 +
1.37 endmenu
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/config/companion_libs/ppl.in Tue May 05 22:04:20 2009 +0000
2.3 @@ -0,0 +1,33 @@
2.4 +# PPL options
2.5 +
2.6 +choice
2.7 + bool
2.8 + prompt "PPL version"
2.9 +
2.10 +config PPL_V_0_10_2
2.11 + bool
2.12 + prompt "0.10.2"
2.13 +
2.14 +# CT_INSERT_VERSION_ABOVE
2.15 +# Don't remove above line!
2.16 +endchoice
2.17 +
2.18 +config PPL_VERSION
2.19 + string
2.20 + default "0.10.2" if PPL_V_0_10_2
2.21 +# CT_INSERT_VERSION_STRING_ABOVE
2.22 +# Don't remove above line!
2.23 +
2.24 +config PPL_CHECK
2.25 + bool
2.26 + prompt "Check PPL (!!! README !!!)"
2.27 + default n
2.28 + help
2.29 + Checking PPL is very intensive and takes a loooong time.
2.30 + The PPL folks do not recommend checking the library, but they do
2.31 + not recommend not checking it, either.
2.32 +
2.33 + Checking PPL is thus disabled by default.
2.34 +
2.35 + If you suspect that your PPL library is the cause for incorrectly
2.36 + generated code, you should answer 'Y' here.
3.1 --- a/scripts/addToolVersion.sh Tue May 05 21:16:37 2009 +0000
3.2 +++ b/scripts/addToolVersion.sh Tue May 05 22:04:20 2009 +0000
3.3 @@ -13,7 +13,7 @@
3.4 'tool' in one of:
3.5 --gcc, --binutils, --glibc, --eglibc, --uClibc, --linux,
3.6 --gdb, --dmalloc, --duma, --strace, --ltrace, --libelf
3.7 - --gmp, --mpfr
3.8 + --gmp, --mpfr, --ppl
3.9
3.10 Valid options for all tools:
3.11 --stable, -s, +x (default)
3.12 @@ -133,6 +133,7 @@
3.13 --libelf) EXP=; OBS=; cat=LIBELF; tool=libelf; tool_prefix=tools;;
3.14 --gmp) EXP=; OBS=; cat=GMP; tool=gmp; tool_prefix=companion_libs;;
3.15 --mpfr) EXP=; OBS=; cat=MPFR; tool=mpfr; tool_prefix=companion_libs;;
3.16 + --ppl) EXP=; OBS=; cat=PPL; tool=ppl; tool_prefix=companion_libs;;
3.17
3.18 # Tools options:
3.19 -x|--experimental|+s) EXP=1;;
4.1 --- a/scripts/build/companion_libs/gmp.sh Tue May 05 21:16:37 2009 +0000
4.2 +++ b/scripts/build/companion_libs/gmp.sh Tue May 05 22:04:20 2009 +0000
4.3 @@ -22,20 +22,32 @@
4.4 }
4.5
4.6 do_gmp() {
4.7 + local opts
4.8 + local cflags
4.9 +
4.10 mkdir -p "${CT_BUILD_DIR}/build-gmp"
4.11 cd "${CT_BUILD_DIR}/build-gmp"
4.12
4.13 CT_DoStep INFO "Installing GMP"
4.14
4.15 CT_DoLog EXTRA "Configuring GMP"
4.16 - CFLAGS="${CT_CFLAGS_FOR_HOST}" \
4.17 +
4.18 + if [ "${CT_PPL_CLOOG}" = "y" ]; then
4.19 + opts="--enable-cxx"
4.20 + cflags="-fexceptions"
4.21 + fi
4.22 +
4.23 + CFLAGS="${CT_CFLAGS_FOR_HOST} ${cflags}" \
4.24 CT_DoExecLog ALL \
4.25 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
4.26 --build=${CT_BUILD} \
4.27 --host=${CT_HOST} \
4.28 --prefix="${CT_PREFIX_DIR}" \
4.29 - --disable-shared --enable-static \
4.30 - --enable-fft --enable-mpbsd
4.31 + --disable-shared \
4.32 + --enable-static \
4.33 + --enable-fft \
4.34 + --enable-mpbsd \
4.35 + ${opts}
4.36
4.37 CT_DoLog EXTRA "Building GMP"
4.38 CT_DoExecLog ALL make ${PARALLELMFLAGS}
4.39 @@ -66,8 +78,10 @@
4.40 --build=${CT_BUILD} \
4.41 --host=${CT_TARGET} \
4.42 --prefix=/usr \
4.43 - --disable-shared --enable-static \
4.44 - --enable-fft --enable-mpbsd
4.45 + --disable-shared \
4.46 + --enable-static \
4.47 + --enable-fft \
4.48 + --enable-mpbsd \
4.49
4.50 CT_DoLog EXTRA "Building GMP"
4.51 CT_DoExecLog ALL make ${PARALLELMFLAGS}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/scripts/build/companion_libs/ppl.sh Tue May 05 22:04:20 2009 +0000
5.3 @@ -0,0 +1,66 @@
5.4 +# This file adds the functions to build the PPL library
5.5 +# Copyright 2009 Yann E. MORIN
5.6 +# Licensed under the GPL v2. See COPYING in the root of this package
5.7 +
5.8 +do_ppl_get() { :; }
5.9 +do_ppl_extract() { :; }
5.10 +do_ppl() { :; }
5.11 +do_ppl_target() { :; }
5.12 +
5.13 +# Overide functions depending on configuration
5.14 +if [ "${CT_PPL_CLOOG}" = "y" ]; then
5.15 +
5.16 +# Download PPL
5.17 +do_ppl_get() {
5.18 + CT_GetFile "ppl-${CT_PPL_VERSION}" \
5.19 + http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION} \
5.20 + ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION}
5.21 +}
5.22 +
5.23 +# Extract PPL
5.24 +do_ppl_extract() {
5.25 + CT_Extract "ppl-${CT_PPL_VERSION}"
5.26 + CT_Patch "ppl-${CT_PPL_VERSION}"
5.27 +}
5.28 +
5.29 +do_ppl() {
5.30 + mkdir -p "${CT_BUILD_DIR}/build-ppl"
5.31 + cd "${CT_BUILD_DIR}/build-ppl"
5.32 +
5.33 + CT_DoStep INFO "Installing PPL"
5.34 +
5.35 + CT_DoLog EXTRA "Configuring PPL"
5.36 + CFLAGS="${CT_CFLAGS_FOR_HOST}" \
5.37 + CT_DoExecLog ALL \
5.38 + "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
5.39 + --build=${CT_BUILD} \
5.40 + --host=${CT_HOST} \
5.41 + --prefix="${CT_PREFIX_DIR}" \
5.42 + --with-libgmp-prefix="${CT_PREFIX_DIR}" \
5.43 + --with-libgmpxx-prefix="${CT_PREFIX_DIR}" \
5.44 + --disable-shared \
5.45 + --enable-static \
5.46 + --disable-debugging \
5.47 + --disable-assertions \
5.48 + --disable-ppl_lcdd \
5.49 + --disable-ppl_lpsol
5.50 +
5.51 + # Maybe-options:
5.52 + # --enable-interfaces=...
5.53 + # --enable-optimization=speed or sspeed (yes, with 2 's')
5.54 +
5.55 + CT_DoLog EXTRA "Building PPL"
5.56 + CT_DoExecLog ALL make ${PARALLELMFLAGS}
5.57 +
5.58 + if [ "${CT_PPL_CHECK}" = "y" ]; then
5.59 + CT_DoLog EXTRA "Checking PPL"
5.60 + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
5.61 + fi
5.62 +
5.63 + CT_DoLog EXTRA "Installing PPL"
5.64 + CT_DoExecLog ALL make install
5.65 +
5.66 + CT_EndStep
5.67 +}
5.68 +
5.69 +fi # CT_PPL_CLOOG
6.1 --- a/scripts/crosstool-NG.sh.in Tue May 05 21:16:37 2009 +0000
6.2 +++ b/scripts/crosstool-NG.sh.in Tue May 05 22:04:20 2009 +0000
6.3 @@ -90,6 +90,7 @@
6.4 . "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
6.5 . "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh"
6.6 . "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh"
6.7 +. "${CT_LIB_DIR}/scripts/build/companion_libs/ppl.sh"
6.8 . "${CT_LIB_DIR}/scripts/build/binutils.sh"
6.9 . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
6.10 . "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
6.11 @@ -444,6 +445,7 @@
6.12 do_kernel_get
6.13 do_gmp_get
6.14 do_mpfr_get
6.15 + do_ppl_get
6.16 do_binutils_get
6.17 do_cc_get
6.18 do_libc_get
6.19 @@ -460,6 +462,7 @@
6.20 do_kernel_extract
6.21 do_gmp_extract
6.22 do_mpfr_extract
6.23 + do_ppl_extract
6.24 do_binutils_extract
6.25 do_cc_extract
6.26 do_libc_extract
7.1 --- a/steps.mk Tue May 05 21:16:37 2009 +0000
7.2 +++ b/steps.mk Tue May 05 22:04:20 2009 +0000
7.3 @@ -20,6 +20,7 @@
7.4 kernel_headers \
7.5 gmp \
7.6 mpfr \
7.7 + ppl \
7.8 binutils \
7.9 cc_core_pass_1 \
7.10 libc_headers \