summaryrefslogtreecommitdiff
path: root/gcc/exec-tool.in
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2008-04-02 10:07:58 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2008-04-02 10:07:58 +0000
commitda0f6381586f7d1acfaa51540355db2c83c34ed2 (patch)
tree898bb2254aaae08c8cf898c55adf2bbb800e06f5 /gcc/exec-tool.in
parentbf1e48d172ead219afc6471252f1a7c775999070 (diff)
downloadgcc-da0f6381586f7d1acfaa51540355db2c83c34ed2.tar.gz
re PR bootstrap/35752 (Combined gcc + binutils source tree doesn't bootstrap with --enable-shared)
2008-04-02 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/35752 * Makefile.in (objdir): Set it here. * configure.ac: Not here. Find dynamic linker characteristics. * exec-tool.in: Use them. * aclocal.m4: Regenerate. * configure: Regenerate. From-SVN: r133832
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