From bd82031db608ce9eeabe7114cdb871cf8914de75 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Sat, 8 Sep 2012 10:23:42 +0200 Subject: [PATCH] --- yaml --- r: 329101 b: refs/heads/master c: b25b09ecf98bf6a32f3732281c2db13be6aeb14c h: refs/heads/master i: 329099: b7feba37ff6d455fad42cde9774fcda21d2ddcd6 v: v3 --- [refs] | 2 +- trunk/samples/seccomp/Makefile | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 64679b413ddb..da2ed3f98d59 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e4930eb7c8fb20a39dfb5f8a8f80402710dcea8 +refs/heads/master: b25b09ecf98bf6a32f3732281c2db13be6aeb14c diff --git a/trunk/samples/seccomp/Makefile b/trunk/samples/seccomp/Makefile index 16aa2d424985..bbbd276659ba 100644 --- a/trunk/samples/seccomp/Makefile +++ b/trunk/samples/seccomp/Makefile @@ -18,14 +18,22 @@ HOSTCFLAGS_bpf-direct.o += -idirafter $(objtree)/include bpf-direct-objs := bpf-direct.o # Try to match the kernel target. -ifeq ($(CONFIG_64BIT),) -HOSTCFLAGS_bpf-direct.o += -m32 -HOSTCFLAGS_dropper.o += -m32 -HOSTCFLAGS_bpf-helper.o += -m32 -HOSTCFLAGS_bpf-fancy.o += -m32 -HOSTLOADLIBES_bpf-direct += -m32 -HOSTLOADLIBES_bpf-fancy += -m32 -HOSTLOADLIBES_dropper += -m32 +ifndef CONFIG_64BIT + +# s390 has -m31 flag to build 31 bit binaries +ifndef CONFIG_S390 +MFLAG = -m32 +else +MFLAG = -m31 +endif + +HOSTCFLAGS_bpf-direct.o += $(MFLAG) +HOSTCFLAGS_dropper.o += $(MFLAG) +HOSTCFLAGS_bpf-helper.o += $(MFLAG) +HOSTCFLAGS_bpf-fancy.o += $(MFLAG) +HOSTLOADLIBES_bpf-direct += $(MFLAG) +HOSTLOADLIBES_bpf-fancy += $(MFLAG) +HOSTLOADLIBES_dropper += $(MFLAG) endif # Tell kbuild to always build the programs