A more accurate GCC compiler detection
Instead of relying on the executable name, it is better to "parse" the version information of the compiler.
This commit is contained in:
parent
e23dab20da
commit
bbf8fea738
7
makefile
7
makefile
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user