[GRASS-dev] [GRASS GIS] #2916: configure bug (?): FORTIFY_SOURCE in CPPFLAGS breaks configure on Arch Linux

GRASS GIS trac at osgeo.org
Sun Feb 21 23:57:06 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:14 msieczka]:

 > How about this:
 >
 {{{
 CFLAGS="$CPPFLAGS $CFLAGS" CXXFLAGS="$CPPFLAGS $CXXFLAGS" CPPFLAGS=`echo
 $CPPFLAGS | sed 's/-D_FORTIFY_SOURCE=.//g'` ./configure
 }}}

 It would be better if any _FORTIFY_SOURCE definition could be extracted
 and moved into CFLAGS/CXXFLAGS, e.g.

 {{{
 FORTIFY_FLAGS=`echo "$CPPFLAGS" | sed
 '/^.*\(-D_FORTIFY_SOURCE=.\).*$/s//\1/'`
 CPPFLAGS=`echo "$CPPFLAGS" | sed 's/-D_FORTIFY_SOURCE=.//g'`
 CFLAGS="$FORTIFY_FLAGS $CFLAGS"
 CXXFLAGS="$FORTIFY_FLAGS $CXXFLAGS"
 }}}

 This avoids any potential problems with duplicating the other elements of
 $CPPFLAGS.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2916#comment:15>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list