libtool-patches
[Top][All Lists]
Advanced

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

Re: Additional link flags for HP aCC and SGI CC


From: Albert Chin
Subject: Re: Additional link flags for HP aCC and SGI CC
Date: Thu, 2 Sep 2004 17:20:12 -0500
User-agent: Mutt/1.5.6i

On Thu, Sep 02, 2004 at 06:04:44PM +0200, Ludovic Court?s wrote:
> 9 days, 4 hours, 35 minutes, 38 seconds ago, 
> Gary V. Vaughan wrote:
> > It does, but the interface to the user doesn't change depending on the
> > host machine.  -Xcompiler and -Xlinker are there so that if we find a
> > missing abstraction, libtool users can continue to work while we figure
> > out how to incorporate a clean abstraction into the user interface.
> 
> Due to lack of time, I haven't been able to hack on Libtool so that it
> recognizes new high-level options such as `--warnings=on'.
> 
> However, I think I found a quite good reason to incorporate (more)
> vendor-specific switches knowledge into Libtool (eg. `-AA' et al.).  :-)
> The reason is that those flags are needed at configure time where
> Libtool isn't used and where `-Xcompiler' and `-Xlinker' are potentially
> unknown and may make the compiler fail.
> 
> Of course, I could just use the raw CFLAGS/LDFLAGS at configure-time and
> "libtoolize" them (ie. prefix each switch with either `-Xcompiler' or
> `-Xlinker') at the very end of my `configure.ac' file but I find this
> solution inelegant.  That's probably the reason why Libtool already
> knowns the most commonly used vendor specific switches.  What do you
> think?

The following patch will pass all -[arg] and +[arg] switches through.
Is it safe?

-- 
albert chin (address@hidden)

-- snip snip
Index: config/ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.in,v
retrieving revision 1.12
diff -u -3 -p -r1.12 ltmain.in
--- config/ltmain.in    1 Sep 2004 09:48:25 -0000       1.12
+++ config/ltmain.in    2 Sep 2004 22:20:29 -0000
@@ -2985,6 +2985,10 @@ func_mode_link ()
          arg="\"$arg\""
          ;;
        esac
+
+       if test -z "$prev"; then
+         compiler_flags="$compiler_flags $arg"
+       fi
        ;;
 
       *.$objext)




reply via email to

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