lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri,  1 Apr 2022 00:56:58 +0300
From:   Grigory Vasilyev <h0tc0d3@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     Grigory Vasilyev <h0tc0d3@...il.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Shuah Khan <shuah@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Jean-Philippe Brucker <jean-philippe@...aro.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Yury Norov <yury.norov@...il.com>, Yonghong Song <yhs@...com>,
        Adrian Ratiu <adrian.ratiu@...labora.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, llvm@...ts.linux.dev
Subject: [PATCH] Fix kernel build with LLVM=1

The wrong logic is using 1 as a suffix instead of -1.
So the build script tries to find clang1 file instead of clang.

GEN     Makefile
HOSTCC  scripts/basic/fixdep
/bin/sh: line 1: clang1: command not found
make[2]: *** [/build/linux/scripts/Makefile.host:95: scripts/basic/fixdep] Error 127
make[1]: *** [/build/linux/Makefile:564: scripts_basic] Error 2
make: *** [Makefile:219: __sub-make] Error 2

Fixes: b8321ed4a40c("Merge tag 'kbuild-v5.18-v2'")

Signed-off-by: Grigory Vasilyev <h0tc0d3@...il.com>
Reported-by: Grigory Vasilyev <h0tc0d3@...il.com>
---
 Makefile                       | 4 ++--
 tools/scripts/Makefile.include | 4 ++--
 tools/testing/selftests/lib.mk | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 18ecb49f1af6..efca890d4ea3 100644
--- a/Makefile
+++ b/Makefile
@@ -426,8 +426,8 @@ HOST_LFS_LIBS := $(shell getconf LFS_LIBS 2>/dev/null)
 ifneq ($(LLVM),)
 ifneq ($(filter %/,$(LLVM)),)
 LLVM_PREFIX := $(LLVM)
-else ifneq ($(filter -%,$(LLVM)),)
-LLVM_SUFFIX := $(LLVM)
+else ifneq (,$(findstring -, $(LLVM)))
+LLVM_SUFFIX := $(filter -%, $(LLVM))
 endif
 
 HOSTCC	= $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index 0efb8f2b33ce..c7a56d7f0bad 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -54,8 +54,8 @@ endef
 ifneq ($(LLVM),)
 ifneq ($(filter %/,$(LLVM)),)
 LLVM_PREFIX := $(LLVM)
-else ifneq ($(filter -%,$(LLVM)),)
-LLVM_SUFFIX := $(LLVM)
+else ifneq (,$(findstring -, $(LLVM)))
+LLVM_SUFFIX := $(filter -%, $(LLVM))
 endif
 
 $(call allow-override,CC,$(LLVM_PREFIX)clang$(LLVM_SUFFIX))
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 2a2d240cdc1b..42af066cf39e 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -3,8 +3,8 @@
 ifneq ($(LLVM),)
 ifneq ($(filter %/,$(LLVM)),)
 LLVM_PREFIX := $(LLVM)
-else ifneq ($(filter -%,$(LLVM)),)
-LLVM_SUFFIX := $(LLVM)
+else ifneq (,$(findstring -, $(LLVM)))
+LLVM_SUFFIX := $(filter -%, $(LLVM))
 endif
 
 CC := $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
-- 
2.35.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ