Fix clang detection when cross-compiling.
`echo` needs -e to output newlines, without the switch make complains: <stdin>:1:17: warning: extra tokens at end of #ifdef directive <stdin>:1: error: unterminated #ifdef and does not detect clang properly when cross-compiling.
This commit is contained in:
parent
fe382afd82
commit
f01cc5d266
@ -26,7 +26,7 @@ ifeq ($(PLATFORM),FreeBSD)
|
|||||||
# XXX: FreeBSD needs extra escaping for some reason
|
# XXX: FreeBSD needs extra escaping for some reason
|
||||||
CSTR := $$$(CSTR)
|
CSTR := $$$(CSTR)
|
||||||
endif
|
endif
|
||||||
ifneq (,$(shell echo $(CSTR) | $(CC) -E - | grep CLANG))
|
ifneq (,$(shell printf $(CSTR) | $(CC) -E - | grep CLANG))
|
||||||
CC := $(CROSS_COMPILE)clang
|
CC := $(CROSS_COMPILE)clang
|
||||||
else
|
else
|
||||||
CC := $(CROSS_COMPILE)gcc
|
CC := $(CROSS_COMPILE)gcc
|
||||||
|
Loading…
Reference in New Issue
Block a user