mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
2e4930eb7c
commit
b25b09ecf9
@ -18,14 +18,22 @@ HOSTCFLAGS_bpf-direct.o += -idirafter $(objtree)/include
|
|||||||
bpf-direct-objs := bpf-direct.o
|
bpf-direct-objs := bpf-direct.o
|
||||||
|
|
||||||
# Try to match the kernel target.
|
# Try to match the kernel target.
|
||||||
ifeq ($(CONFIG_64BIT),)
|
ifndef CONFIG_64BIT
|
||||||
HOSTCFLAGS_bpf-direct.o += -m32
|
|
||||||
HOSTCFLAGS_dropper.o += -m32
|
# s390 has -m31 flag to build 31 bit binaries
|
||||||
HOSTCFLAGS_bpf-helper.o += -m32
|
ifndef CONFIG_S390
|
||||||
HOSTCFLAGS_bpf-fancy.o += -m32
|
MFLAG = -m32
|
||||||
HOSTLOADLIBES_bpf-direct += -m32
|
else
|
||||||
HOSTLOADLIBES_bpf-fancy += -m32
|
MFLAG = -m31
|
||||||
HOSTLOADLIBES_dropper += -m32
|
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
|
endif
|
||||||
|
|
||||||
# Tell kbuild to always build the programs
|
# Tell kbuild to always build the programs
|
||||||
|
Loading…
Reference in New Issue
Block a user