diff options
author | Alexey Neyman <stilor@att.net> | 2019-01-23 07:57:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-23 07:57:17 (GMT) |
commit | daa07529503413956bc3c769267d12dacb28e0d5 (patch) | |
tree | 8514dfe42c97432b2a0b51485a6f1dca7e12cd06 | |
parent | 0364e3cf91a636dea48b6a7a203f9de5c7f1adc2 (diff) | |
parent | de797aa99d7b380cdef6c0146ae4cc68d10e089d (diff) |
Merge pull request #1128 from dimkr/uclibc-cfg
Store the uClibc .config alongside the ct-ng .config
-rw-r--r-- | scripts/build/libc/uClibc.sh | 4 | ||||
-rw-r--r-- | scripts/crosstool-NG.sh | 5 | ||||
-rw-r--r-- | scripts/functions | 11 |
3 files changed, 16 insertions, 4 deletions
diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index ccadfeb..5ea5c58 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 3e888d7..9804a6c 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -613,10 +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" - 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..618298a 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 "${path}" >>"${CT_PREFIX_DIR}/bin/${CT_TARGET}-${suffix}.config" +} |