diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-08-29 22:27:12 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2009-08-29 22:27:12 (GMT) |
commit | d811941c9a8222476995fac6805ca0ee188dad1e (patch) | |
tree | bc20dcf4a04a0c29a09882e0cf8603ea7ea6c0e6 /scripts/build/internals.sh | |
parent | 8f051d8ef6a9bc03da3c68da518021a6b222c176 (diff) |
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.
Diffstat (limited to 'scripts/build/internals.sh')
-rw-r--r-- | scripts/build/internals.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index a920c50..cf869a1 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 |