Since make version 4.3 [0] the `#` sign inside a string is handled differently. Fix that. [0] https://lists.gnu.org/archive/html/info-gnu/2020-01/msg00004.html Signed-off-by: Steffen Jaeckel <[email protected]>
@@ -13,7 +13,8 @@ ifndef CROSS_COMPILE
CROSS_COMPILE:=
endif
-ifneq (,$(shell printf "#ifdef __clang__\nCLANG\n#endif\n" | $(CC) -E - | grep CLANG))
+H := \#
+ifeq (CLANG,$(shell printf "$(H)ifdef __clang__\nCLANG\n$(H)endif\n" | $(CC) -E - | grep CLANG))
CC_IS_CLANG := 1
else
CC_IS_CLANG := 0