[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrong order of preprocessor and compiler flags
From: |
Evgeny Grin |
Subject: |
Re: Wrong order of preprocessor and compiler flags |
Date: |
Mon, 28 Mar 2022 10:48:34 +0300 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
Hello Karl,
On 28.03.2022 0:22, Karl Berry wrote:
It seems the basic inconsistency is whether CPPFLAGS is considered a
"user variable" or not. In earlier eras, it wasn't, but from your msg,
I gather it is now.
The GNU standards node about it, that you mentioned,
https://www.gnu.org/prep/standards/standards.html#Command-Variables
does not clearly state it one way or another. But its example shows
CFLAGS after CPPFLAGS.
The same example puts "-I." into ALL_CFLAGS, which makes even harder to
guess the right idea how to use CPPFLAGS.
Thus I think a prior step is to write bug-standards@gnu.org and suggest
clarifying the status of CPPFLAGS, its relationship to CFLAGS, etc.
Definitely makes sense.
I'll write to the standards list.
We could consider changing automake to follow autoconf even if the GCS
is not changed, but it would be better if the GCS were clear.
2. Use AM_CFLAGS CFLAGS AM_CPPFLAGS CPPFLAGS. This is more aligned with
current flags grouping, but CFLAGS will not override definitions in
AM_CPPFLAGS (less aligned with GNU Standards).
It seems wrong (and disastrously backwards-incompatible) to me for
CFLAGS not to override AM_everything. Your option 1:
1. Use AM_CFLAGS AM_CPPFLAGS CFLAGS CPPFLAGS. I think this is the best
option. As required by GNU Standards, CFLAGS still override all
upstream-defined flags.
seems like the best option to me too. --thanks, karl.
--
Evgeny