[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiler/Linker flags
From: |
Christopher Hulbert |
Subject: |
Re: Compiler/Linker flags |
Date: |
Thu, 18 Jan 2007 07:47:12 -0500 |
On 1/18/07, Ralf Wildenhues <address@hidden> wrote:
* Christopher Hulbert wrote on Thu, Jan 18, 2007 at 01:18:07PM CET:
> On 1/17/07, Bob Friesenhahn <address@hidden> wrote:
> >On Wed, 17 Jan 2007, Christopher Hulbert wrote:
> >
> >> It seems that libtool is set up to strip unrecognized flags unless
> >> using something like -Wc,flag. Can anyone give me a brief answer as
> >> to why? I often find myself going through hoops to get flags past
> >
> >The reason for the odd behavior is that libtool needs to know which
> >options should be applied to the compiler, and which should be applied
> >to the linker. [...]
> Makes sense. Now if the compiler is used for linking (which is
> generally the case for my compilations), would it make sense to allow
> unrecognized flags through?
As in, for example, `-MF foo.Tpo', erroneously passed by the
(non-Automake-using) innocent user in $(CFLAGS)? Or, FWIW, -Bstatic,
which will let libtool make the completely wrong choices of libraries
(at the moment) if allowed through?
I can't say I've ever tried -Bstatic, so I have no idea what libtool
would do with it. I still lack the details of libtool's guts :)!
-Bstatic_pgi may very well also
be in the category that libtool needs to know about it; I cannot know,
you haven't told us what semantics it has, and the GNU/Linux PGI I have
access to doesn't know about it either.
Well, -Bstatic_pgi was just the latest flag I was trying to get
through. There are a lot of others that are useful at link time for
the pgi compilers. These flags deal with optimization flags like IPA,
vectorization, etc.
Sometimes, I just end up defining a variable like LDFLAGS_LT which I
put in AM_LDFLAGS in the automake files so that they do not get used
in autoconf testing, but still make it into the package compiling.
Then I can use -Wc,-Bstatic_pgi -Wc,"-Mipa=fast,libinline", etc....
Cheers,
Ralf