about summary refs log tree commit diff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-05-30 17:29:44 +0300
committerGitHub <noreply@github.com>2023-05-30 17:29:44 +0300
commitc7ced56066953dd352ab1de341e486f9ec5e29d8 (patch)
tree19d0ce0b7fcc9f5252a672fa1c640d4479c23262 /GNUmakefile
parent8e1df8e53d359f2858168a276c46d1113d4102f2 (diff)
parent287128a196f61ab6f678a2b2b09713547868eff8 (diff)
downloadafl++-c7ced56066953dd352ab1de341e486f9ec5e29d8.tar.gz
Merge pull request #1747 from AFLplusplus/dev
push to stable
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 4ecdae52..715e7386 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -100,8 +100,13 @@ else
   LDFLAGS += $(SDK_LD)
 endif
 
+COMPILER_TYPE=$(shell $(CC) --version|grep "Free Software Foundation")
+ifneq "$(COMPILER_TYPE)" ""
+  #$(info gcc is being used)
+  CFLAGS_OPT += -Wno-error=format-truncation -Wno-format-truncation
+endif
+
 ifeq "$(SYS)" "SunOS"
-  CFLAGS_OPT += -Wno-format-truncation
   LDFLAGS = -lkstat -lrt -lsocket -lnsl
 endif
 
@@ -139,13 +144,13 @@ endif
 
 ifdef DEBUG
   $(info Compiling DEBUG version of binaries)
-  override CFLAGS += -ggdb3 -O0 -Wall -Wextra -Werror -Wno-error=format-truncation= $(CFLAGS_OPT)
+  override CFLAGS += -ggdb3 -O0 -Wall -Wextra -Werror $(CFLAGS_OPT)
 else
   CFLAGS ?= -O2 $(CFLAGS_OPT) # -funroll-loops is slower on modern compilers
 endif
 
 override CFLAGS += -g -Wno-pointer-sign -Wno-variadic-macros -Wall -Wextra -Wno-pointer-arith \
-			-fPIC -I include/ -DAFL_PATH=\"$(HELPER_PATH)\" -Wno-format-truncation \
+			-fPIC -I include/ -DAFL_PATH=\"$(HELPER_PATH)\"  \
 			-DBIN_PATH=\"$(BIN_PATH)\" -DDOC_PATH=\"$(DOC_PATH)\"
 # -fstack-protector