On 7/27/23 7:18 PM, Alexei Starovoitov wrote:
On Thu, Jul 27, 2023 at 6:13 PM Yonghong Song <yonghong.song@xxxxxxxxx> wrote:
-# Silence some warnings when compiled with clang
ifneq ($(LLVM),)
+# Silence some warnings when compiled with clang
CFLAGS += -Wno-unused-command-line-argument
+# Check whether cpu=v4 is supported or not by clang
+ifneq ($(shell $(CLANG) --target=bpf -mcpu=help 2>&1 | grep 'v4'),)
+CLANG_CPUV4 := 1
+endif
endif
Gating cpu=v4 testing by LLVM=1 is unnecessary.
The kernel can be built by GCC, but we should still build
test_progs-cpuv4 when clang supports it.
Please consider a follow up.
Agree. Will do a follow-up for cpu-v4 not depending on LLVM=1.
I've applied the set, since the rest looks great!