From 646bb2e524f6e91d0a80e4072d41d753e727a5b7 Mon Sep 17 00:00:00 2001 From: jinzhiguang Date: Tue, 5 Dec 2023 09:16:51 +0800 Subject: [PATCH] mirror: Fix CLANG_BPF_CO_RE_PROBE_CMD When global variables are not initialized, the original command will get incorrect results in some versions of clang environment. Signed-off-by: jinzhiguang --- src/Makefile.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.feature b/src/Makefile.feature index d091cdac..131c67e4 100644 --- a/src/Makefile.feature +++ b/src/Makefile.feature @@ -27,7 +27,7 @@ endif ### feature-clang-bpf-co-re CLANG_BPF_CO_RE_PROBE_CMD = \ - printf '%s\n' 'struct s { int i; } __attribute__((preserve_access_index)); struct s foo;' | \ + printf '%s\n' 'struct s { int i; } __attribute__((preserve_access_index)); struct s foo = {};' | \ $(CLANG) -g -target bpf -S -o - -x c - $(QUIET_STDERR) | grep -q BTF_KIND_VAR ifneq ($(findstring clang-bpf-co-re,$(FEATURE_TESTS)),)