diff options
author | Yann E. MORIN <devnull@localhost> | 2009-06-17 09:38:04 (GMT) |
---|---|---|
committer | Yann E. MORIN <devnull@localhost> | 2009-06-17 09:38:04 (GMT) |
commit | 302dd084c2e782ea5fdbde1db9f1b2bcda5ac83f (patch) | |
tree | 2bd1601131ca41844086fcdcaccffcc7438a66ee /scripts/build/internals.sh | |
parent | a393a72f5f7b0f0f48f11782d70b255c6ca5f740 (diff) | |
parent | a7ff05b022a8db08185486fa0fbf324f2ecd9d3e (diff) |
[gcc] Merge the gcc-4.4 suport to the default branch, from 1407:83083566fdd0
Diffstat (limited to 'scripts/build/internals.sh')
-rw-r--r-- | scripts/build/internals.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index acaf864..a262c1d 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -4,6 +4,8 @@ # un-wanted files, to add tuple aliases, and to add the final # crosstool-NG-provided files. do_finish() { + local _t + CT_DoStep INFO "Cleaning-up the toolchain's directory" CT_DoLog EXTRA "Removing access to the build system tools" @@ -39,6 +41,33 @@ do_finish() { done CT_Popd + # If using the companion libraries, we need a wrapper + # that will set LD_LIBRARY_PATH approriately + if [ "${CT_GMP_MPFR}" = "y" \ + -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then + 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" + + # Replace every tools with the wrapper + # Do it unconditionally, even for those tools that happen to be shell + # scripts, we don't know if they would in the end spawn a binary... + # Just skip symlinks + for _t in "${CT_TARGET}-"*; do + if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then + CT_DoExecLog ALL mv "${t}" ".${_t}" + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}" + fi + done + + # Get rid of the wrapper, we're using hardlinks + CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper" + CT_Popd + fi + # Remove the generated documentation files if [ "${CT_REMOVE_DOCS}" = "y" ]; then CT_DoLog EXTRA "Removing installed documentation" |