aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens2012-09-08 03:23:42 -0500
committerJames Morris2012-09-11 21:55:31 -0500
commitb25b09ecf98bf6a32f3732281c2db13be6aeb14c (patch)
tree4d7d0e8ddbca40c4d125306e2d9ea3df76f617be /samples
parent2e4930eb7c8fb20a39dfb5f8a8f80402710dcea8 (diff)
downloadkernel-omap-b25b09ecf98bf6a32f3732281c2db13be6aeb14c.tar.gz
kernel-omap-b25b09ecf98bf6a32f3732281c2db13be6aeb14c.tar.xz
kernel-omap-b25b09ecf98bf6a32f3732281c2db13be6aeb14c.zip
samples/seccomp: fix 31 bit build on s390
On s390 the flag to force 31 builds is -m31 instead of -m32 unlike on all (?) other architectures. Fixes this compile error: HOSTCC samples/seccomp/bpf-direct.o cc1: error: unrecognized command line option "-m32" make[2]: *** [samples/seccomp/bpf-direct.o] Error 1 Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'samples')
-rw-r--r--samples/seccomp/Makefile24
1 files changed, 16 insertions, 8 deletions
diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile
index 16aa2d424985..bbbd276659ba 100644
--- a/samples/seccomp/Makefile
+++ b/samples/seccomp/Makefile
@@ -18,14 +18,22 @@ HOSTCFLAGS_bpf-direct.o += -idirafter $(objtree)/include
18bpf-direct-objs := bpf-direct.o 18bpf-direct-objs := bpf-direct.o
19 19
20# Try to match the kernel target. 20# Try to match the kernel target.
21ifeq ($(CONFIG_64BIT),) 21ifndef CONFIG_64BIT
22HOSTCFLAGS_bpf-direct.o += -m32 22
23HOSTCFLAGS_dropper.o += -m32 23# s390 has -m31 flag to build 31 bit binaries
24HOSTCFLAGS_bpf-helper.o += -m32 24ifndef CONFIG_S390
25HOSTCFLAGS_bpf-fancy.o += -m32 25MFLAG = -m32
26HOSTLOADLIBES_bpf-direct += -m32 26else
27HOSTLOADLIBES_bpf-fancy += -m32 27MFLAG = -m31
28HOSTLOADLIBES_dropper += -m32 28endif
29
30HOSTCFLAGS_bpf-direct.o += $(MFLAG)
31HOSTCFLAGS_dropper.o += $(MFLAG)
32HOSTCFLAGS_bpf-helper.o += $(MFLAG)
33HOSTCFLAGS_bpf-fancy.o += $(MFLAG)
34HOSTLOADLIBES_bpf-direct += $(MFLAG)
35HOSTLOADLIBES_bpf-fancy += $(MFLAG)
36HOSTLOADLIBES_dropper += $(MFLAG)
29endif 37endif
30 38
31# Tell kbuild to always build the programs 39# Tell kbuild to always build the programs