bug-standards
[Top][All Lists]
Advanced

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

common c(xx)flags for compilation?


From: Karl Berry
Subject: common c(xx)flags for compilation?
Date: Fri, 13 May 2016 21:20:54 GMT

Maybe it's too late, but I've found it would be nice if there was a
variable analogous to CFLAGS and CXXFLAGS which applies to both C and
C++ (and Objective C and ...) compilations.  Of course it's possible to
duplicate the flags (yuck) or use workarounds (yuck), but why not
support it in the straightforward way?  It is so common to want to, for
example, set both to -g if you're going to set one.

Although in practice one can use CPPFLAGS for this now, at least in the
cases I've come across, the autoconf manual warns that this should not
be relied on.  (Although given the pace of autoconf development, I
rather suspect it will hold true forever, but anyway ...)  Also,
CPPFLAGS is not a logical name for compilation or linking options.

COMMONCFLAGS comes to mind for a name, though I don't have strong
feelings about it.  By default it would be empty, not set by any macro,
and overridden by CFLAGS and CXXFLAGS.  Reserved for the user.  The
implementation would just be to add that to the various definitions that
now use CFLAGS and the like.

Wdyt?  --karl



reply via email to

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