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).
This commit is contained in:
parent
c2f1815bcb
commit
0bd1a3a4a8
@ -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 is a workaround to support both GNU Make 4.3 and older versions.
|
||||||
NUMBER_SIGN_CHAR := \#
|
NUMBER_SIGN_CHAR := \#
|
||||||
C11_ATOMIC := $(shell sh -c 'echo "$(NUMBER_SIGN_CHAR)include <stdatomic.h>" > foo.c; \
|
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')
|
if [ -f foo.o ]; then echo "yes"; rm foo.o; fi; rm foo.c')
|
||||||
ifeq ($(C11_ATOMIC),yes)
|
ifeq ($(C11_ATOMIC),yes)
|
||||||
STD+=-std=c11
|
STD+=-std=gnu11
|
||||||
else
|
else
|
||||||
STD+=-std=c99
|
STD+=-std=c99
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user