# HG changeset patch # User "Yann E. MORIN" # Date 1311613457 -7200 # Node ID 8a72662f0815ea35907214e4ccfc7255baf6f5a0 # Parent 79201a2826fdffcd2e68e9702cffa2cfcbb76dcf complibs: fixup the host complibs install dir It's easier to have as much as possible stuff in the same place to ease backup/restore, and make things easier to follow. Move the host companion libraries install dir as a sub-dir of the build-tools install dir (but not directly in it, it would break for canadian or cross-native). Signed-off-by: "Yann E. MORIN" diff -r 79201a2826fd -r 8a72662f0815 scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/cc/gcc.sh Mon Jul 25 19:04:17 2011 +0200 @@ -68,7 +68,7 @@ do_core=y core_opts+=( "mode=static" ) core_opts+=( "host=${CT_BUILD}" ) - core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) + core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) ;; @@ -93,7 +93,7 @@ # Common options: core_opts+=( "host=${CT_BUILD}" ) core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) - core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) + core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) # Do nothing for canadian-crosses, we already have a target compiler. @@ -469,7 +469,7 @@ final_opts+=( "host=${CT_HOST}" ) final_opts+=( "prefix=${CT_PREFIX_DIR}" ) - final_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) + final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" ) final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) if [ "${CT_BUILD_MANUALS}" = "y" ]; then final_opts+=( "build_manuals=yes" ) diff -r 79201a2826fd -r 8a72662f0815 scripts/build/companion_libs/cloog.sh --- a/scripts/build/companion_libs/cloog.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/companion_libs/cloog.sh Mon Jul 25 19:04:17 2011 +0200 @@ -64,7 +64,7 @@ CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-host-${CT_HOST}" cloog_opts+=( "host=${CT_HOST}" ) - cloog_opts+=( "prefix=${CT_COMPLIBS_DIR}" ) + cloog_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) cloog_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) do_cloog_backend "${cloog_opts[@]}" diff -r 79201a2826fd -r 8a72662f0815 scripts/build/companion_libs/gmp.sh --- a/scripts/build/companion_libs/gmp.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/companion_libs/gmp.sh Mon Jul 25 19:04:17 2011 +0200 @@ -51,7 +51,7 @@ CT_mkdir_pushd "${CT_BUILD_DIR}/build-gmp-host-${CT_HOST}" gmp_opts+=( "host=${CT_HOST}" ) - gmp_opts+=( "prefix=${CT_COMPLIBS_DIR}" ) + gmp_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) gmp_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) do_gmp_backend "${gmp_opts[@]}" diff -r 79201a2826fd -r 8a72662f0815 scripts/build/companion_libs/libelf.sh --- a/scripts/build/companion_libs/libelf.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/companion_libs/libelf.sh Mon Jul 25 19:04:17 2011 +0200 @@ -52,7 +52,7 @@ CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-host-${CT_HOST}" libelf_opts+=( "host=${CT_HOST}" ) - libelf_opts+=( "prefix=${CT_COMPLIBS_DIR}" ) + libelf_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) libelf_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) do_libelf_backend "${libelf_opts[@]}" diff -r 79201a2826fd -r 8a72662f0815 scripts/build/companion_libs/mpc.sh --- a/scripts/build/companion_libs/mpc.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/companion_libs/mpc.sh Mon Jul 25 19:04:17 2011 +0200 @@ -52,7 +52,7 @@ CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-host-${CT_HOST}" mpc_opts+=( "host=${CT_HOST}" ) - mpc_opts+=( "prefix=${CT_COMPLIBS_DIR}" ) + mpc_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) mpc_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) do_mpc_backend "${mpc_opts[@]}" diff -r 79201a2826fd -r 8a72662f0815 scripts/build/companion_libs/mpfr.sh --- a/scripts/build/companion_libs/mpfr.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/companion_libs/mpfr.sh Mon Jul 25 19:04:17 2011 +0200 @@ -94,7 +94,7 @@ CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpfr-host-${CT_HOST}" mpfr_opts+=( "host=${CT_HOST}" ) - mpfr_opts+=( "prefix=${CT_COMPLIBS_DIR}" ) + mpfr_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) mpfr_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) do_mpfr_backend "${mpfr_opts[@]}" diff -r 79201a2826fd -r 8a72662f0815 scripts/build/companion_libs/ppl.sh --- a/scripts/build/companion_libs/ppl.sh Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/build/companion_libs/ppl.sh Mon Jul 25 19:04:17 2011 +0200 @@ -54,7 +54,7 @@ CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}" ppl_opts+=( "host=${CT_HOST}" ) - ppl_opts+=( "prefix=${CT_COMPLIBS_DIR}" ) + ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) ppl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) do_ppl_backend "${ppl_opts[@]}" diff -r 79201a2826fd -r 8a72662f0815 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/crosstool-NG.sh.in Mon Jul 25 19:04:17 2011 +0200 @@ -157,7 +157,18 @@ CT_BUILDTOOLS_PREFIX_DIR="${CT_WORK_DIR}/${CT_TARGET}/buildtools" CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state" CT_CONFIG_DIR="${CT_BUILD_DIR}/configs" -CT_COMPLIBS_DIR="${CT_BUILD_DIR}/static" +# Note about HOST_COMPLIBS_DIR: it's always gonna be in the buildtools dir, or a +# sub-dir. So we won't have to save/restore it, not even create it. +# In case of cross or native, host-complibs are used for build-complibs; +# in case of canadian or cross-native, host-complibs are specific +case "${CT_TOOLCHAIN_TYPE}" in + native|cross) + CT_HOST_COMPLIBS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}" + ;; + canadian|cross-native) + CT_HOST_COMPLIBS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}/complibs-host" + ;; +esac # Compute test suite install directory CT_TEST_SUITE_DIR=${CT_INSTALL_DIR}/test-suite @@ -233,7 +244,7 @@ CT_DoExecLog ALL mkdir -p "${CT_CONFIG_DIR}" CT_DoExecLog ALL mkdir -p "${CT_INSTALL_DIR}" CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}" -CT_DoExecLog ALL mkdir -p "${CT_COMPLIBS_DIR}" +CT_DoExecLog ALL mkdir -p "${CT_HOST_COMPLIBS_DIR}" # Only create the state dir if asked for a restartable build [ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}" diff -r 79201a2826fd -r 8a72662f0815 scripts/functions --- a/scripts/functions Mon Jul 25 19:04:00 2011 +0200 +++ b/scripts/functions Mon Jul 25 19:04:17 2011 +0200 @@ -1146,7 +1146,6 @@ /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh" CT_DoTarballIfExists "${CT_BUILDTOOLS_PREFIX_DIR}" "${state_dir}/buildtools_dir" - CT_DoTarballIfExists "${CT_COMPLIBS_DIR}" "${state_dir}/complibs_dir" CT_DoTarballIfExists "${CT_CONFIG_DIR}" "${state_dir}/config_dir" CT_DoTarballIfExists "${CT_PREFIX_DIR}" "${state_dir}/prefix_dir" --exclude '*.log' @@ -1179,7 +1178,6 @@ CT_DoExtractTarballIfExists "${state_dir}/prefix_dir" "${CT_PREFIX_DIR}" CT_DoExtractTarballIfExists "${state_dir}/config_dir" "${CT_CONFIG_DIR}" - CT_DoExtractTarballIfExists "${state_dir}/complibs_dir" "${CT_COMPLIBS_DIR}" CT_DoExtractTarballIfExists "${state_dir}/buildtools_dir" "${CT_BUILDTOOLS_PREFIX_DIR}" # Restore the environment, discarding any error message