From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, arm@kernel.org,
Arnd Bergmann <arnd@arndb.de>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Kees Cook <keescook@chromium.org>,
James Morris <james.l.morris@oracle.com>
Subject: [PATCH 14/15] samples/seccomp: be less stupid about cross compiling
Date: Mon, 21 Jan 2013 17:16:07 +0000 [thread overview]
Message-ID: <1358788568-11137-15-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1358788568-11137-1-git-send-email-arnd@arndb.de>
The seccomp filters are currently built for the build
host, not for the machine that they are going to run
on, but they are also built for with the -m32 flag
if the kernel is built for a 32 bit machine, both
of which seems rather odd.
It broke allyesconfig on my machine, which is x86-64, but
building for 32 bit ARM, with this error message:
In file included from /usr/include/stdio.h:28:0,
from samples/seccomp/bpf-fancy.c:15:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
because there are no 32 bit libc headers installed on
this machine. We should really be building all the
samples for the target machine rather than the build
host, but since the infrastructure for that appears
to be missing right now, let's be a little bit smarter
and not pass the '-m32' flag to the HOSTCC when cross-
compiling.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: James Morris <james.l.morris@oracle.com>
---
samples/seccomp/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
index bbbd276..7203e66 100644
--- a/samples/seccomp/Makefile
+++ b/samples/seccomp/Makefile
@@ -19,6 +19,7 @@ bpf-direct-objs := bpf-direct.o
# Try to match the kernel target.
ifndef CONFIG_64BIT
+ifndef CROSS_COMPILE
# s390 has -m31 flag to build 31 bit binaries
ifndef CONFIG_S390
@@ -35,6 +36,7 @@ HOSTLOADLIBES_bpf-direct += $(MFLAG)
HOSTLOADLIBES_bpf-fancy += $(MFLAG)
HOSTLOADLIBES_dropper += $(MFLAG)
endif
+endif
# Tell kbuild to always build the programs
always := $(hostprogs-y)
--
1.7.10.4
next prev parent reply other threads:[~2013-01-21 17:21 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 17:15 [PATCH 00/15] ARM build regressions in v3.8 Arnd Bergmann
2013-01-21 17:15 ` [PATCH 01/15] ARM: compressed/head.S: work around new binutils warning Arnd Bergmann
2013-01-21 17:15 ` [PATCH 02/15] ARM: mvebu: build coherency_ll.S for arch=armv7-a Arnd Bergmann
2013-01-21 19:03 ` Tony Lindgren
2013-01-21 20:16 ` Arnd Bergmann
2013-01-21 17:15 ` [PATCH 03/15] ARM: samsung: fix assembly syntax for new gas Arnd Bergmann
2013-01-21 17:15 ` [PATCH 04/15] ARM: w90x900: fix legacy assembly syntax Arnd Bergmann
2013-01-21 17:15 ` [PATCH 05/15] ASoC: fsl: fiq and dma cannot both be modules Arnd Bergmann
2013-01-22 3:50 ` Shawn Guo
2013-01-22 6:33 ` Mark Brown
2013-01-22 8:21 ` Arnd Bergmann
2013-02-05 16:21 ` Arnd Bergmann
2013-02-05 16:42 ` [PATCH] ASoC: fsl: fix allyesconfig build for imx-pcm Arnd Bergmann
2013-02-06 4:02 ` Shawn Guo
2013-02-06 8:58 ` Arnd Bergmann
2013-01-21 17:15 ` [PATCH 06/15] clk: export __clk_get_name Arnd Bergmann
2013-01-21 20:51 ` Ulf Hansson
2013-01-22 10:54 ` Fabio Estevam
2013-01-22 15:43 ` Arnd Bergmann
2013-02-14 17:41 ` Arnd Bergmann
2013-01-21 17:16 ` [PATCH 07/15] drm/exynos: don't include plat/gpio-cfg.h Arnd Bergmann
2013-01-21 17:16 ` [PATCH 08/15] drm/exynos: fimd and ipp are broken on multiplatform Arnd Bergmann
2013-01-22 1:26 ` Inki Dae
2013-01-21 17:16 ` [PATCH 09/15] media: coda: don't build " Arnd Bergmann
2013-01-22 3:54 ` Shawn Guo
2013-01-22 12:32 ` Mauro Carvalho Chehab
2013-01-22 12:34 ` Mauro Carvalho Chehab
2013-01-22 8:21 ` Sascha Hauer
2013-01-22 15:41 ` Arnd Bergmann
2013-01-21 17:16 ` [PATCH 10/15] mfd/vexpress: export vexpress_config_func_{put,get} Arnd Bergmann
2013-01-21 17:23 ` Pawel Moll
2013-01-21 17:16 ` [PATCH 11/15] mtd: davinci_nand: fix OF support Arnd Bergmann
2013-01-21 21:37 ` Heiko Schocher
2013-01-21 21:50 ` Arnd Bergmann
2013-01-21 17:16 ` [PATCH 12/15] USB: gadget/freescale: disable non-multiplatform drivers Arnd Bergmann
2013-01-21 18:41 ` Felipe Balbi
2013-01-21 18:57 ` Greg Kroah-Hartman
2013-01-21 19:00 ` Felipe Balbi
2013-01-21 20:15 ` Arnd Bergmann
2013-02-05 16:27 ` Arnd Bergmann
2013-02-05 17:00 ` Greg Kroah-Hartman
2013-02-05 21:37 ` Felipe Balbi
2013-02-05 22:54 ` Arnd Bergmann
2013-02-06 1:55 ` Greg Kroah-Hartman
2013-02-06 7:06 ` Felipe Balbi
2013-01-21 17:16 ` [PATCH 13/15] USB: ehci: make orion and mxc bus glues coexist Arnd Bergmann
2013-01-21 18:42 ` Felipe Balbi
2013-01-21 20:11 ` Alan Stern
2013-01-21 21:37 ` Arnd Bergmann
2013-01-22 6:11 ` Shawn Guo
2013-01-22 6:14 ` Shawn Guo
2013-01-22 15:30 ` Alan Stern
2013-01-21 20:14 ` Arnd Bergmann
2013-01-21 20:35 ` Alan Stern
2013-01-21 21:49 ` Arnd Bergmann
2013-01-22 3:39 ` Alan Stern
2013-01-21 17:16 ` Arnd Bergmann [this message]
2013-01-22 21:20 ` [PATCH 14/15] samples/seccomp: be less stupid about cross compiling Kees Cook
2013-01-28 14:26 ` Will Drewry
2013-01-21 17:16 ` [PATCH 15/15] staging/omapdrm: don't build on multiplatform Arnd Bergmann
2013-01-21 17:26 ` Rob Clark
2013-01-21 17:29 ` Rob Clark
2013-01-21 17:41 ` Arnd Bergmann
2013-01-21 18:39 ` Rob Clark
2013-01-21 20:09 ` Arnd Bergmann
2013-01-22 16:53 ` Greg Kroah-Hartman
2013-01-22 16:57 ` Rob Clark
2013-01-22 17:30 ` Greg Kroah-Hartman
2013-01-22 17:47 ` Arnd Bergmann
2013-01-22 18:16 ` Rob Clark
2013-01-22 21:07 ` Arnd Bergmann
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=1358788568-11137-15-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=arm@kernel.org \
--cc=heiko.carstens@de.ibm.com \
--cc=james.l.morris@oracle.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®