[GRASS-dev] [GRASS GIS] #2916: configure bug (?): FORTIFY_SOURCE in CPPFLAGS breaks configure on Arch Linux
GRASS GIS
trac at osgeo.org
Wed Feb 24 19:44:12 PST 2016
#2916: configure bug (?): FORTIFY_SOURCE in CPPFLAGS breaks configure on Arch
Linux
------------------------+-------------------------
Reporter: msieczka | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Compiling | Version: 7.0.3
Resolution: | Keywords:
CPU: All | Platform: Linux
------------------------+-------------------------
Comment (by glynn):
Replying to [comment:17 scimmia]:
> No, being a "D" flag, CPPFLAGS is correct,
That would be true ... if it wasn't for the fact that <features.h> has an
interaction between the setting of _FORTIFY_SOURCE and the setting of
__OPTIMIZE__. The latter is set by the compiler based upon -O switches,
which definitely shouldn't go into CPPFLAGS.
_FORTIFY_SOURCE shouldn't be set to a value other than zero unless
optimisation is enabled, and CPPFLAGS shouldn't contain any optimisation
switches. Therefore, CPPFLAGS shouldn't contain a setting for
_FORTIFY_SOURCE.
The fact that -D_FORTIFY_SOURCE=1 is interpreted by the preprocessor
doesn't mean that it's acceptable to set that flag when running the
preprocessor separately from compilation.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2916#comment:19>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list