bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: bpf@vger.kernel.org, netdev@vger.kernel.org
Cc: sdf@fomichev.me, ys114321@gmail.com, davem@davemloft.net,
	ast@kernel.org, daniel@iogearbox.net,
	Ilya Leoshkevich <iii@linux.ibm.com>
Subject: [PATCH v3 bpf-next 1/4] selftests/bpf: compile progs with -D__TARGET_ARCH_$(ARCH)
Date: Tue,  9 Jul 2019 17:18:06 +0200	[thread overview]
Message-ID: <20190709151809.37539-2-iii@linux.ibm.com> (raw)
In-Reply-To: <20190709151809.37539-1-iii@linux.ibm.com>

This opens up the possibility of accessing registers in an
arch-independent way.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
 tools/testing/selftests/bpf/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 2620406a53ec..59d89d5aa05e 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
+include ../../../scripts/Makefile.arch
 
 LIBDIR := ../../../lib
 BPFDIR := $(LIBDIR)/bpf
@@ -138,7 +139,8 @@ CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
 
 CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
 	      $(CLANG_SYS_INCLUDES) \
-	      -Wno-compare-distinct-pointer-types
+	      -Wno-compare-distinct-pointer-types \
+	      -D__TARGET_ARCH_$(ARCH)
 
 $(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline
 $(OUTPUT)/test_xdp_noinline.o: CLANG_FLAGS += -fno-inline
-- 
2.21.0


  reply	other threads:[~2019-07-09 15:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 15:18 [PATCH v3 bpf-next 0/4] selftests/bpf: fix compiling loop{1,2,3}.c on s390 Ilya Leoshkevich
2019-07-09 15:18 ` Ilya Leoshkevich [this message]
2019-07-09 15:18 ` [PATCH v3 bpf-next 2/4] selftests/bpf: fix s930 -> s390 typo Ilya Leoshkevich
2019-07-09 15:18 ` [PATCH v3 bpf-next 3/4] selftests/bpf: make PT_REGS_* work in userspace Ilya Leoshkevich
2019-07-09 17:48   ` Andrii Nakryiko
2019-07-10 11:47     ` Ilya Leoshkevich
2019-07-10 17:14       ` Andrii Nakryiko
2019-07-09 15:18 ` [PATCH v3 bpf-next 4/4] selftests/bpf: fix compiling loop{1,2,3}.c on s390 Ilya Leoshkevich
2019-07-09 16:07 ` [PATCH v3 bpf-next 0/4] " Stanislav Fomichev
2019-07-09 17:50 ` Andrii Nakryiko

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=20190709151809.37539-2-iii@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \
    --cc=ys114321@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).