gcc-plugins: Require utsrelease.h before scripts target
Guenter Roeck
Tested-byQuoted 4 lines · Kees Cook
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.
Quoted 9 lines
Reported-by kernel test robot <[email protected]>Reported-by Guenter Roeck <[email protected]>Fixes 61f60bac8c05 ("gcc-plugins: Change all version strings match kernel")Cc Guenter Roeck <[email protected]>Cc Masahiro Yamada <[email protected]>Signed-off-by Kees Cook <[email protected]>
I was able to reproduce the problem with the following change in Makefile.
include/generated/utsrelease.h: include/config/kernel.release FORCE
+ sleep 2
$(call filechk,utsrelease.h)
With this patch, the problem is gone.
Tested-by Guenter Roeck <[email protected]>
Guenter
Quoted 32 lines
--- Makefile | 2 +- scripts/gcc-plugins/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Makefile +1
-1@@ -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 kernelscripts/gcc-plugins/Makefile +1
-1@@ -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)Signature · 1 line
2.32.0