[PATCH] um: Don't build arch/x86/um/user-offsets.s with gcc plugins

From: Thomas Meyer
Date: Wed May 17 2017 - 17:13:38 EST


For some reasons I don't know users-offsets.s get's build before the
gcc-plugins itself.
This patch fixes the problem by not using the gcc-plugins for building
user-offsets.s

make order example:
$ make ARCH=um
 CHKÂÂÂÂÂinclude/generated/uapi/linux/version.h
 HOSTCCÂÂscripts/basic/fixdep
 HOSTCCÂÂscripts/basic/bin2c
 HOSTCCÂÂscripts/unifdef
 CCÂÂÂÂÂÂarch/x86/um/user-offsets.s
 CHKÂÂÂÂÂinclude/generated/user_constants.h
 CHKÂÂÂÂÂinclude/config/kernel.release
 CHKÂÂÂÂÂinclude/generated/utsrelease.h
 HOSTCXX -fPIC scripts/gcc-plugins/latent_entropy_plugin.o
 HOSTLLD -shared scripts/gcc-plugins/latent_entropy_plugin.so
 HOSTCXX -fPIC scripts/gcc-plugins/structleak_plugin.o
 HOSTLLD -shared scripts/gcc-plugins/structleak_plugin.so

Signed-off-by: Thomas Meyer <thomas@xxxxxxxx>
---
Âarch/x86/um/Makefile | 2 +-
Â1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
index 46cbbfe..d67c78a 100644
--- a/arch/x86/um/Makefile
+++ b/arch/x86/um/Makefile
@@ -36,7 +36,7 @@ subarch-$(CONFIG_MODULES) += ../kernel/module.o
ÂUSER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
Â
Âextra-y += user-offsets.s
-$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
+$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(filter-out $(GCC_PLUGINS_CFLAGS), $(USER_CFLAGS) ) \
 -Iarch/x86/include/generated
Â
ÂUNPROFILE_OBJS := stub_segv.o