[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220523200222.711011-1-keescook@chromium.org>
Date: Mon, 23 May 2022 13:02:22 -0700
From: Kees Cook <keescook@...omium.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Kees Cook <keescook@...omium.org>,
kernel test robot <lkp@...el.com>,
Masahiro Yamada <masahiroy@...nel.org>,
linux-kbuild@...r.kernel.org,
Michal Marek <michal.lkml@...kovi.net>,
Nick Desaulniers <ndesaulniers@...gle.com>,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: [PATCH] gcc-plugins: Require utsrelease.h before scripts target
The "utsrelease.h" target was in parallel with the "scripts" target,
which meant -j1 or unlucky parallel builds from a distclean state would
fail to build the GCC plugins.
Reported-by: kernel test robot <lkp@...el.com>
Link: https://lore.kernel.org/linux-mm/202205230239.EZxeZ3Fv-lkp@intel.com
Reported-by: Guenter Roeck <linux@...ck-us.net>
Link: https://lore.kernel.org/lkml/YouX6g1T7w3FDeM8@cmpxchg.org
Fixes: 61f60bac8c05 ("gcc-plugins: Change all version strings match kernel")
Cc: Guenter Roeck <linux@...ck-us.net>
Cc: Masahiro Yamada <masahiroy@...nel.org>
Cc: linux-kbuild@...r.kernel.org
Signed-off-by: Kees Cook <keescook@...omium.org>
---
Makefile | 2 +-
scripts/gcc-plugins/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 91c91fcf3c24..c04420d5aa3d 100644
--- a/Makefile
+++ b/Makefile
@@ -1175,7 +1175,7 @@ include/config/kernel.release: FORCE
# Carefully list dependencies so we do not try to build scripts twice
# in parallel
PHONY += scripts
-scripts: scripts_basic scripts_dtc
+scripts: include/generated/utsrelease.h scripts_basic scripts_dtc
$(Q)$(MAKE) $(build)=$(@)
# Things we need to do before we recursively start building the kernel
diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile
index 6f0aecad5d67..c29334669a16 100644
--- a/scripts/gcc-plugins/Makefile
+++ b/scripts/gcc-plugins/Makefile
@@ -64,5 +64,5 @@ $(foreach m, $(notdir $(plugin-multi)), $(eval $(obj)/$m: $(addprefix $(obj)/, $
quiet_cmd_plugin_cxx_o_c = HOSTCXX $@
cmd_plugin_cxx_o_c = $(HOSTCXX) $(plugin_cxxflags) -c -o $@ $<
-$(plugin-objs): $(obj)/%.o: $(src)/%.c FORCE
+$(plugin-objs): $(obj)/%.o: $(src)/%.c $(objdir)/include/generated/utsrelease.h FORCE
$(call if_changed_dep,plugin_cxx_o_c)
--
2.32.0
Powered by blists - more mailing lists