From d811941c9a8222476995fac6805ca0ee188dad1e Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sun, 30 Aug 2009 00:27:12 +0200 Subject: config: choose whether to use the shell or the C wrapper Offer a config choice on whether to isntall the script wrapper, or the compiled C wrapper. Update docs/overview.txt accordingly. --- scripts/build/internals.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index a920c502..cf869a1a 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -46,9 +46,25 @@ do_finish() { CT_DoLog EXTRA "Installing toolchain wrappers" CT_Pushd "${CT_PREFIX_DIR}/bin" - # Copy the wrapper - CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/wrapper.in" \ - ".${CT_TARGET}-wrapper" + # Install the wrapper + case "${CT_TOOLS_WRAPPER}" in + script) + CT_DoExecLog DEBUG install \ + -m 0755 \ + "${CT_LIB_DIR}/scripts/wrapper.in" \ + ".${CT_TARGET}-wrapper" + ;; + exec) + _t="-s" + if [ "${CT_DEBUG_CT}" = "y" ]; then + _t="" # If debugging crosstool-NG, don't strip the wrapper + fi + CT_DoExecLog "${HOST_CC}" \ + -Wall -Wextra -Wunreachable-code -Werror \ + -O3 -static ${_t} \ + -o ".${CT_TARGET}-wrapper" + ;; + esac # Replace every tools with the wrapper # Do it unconditionally, even for those tools that happen to be shell -- cgit v1.2.3