summaryrefslogtreecommitdiff
path: root/libtool-ldflags
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-20 10:20:05 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-20 10:20:05 +0000
commit9658ef825c1c123b5fb8df0046be91ba31942731 (patch)
tree62a4be58d1afe09b522ff80bc4c0fb886dbc2746 /libtool-ldflags
parente64c07b90eac1b46178db38243decfe4a2c8b67a (diff)
downloadgcc-9658ef825c1c123b5fb8df0046be91ba31942731.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128617 138bc75d-0d04-0410-961f-82ee72b054a4
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 @@
# The output of the script. This string is built up as we process the
# arguments.
result=
+prev_arg=
for arg
do
@@ -43,13 +44,21 @@ do
# options. So, we prefix these options with -Xcompiler to
# make clear to libtool that they are in fact compiler
# options.
- result="$result -Xcompiler"
+ case $prev_arg in
+ -Xpreprocessor|-Xcompiler|-Xlinker)
+ # This option is already prefixed; don't prefix it again.
+ ;;
+ *)
+ result="$result -Xcompiler"
+ ;;
+ esac
;;
*)
# We do not want to add -Xcompiler to other options because
# that would prevent libtool itself from recognizing them.
;;
esac
+ prev_arg=$arg
# If $(LDFLAGS) is (say):
# a "b'c d" e