autoconf
[Top][All Lists]
Advanced

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

Re: Wrong order of preprocessor and compiler flags


From: Bob Friesenhahn
Subject: Re: Wrong order of preprocessor and compiler flags
Date: Thu, 24 Mar 2022 09:42:31 -0500 (CDT)
User-agent: Alpine 2.20 (GSO 67 2015-01-07)

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. Such usages should be corrected.

Becides cases where the pre-processor may be used directly (not sure if there are any), it should be considered that CPPFLAGS works for both the C and C++ compilers but CFLAGS is only for the C compiler.

Usage of CPPFLAGS before CFLAGS looks logical for me, I think autoconf should be fixed.

It does feel more logical.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt



reply via email to

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