mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 05:12:49 +00:00
selftests: Set CC to clang in lib.mk if LLVM is set
[ Upstream commit 26e6dd1072
]
selftests/bpf/Makefile includes lib.mk. With the following command
make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel
make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 V=1
some files are still compiled with gcc. This patch
fixed lib.mk issue which sets CC to gcc in all cases.
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210413153413.3027426-1-yhs@fb.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2bb2ff46d2
commit
b9ef1725d5
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,10 @@
|
|||
# This mimics the top-level Makefile. We do it explicitly here so that this
|
||||
# Makefile can operate with or without the kbuild infrastructure.
|
||||
ifneq ($(LLVM),)
|
||||
CC := clang
|
||||
else
|
||||
CC := $(CROSS_COMPILE)gcc
|
||||
endif
|
||||
|
||||
ifeq (0,$(MAKELEVEL))
|
||||
OUTPUT := $(shell pwd)
|
||||
|
|
Loading…
Reference in a new issue