Merge pull request #10 from AndersonTorres/patch-1

A more accurate GCC compiler detection
This commit is contained in:
dzaima 2021-10-07 18:40:48 +03:00 committed by GitHub
commit ef87b3e009
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,10 @@ single-c:
# compiler setup
CC = clang
ifneq ($(findstring gcc, $(CC)),)
# Detects if we are running GCC instead of Clang
CC_IS_GCC = $(shell $(CC) --version | head -n1 | grep -m 1 -c "gcc")
ifeq (${CC_IS_GCC}, 1)
CCFLAGS = -Wno-parentheses
else
CCFLAGS = -Wno-microsoft-anon-tag
@ -121,4 +124,4 @@ ${bd}/load.o: src/gen/customRuntime
clean:
rm -f ${bd}/*.o
rm -f ${bd}/*.d
rm -f ${bd}/*.d