From: Robin H. Johnson Date: Wed, 3 Feb 2016 16:19:52 +0000 (-0800) Subject: Makefile: false positive on _FORTIFY_SOURCE X-Git-Tag: fio-2.7~31 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a8b412146efdaa79adaa766dd192512bf2178ce7 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 --- 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)