autoconf
[Top][All Lists]
Advanced

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

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


From: Allan McRae
Subject: Re: Autoconf does not like "-D_FORTIFY_SOURCE=2 -O2"
Date: Thu, 09 May 2013 13:19:14 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130428 Thunderbird/17.0.5

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




reply via email to

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