[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"-v" in CFLAGS breaks autoconf -fPIC and some other tests
From: |
Knut Petersen |
Subject: |
"-v" in CFLAGS breaks autoconf -fPIC and some other tests |
Date: |
Sat, 21 Jul 2012 08:20:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120601 Thunderbird/13.0 |
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)
cu,
Knut
- "-v" in CFLAGS breaks autoconf -fPIC and some other tests,
Knut Petersen <=