summaryrefslogtreecommitdiffstats
path: root/libtool-ldflags
diff options
context:
space:
mode:
authorPaul Jarc <prj-bugzilla-gcc@multivac.cwru.edu>2007-09-20 10:20:05 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-09-20 10:20:05 +0000
commit19d5986dde92e800281aaa285fb7314fe2b79aad (patch)
tree62a4be58d1afe09b522ff80bc4c0fb886dbc2746 /libtool-ldflags
parentre PR c++/33459 (ICE on reference member in union) (diff)
downloadgcc-19d5986dde92e800281aaa285fb7314fe2b79aad.tar.gz
gcc-19d5986dde92e800281aaa285fb7314fe2b79aad.tar.bz2
gcc-19d5986dde92e800281aaa285fb7314fe2b79aad.tar.xz
re PR bootstrap/31906 ("-Xcompiler" is inserted after "-Xlinker" when building libstdc++)
2007-09-20 Paul Jarc <prj-bugzilla-gcc@multivac.cwru.edu> PR bootstrap/31906 * libtool-ldflags: Don't prefix arguments with -Xcompiler if they're already prefixed. From-SVN: r128617
Diffstat (limited to 'libtool-ldflags')
-rwxr-xr-xlibtool-ldflags11
1 files changed, 10 insertions, 1 deletions
diff --git a/libtool-ldflags b/libtool-ldflags
index 6321747b4a9..e32e37bf10d 100755
--- a/libtool-ldflags
+++ b/libtool-ldflags
@@ -31,6 +31,7 @@
31# The output of the script. This string is built up as we process the 31# The output of the script. This string is built up as we process the
32# arguments. 32# arguments.
33result= 33result=
34prev_arg=
34 35
35for arg 36for arg
36do 37do
@@ -43,13 +44,21 @@ do
43 # options. So, we prefix these options with -Xcompiler to 44 # options. So, we prefix these options with -Xcompiler to
44 # make clear to libtool that they are in fact compiler 45 # make clear to libtool that they are in fact compiler
45 # options. 46 # options.
46 result="$result -Xcompiler" 47 case $prev_arg in
48 -Xpreprocessor|-Xcompiler|-Xlinker)
49 # This option is already prefixed; don't prefix it again.
50 ;;
51 *)
52 result="$result -Xcompiler"
53 ;;
54 esac
47 ;; 55 ;;
48 *) 56 *)
49 # We do not want to add -Xcompiler to other options because 57 # We do not want to add -Xcompiler to other options because
50 # that would prevent libtool itself from recognizing them. 58 # that would prevent libtool itself from recognizing them.
51 ;; 59 ;;
52 esac 60 esac
61 prev_arg=$arg
53 62
54 # If $(LDFLAGS) is (say): 63 # If $(LDFLAGS) is (say):
55 # a "b'c d" e 64 # a "b'c d" e