summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-25 17:04:17 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-07-25 17:04:17 (GMT)
commit2f718dd60c19a5d671e7fbef00c67c05ef98c9f4 (patch)
tree7a4940f84ef5838b66b5290a14bc7f95296fdedc
parent4a8daa02e39e234aa03833287fcec3401d9932a4 (diff)
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>
-rw-r--r--scripts/build/cc/gcc.sh6
-rw-r--r--scripts/build/companion_libs/cloog.sh2
-rw-r--r--scripts/build/companion_libs/gmp.sh2
-rw-r--r--scripts/build/companion_libs/libelf.sh2
-rw-r--r--scripts/build/companion_libs/mpc.sh2
-rw-r--r--scripts/build/companion_libs/mpfr.sh2
-rw-r--r--scripts/build/companion_libs/ppl.sh2
-rw-r--r--scripts/crosstool-NG.sh.in15
-rw-r--r--scripts/functions2
9 files changed, 22 insertions, 13 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index d1bb274..b56b49c 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -68,7 +68,7 @@ do_cc_core_pass_1() {
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 @@ do_cc_core_pass_2() {
# 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 @@ do_cc() {
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 --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh
index 5c2b421..f83aa24 100644
--- a/scripts/build/companion_libs/cloog.sh
+++ b/scripts/build/companion_libs/cloog.sh
@@ -64,7 +64,7 @@ do_cloog_for_host() {
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 --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh
index 04af002..ebc095b 100644
--- a/scripts/build/companion_libs/gmp.sh
+++ b/scripts/build/companion_libs/gmp.sh
@@ -51,7 +51,7 @@ do_gmp_for_host() {
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 --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh
index c10a7bf..e7b140b 100644
--- a/scripts/build/companion_libs/libelf.sh
+++ b/scripts/build/companion_libs/libelf.sh
@@ -52,7 +52,7 @@ do_libelf_for_host() {
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 --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh
index f45982d..b035f4d 100644
--- a/scripts/build/companion_libs/mpc.sh
+++ b/scripts/build/companion_libs/mpc.sh
@@ -52,7 +52,7 @@ do_mpc_for_host() {
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 --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh
index b346757..35a4849 100644
--- a/scripts/build/companion_libs/mpfr.sh
+++ b/scripts/build/companion_libs/mpfr.sh
@@ -94,7 +94,7 @@ do_mpfr_for_host() {
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 --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh
index da7fb1a..90dcad3 100644
--- a/scripts/build/companion_libs/ppl.sh
+++ b/scripts/build/companion_libs/ppl.sh
@@ -54,7 +54,7 @@ do_ppl_for_host() {
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 --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 7f18ae1..c683417 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -157,7 +157,18 @@ CT_BUILD_DIR="${CT_WORK_DIR}/${CT_TARGET}/build"
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_BUILDTOOLS_PREFIX_DIR}/bin"
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 --git a/scripts/functions b/scripts/functions
index ad89194..4e23666 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -1146,7 +1146,6 @@ CT_DoSaveState() {
/^(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_DoLoadState(){
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