From a8b412146efdaa79adaa766dd192512bf2178ce7 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 3 Feb 2016 08:19:52 -0800 Subject: [PATCH] Makefile: false positive on _FORTIFY_SOURCE If the compiler is very pedantic and includes _FORTIFY_SOURCE, then you get the following warning about redefinition: :0:0: warning: "_FORTIFY_SOURCE" redefined To prevent it, undefine and redefine _FORTIFY_SOURCE. Gentoo's gcc does this for -O2. Signed-off-by: Robin H. Johnson --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9b15afeb..684b565d 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ all: include config-host.mak endif -DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG +DEBUGFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFIO_INTERNAL $(DEBUGFLAGS) OPTFLAGS= -g -ffast-math CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) -I. -I$(SRCDIR) -- 2.25.1