diff options
-rw-r--r-- | config/binutils/binutils.in | 5 | ||||
-rw-r--r-- | config/companion_libs.in | 62 | ||||
-rw-r--r-- | config/debug/gdb.in | 5 | ||||
-rw-r--r-- | scripts/build/companion_libs/gmp.sh | 12 | ||||
-rw-r--r-- | scripts/build/companion_libs/mpfr.sh | 12 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 3 |
6 files changed, 63 insertions, 36 deletions
diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in index 2b6df6e..22248d7 100644 --- a/config/binutils/binutils.in +++ b/config/binutils/binutils.in @@ -79,9 +79,8 @@ config BINUTILS_TARGET_USE_GMP_MPFR bool prompt "Use GMP and MPFR" default n - select GMP - select MPFR - select COMPLIBS_TARGET + select GMP_TARGET + select MPFR_TARGET help binutils can be configured to use GMP and MPFR. While this is automatically handled for the cross-binutils, diff --git a/config/companion_libs.in b/config/companion_libs.in index 346b6ab..e230cf9 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -100,19 +100,54 @@ config MPC can say 'Y' here, although it is unknown yet if any other component can use it. -if GMP +config GMP_TARGET + bool + +config MPFR_TARGET + bool + select GMP_TARGET + +config PPL_TARGET + bool + select GMP_TARGET + select MPFR_TARGET + +config CLOOG_TARGET + bool + select GMP_TARGET + select MPFR_TARGET + select PPL_TARGET + +config MPC_TARGET + bool + select GMP_TARGET + select MPFR_TARGET + select PPL_TARGET + select CLOOG_TARGET + +if GMP || GMP_TARGET +comment "GMP version needed to build for target" + depends on !GMP source config/companion_libs/gmp.in endif -if MPFR +if MPFR || MPFR_TARGET +comment "MPFR version needed to build for target" + depends on !MPFR source config/companion_libs/mpfr.in endif -if PPL +if PPL || PPL_TARGET +comment "PPL version needed to build for target" + depends on !PPL source config/companion_libs/ppl.in endif -if CLOOG +if CLOOG || CLOOG_TARGET +comment "CLOOG version needed to build for target" + depends on !CLOOG source config/companion_libs/cloog.in endif -if MPC +if MPC || MPC_TARGET +comment "MPC version needed to build for target" + depends on !MPC source config/companion_libs/mpc.in endif @@ -122,12 +157,11 @@ config FOO comment "Companion libraries common options" depends on COMPLIBS || WRAPPER_NEEDED -if COMPLIBS - config COMP_LIBS_CHECK bool prompt "| Check the companion libraries builds (!!! READ HELP!!!)" default n + depends on COMPLIBS help It is highly recommended to check the newly built companion libraries. Unfortunately, this is a very intensive task, and takes a loooong time. @@ -142,20 +176,6 @@ config COMP_LIBS_CHECK building PPL on my machine takes roughly 1'40", while checking it takes about 1h40'... -config COMPLIBS_TARGET - bool - prompt "| Build companion libraries for the target" - 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. - -endif # COMPLIBS - choice bool prompt "| Install tools wrapper as:" diff --git a/config/debug/gdb.in b/config/debug/gdb.in index 60efbc4..0ee07cc 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -58,9 +58,8 @@ config GDB_NATIVE_USE_GMP_MPFR prompt "Use GMP and MPFR" default n depends on GDB_NATIVE - select GMP - select MPFR - select COMPLIBS_TARGET + select GMP_TARGET + select MPFR_TARGET help gdb can make use of the GMP and MPFR libraries. diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index 351c2fa..2c27693 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -8,7 +8,7 @@ do_gmp() { :; } do_gmp_target() { :; } # Overide functions depending on configuration -if [ "${CT_GMP}" = "y" ]; then +if [ "${CT_GMP}" = "y" -o "${CT_GMP_TARGET}" = "y" ]; then # Download GMP do_gmp_get() { @@ -21,6 +21,8 @@ do_gmp_extract() { CT_Patch "gmp-${CT_GMP_VERSION}" } +if [ "${CT_GMP}" = "y" ]; then + do_gmp() { mkdir -p "${CT_BUILD_DIR}/build-gmp" @@ -56,7 +58,9 @@ do_gmp() { CT_EndStep } -if [ "${CT_COMPLIBS_TARGET}" = "y" ]; then +fi # CT_GMP + +if [ "${CT_GMP_TARGET}" = "y" ]; then do_gmp_target() { mkdir -p "${CT_BUILD_DIR}/build-gmp-target" @@ -87,6 +91,6 @@ do_gmp_target() { CT_EndStep } -fi # CT_COMPLIBS_TARGET == y +fi # CT_GMP_TARGET -fi # CT_GMP == y +fi # CT_GMP || CT_GMP_TARGET diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index 5e91e1a..12fe125 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -8,7 +8,7 @@ do_mpfr() { :; } do_mpfr_target() { :; } # Overide function depending on configuration -if [ "${CT_MPFR}" = "y" ]; then +if [ "${CT_MPFR}" = "y" -o "${CT_MPFR_TARGET}" = "y" ]; then # Download MPFR do_mpfr_get() { @@ -64,6 +64,8 @@ do_mpfr_extract() { esac } +if [ "${CT_MPFR}" = "y" ]; then + do_mpfr() { mkdir -p "${CT_BUILD_DIR}/build-mpfr" cd "${CT_BUILD_DIR}/build-mpfr" @@ -106,7 +108,9 @@ do_mpfr() { CT_EndStep } -if [ "${CT_COMPLIBS_TARGET}" = "y" ]; then +fi # CT_MPFR + +if [ "${CT_MPFR_TARGET}" = "y" ]; then do_mpfr_target() { mkdir -p "${CT_BUILD_DIR}/build-mpfr-target" @@ -145,6 +149,6 @@ do_mpfr_target() { CT_EndStep } -fi # CT_COMPLIBS_TARGET == y +fi # CT_MPFR_TARGET -fi # CT_MPFR == y +fi # CT_MPFR || CT_MPFR_TARGET diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 4b90091..1d065c8 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -224,7 +224,8 @@ do_debug_gdb_build() { *) native_extra_config+=("--enable-threads");; esac if [ "${CT_GDB_NATIVE_USE_GMP_MPFR}" = "y" ]; then - native_extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr" "--with-mpfr=${CT_SYSROOT_DIR}/usr") + native_extra_config+=("--with-gmp=${CT_SYSROOT_DIR}/usr") + native_extra_config+=("--with-mpfr=${CT_SYSROOT_DIR}/usr") fi if [ "${CT_GDB_NATIVE_STATIC}" = "y" ]; then |