complibs: fixup the host complibs install dir
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jul 25 19:04:17 2011 +0200 (2011-07-25)
changeset 29318a72662f0815
parent 2930 79201a2826fd
child 2932 c1f65d6a9a13
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" <yann.morin.1998@anciens.enib.fr>
scripts/build/cc/gcc.sh
scripts/build/companion_libs/cloog.sh
scripts/build/companion_libs/gmp.sh
scripts/build/companion_libs/libelf.sh
scripts/build/companion_libs/mpc.sh
scripts/build/companion_libs/mpfr.sh
scripts/build/companion_libs/ppl.sh
scripts/crosstool-NG.sh.in
scripts/functions
     1.1 --- a/scripts/build/cc/gcc.sh	Mon Jul 25 19:04:00 2011 +0200
     1.2 +++ b/scripts/build/cc/gcc.sh	Mon Jul 25 19:04:17 2011 +0200
     1.3 @@ -68,7 +68,7 @@
     1.4              do_core=y
     1.5              core_opts+=( "mode=static" )
     1.6              core_opts+=( "host=${CT_BUILD}" )
     1.7 -            core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
     1.8 +            core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
     1.9              core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    1.10              core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.11              ;;
    1.12 @@ -93,7 +93,7 @@
    1.13      # Common options:
    1.14      core_opts+=( "host=${CT_BUILD}" )
    1.15      core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    1.16 -    core_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
    1.17 +    core_opts+=( "complibs=${CT_BUILDTOOLS_PREFIX_DIR}" )
    1.18      core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.19  
    1.20      # Do nothing for canadian-crosses, we already have a target compiler.
    1.21 @@ -469,7 +469,7 @@
    1.22  
    1.23      final_opts+=( "host=${CT_HOST}" )
    1.24      final_opts+=( "prefix=${CT_PREFIX_DIR}" )
    1.25 -    final_opts+=( "complibs=${CT_COMPLIBS_DIR}" )
    1.26 +    final_opts+=( "complibs=${CT_HOST_COMPLIBS_DIR}" )
    1.27      final_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.28      if [ "${CT_BUILD_MANUALS}" = "y" ]; then
    1.29          final_opts+=( "build_manuals=yes" )
     2.1 --- a/scripts/build/companion_libs/cloog.sh	Mon Jul 25 19:04:00 2011 +0200
     2.2 +++ b/scripts/build/companion_libs/cloog.sh	Mon Jul 25 19:04:17 2011 +0200
     2.3 @@ -64,7 +64,7 @@
     2.4      CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-host-${CT_HOST}"
     2.5  
     2.6      cloog_opts+=( "host=${CT_HOST}" )
     2.7 -    cloog_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
     2.8 +    cloog_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
     2.9      cloog_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    2.10      do_cloog_backend "${cloog_opts[@]}"
    2.11  
     3.1 --- a/scripts/build/companion_libs/gmp.sh	Mon Jul 25 19:04:00 2011 +0200
     3.2 +++ b/scripts/build/companion_libs/gmp.sh	Mon Jul 25 19:04:17 2011 +0200
     3.3 @@ -51,7 +51,7 @@
     3.4      CT_mkdir_pushd "${CT_BUILD_DIR}/build-gmp-host-${CT_HOST}"
     3.5  
     3.6      gmp_opts+=( "host=${CT_HOST}" )
     3.7 -    gmp_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
     3.8 +    gmp_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
     3.9      gmp_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    3.10      do_gmp_backend "${gmp_opts[@]}"
    3.11  
     4.1 --- a/scripts/build/companion_libs/libelf.sh	Mon Jul 25 19:04:00 2011 +0200
     4.2 +++ b/scripts/build/companion_libs/libelf.sh	Mon Jul 25 19:04:17 2011 +0200
     4.3 @@ -52,7 +52,7 @@
     4.4      CT_mkdir_pushd "${CT_BUILD_DIR}/build-libelf-host-${CT_HOST}"
     4.5  
     4.6      libelf_opts+=( "host=${CT_HOST}" )
     4.7 -    libelf_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
     4.8 +    libelf_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
     4.9      libelf_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    4.10      do_libelf_backend "${libelf_opts[@]}"
    4.11  
     5.1 --- a/scripts/build/companion_libs/mpc.sh	Mon Jul 25 19:04:00 2011 +0200
     5.2 +++ b/scripts/build/companion_libs/mpc.sh	Mon Jul 25 19:04:17 2011 +0200
     5.3 @@ -52,7 +52,7 @@
     5.4      CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpc-host-${CT_HOST}"
     5.5  
     5.6      mpc_opts+=( "host=${CT_HOST}" )
     5.7 -    mpc_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
     5.8 +    mpc_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
     5.9      mpc_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    5.10      do_mpc_backend "${mpc_opts[@]}"
    5.11  
     6.1 --- a/scripts/build/companion_libs/mpfr.sh	Mon Jul 25 19:04:00 2011 +0200
     6.2 +++ b/scripts/build/companion_libs/mpfr.sh	Mon Jul 25 19:04:17 2011 +0200
     6.3 @@ -94,7 +94,7 @@
     6.4      CT_mkdir_pushd "${CT_BUILD_DIR}/build-mpfr-host-${CT_HOST}"
     6.5  
     6.6      mpfr_opts+=( "host=${CT_HOST}" )
     6.7 -    mpfr_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
     6.8 +    mpfr_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
     6.9      mpfr_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    6.10      do_mpfr_backend "${mpfr_opts[@]}"
    6.11  
     7.1 --- a/scripts/build/companion_libs/ppl.sh	Mon Jul 25 19:04:00 2011 +0200
     7.2 +++ b/scripts/build/companion_libs/ppl.sh	Mon Jul 25 19:04:17 2011 +0200
     7.3 @@ -54,7 +54,7 @@
     7.4      CT_mkdir_pushd "${CT_BUILD_DIR}/build-ppl-host-${CT_HOST}"
     7.5  
     7.6      ppl_opts+=( "host=${CT_HOST}" )
     7.7 -    ppl_opts+=( "prefix=${CT_COMPLIBS_DIR}" )
     7.8 +    ppl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
     7.9      ppl_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    7.10      do_ppl_backend "${ppl_opts[@]}"
    7.11  
     8.1 --- a/scripts/crosstool-NG.sh.in	Mon Jul 25 19:04:00 2011 +0200
     8.2 +++ b/scripts/crosstool-NG.sh.in	Mon Jul 25 19:04:17 2011 +0200
     8.3 @@ -157,7 +157,18 @@
     8.4  CT_BUILDTOOLS_PREFIX_DIR="${CT_WORK_DIR}/${CT_TARGET}/buildtools"
     8.5  CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
     8.6  CT_CONFIG_DIR="${CT_BUILD_DIR}/configs"
     8.7 -CT_COMPLIBS_DIR="${CT_BUILD_DIR}/static"
     8.8 +# Note about HOST_COMPLIBS_DIR: it's always gonna be in the buildtools dir, or a
     8.9 +# sub-dir. So we won't have to save/restore it, not even create it.
    8.10 +# In case of cross or native, host-complibs are used for build-complibs;
    8.11 +# in case of canadian or cross-native, host-complibs are specific
    8.12 +case "${CT_TOOLCHAIN_TYPE}" in
    8.13 +    native|cross)
    8.14 +        CT_HOST_COMPLIBS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}"
    8.15 +        ;;
    8.16 +    canadian|cross-native)
    8.17 +        CT_HOST_COMPLIBS_DIR="${CT_BUILDTOOLS_PREFIX_DIR}/complibs-host"
    8.18 +        ;;
    8.19 +esac
    8.20  
    8.21  # Compute test suite install directory
    8.22  CT_TEST_SUITE_DIR=${CT_INSTALL_DIR}/test-suite
    8.23 @@ -233,7 +244,7 @@
    8.24  CT_DoExecLog ALL mkdir -p "${CT_CONFIG_DIR}"
    8.25  CT_DoExecLog ALL mkdir -p "${CT_INSTALL_DIR}"
    8.26  CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}"
    8.27 -CT_DoExecLog ALL mkdir -p "${CT_COMPLIBS_DIR}"
    8.28 +CT_DoExecLog ALL mkdir -p "${CT_HOST_COMPLIBS_DIR}"
    8.29  
    8.30  # Only create the state dir if asked for a restartable build
    8.31  [ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}"
     9.1 --- a/scripts/functions	Mon Jul 25 19:04:00 2011 +0200
     9.2 +++ b/scripts/functions	Mon Jul 25 19:04:17 2011 +0200
     9.3 @@ -1146,7 +1146,6 @@
     9.4                             /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh"
     9.5  
     9.6      CT_DoTarballIfExists "${CT_BUILDTOOLS_PREFIX_DIR}" "${state_dir}/buildtools_dir"
     9.7 -    CT_DoTarballIfExists "${CT_COMPLIBS_DIR}" "${state_dir}/complibs_dir"
     9.8      CT_DoTarballIfExists "${CT_CONFIG_DIR}" "${state_dir}/config_dir"
     9.9      CT_DoTarballIfExists "${CT_PREFIX_DIR}" "${state_dir}/prefix_dir" --exclude '*.log'
    9.10  
    9.11 @@ -1179,7 +1178,6 @@
    9.12  
    9.13      CT_DoExtractTarballIfExists "${state_dir}/prefix_dir" "${CT_PREFIX_DIR}"
    9.14      CT_DoExtractTarballIfExists "${state_dir}/config_dir" "${CT_CONFIG_DIR}"
    9.15 -    CT_DoExtractTarballIfExists "${state_dir}/complibs_dir" "${CT_COMPLIBS_DIR}"
    9.16      CT_DoExtractTarballIfExists "${state_dir}/buildtools_dir" "${CT_BUILDTOOLS_PREFIX_DIR}"
    9.17  
    9.18      # Restore the environment, discarding any error message