提交 1c2dd16a 编写于 作者: A Alexei Starovoitov 提交者: David S. Miller

selftests/bpf: get rid of -D__x86_64__

-D__x86_64__ workaround was used to make /usr/include/features.h
to follow expected path through the system include headers.
This is not portable.
Instead define dummy stubs.h which is used by 'clang -target bpf'

Fixes: 6882804c ("selftests/bpf: add a test for overlapping packet range checks")
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ead18fb
...@@ -34,6 +34,6 @@ $(BPFOBJ): force ...@@ -34,6 +34,6 @@ $(BPFOBJ): force
CLANG ?= clang CLANG ?= clang
%.o: %.c %.o: %.c
$(CLANG) -I../../../include/uapi -I../../../../samples/bpf/ \ $(CLANG) -I. -I../../../include/uapi -I../../../../samples/bpf/ \
-D__x86_64__ -Wno-compare-distinct-pointer-types \ -Wno-compare-distinct-pointer-types \
-O2 -target bpf -c $< -o $@ -O2 -target bpf -c $< -o $@
/* dummy .h to trick /usr/include/features.h to work with 'clang -target bpf' */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册