diff options
author | hexcoder- <heiko@hexco.de> | 2020-02-11 20:15:01 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-02-11 20:15:01 +0100 |
commit | 1b758e4d6b14cc7afdd8c90e80b2afef140d6331 (patch) | |
tree | 371269a9917ea96c3d9bb9ec30f11b40544bcd38 /llvm_mode | |
parent | 5571142e25d09ec0d8775f07b5b664d52bfd93af (diff) | |
download | afl++-1b758e4d6b14cc7afdd8c90e80b2afef140d6331.tar.gz |
compatibility for GNU make 4.3, which behaves different for
lines with '#' like in ifeq "$(shell echo '\#include <sys/ipc.h> ... Now make v 4.3 wants ifeq "$(shell echo '#include <sys/ipc.h> ... In order to get it working with all GNU makes, we use a make variable for '#' called HASH
Diffstat (limited to 'llvm_mode')
-rw-r--r-- | llvm_mode/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 6e0a27af..6fa04e2c 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -18,12 +18,13 @@ # For Heiko: #TEST_MMAP=1 +HASH=\# PREFIX ?= /usr/local HELPER_PATH = $(PREFIX)/lib/afl BIN_PATH = $(PREFIX)/bin -VERSION = $(shell grep '^\#define VERSION ' ../config.h | cut -d '"' -f2) +VERSION = $(shell grep '^$(HASH)define VERSION ' ../config.h | cut -d '"' -f2) ifeq "$(shell uname)" "OpenBSD" LLVM_CONFIG ?= $(BIN_PATH)/llvm-config @@ -116,7 +117,7 @@ endif CLANGVER = $(shell $(CC) --version | sed -E -ne '/^.*version\ ([0-9]\.[0-9]\.[0-9]).*/s//\1/p') -ifeq "$(shell echo '\#include <sys/ipc.h>@\#include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1" +ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1" SHMAT_OK=1 else SHMAT_OK=0 |