mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 02:39:46 +00:00
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>
This commit is contained in:
parent
4a8daa02e3
commit
2f718dd60c
@ -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" )
|
||||
|
@ -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[@]}"
|
||||
|
||||
|
@ -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[@]}"
|
||||
|
||||
|
@ -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[@]}"
|
||||
|
||||
|
@ -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[@]}"
|
||||
|
||||
|
@ -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[@]}"
|
||||
|
||||
|
@ -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[@]}"
|
||||
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user