Merge pull request #477 from J08nY/fix/makefile-echo

Fix clang detection when cross-compiling.
This commit is contained in:
Steffen Jaeckel 2020-03-10 22:51:15 +01:00 committed by GitHub
commit aa8b4571fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ ifeq ($(PLATFORM),FreeBSD)
# XXX: FreeBSD needs extra escaping for some reason
CSTR := $$$(CSTR)
endif
ifneq (,$(shell echo $(CSTR) | $(CC) -E - | grep CLANG))
ifneq (,$(shell printf $(CSTR) | $(CC) -E - | grep CLANG))
CC := $(CROSS_COMPILE)clang
else
CC := $(CROSS_COMPILE)gcc