From: Tycho Andersen Date: Mon, 7 Jan 2019 23:16:31 +0000 (-0700) Subject: samples/seccomp: Fix 32-bit build X-Git-Tag: v5.0-rc2~18^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a77d1d196bc63b37d9b4d1b614884669e8e79d32;p=thirdparty%2Fkernel%2Flinux.git samples/seccomp: Fix 32-bit build Both the .o and the actual executable need to be built with -m32 in order to link correctly. Reported-by: Ingo Molnar Signed-off-by: Tycho Andersen Reviewed-by: Kees Cook Cc: Borislav Petkov Cc: James Morris Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: fec7b6690541 ("samples: add an example of seccomp user trap") Link: http://lkml.kernel.org/r/20190107231631.1849-1-tycho@tycho.ws Signed-off-by: Ingo Molnar --- diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile index 4920903c8009a..fb43a814d4c08 100644 --- a/samples/seccomp/Makefile +++ b/samples/seccomp/Makefile @@ -34,6 +34,7 @@ HOSTCFLAGS_bpf-direct.o += $(MFLAG) HOSTCFLAGS_dropper.o += $(MFLAG) HOSTCFLAGS_bpf-helper.o += $(MFLAG) HOSTCFLAGS_bpf-fancy.o += $(MFLAG) +HOSTCFLAGS_user-trap.o += $(MFLAG) HOSTLDLIBS_bpf-direct += $(MFLAG) HOSTLDLIBS_bpf-fancy += $(MFLAG) HOSTLDLIBS_dropper += $(MFLAG)