[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Wrong order of preprocessor and compiler flags
From: |
Karl Berry |
Subject: |
Re: Wrong order of preprocessor and compiler flags |
Date: |
Sun, 27 Mar 2022 15:22:03 -0600 |
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.
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.
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.