Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2"

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

 



On 09/05/13 07:11, Paul Eggert wrote:
> On 05/08/13 11:26, Anatol Pomozov wrote:
>> Why autoconf uses CPPFLAGS
>> (and not CPPFLAGS+CXXFLAGS) for headers discovery?
> 
> It's a long story, but basically autoconf used to invoke
> just the preprocessor to test for header existence, partly
> on the grounds of making 'configure' go faster.  That turns
> out to have problems, so it now tries to compile as well,
> optionally, using a heuristic that I don't recall right now.
> I expect that the goal is that it'll use the compiler exclusivly,
> but doing that will require some developer effort, and nobody
> has had the time and inclination to carry that through.

So there are multiple options of how to fix this.  This simple "fixes"
are patching glibc and gcc, but these run against my distributions
patching policy.  Also, adding -O2 to CPPFLAGS or moving
-D_FORTIFY_SOURCE to CFALGS just does not seem correct either - CFLAGS
and CPPFLAGS are separate for a reason.

I believe autoconf uses "CPP CPPFLAGS" to detect headers mainly because
of "-I" flags needing to be considered.  Would an acceptable solution at
the autoconf level be to split the CPPFLAGS into -I flags and others
(-D, -U) and just use the -I ones in the header test?

If that is fine in principle, I can attempt to implement it.

Allan


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux