From 96153e0e9cfdf5bd399de06d422a01ae3e798bb8 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Fri, 11 Nov 2022 03:30:39 +0200 Subject: [PATCH] Revert "kbuild: Check for 'clang' string in the entire --version output" Remove non-upstream change. This reverts commit 4b4a6295c1b1e8936c4e7dad56b1fd05a13d8569. Change-Id: I38505fa398e1de10fa3bbd7248d9b4cb1173e444 --- Makefile | 2 +- init/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a95654df031e..78a0ae1662f8 100644 --- a/Makefile +++ b/Makefile @@ -553,7 +553,7 @@ ifdef building_out_of_srctree { echo "# this is build directory, ignore it"; echo "*"; } > .gitignore endif -ifneq ($(shell $(CC) --version 2>&1 | grep clang),) +ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) ifneq ($(CROSS_COMPILE),) CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) diff --git a/init/Kconfig b/init/Kconfig index 60b239d75b11..7bebea307eb7 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -35,7 +35,7 @@ config GCC_VERSION default 0 config CC_IS_CLANG - def_bool $(success,$(CC) --version | grep -q clang) + def_bool $(success,$(CC) --version | head -n 1 | grep -q clang) config LD_IS_LLD def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)