From 4b4a6295c1b1e8936c4e7dad56b1fd05a13d8569 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Mon, 18 Mar 2019 13:54:54 -0700 Subject: [PATCH] kbuild: Check for 'clang' string in the entire --version output The build system assumes that the clang version string is found in the first line of the clang --version output. However, this is not true for SDLLVM. Hence, look for the string in the entire output, rather than just the first line. Change-Id: I2db999e616f4e5ceedb5c0081d6440bbd5c3f52e Signed-off-by: Raghavendra Rao Ananta --- Makefile | 2 +- init/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 769a2e5a8eaf..37a1f3039623 100644 --- a/Makefile +++ b/Makefile @@ -517,7 +517,7 @@ ifneq ($(srctree),.) { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif -ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) +ifneq ($(shell $(CC) --version 2>&1 | grep clang),) ifneq ($(CROSS_COMPILE),) CLANG_TRIPLE ?= $(CROSS_COMPILE) CLANG_FLAGS := --target=$(notdir $(CLANG_TRIPLE:%-=%)) diff --git a/init/Kconfig b/init/Kconfig index 36894c9fb420..725a1862f5ba 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -18,7 +18,7 @@ config GCC_VERSION default 0 config CC_IS_CLANG - def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) + def_bool $(success,$(CC) --version | grep -q clang) config CLANG_VERSION int