diff options
author | hexcoder- <heiko@hexco.de> | 2024-11-09 22:31:07 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2024-11-09 22:31:07 +0100 |
commit | f39cf57eac13f859fcf8c082b038ee6254bc0da9 (patch) | |
tree | b07e7e44cdceac332fa7a3e0f0451aa23322a2cc | |
parent | e62999c95f3e796c8f6ff8beab36799a661c755c (diff) | |
download | afl++-f39cf57eac13f859fcf8c082b038ee6254bc0da9.tar.gz |
enhance backward compatibility and portability
-rw-r--r-- | GNUmakefile | 2 | ||||
-rw-r--r-- | GNUmakefile.llvm | 2 | ||||
-rw-r--r-- | instrumentation/afl-llvm-common.h | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile index 24295c48..2f0255ed 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -119,7 +119,7 @@ endif COMPILER_TYPE=$(shell $(CC) --version|grep "Free Software Foundation") ifneq "$(COMPILER_TYPE)" "" #$(info gcc is being used) - override CFLAGS_OPT += -Wno-error=format-truncation -Wno-format-truncation + override CFLAGS_OPT += -Wno-format-truncation endif ifeq "$(SYS)" "SunOS" diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm index 367c437f..6a551492 100644 --- a/GNUmakefile.llvm +++ b/GNUmakefile.llvm @@ -69,7 +69,7 @@ endif LLVM_STDCXX := gnu++11 LLVM_LTO := 0 -LLVM_UNSUPPORTED := $(shell echo "$(LLVMVER)" | grep -E -q '^[0-2]\.|^3\.[0-8]\.' && echo 1 || echo 0) +LLVM_UNSUPPORTED := $(shell echo "$(LLVMVER)" | grep -E -q '^[0-2]\.|^3\.[0-7]\.' && echo 1 || echo 0) # Uncomment to see the values assigned above # $(foreach var,LLVM_CONFIG LLVMVER LLVM_MAJOR LLVM_MINOR LLVM_TOO_NEW LLVM_TOO_OLD LLVM_TOO_NEW_DEFAULT LLVM_TOO_OLD_DEFAULT LLVM_NEW_API LLVM_NEWER_API LLVM_13_OK LLVM_HAVE_LTO LLVM_BINDIR LLVM_LIBDIR LLVM_STDCXX LLVM_APPLE_XCODE LLVM_LTO LLVM_UNSUPPORTED,$(warning $(var) = $($(var)))) diff --git a/instrumentation/afl-llvm-common.h b/instrumentation/afl-llvm-common.h index 6b628d64..98c4c7c9 100644 --- a/instrumentation/afl-llvm-common.h +++ b/instrumentation/afl-llvm-common.h @@ -8,7 +8,13 @@ #include <list> #include <string> #include <fstream> + +#ifdef __has_include +#if __has_include(<optional>) #include <optional> +#endif +#endif + #include <sys/time.h> #include "llvm/Config/llvm-config.h" |