author: Masahiro Yamada <masahiroy@kernel.org> 2020-08-02 00:00:50 +0900
committer: Masahiro Yamada <masahiroy@kernel.org> 2020-08-10 01:32:59 +0900
commit: 132305b3b474a85152302ceda4551384cce3904e
parent: e0fe0bbe57b8d708a18756be5bc289bdaf78d2a8
Commit Summary:
Diffstat:
1 file changed, 4 insertions, 1 deletion
diff --git a/Makefile b/Makefile
index 483456d5dd3e..712206381a27 100644
--- a/Makefile
+++ b/Makefile
@@ -506,7 +506,6 @@ KBUILD_CFLAGS_MODULE := -DMODULE
KBUILD_LDFLAGS_MODULE :=
export KBUILD_LDS_MODULE := $(srctree)/scripts/module-common.lds
KBUILD_LDFLAGS :=
-GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=
export ARCH SRCARCH CONFIG_SHELL BASH HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE LD CC
@@ -955,6 +954,10 @@ include-$(CONFIG_GCC_PLUGINS) += scripts/Makefile.gcc-plugins
include $(addprefix $(srctree)/, $(include-y))
+# scripts/Makefile.gcc-plugins is intentionally included last.
+# Do not add $(call cc-option,...) below this line. When you build the kernel
+# from the clean source tree, the GCC plugins do not exist at this point.
+
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
KBUILD_CPPFLAGS += $(KCPPFLAGS)
KBUILD_AFLAGS += $(KAFLAGS)