fix compile for MacOSX -DFORTIFY_SOURCE=2 is problematic

This commit is contained in:
hexcoder- 2020-04-08 23:45:28 +02:00 committed by van Hauser
parent 04360a35ed
commit 858c81a19b

View File

@ -54,6 +54,7 @@ ifneq "$(shell uname)" "Darwin"
ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1" ifeq "$(shell echo 'int main() {return 0; }' | $(CC) $(CFLAGS) -Werror -x c - -march=native -o .test 2>/dev/null && echo 1 || echo 0 ; rm -f .test )" "1"
CFLAGS_OPT = -march=native CFLAGS_OPT = -march=native
endif endif
CFLAGS_OPT += -D_FORTIFY_SOURCE=2
endif endif
ifneq "$(shell uname -m)" "x86_64" ifneq "$(shell uname -m)" "x86_64"
@ -66,7 +67,7 @@ ifneq "$(shell uname -m)" "x86_64"
endif endif
endif endif
CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT) -D_FORTIFY_SOURCE=2 CFLAGS ?= -O3 -funroll-loops $(CFLAGS_OPT)
override CFLAGS += -Wall -g -Wno-pointer-sign \ override CFLAGS += -Wall -g -Wno-pointer-sign \
-I include/ -Werror -DAFL_PATH=\"$(HELPER_PATH)\" \ -I include/ -Werror -DAFL_PATH=\"$(HELPER_PATH)\" \
-DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\"