From 132305b3b474a85152302ceda4551384cce3904e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 2 Aug 2020 00:00:50 +0900 Subject: kbuild: stop filtering out $(GCC_PLUGINS_CFLAGS) from cc-option base Commit d26e94149276 ("kbuild: no gcc-plugins during cc-option tests") was neeeded because scripts/Makefile.gcc-plugins was too early. This is unneeded by including scripts/Makefile.gcc-plugins last, and being careful to not add cc-option tests after it. Signed-off-by: Masahiro Yamada --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') 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) -- cgit