summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/Makefile
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2023-07-28 07:57:45 +0200
committerAlexei Starovoitov <ast@kernel.org>2023-07-28 17:54:05 +0200
commita76584fc9ff6b32f9839036eb15f4ca4d2586173 (patch)
tree1ef25af3d08b4babba11c1603be4d4dfc66b034f /tools/testing/selftests/bpf/Makefile
parentbpf: Fix compilation warning with -Wparentheses (diff)
downloadlinux-a76584fc9ff6b32f9839036eb15f4ca4d2586173.tar.xz
linux-a76584fc9ff6b32f9839036eb15f4ca4d2586173.zip
selftests/bpf: Enable test test_progs-cpuv4 for gcc build kernel
Currently, test_progs-cpuv4 is generated with clang build kernel when bpf cpu=v4 is supported by the clang compiler. Let us enable test_progs-cpuv4 for gcc build kernel as well. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230728055745.2285202-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/Makefile')
-rw-r--r--tools/testing/selftests/bpf/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 6a45719a8d47..73a6ca80fa16 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -36,11 +36,12 @@ LDLIBS += -lelf -lz -lrt -lpthread
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
+endif
+
+# Check whether bpf cpu=v4 is supported or not by clang
ifneq ($(shell $(CLANG) --target=bpf -mcpu=help 2>&1 | grep 'v4'),)
CLANG_CPUV4 := 1
endif
-endif
# Order correspond to 'make run_tests' order
TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \