[Top][All Lists]

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

Re: "-v" in CFLAGS breaks autoconf -fPIC and some other tests

From: Mike Frysinger
Subject: Re: "-v" in CFLAGS breaks autoconf -fPIC and some other tests
Date: Sat, 21 Jul 2012 09:54:20 -0400
User-agent: KMail/1.13.7 (Linux/3.4.4; KDE/4.6.5; x86_64; ; )

On Saturday 21 July 2012 02:20:48 Knut Petersen wrote:
> The reason is obvious - the autoconf "-fPIC" test assumes that any
> additional output during the test compilation is caused by a compiler
> warning, but in verbose mode that output it is caused by the compile
> process.

pretty sure that is libtool, not autoconf.

> The inclusion of "-v" into CFLAGS for an xorg build causes compilation
> without -fPIC, hence no position independent code is generated, hence
> lazy symbol resolution does not work, hence dlopen() calls used to
> load xorg modules fail.

move the -v appending of CFLAGS to the end of your configure script then

> btw: Some other standard tests share the same broken mechanism.
> I think this needs to be fixed as probably almost nobody knows or suspects
> that enabling verbose compiler output has the side effect of disabling
> generation of position independent code. Maybe the easiest way would
> be to strip "-v"  and "--verbose" from CFLAGS for those tests.

the reality is that many things simply can't be tested for as easily as you 
might like.  many compilers merely ignore unknown options by dumping a warning 
message and then doing the compile and then exiting with normal 0 status.  for 
a long time, this included gcc ... not sure if it still does though.  
certainly clang still does this.  thus the only way to test for these unknown 
flags is to look at the output.  you can't grep for a known string because that 
assumes specific locale as well as the format of message itself.

libtool might be able to test for a -v in CFLAGS and save/restore it, but that 
might get tricky as it might be part of another flag series.  i don't know if 
there's any precedence in libtool for doing this.

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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