summaryrefslogtreecommitdiff
path: root/gcc/exec-tool.in
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-05 10:32:23 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-05 10:32:23 +0000
commitfe410b3e0f7de0376d98b922113c80f9ab4bd192 (patch)
tree2907bc726434f732f093ecd43d5f5ba62ac08265 /gcc/exec-tool.in
parent941f2a0d21995a3e06f340891a639c4462850312 (diff)
downloadgcc-fe410b3e0f7de0376d98b922113c80f9ab4bd192.tar.gz
2008-04-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r133930 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/exec-tool.in')
-rw-r--r--gcc/exec-tool.in20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/exec-tool.in b/gcc/exec-tool.in
index f4cc7a0a9cc..6bdddd1d063 100644
--- a/gcc/exec-tool.in
+++ b/gcc/exec-tool.in
@@ -23,6 +23,8 @@ ORIGINAL_AS_FOR_TARGET="@ORIGINAL_AS_FOR_TARGET@"
ORIGINAL_LD_FOR_TARGET="@ORIGINAL_LD_FOR_TARGET@"
ORIGINAL_NM_FOR_TARGET="@ORIGINAL_NM_FOR_TARGET@"
exeext=@host_exeext@
+fast_install=@enable_fast_install@
+objdir=@objdir@
invoked=`basename "$0"`
case "$invoked" in
@@ -50,7 +52,23 @@ case "$original" in
scriptdir=`cd "$tdir" && pwd`
if test -x $scriptdir/../$dir/$prog; then
- exec $scriptdir/../$dir/$prog ${1+"$@"}
+ test "$fast_install" = yes || exec $scriptdir/../$dir/$prog ${1+"$@"}
+
+ # if libtool did everything it needs to do, there's a fast path
+ lt_prog=$scriptdir/../$dir/$objdir/lt-$prog
+ test -x $lt_prog && exec $lt_prog ${1+"$@"}
+
+ # libtool has not relinked ld-new yet, but we cannot just use the
+ # previous stage (because then the relinking would just never happen!).
+ # So we take extra care to use prev-ld/ld-new *on recursive calls*.
+ test -f $lt_prog-recursive && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
+
+ touch $lt_prog-recursive
+ $scriptdir/../$dir/$prog ${1+"$@"}
+ result=$?
+ rm -f $lt_prog-recursive
+ exit $result
+
else
exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
fi