1.1 --- a/configure Tue Jun 02 17:33:04 2009 +0000
1.2 +++ b/configure Tue Jun 02 21:01:19 2009 +0000
1.3 @@ -337,6 +337,7 @@
1.4 has_or_abort prog=libtool \
1.5 ver='\(GNU libtool.*\) (2[[:digit:]]*\.|1\.6[[:digit:]]*\.|1\.5\.[2-9][[:digit:]]+)' \
1.6 err="'libtool' 1.5.26 or above was not found"
1.7 +has_or_abort prog=stat ver='GNU coreutils'
1.8 has_or_abort prog="curl wget"
1.9 has_or_abort prog=cvs
1.10 has_or_abort prog=patch
2.1 --- a/scripts/build/internals.sh Tue Jun 02 17:33:04 2009 +0000
2.2 +++ b/scripts/build/internals.sh Tue Jun 02 21:01:19 2009 +0000
2.3 @@ -47,14 +47,24 @@
2.4 -o "${CT_PPL_CLOOG_MPC}" = "y" ]; then
2.5 CT_DoLog EXTRA "Installing toolchain wrappers"
2.6 CT_Pushd "${CT_PREFIX_DIR}/bin"
2.7 - sed -r -e 's|@@CT_bash@@|'"${bash}"'|g;' \
2.8 - "${CT_LIB_DIR}/scripts/wrapper.in" \
2.9 - >".${CT_TARGET}-wrapper"
2.10 - CT_DoExecLog ALL chmod 755 ".${CT_TARGET}-wrapper"
2.11 +
2.12 + # Copy the wrapper
2.13 + CT_DoExecLog DEBUG install -m 0755 "${CT_LIB_DIR}/scripts/wrapper.in" \
2.14 + ".${CT_TARGET}-wrapper"
2.15 +
2.16 + # Replace every tools with the wrapper
2.17 + # Do it unconditionally, even for those tools that happen to be shell
2.18 + # scripts, we don't know if they would in the end spawn a binary...
2.19 + # Just skip symlinks
2.20 for t in "${CT_TARGET}-"*; do
2.21 - CT_DoExecLog ALL mv "${t}" ".${t}"
2.22 - CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}"
2.23 + if [ "$( LANG=C stat -c '%F' "${t}" )" != "symbolic link" ]; then
2.24 + CT_DoExecLog ALL mv "${t}" ".${t}"
2.25 + CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}"
2.26 + fi
2.27 done
2.28 +
2.29 + # Get rid of the wrapper, we're using hardlinks
2.30 + CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper"
2.31 CT_Popd
2.32 fi
2.33
3.1 --- a/scripts/wrapper.in Tue Jun 02 17:33:04 2009 +0000
3.2 +++ b/scripts/wrapper.in Tue Jun 02 21:01:19 2009 +0000
3.3 @@ -1,5 +1,4 @@
3.4 -#!@@CT_bash@@
3.5 -# There are bashisms on the last line
3.6 +#!/bin/sh
3.7
3.8 dirname="$(dirname "${0}")"
3.9 basename="$(basename "${0}")"
3.10 @@ -12,4 +11,4 @@
3.11 esac
3.12
3.13 export LD_LIBRARY_PATH
3.14 -exec -a "${basename}" "${dirname}/.${basename}" "$@"
3.15 +exec "${dirname}/.${basename}" "$@"