From f11a0c8f3016fd6d62116d606cd68a01ec06f951 Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Mon, 21 Sep 2020 11:17:48 +0300 Subject: [PATCH] Fix C11 detection in the makefile (#7822) 445a4b6 introudced a makefile script that detects if the toolchain supports c11, and it looked that it was passing on MacOS and fails on Ubuntu, looks like Ubuntu's Dash was spawning a background process, deleted foo.c before gcc tried to compile it. --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 6414b8c78..715316a15 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,7 +31,7 @@ OPT=$(OPTIMIZATION) # Detect if the compiler supports C11 _Atomic C11_ATOMIC := $(shell sh -c 'echo "\#include " > foo.c; \ - $(CC) -std=c11 -c foo.c -o foo.o &> /dev/null; \ + $(CC) -std=c11 -c foo.c -o foo.o > /dev/null 2>&1; \ if [ -f foo.o ]; then echo "yes"; rm foo.o; fi; rm foo.c') ifeq ($(C11_ATOMIC),yes) STD+=-std=c11