about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-04-08 23:45:28 +0200
committervan Hauser <vh@thc.org>2020-04-09 10:23:37 +0200
commit858c81a19b9f10656b84e4f8136a9c19321c208c (patch)
tree7f990cbb97b44f5db2d1222672e69fae467947b4 /GNUmakefile
parent04360a35edfd3761f515967ec73f776155177bff (diff)
downloadafl++-858c81a19b9f10656b84e4f8136a9c19321c208c.tar.gz
fix compile for MacOSX -DFORTIFY_SOURCE=2 is problematic
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 0cbeaa81..a2a4bcaf 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -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"
 	CFLAGS_OPT = -march=native
  endif
+	CFLAGS_OPT += -D_FORTIFY_SOURCE=2
 endif
 
 ifneq "$(shell uname -m)" "x86_64"
@@ -66,7 +67,7 @@ ifneq "$(shell uname -m)" "x86_64"
  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 \
 			  -I include/ -Werror -DAFL_PATH=\"$(HELPER_PATH)\" \
 			  -DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\"