[Btrfs-devel] [PATCH] btrfs-progs: build with -D_FORTIFY_SOURCE=2 by default

Jan Engelhardt jengelh at computergmbh.de
Fri Jan 18 13:00:20 PST 2008


Add -D_FORTIFY_SOURCE=2 to the makeflags. It has been very helpful
in finding problems.

Signed-off-by: Jan Engelhardt <jengelh at computergmbh.de>

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: btrfs-progs-0.11/Makefile
===================================================================
--- btrfs-progs-0.11.orig/Makefile
+++ btrfs-progs-0.11/Makefile
@@ -1,5 +1,5 @@
 CC=gcc
-AM_CFLAGS = -Wall -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
+AM_CFLAGS = -Wall -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
 CFLAGS = -g -Werror
 objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
 	  root-tree.o dir-item.o hash.o file-item.o inode-item.o \




More information about the Btrfs-devel mailing list