# HG changeset patch # User "Yann E. MORIN" # Date 1311544394 -7200 # Node ID 22e495b7bee89d4684b96f3343854009aee71780 # Parent 3f70dd642d347ef29057e665187fc1e546c78574 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" diff -r 3f70dd642d34 -r 22e495b7bee8 scripts/build/companion_libs/cloog.sh --- a/scripts/build/companion_libs/cloog.sh Sun Jul 24 23:52:28 2011 +0200 +++ b/scripts/build/companion_libs/cloog.sh Sun Jul 24 23:53:14 2011 +0200 @@ -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 @@ 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 -r 3f70dd642d34 -r 22e495b7bee8 scripts/build/companion_libs/gmp.sh --- a/scripts/build/companion_libs/gmp.sh Sun Jul 24 23:52:28 2011 +0200 +++ b/scripts/build/companion_libs/gmp.sh Sun Jul 24 23:53:14 2011 +0200 @@ -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 @@ 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 -r 3f70dd642d34 -r 22e495b7bee8 scripts/build/companion_libs/libelf.sh --- a/scripts/build/companion_libs/libelf.sh Sun Jul 24 23:52:28 2011 +0200 +++ b/scripts/build/companion_libs/libelf.sh Sun Jul 24 23:53:14 2011 +0200 @@ -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 @@ 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 -r 3f70dd642d34 -r 22e495b7bee8 scripts/build/companion_libs/mpc.sh --- a/scripts/build/companion_libs/mpc.sh Sun Jul 24 23:52:28 2011 +0200 +++ b/scripts/build/companion_libs/mpc.sh Sun Jul 24 23:53:14 2011 +0200 @@ -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 @@ 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 -r 3f70dd642d34 -r 22e495b7bee8 scripts/build/companion_libs/mpfr.sh --- a/scripts/build/companion_libs/mpfr.sh Sun Jul 24 23:52:28 2011 +0200 +++ b/scripts/build/companion_libs/mpfr.sh Sun Jul 24 23:53:14 2011 +0200 @@ -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 @@ 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 -r 3f70dd642d34 -r 22e495b7bee8 scripts/build/companion_libs/ppl.sh --- a/scripts/build/companion_libs/ppl.sh Sun Jul 24 23:52:28 2011 +0200 +++ b/scripts/build/companion_libs/ppl.sh Sun Jul 24 23:53:14 2011 +0200 @@ -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 @@ 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