comparison gcc/exec-tool.in @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents 77e2b8dfacca
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 #! /bin/sh 1 #! /bin/sh
2 2
3 # Copyright (C) 2007, 2008 Free Software Foundation, Inc. 3 # Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
4 # This file is part of GCC. 4 # This file is part of GCC.
5 5
6 # GCC is free software; you can redistribute it and/or modify 6 # GCC is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by 7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option) 8 # the Free Software Foundation; either version 3, or (at your option)
26 exeext=@host_exeext@ 26 exeext=@host_exeext@
27 fast_install=@enable_fast_install@ 27 fast_install=@enable_fast_install@
28 objdir=@objdir@ 28 objdir=@objdir@
29 29
30 invoked=`basename "$0"` 30 invoked=`basename "$0"`
31 id=$invoked
31 case "$invoked" in 32 case "$invoked" in
32 as) 33 as)
33 original=$ORIGINAL_AS_FOR_TARGET 34 original=$ORIGINAL_AS_FOR_TARGET
34 prog=as-new$exeext 35 prog=as-new$exeext
35 dir=gas 36 dir=gas
36 ;; 37 ;;
37 collect-ld) 38 collect-ld)
38 # when using a linker plugin, gcc will always pass '-plugin' as the 39 # when using a linker plugin, gcc will always pass '-plugin' as the
39 # first option to the linker. 40 # first or second option to the linker.
40 if test x"$1" = "x-plugin"; then 41 if test x"$1" = "x-plugin" || test x"$2" = "x-plugin"; then
41 original=$ORIGINAL_PLUGIN_LD_FOR_TARGET 42 original=$ORIGINAL_PLUGIN_LD_FOR_TARGET
42 else 43 else
43 original=$ORIGINAL_LD_FOR_TARGET 44 original=$ORIGINAL_LD_FOR_TARGET
44 fi 45 fi
45 prog=ld-new$exeext 46 prog=ld-new$exeext
46 dir=ld 47 dir=ld
48 id=ld
47 ;; 49 ;;
48 nm) 50 nm)
49 original=$ORIGINAL_NM_FOR_TARGET 51 original=$ORIGINAL_NM_FOR_TARGET
50 prog=nm-new$exeext 52 prog=nm-new$exeext
51 dir=binutils 53 dir=binutils
66 test -x $lt_prog && exec $lt_prog ${1+"$@"} 68 test -x $lt_prog && exec $lt_prog ${1+"$@"}
67 69
68 # libtool has not relinked ld-new yet, but we cannot just use the 70 # libtool has not relinked ld-new yet, but we cannot just use the
69 # previous stage (because then the relinking would just never happen!). 71 # previous stage (because then the relinking would just never happen!).
70 # So we take extra care to use prev-ld/ld-new *on recursive calls*. 72 # So we take extra care to use prev-ld/ld-new *on recursive calls*.
73 eval LT_RCU="\${LT_RCU_$id}"
71 test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"} 74 test x"$LT_RCU" = x"1" && exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
72 75
73 LT_RCU=1; export LT_RCU 76 eval LT_RCU_$id=1
77 export LT_RCU_$id
74 $scriptdir/../$dir/$prog ${1+"$@"} 78 $scriptdir/../$dir/$prog ${1+"$@"}
75 result=$? 79 result=$?
76 exit $result 80 exit $result
77 81
78 else 82 else
79 exec $scriptdir/../prev-$dir/$prog ${1+"$@"} 83 exec $scriptdir/../prev-$dir/$prog ${1+"$@"}
80 fi 84 fi
81 ;; 85 ;;
82 *) 86 *)
83 exec "$original" ${1+"$@"} 87 exec $original ${1+"$@"}
84 ;; 88 ;;
85 esac 89 esac
86
87