If the compiler is very pedantic and includes _FORTIFY_SOURCE, then you
get the following warning about redefinition:
<command-line>: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 <robbat2@gentoo.org>
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)