The rationale for placement of `CPPFLAGS` early is to allow users to better
control include ordering. This is similar to why `CFLAGS` is last.
Consider this situation :
User wants to preempt the default include path, and wants to override the C
standard.
make CPPFLAGS='-Ifoo/bar' CFLAGS='-std=c1
On 24.03.2022 21:37, Nick Bowler wrote:
On 2022-03-24, Zack Weinberg wrote:
On Thu, Mar 24, 2022, at 11:13 AM, Nick Bowler wrote:
However, GNU coding standards state that CFLAGS should be the last
item on compilation commands, so it would appear that this is a case
where traditional "make" beh
Original Message
From: Evgeny Grin
Sent: Thursday, March 24, 2022, 14:26 UTC+3
Subject: Wrong order of preprocessor and compiler flags
I've found that everywhere in autoconf scripts flags are used like:
$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_
On 2022-03-24, Zack Weinberg wrote:
> On Thu, Mar 24, 2022, at 11:13 AM, Nick Bowler wrote:
>> However, GNU coding standards state that CFLAGS should be the last
>> item on compilation commands, so it would appear that this is a case
>> where traditional "make" behaviour contrasts with GNU standar
On Thu, Mar 24, 2022, at 11:13 AM, Nick Bowler wrote:
> On 2022-03-23, Zack Weinberg wrote:
>> ... before we change
>> anything, we need to check what the rules *built into GNU and BSD
>> Make* do with CFLAGS and CPPFLAGS (and also CXXFLAGS, OBJCFLAGS, etc)
>> because those are much much harder to
On 2022-03-23, Zack Weinberg wrote:
> On Wed, Mar 23, 2022, at 11:31 AM, Evgeny Grin wrote:
>> I've found that everywhere in autoconf scripts flags are used like:
>> $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD
>> while automake and libtool use flags in the other order:
>> $(CC) $
I've found that everywhere in autoconf scripts flags are used like:
$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD
while automake and libtool use flags in the other order:
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CFLAGS) $(CFLAGS)
I agree th
On Wed, Mar 23, 2022, at 11:31 AM, Evgeny Grin wrote:
> Hello,
>
> I've found that everywhere in autoconf scripts flags are used like:
> $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD
> while automake and libtool use flags in the other order:
> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INC
Hello,
I've found that everywhere in autoconf scripts flags are used like:
$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD
while automake and libtool use flags in the other order:
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CFLAGS) $(CFLAGS)
Auto