diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-07-24 23:53:14 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-07-24 23:53:14 +0200 |
commit | ae3b564fb808cd89098dbcab444b49b742ab53b2 (patch) | |
tree | 1c3431e3a850bbe9c0895ff14fc1f62842d1579b /scripts | |
parent | 518a1ff137ed5e1a2c3251d4672549985c0cc2d5 (diff) | |
download | crosstool-ng-ae3b564fb808cd89098dbcab444b49b742ab53b2.tar.gz crosstool-ng-ae3b564fb808cd89098dbcab444b49b742ab53b2.tar.bz2 crosstool-ng-ae3b564fb808cd89098dbcab444b49b742ab53b2.zip |
complibs: add frontends for building to run on the build machine
In canadian-cross, we need the companion libraries running on the
build machine, to be able to build the two core gcc.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/companion_libs/cloog.sh | 23 | ||||
-rw-r--r-- | scripts/build/companion_libs/gmp.sh | 23 | ||||
-rw-r--r-- | scripts/build/companion_libs/libelf.sh | 23 | ||||
-rw-r--r-- | scripts/build/companion_libs/mpc.sh | 23 | ||||
-rw-r--r-- | scripts/build/companion_libs/mpfr.sh | 23 | ||||
-rw-r--r-- | scripts/build/companion_libs/ppl.sh | 23 |
6 files changed, 138 insertions, 0 deletions
diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 990ac4f2..5c2b421f 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -4,6 +4,7 @@ do_cloog_get() { :; } do_cloog_extract() { :; } +do_cloog_for_build() { :; } do_cloog_for_host() { :; } # Overide functions depending on configuration @@ -33,6 +34,28 @@ do_cloog_extract() { fi } +# Build CLooG/PPL for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_cloog_for_build() { + local -a cloog_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing CLooG/PPL for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-build-${CT_BUILD}" + + cloog_opts+=( "host=${CT_BUILD}" ) + cloog_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_cloog_backend "${cloog_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build CLooG/PPL for running on host do_cloog_for_host() { local -a cloog_opts diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index a4b037d5..04af002c 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -4,6 +4,7 @@ do_gmp_get() { :; } do_gmp_extract() { :; } +do_gmp_for_build() { :; } do_gmp_for_host() { :; } # Overide functions depending on configuration @@ -20,6 +21,28 @@ do_gmp_extract() { CT_Patch "gmp" "${CT_GMP_VERSION}" } +# Build GMP for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_gmp_for_build() { + local -a gmp_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing GMP for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-gmp-build-${CT_BUILD}" + + gmp_opts+=( "host=${CT_BUILD}" ) + gmp_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_gmp_backend "${gmp_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build GMP for running on host do_gmp_for_host() { local -a gmp_opts diff --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh index 33845754..c10a7bf3 100644 --- a/scripts/build/companion_libs/libelf.sh +++ b/scripts/build/companion_libs/libelf.sh @@ -2,6 +2,7 @@ do_libelf_get() { :; } do_libelf_extract() { :; } +do_libelf_for_build() { :; } do_libelf_for_host() { :; } do_libelf_for_target() { :; } @@ -21,6 +22,28 @@ do_libelf_extract() { if [ "${CT_LIBELF}" = "y" ]; then +# Build libelf for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_libelf_for_build() { + local -a libelf_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing libelf for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-build-${CT_BUILD}" + + libelf_opts+=( "host=${CT_BUILD}" ) + libelf_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_libelf_backend "${libelf_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build libelf for running on host do_libelf_for_host() { local -a libelf_opts diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh index 3236576b..f45982dc 100644 --- a/scripts/build/companion_libs/mpc.sh +++ b/scripts/build/companion_libs/mpc.sh @@ -4,6 +4,7 @@ do_mpc_get() { :; } do_mpc_extract() { :; } +do_mpc_for_build() { :; } do_mpc_for_host() { :; } # Overide functions depending on configuration @@ -21,6 +22,28 @@ do_mpc_extract() { CT_Patch "mpc" "${CT_MPC_VERSION}" } +# Build MPC for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_mpc_for_build() { + local -a mpc_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing MPC for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-build-${CT_BUILD}" + + mpc_opts+=( "host=${CT_BUILD}" ) + mpc_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_mpc_backend "${mpc_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build MPC for running on host do_mpc_for_host() { local -a mpc_opts diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index 25bd101d..b3467577 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -4,6 +4,7 @@ do_mpfr_get() { :; } do_mpfr_extract() { :; } +do_mpfr_for_build() { :; } do_mpfr_for_host() { :; } # Overide function depending on configuration @@ -63,6 +64,28 @@ do_mpfr_extract() { esac } +# Build MPFR for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_mpfr_for_build() { + local -a mpfr_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing MPFR for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpfr-build-${CT_BUILD}" + + mpfr_opts+=( "host=${CT_BUILD}" ) + mpfr_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_mpfr_backend "${mpfr_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build MPFR for running on host do_mpfr_for_host() { local -a mpfr_opts diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 4b4ff8eb..da7fb1a5 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -4,6 +4,7 @@ do_ppl_get() { :; } do_ppl_extract() { :; } +do_ppl_for_build() { :; } do_ppl_for_host() { :; } # Overide functions depending on configuration @@ -23,6 +24,28 @@ do_ppl_extract() { CT_Patch "ppl" "${CT_PPL_VERSION}" } +# Build PPL for running on build +# - always build statically +# - we do not have build-specific CFLAGS +# - install in build-tools prefix +do_ppl_for_build() { + local -a ppl_opts + + case "${CT_TOOLCHAIN_TYPE}" in + native|cross) return 0;; + esac + + CT_DoStep INFO "Installing PPL for build" + CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-build-${CT_BUILD}" + + ppl_opts+=( "host=${CT_BUILD}" ) + ppl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + do_ppl_backend "${ppl_opts[@]}" + + CT_Popd + CT_EndStep +} + # Build PPL for running on host do_ppl_for_host() { local -a ppl_opts |