summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-06-02 21:01:19 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-06-02 21:01:19 (GMT)
commita07693b13cd0741fe0de2d6756a7a3c680f3f689 (patch)
treed2b61eb0213e9ce5e8cacbd8015125be7dd04c58 /scripts/build
parentd9e898bdbc0828739425b25a6f23da198248f251 (diff)
/devel/gcc-4.4:
- ./configure: check for 'stat', needing to install the tools wrapper - wrapper: make it a POSIX-compliant script, restore relocatability - don't install the wrapper for symlinks -------- diffstat follows -------- /devel/gcc-4.4/configure | 1 1 0 0 + /devel/gcc-4.4/scripts/build/internals.sh | 22 16 6 0 ++++++++++++++++------ /devel/gcc-4.4/scripts/wrapper.in | 5 2 3 0 ++--- 3 files changed, 19 insertions(+), 9 deletions(-)
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/internals.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index 51272e6..b8a80f2 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -47,14 +47,24 @@ do_finish() {
-o "${CT_PPL_CLOOG_MPC}" = "y" ]; then
CT_DoLog EXTRA "Installing toolchain wrappers"
CT_Pushd "${CT_PREFIX_DIR}/bin"
- sed -r -e 's|@@CT_bash@@|'"${bash}"'|g;' \
- "${CT_LIB_DIR}/scripts/wrapper.in" \
- >".${CT_TARGET}-wrapper"
- CT_DoExecLog ALL chmod 755 ".${CT_TARGET}-wrapper"
+
+ # 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
- CT_DoExecLog ALL mv "${t}" ".${t}"
- CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${t}"
+ 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