X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libtool-ldflags;h=e32e37bf10dd5a5af7648b64ae648e80bcf44b5f;hp=6321747b4a95b4163d9e847f1b529cef98bae6f7;hb=9658ef825c1c123b5fb8df0046be91ba31942731;hpb=e64c07b90eac1b46178db38243decfe4a2c8b67a 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