From: Sirio Balmelli <sirio@b-ad.ch>
To: ast@kernel.org
Cc: daniel@iogearbox.net, netdev@vger.kernel.org
Subject: [PATCH 1/3] selftests/bpf: Makefile: add includes to fix broken test build
Date: Thu, 26 Apr 2018 10:31:09 +0200 [thread overview]
Message-ID: <20180426083107.GA13908@vm4> (raw)
several bpf tests fail to build with clang 7.0.0:
...
In file included from ../../../include/uapi/linux/bpf.h:11:
In file included from ./include/uapi/linux/types.h:5:
/usr/include/asm-generic/int-ll64.h:11:10: fatal error: 'asm/bitsperlong.h' file not found
/usr/include/asm-generic/int-ll64.h is from outside the kernel repo,
probably a good idea to repoint to -I$(ROOT)/include/uapi.
asm/bitsperlong.h is architecture-specific, cater for this with an
architecture-specific include -I$(ROOT)/$(ARCH)/include/uapi.
Re-building now yields:
../../../../include/uapi/linux/stddef.h:2:10: fatal error: 'linux/compiler_types.h' file not found
Fix this with -I$(ROOT)/include
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
---
tools/testing/selftests/bpf/Makefile | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 0b72cc7..6a8cfaf 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -80,8 +80,14 @@ else
CPU ?= generic
endif
-CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
- -Wno-compare-distinct-pointer-types
+ARCH := arch/$(subst _64,,$(shell uname -p))
+ROOT :=../../../..
+TOOLS :=../../..
+CLANG_FLAGS = -I. -I./include/uapi \
+ -I$(TOOLS)/include/uapi -I$(TOOLS)/include \
+ -I$(ROOT)/$(ARCH)/include/uapi \
+ -I$(ROOT)/include/uapi -I$(ROOT)/include \
+ -Wno-compare-distinct-pointer-types
$(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline
$(OUTPUT)/test_xdp_noinline.o: CLANG_FLAGS += -fno-inline
--
2.7.4
next reply other threads:[~2018-04-26 8:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 8:31 Sirio Balmelli [this message]
2018-04-27 10:04 ` [PATCH 1/3] selftests/bpf: Makefile: add includes to fix broken test build Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180426083107.GA13908@vm4 \
--to=sirio@b-ad.ch \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.