Unverified Commit 0bd1a3a4 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by GitHub
Browse files

Use std=gnu11 instead of std=c11. (#12253)

Adding this as it's required by the latest version of libmusl (but not
clear if it's a regression or an intentional change).
parent c2f1815b
......@@ -47,10 +47,10 @@ OPT=$(OPTIMIZATION)
# NUMBER_SIGN_CHAR is a workaround to support both GNU Make 4.3 and older versions.
NUMBER_SIGN_CHAR := \#
C11_ATOMIC := $(shell sh -c 'echo "$(NUMBER_SIGN_CHAR)include <stdatomic.h>" > foo.c; \
$(CC) -std=c11 -c foo.c -o foo.o > /dev/null 2>&1; \
$(CC) -std=gnu11 -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
STD+=-std=gnu11
else
STD+=-std=c99
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment