diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index b30a4bc8..890f44d3 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -134,15 +134,11 @@ do_binutils() { # are not executable on the build machine. case "${CT_TOOLCHAIN_TYPE}" in cross|native) - mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin" - mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin" - mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin" - mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin" + mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/${CT_TARGET}/bin" + mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/bin" for t in "${binutils_tools[@]}"; do - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin/${t}" - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin/${CT_TARGET}-${t}" - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin/${t}" - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}" + ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_BUILDTOOLS_PREFIX_DIR}/${CT_TARGET}/bin/${t}" + ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${t}" done 2>&1 |CT_DoLog ALL ;; *) ;; diff --git a/scripts/build/binutils/elf2flt.sh b/scripts/build/binutils/elf2flt.sh index 72dca6f7..14a285f2 100644 --- a/scripts/build/binutils/elf2flt.sh +++ b/scripts/build/binutils/elf2flt.sh @@ -64,15 +64,11 @@ do_elf2flt() { # are not executable on the build machine. case "${CT_TOOLCHAIN_TYPE}" in cross|native) - mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin" - mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin" - mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin" - mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin" + mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/${CT_TARGET}/bin" + mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/bin" for t in elf2flt flthdr; do - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/${CT_TARGET}/bin/${t}" - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_STATIC_PREFIX_DIR}/bin/${CT_TARGET}-${t}" - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/${CT_TARGET}/bin/${t}" - ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}" + ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_BUILDTOOLS_PREFIX_DIR}/${CT_TARGET}/bin/${t}" + ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${t}" done 2>&1 |CT_DoLog ALL ;; *) ;; diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index e0906c33..0a65f51f 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -71,7 +71,7 @@ do_cc_core_pass_1() { core_opts+=( "mode=static" ) core_opts+=( "host=${CT_HOST}" ) core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) - core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" ) + core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) ;; *) @@ -100,12 +100,12 @@ do_cc_core_pass_2() { # In case we're NPTL, build the shared core gcc and the target libgcc. # In any other case, build the static core gcc and, if using gcc-4.3+, # also build the target libgcc. + core_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in y,*,*) do_core=y core_opts+=( "host=${CT_HOST}" ) core_opts+=( "mode=static" ) - core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" ) core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) ;; @@ -116,7 +116,6 @@ do_cc_core_pass_2() { core_opts+=( "host=${CT_HOST}" ) core_opts+=( "build_libgcc=yes" ) core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) - core_opts+=( "prefix=${CT_CC_CORE_SHARED_PREFIX_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) ;; ,,win32) @@ -125,7 +124,6 @@ do_cc_core_pass_2() { core_opts+=( "host=${CT_HOST}" ) core_opts+=( "build_libgcc=yes" ) core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) - core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) ;; *) @@ -133,7 +131,6 @@ do_cc_core_pass_2() { core_opts+=( "mode=static" ) core_opts+=( "host=${CT_HOST}" ) core_opts+=( "complibs=${CT_COMPLIBS_DIR}" ) - core_opts+=( "prefix=${CT_CC_CORE_STATIC_PREFIX_DIR}" ) core_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then core_opts+=( "build_libgcc=yes" ) diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 2c520479..7f18ae1a 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -162,11 +162,6 @@ CT_COMPLIBS_DIR="${CT_BUILD_DIR}/static" # Compute test suite install directory CT_TEST_SUITE_DIR=${CT_INSTALL_DIR}/test-suite -# Note: we'll always install the core compiler in its own directory, so as to -# not mix the two builds: core and final. -CT_CC_CORE_STATIC_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-static" -CT_CC_CORE_SHARED_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-shared" - # We must ensure that we can restart if asked for! if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}" ]; then CT_DoLog ERROR "You asked to restart a non-restartable build" @@ -239,10 +234,6 @@ 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}" -if [ -z "${CT_CANADIAN}" ]; then - CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_STATIC_PREFIX_DIR}" - CT_DoExecLog ALL mkdir -p "${CT_CC_CORE_SHARED_PREFIX_DIR}" -fi # 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}" @@ -457,13 +448,12 @@ if [ -z "${CT_RESTART}" ]; then # Carefully add paths in the order we want them: # - first try in ${CT_PREFIX_DIR}/bin - # - then try in ${CT_CC_CORE_SHARED_PREFIX_DIR}/bin - # - then try in ${CT_CC_CORE_STATIC_PREFIX_DIR}/bin + # - then try the buildtools dir # - fall back to searching user's PATH # Of course, neither cross-native nor canadian can run on BUILD, # so don't add those PATHs in this case... case "${CT_TOOLCHAIN_TYPE}" in - cross) export PATH="${CT_BUILDTOOLS_PREFIX_DIR}/bin:${CT_PREFIX_DIR}/bin:${CT_CC_CORE_SHARED_PREFIX_DIR}/bin:${CT_CC_CORE_STATIC_PREFIX_DIR}/bin:${PATH}";; + cross) export PATH="${CT_PREFIX_DIR}/bin:${CT_BUILDTOOLS_PREFIX_DIR}/bin:${PATH}";; canadian) export PATH="${CT_BUILDTOOLS_PREFIX_DIR}/bin:${PATH}";; *) ;; esac diff --git a/scripts/functions b/scripts/functions index cc218991..ad891940 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1148,8 +1148,6 @@ CT_DoSaveState() { 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_CC_CORE_STATIC_PREFIX_DIR}" "${state_dir}/cc_core_static_prefix_dir" - CT_DoTarballIfExists "${CT_CC_CORE_SHARED_PREFIX_DIR}" "${state_dir}/cc_core_shared_prefix_dir" CT_DoTarballIfExists "${CT_PREFIX_DIR}" "${state_dir}/prefix_dir" --exclude '*.log' CT_DoLog STATE " Saving log file" @@ -1180,8 +1178,6 @@ CT_DoLoadState(){ CT_DoLog ${CT_LOG_LEVEL_MAX} "Restoring state at step '${state_name}', as requested." CT_DoExtractTarballIfExists "${state_dir}/prefix_dir" "${CT_PREFIX_DIR}" - CT_DoExtractTarballIfExists "${state_dir}/cc_core_shared_prefix_dir" "${CT_CC_CORE_SHARED_PREFIX_DIR}" - CT_DoExtractTarballIfExists "${state_dir}/cc_core_static_prefix_dir" "${CT_CC_CORE_STATIC_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}"