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
On Thu, 24 Mar 2022, Evgeny Grin wrote:
It's not uncommon to use CFLAGS for macros or for '-I' flags.
I think it's easy to imagine other conflicting situation where the order of
used flags is significant.
It may not be uncommon, but it is a usage bug to use CFLAGS for
pre-processor options.
> On 24 Mar 2022, at 14:42, Bob Friesenhahn
> wrote:
>
> On Thu, 24 Mar 2022, Evgeny Grin wrote:
>>
>> It's not uncommon to use CFLAGS for macros or for '-I' flags.
>> I think it's easy to imagine other conflicting situation where the order of
>> used flags is significant.
>
> It may not be
> On Mar 24, 2022, at 3:47 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) $
On 3/24/22 11:41, Sam James wrote:
>
>
>> On 24 Mar 2022, at 14:42, Bob Friesenhahn
>> wrote:
>>
>> On Thu, 24 Mar 2022, Evgeny Grin wrote:
>>>
>>> It's not uncommon to use CFLAGS for macros or for '-I' flags. I
>>> think it's easy to imagine other conflicting situation where the
>>> order of
On 24.03.2022 17:42, Bob Friesenhahn wrote:
On Thu, 24 Mar 2022, Evgeny Grin wrote:
It's not uncommon to use CFLAGS for macros or for '-I' flags.
I think it's easy to imagine other conflicting situation where the
order of used flags is significant.
It may not be uncommon, but it is a usage b
Let' move this discussion to the autoconf@gnu.org list
Forwarded Message
From: Evgeny Grin
Sent: Thursday, March 24, 2022, 21:38 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 $
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
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