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 <rananta@codeaurora.org>
This commit is contained in:
Raghavendra Rao Ananta 2019-03-18 13:54:54 -07:00
commit 4b4a6295c1
2 changed files with 2 additions and 2 deletions

View file

@ -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:%-=%))

View file

@ -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