libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New flag -XCClinker


From: Boehne, Robert
Subject: New flag -XCClinker
Date: Mon, 28 Oct 2002 07:47:37 -0600

Hello,

I've found that -Xlinker and -Xcompiler -Wl, && -Wc,
were not quite enough.  The problem appeared when I
needed to make sure a linking flag was passed to the
C++ compiler driver as-is.  Without this patch, the only
way I could get these flags in the right place was to
set CXX to "$CXX -flag1 -flag2" and that broke a few
configure tests.  In general, I think non-C compilers
need a flag like this when it should be passed at link
time to the compiler driver.

This patch adds the flag -XCClinker which behaves just like
-Xlinker but does not append ${wl} to the flag.  Documentation
is also updated.  I've tested the patch, and found no regressions.

Ok to commit?

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne AT ricardo-us DOT com

Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.306
diff -u -r1.306 ltmain.in
--- ltmain.in   25 Oct 2002 00:23:24 -0000      1.306
+++ ltmain.in   28 Oct 2002 13:40:44 -0000
@@ -1089,6 +1089,14 @@
          finalize_command="$finalize_command $wl$qarg"
          continue
          ;;
+       xcclinker)
+         linker_flags="$linker_flags $qarg"
+         compiler_flags="$compiler_flags $qarg"
+         prev=
+         compile_command="$compile_command $qarg"
+         finalize_command="$finalize_command $qarg"
+         continue
+         ;;
        *)
          eval "$prev=\"\$arg\""
          prev=
@@ -1354,6 +1362,11 @@
 
       -Xlinker)
        prev=xlinker
+       continue
+       ;;
+
+      -XCClinker)
+       prev=xcclinker
        continue
        ;;
 
Index: doc/libtool.texi
===================================================================
RCS file: /cvsroot/libtool/libtool/doc/libtool.texi,v
retrieving revision 1.125
diff -u -r1.125 libtool.texi
--- doc/libtool.texi    20 Jun 2002 06:58:38 -0000      1.125
+++ doc/libtool.texi    28 Oct 2002 13:40:44 -0000
@@ -1144,10 +1144,11 @@
 @samp{.lo}.
 
 If shared libraries are being built, any necessary PIC generation flags
-are substituted into the compilation command.
-You can pass compiler and linker specific flags using @samp{-Wc,@var{flag}}
-and @samp{-Xcompiler @var{flag}} or @samp{-Wl,@var{flag}} and
address@hidden @var{flag}}, respectively.
+are substituted into the compilation command.  You can pass link specific
+flags to the compiler driver using @samp{-XCClinker @var{flag}} or pass
+linker flags with @samp{-Wl,@var{flag}} and @samp{-Xlinker @var{flag}}.
+You can also pass compile specific flags using @samp{-Wc,@var{flag}}
+and @samp{-Xcompiler @var{flag}}.
 
 If the @samp{-static} option is given, then a @samp{.o} file is built,
 even if libtool was configured with @samp{--disable-static}.
@@ -1298,6 +1299,9 @@
 @item -Wl,@var{flag}
 @itemx -Xlinker @var{flag}
 Pass a linker specific flag directly to the linker.
+
address@hidden -XCClinker @var{flag}
+Pass a link specific flag to the compiler driver (@var{CC}) during linking.
 @end table
 
 If the @var{output-file} ends in @samp{.la}, then a libtool library is

reply via email to

[Prev in Thread] Current Thread [Next in Thread]