Skip to content

Commit 19d5986

Browse files
Paul JarcPaolo Carlini
Paul Jarc
authored and
Paolo Carlini
committed
re PR bootstrap/31906 ("-Xcompiler" is inserted after "-Xlinker" when building libstdc++)
2007-09-20 Paul Jarc <[email protected]> PR bootstrap/31906 * libtool-ldflags: Don't prefix arguments with -Xcompiler if they're already prefixed. From-SVN: r128617
1 parent b43d1bd commit 19d5986

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2007-09-20 Paul Jarc <[email protected]>
2+
3+
PR bootstrap/31906
4+
* libtool-ldflags: Don't prefix arguments with -Xcompiler if
5+
they're already prefixed.
6+
17
2007-09-19 Benjamin Kosnik <[email protected]>
28

39
* configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Move libgomp before

libtool-ldflags

+10-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
# The output of the script. This string is built up as we process the
3232
# arguments.
3333
result=
34+
prev_arg=
3435

3536
for arg
3637
do
@@ -43,13 +44,21 @@ do
4344
# options. So, we prefix these options with -Xcompiler to
4445
# make clear to libtool that they are in fact compiler
4546
# 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
4755
;;
4856
*)
4957
# We do not want to add -Xcompiler to other options because
5058
# that would prevent libtool itself from recognizing them.
5159
;;
5260
esac
61+
prev_arg=$arg
5362

5463
# If $(LDFLAGS) is (say):
5564
# a "b'c d" e

0 commit comments

Comments
 (0)