From 1b758e4d6b14cc7afdd8c90e80b2afef140d6331 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Tue, 11 Feb 2020 20:15:01 +0100 Subject: compatibility for GNU make 4.3, which behaves different for lines with '#' like in ifeq "$(shell echo '\#include ... Now make v 4.3 wants ifeq "$(shell echo '#include ... In order to get it working with all GNU makes, we use a make variable for '#' called HASH --- gcc_plugin/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc_plugin') diff --git a/gcc_plugin/Makefile b/gcc_plugin/Makefile index 9ad5c382..9d312a94 100644 --- a/gcc_plugin/Makefile +++ b/gcc_plugin/Makefile @@ -35,8 +35,9 @@ CC ?= gcc CXX ?= g++ PLUGIN_FLAGS = -fPIC -fno-rtti -I"$(shell $(CC) -print-file-name=plugin)/include" +HASH=\# -ifeq "$(shell echo '\#include @\#include @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 @$(HASH)include @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 -- cgit 1.4.1