@@ -1009,6 +1009,9 @@ archprepare: archheaders archscripts prepare1
scripts_basic
prepare0: KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
prepare0: KBUILD_AFLAGS += $(GCC_PLUGINS_AFLAGS)
prepare0: archprepare FORCE
+ifdef CONFIG_GCC_PLUGINS
+ $(Q)$(MAKE) $(build)=scripts/gcc-plugins
+endif
$(Q)$(MAKE) $(build)=.
# All the preparing..
@@ -45,7 +45,6 @@ subdir-y += mod
subdir-$(CONFIG_SECURITY_SELINUX) += selinux
subdir-$(CONFIG_DTC) += dtc
subdir-$(CONFIG_GDB_SCRIPTS) += gdb
-subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins
# Let clean descend into subdirs
-subdir- += basic kconfig package
+subdir- += basic kconfig package gcc-plugins