From ed2a14e1985d78d1b3c73f60ba42dcfdcf19f3bd Mon Sep 17 00:00:00 2001 From: Patrick Desaulniers Date: Sun, 1 Jan 2023 10:20:08 -0500 Subject: [PATCH] Fix target compiler detection --- Makefile.base.mk | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile.base.mk b/Makefile.base.mk index e1faf654..a4ce2737 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -35,11 +35,7 @@ DPF_MAKEFILE_BASE_INCLUDED = true # --------------------------------------------------------------------------------------------------------------------- # Auto-detect target compiler if not defined -ifeq ($(shell echo '\#test' | grep -- '\#test'),\#test) -TARGET_COMPILER = $(shell echo '\#ifdef __clang__\nclang\n\#else\ngcc\n\#endif' | $(CC) -E -P -x c - 2>/dev/null) -else -TARGET_COMPILER = $(shell echo '#ifdef __clang__\nclang\n#else\ngcc\n#endif' | $(CC) -E -P -x c - 2>/dev/null) -endif +TARGET_COMPILER = $(shell printf '#ifdef __clang__\nclang\n#else\ngcc\n#endif' | $(CC) -E -P -x c - 2>/dev/null) ifneq ($(CLANG),true) ifneq ($(GCC),true)