aboutsummaryrefslogtreecommitdiff
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
parentb43d1bdea541d54d36ad04c73ac8061c3ddec37a (diff)
downloadgcc-19d5986dde92e800281aaa285fb7314fe2b79aad.zip
gcc-19d5986dde92e800281aaa285fb7314fe2b79aad.tar.gz
gcc-19d5986dde92e800281aaa285fb7314fe2b79aad.tar.bz2
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
-rw-r--r--ChangeLog6
-rwxr-xr-xlibtool-ldflags11
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d99400..e57e59d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2007-09-19 Benjamin Kosnik <bkoz@redhat.com>
* configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Move libgomp before
diff --git a/libtool-ldflags b/libtool-ldflags
index 6321747..e32e37b 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