[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: |
Václav Zeman |
Subject: |
Re: "-v" in CFLAGS breaks autoconf -fPIC and some other tests |
Date: |
Sat, 21 Jul 2012 23:24:31 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 07/21/2012 08:20 AM, Knut Petersen wrote:
> Hi everybody!
>
> While debugging a xorg modules loading failure I found that the test
> for -fPIC
> support wrongly judges that the compiler does not support PIC code
> generation
> whenever CFLAGS contains "-v" or "--verbose", see xorg bug 41208.
> <https://bugs.freedesktop.org/show_bug.cgi?id=41208>
>
> 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.
>
> 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.
>
> 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.
>
> autoconf version used: 2.68 (this problems seems to be old, I found
> related discussions dating back to at least 2007)
I have noticed the same or similar problem with Solaris Studio on Linux,
see email "FYI: Solaris Studio compiler on Linux and PIC support in C++".
--
VZ
signature.asc
Description: OpenPGP digital signature