Skip to content

Commit

Permalink
fix CLANG_BPF_CO_RE_PROBE_CMD.
Browse files Browse the repository at this point in the history
When global variables are not initialized, the original command will get incorrect results in some versions of clang environment.
  • Loading branch information
dylanorz committed Dec 5, 2023
1 parent 687e7f0 commit da60bd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Makefile.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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)),)
Expand Down

0 comments on commit da60bd3

Please sign in to comment.