File memkind-dont-redefine-fortify.diff of Package memkind

Index: configure.ac
===================================================================
--- configure.ac.orig
+++ configure.ac
@@ -158,6 +158,9 @@ if test "x$enable_secure" = "x1" ; then
 
   if test "$CFLAGS" != "${CFLAGS%-O0*}" ; then # if CFLAGS contains -O0
       echo "WARNING: Could not apply FORTIFY_SOURCE=2 due to lack of optimization (-O0)"
+  elif test "$CFLAGS" != "${CFLAGS%-D_FORTIFY_SOURCE*}"; then
+      # CFLAGS already has FORTIFY_SOURCE, don't redefine
+      :
   else
       CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2" #FORTITFY_SOURCE does not work with -O0 (ex. if enable_debug=1 or enable_gcov=1)
   fi
openSUSE Build Service is sponsored by