btrfs-progs: autoconf: do not force fortify flags
authorDavid Sterba <dsterba@suse.cz>
Thu, 5 Feb 2015 14:11:40 +0000 (15:11 +0100)
committerDavid Sterba <dsterba@suse.cz>
Thu, 5 Feb 2015 14:11:40 +0000 (15:11 +0100)
Make it default, but let the user override it.

Signed-off-by: David Sterba <dsterba@suse.cz>
Makefile.in
configure.ac

index c233d3d..3606901 100644 (file)
@@ -132,10 +132,10 @@ ifdef C
        # don't use FORTIFY with sparse because glibc with FORTIFY can
        # generate so many sparse errors that sparse stops parsing,
        # which masks real errors that we want to see.
+       CFLAGS += -U_FORTIFY_SOURCE
 else
        check = true
        check_echo = true
-       CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
 endif
 
 %.o.d: %.c
index d059e1c..0692d5a 100644 (file)
@@ -8,7 +8,7 @@ LIBBTRFS_MAJOR=0
 LIBBTRFS_MINOR=1
 LIBBTRFS_PATCHLEVEL=1
 
-CFLAGS=${CFLAGS:-"-g -O1 -Wall"}
+CFLAGS=${CFLAGS:-"-g -O1 -Wall -D_FORTIFY_SOURCE=2"}
 AC_SUBST([CFLAGS])
 
 AC_PREREQ([2.60])