1.1 --- a/config/binutils/binutils.in Thu Feb 18 20:43:31 2010 +0100
1.2 +++ b/config/binutils/binutils.in Wed Feb 17 23:50:49 2010 +0100
1.3 @@ -79,9 +79,8 @@
1.4 bool
1.5 prompt "Use GMP and MPFR"
1.6 default n
1.7 - select GMP
1.8 - select MPFR
1.9 - select COMPLIBS_TARGET
1.10 + select GMP_TARGET
1.11 + select MPFR_TARGET
1.12 help
1.13 binutils can be configured to use GMP and MPFR.
1.14 While this is automatically handled for the cross-binutils,
2.1 --- a/config/companion_libs.in Thu Feb 18 20:43:31 2010 +0100
2.2 +++ b/config/companion_libs.in Wed Feb 17 23:50:49 2010 +0100
2.3 @@ -100,19 +100,54 @@
2.4 can say 'Y' here, although it is unknown yet if any other component
2.5 can use it.
2.6
2.7 -if GMP
2.8 +config GMP_TARGET
2.9 + bool
2.10 +
2.11 +config MPFR_TARGET
2.12 + bool
2.13 + select GMP_TARGET
2.14 +
2.15 +config PPL_TARGET
2.16 + bool
2.17 + select GMP_TARGET
2.18 + select MPFR_TARGET
2.19 +
2.20 +config CLOOG_TARGET
2.21 + bool
2.22 + select GMP_TARGET
2.23 + select MPFR_TARGET
2.24 + select PPL_TARGET
2.25 +
2.26 +config MPC_TARGET
2.27 + bool
2.28 + select GMP_TARGET
2.29 + select MPFR_TARGET
2.30 + select PPL_TARGET
2.31 + select CLOOG_TARGET
2.32 +
2.33 +if GMP || GMP_TARGET
2.34 +comment "GMP version needed to build for target"
2.35 + depends on !GMP
2.36 source config/companion_libs/gmp.in
2.37 endif
2.38 -if MPFR
2.39 +if MPFR || MPFR_TARGET
2.40 +comment "MPFR version needed to build for target"
2.41 + depends on !MPFR
2.42 source config/companion_libs/mpfr.in
2.43 endif
2.44 -if PPL
2.45 +if PPL || PPL_TARGET
2.46 +comment "PPL version needed to build for target"
2.47 + depends on !PPL
2.48 source config/companion_libs/ppl.in
2.49 endif
2.50 -if CLOOG
2.51 +if CLOOG || CLOOG_TARGET
2.52 +comment "CLOOG version needed to build for target"
2.53 + depends on !CLOOG
2.54 source config/companion_libs/cloog.in
2.55 endif
2.56 -if MPC
2.57 +if MPC || MPC_TARGET
2.58 +comment "MPC version needed to build for target"
2.59 + depends on !MPC
2.60 source config/companion_libs/mpc.in
2.61 endif
2.62
2.63 @@ -122,12 +157,11 @@
2.64 comment "Companion libraries common options"
2.65 depends on COMPLIBS || WRAPPER_NEEDED
2.66
2.67 -if COMPLIBS
2.68 -
2.69 config COMP_LIBS_CHECK
2.70 bool
2.71 prompt "| Check the companion libraries builds (!!! READ HELP!!!)"
2.72 default n
2.73 + depends on COMPLIBS
2.74 help
2.75 It is highly recommended to check the newly built companion libraries.
2.76 Unfortunately, this is a very intensive task, and takes a loooong time.
2.77 @@ -142,20 +176,6 @@
2.78 building PPL on my machine takes roughly 1'40", while checking it takes
2.79 about 1h40'...
2.80
2.81 -config COMPLIBS_TARGET
2.82 - bool
2.83 - prompt "| Build companion libraries for the target"
2.84 - depends on ! BARE_METAL
2.85 - default n
2.86 - help
2.87 - Also build companion libraries for the target. This can be usefull if
2.88 - you want to later build a compiler that will run on the target, or if
2.89 - you want to run gdb natively on the target.
2.90 -
2.91 - Please note that for now, crosstool-NG can only build GMP and MPFR so.
2.92 -
2.93 -endif # COMPLIBS
2.94 -
2.95 choice
2.96 bool
2.97 prompt "| Install tools wrapper as:"
3.1 --- a/config/debug/gdb.in Thu Feb 18 20:43:31 2010 +0100
3.2 +++ b/config/debug/gdb.in Wed Feb 17 23:50:49 2010 +0100
3.3 @@ -58,9 +58,8 @@
3.4 prompt "Use GMP and MPFR"
3.5 default n
3.6 depends on GDB_NATIVE
3.7 - select GMP
3.8 - select MPFR
3.9 - select COMPLIBS_TARGET
3.10 + select GMP_TARGET
3.11 + select MPFR_TARGET
3.12 help
3.13 gdb can make use of the GMP and MPFR libraries.
3.14
4.1 --- a/scripts/build/companion_libs/gmp.sh Thu Feb 18 20:43:31 2010 +0100
4.2 +++ b/scripts/build/companion_libs/gmp.sh Wed Feb 17 23:50:49 2010 +0100
4.3 @@ -8,7 +8,7 @@
4.4 do_gmp_target() { :; }
4.5
4.6 # Overide functions depending on configuration
4.7 -if [ "${CT_GMP}" = "y" ]; then
4.8 +if [ "${CT_GMP}" = "y" -o "${CT_GMP_TARGET}" = "y" ]; then
4.9
4.10 # Download GMP
4.11 do_gmp_get() {
4.12 @@ -21,6 +21,8 @@
4.13 CT_Patch "gmp-${CT_GMP_VERSION}"
4.14 }
4.15
4.16 +if [ "${CT_GMP}" = "y" ]; then
4.17 +
4.18 do_gmp() {
4.19
4.20 mkdir -p "${CT_BUILD_DIR}/build-gmp"
4.21 @@ -56,7 +58,9 @@
4.22 CT_EndStep
4.23 }
4.24
4.25 -if [ "${CT_COMPLIBS_TARGET}" = "y" ]; then
4.26 +fi # CT_GMP
4.27 +
4.28 +if [ "${CT_GMP_TARGET}" = "y" ]; then
4.29
4.30 do_gmp_target() {
4.31 mkdir -p "${CT_BUILD_DIR}/build-gmp-target"
4.32 @@ -87,6 +91,6 @@
4.33 CT_EndStep
4.34 }
4.35
4.36 -fi # CT_COMPLIBS_TARGET == y
4.37 +fi # CT_GMP_TARGET
4.38
4.39 -fi # CT_GMP == y
4.40 +fi # CT_GMP || CT_GMP_TARGET
5.1 --- a/scripts/build/companion_libs/mpfr.sh Thu Feb 18 20:43:31 2010 +0100
5.2 +++ b/scripts/build/companion_libs/mpfr.sh Wed Feb 17 23:50:49 2010 +0100
5.3 @@ -8,7 +8,7 @@
5.4 do_mpfr_target() { :; }
5.5
5.6 # Overide function depending on configuration
5.7 -if [ "${CT_MPFR}" = "y" ]; then
5.8 +if [ "${CT_MPFR}" = "y" -o "${CT_MPFR_TARGET}" = "y" ]; then
5.9
5.10 # Download MPFR
5.11 do_mpfr_get() {
5.12 @@ -64,6 +64,8 @@
5.13 esac
5.14 }
5.15
5.16 +if [ "${CT_MPFR}" = "y" ]; then
5.17 +
5.18 do_mpfr() {
5.19 mkdir -p "${CT_BUILD_DIR}/build-mpfr"
5.20 cd "${CT_BUILD_DIR}/build-mpfr"
5.21 @@ -106,7 +108,9 @@
5.22 CT_EndStep
5.23 }
5.24
5.25 -if [ "${CT_COMPLIBS_TARGET}" = "y" ]; then
5.26 +fi # CT_MPFR
5.27 +
5.28 +if [ "${CT_MPFR_TARGET}" = "y" ]; then
5.29
5.30 do_mpfr_target() {
5.31 mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
5.32 @@ -145,6 +149,6 @@
5.33 CT_EndStep
5.34 }
5.35
5.36 -fi # CT_COMPLIBS_TARGET == y
5.37 +fi # CT_MPFR_TARGET
5.38
5.39 -fi # CT_MPFR == y
5.40 +fi # CT_MPFR || CT_MPFR_TARGET
6.1 --- a/scripts/build/debug/300-gdb.sh Thu Feb 18 20:43:31 2010 +0100
6.2 +++ b/scripts/build/debug/300-gdb.sh Wed Feb 17 23:50:49 2010 +0100
6.3 @@ -224,7 +224,8 @@
6.4 *) native_extra_config+=("--enable-threads");;
6.5 esac
6.6 if [ "${CT_GDB_NATIVE_USE_GMP_MPFR}" = "y" ]; then
6.7 - native_extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr" "--with-mpfr=${CT_SYSROOT_DIR}/usr")
6.8 + native_extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr")
6.9 + native_extra_config+=("--with-mpfr=${CT_SYSROOT_DIR}/usr")
6.10 fi
6.11
6.12 if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then