File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
tools/testing/selftests/bpf Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,12 @@ define CLANG_BPF_BUILD_RULE
163
163
-c $1 -o - || echo "BPF obj compilation failed") | \
164
164
$(LLC ) -march=bpf -mcpu=probe $4 -filetype=obj -o $2
165
165
endef
166
+ # Similar to CLANG_BPF_BUILD_RULE, but with disabled alu32
167
+ define CLANG_NOALU32_BPF_BUILD_RULE
168
+ ($(CLANG ) $3 -O2 -target bpf -emit-llvm \
169
+ -c $1 -o - || echo "BPF obj compilation failed") | \
170
+ $(LLC ) -march=bpf -mcpu=v2 $4 -filetype=obj -o $2
171
+ endef
166
172
# Similar to CLANG_BPF_BUILD_RULE, but using native Clang and bpf LLC
167
173
define CLANG_NATIVE_BPF_BUILD_RULE
168
174
($(CLANG ) $3 -O2 -emit-llvm \
@@ -275,6 +281,7 @@ TRUNNER_BPF_LDFLAGS := -mattr=+alu32
275
281
$(eval $(call DEFINE_TEST_RUNNER,test_progs))
276
282
277
283
# Define test_progs-no_alu32 test runner.
284
+ TRUNNER_BPF_BUILD_RULE := CLANG_NOALU32_BPF_BUILD_RULE
278
285
TRUNNER_BPF_LDFLAGS :=
279
286
$(eval $(call DEFINE_TEST_RUNNER,test_progs,no_alu32))
280
287
You can’t perform that action at this time.
0 commit comments