From 2870ffae518798e2f18c110a91a420d65a6e712b Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Wed, 23 Jan 2019 09:52:04 +0200 Subject: Moved uClibc configuration installation to uClibc.sh Signed-off-by: Dima Krasner diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index ccadfeb..9d83c51 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -416,4 +416,8 @@ uClibc_post_cc() # Moreover, need to do this after the final compiler is built: on targets # that use elf2flt, the core compilers cannot find ld when running elf2flt. CT_MultilibFixupLDSO + + if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then + CT_InstallConfigurationFile "$CT_LIBC_UCLIBC_CONFIG_FILE" libc + fi } diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index 89c9e60..9804a6c 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -613,15 +613,7 @@ if [ -z "${CT_RESTART}" ]; then rm -f "${testc}" CT_DoLog EXTRA "Installing user-supplied crosstool-NG configuration" - CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin" - CT_DoExecLog DEBUG ${install} -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config" - CT_DoExecLog DEBUG ${sed} -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config" - if [ -n "$CT_LIBC_UCLIBC_CONFIG_FILE" ] - then - ${install} -m 0755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-libc.config" - bzip2 -c -9 "$CT_LIBC_UCLIBC_CONFIG_FILE" >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-libc.config" - fi - bzip2 -c -9 .config >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-ct-ng.config" + CT_InstallConfigurationFile .config ct-ng CT_DoStep EXTRA "Dumping internal crosstool-NG configuration" CT_DoLog EXTRA "Building a toolchain for:" diff --git a/scripts/functions b/scripts/functions index c97b9f4..877426b 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2453,3 +2453,14 @@ CT_InstallCopyingInformation() shopt -u nullglob } + +CT_InstallConfigurationFile() +{ + local path="${1}" + local suffix="${2}" + + CT_DoExecLog ALL mkdir -p "${CT_PREFIX_DIR}/bin" + CT_DoExecLog DEBUG ${install} -m 0755 "${CT_LIB_DIR}/scripts/toolchain-config.in" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-$suffix.config" + CT_DoExecLog DEBUG ${sed} -i -e 's,@@grep@@,"'"${grep}"'",;' "${CT_PREFIX_DIR}/bin/${CT_TARGET}-$suffix.config" + bzip2 -c -9 "$1" >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-$suffix.config" +} -- cgit v0.10.2-6-g49f6