From: Ilya Leoshkevich <iii@linux•ibm.com>
To: bpf@vger•kernel.org, netdev@vger•kernel.org
Cc: gor@linux•ibm.com, heiko.carstens@de•ibm.com,
Ilya Leoshkevich <iii@linux•ibm.com>
Subject: [PATCH bpf] samples/bpf: build with -D__TARGET_ARCH_$(SRCARCH)
Date: Mon, 15 Jul 2019 11:11:03 +0200 [thread overview]
Message-ID: <20190715091103.4030-1-iii@linux.ibm.com> (raw)
While $ARCH can be relatively flexible (see Makefile and
tools/scripts/Makefile.arch), $SRCARCH always corresponds to a directory
name under arch/.
Therefore, build samples with -D__TARGET_ARCH_$(SRCARCH), since that
matches the expectations of bpf_helpers.h.
Signed-off-by: Ilya Leoshkevich <iii@linux•ibm.com>
Acked-by: Vasily Gorbik <gor@linux•ibm.com>
---
samples/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index f90daadfbc89..1d9be26b4edd 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -284,7 +284,7 @@ $(obj)/%.o: $(src)/%.c
$(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) -I$(obj) \
-I$(srctree)/tools/testing/selftests/bpf/ \
-D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \
- -D__TARGET_ARCH_$(ARCH) -Wno-compare-distinct-pointer-types \
+ -D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \
-Wno-gnu-variable-sized-type-not-at-end \
-Wno-address-of-packed-member -Wno-tautological-compare \
-Wno-unknown-warning-option $(CLANG_ARCH_ARGS) \
--
2.21.0
next reply other threads:[~2019-07-15 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 9:11 Ilya Leoshkevich [this message]
2019-07-15 15:11 ` [PATCH bpf] samples/bpf: build with -D__TARGET_ARCH_$(SRCARCH) Andrii Nakryiko
2019-07-15 22:20 ` 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=20190715091103.4030-1-iii@linux.ibm.com \
--to=iii@linux$(echo .)ibm.com \
--cc=bpf@vger$(echo .)kernel.org \
--cc=gor@linux$(echo .)ibm.com \
--cc=heiko.carstens@de$(echo .)ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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