scripts/build/internals.sh
branchgcc-4.4
changeset 1401 604c5c80e24a
parent 1299 3448ac3f1a5d
child 1402 146c62142e1b
     1.1 --- a/scripts/build/internals.sh	Mon Apr 20 21:10:03 2009 +0000
     1.2 +++ b/scripts/build/internals.sh	Tue Jun 02 17:33:04 2009 +0000
     1.3 @@ -4,6 +4,8 @@
     1.4  # un-wanted files, to add tuple aliases, and to add the final
     1.5  # crosstool-NG-provided files.
     1.6  do_finish() {
     1.7 +    local _t
     1.8 +
     1.9      CT_DoStep INFO "Cleaning-up the toolchain's directory"
    1.10  
    1.11      CT_DoLog EXTRA "Removing access to the build system tools"
    1.12 @@ -39,6 +41,23 @@
    1.13      done
    1.14      CT_Popd
    1.15  
    1.16 +    # If using the companion libraries, we need a wrapper
    1.17 +    # that will set LD_LIBRARY_PATH approriately
    1.18 +    if [    "${CT_GMP_MPFR}" = "y"      \
    1.19 +         -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then
    1.20 +        CT_DoLog EXTRA "Installing toolchain wrappers"
    1.21 +        CT_Pushd "${CT_PREFIX_DIR}/bin"
    1.22 +        sed -r -e 's|@@CT_bash@@|'"${bash}"'|g;'    \
    1.23 +            "${CT_LIB_DIR}/scripts/wrapper.in"      \
    1.24 +            >".${CT_TARGET}-wrapper"
    1.25 +        CT_DoExecLog ALL chmod 755 ".${CT_TARGET}-wrapper"
    1.26 +        for t in "${CT_TARGET}-"*; do
    1.27 +            CT_DoExecLog ALL mv "${t}" ".${t}"
    1.28 +            CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}"
    1.29 +        done
    1.30 +        CT_Popd
    1.31 +    fi
    1.32 +
    1.33      # Remove the generated documentation files
    1.34      if [ "${CT_REMOVE_DOCS}" = "y" ]; then
    1.35          CT_DoLog EXTRA "Removing installed documentation"