From e379551e6102a44a8ceb03c010197c9076001ca7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 17 Sep 2024 23:16:39 +0900 Subject: [PATCH] FROMGIT: kbuild: check the presence of include/generated/rustc_cfg Since commit 2f7ab1267dc9 ("Kbuild: add Rust support"), Kconfig generates include/generated/rustc_cfg, but its presence is not checked in the top-level Makefile. It should be checked similarly to the C header counterpart, include/generated/autoconf.h. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier Acked-by: Miguel Ojeda Tested-by: Miguel Ojeda (cherry picked from commit 985d6cccb67c1943c687294095df04a031183fdb https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild) Bug: 347787665 Signed-off-by: Matthew Maurer Change-Id: Ife95a7f99f0dc40f963980d397b633d0daa21f64 Signed-off-by: Matthew Maurer --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ff028c070be6..3e990fd3b6fe 100644 --- a/Makefile +++ b/Makefile @@ -805,7 +805,7 @@ else # !may-sync-config # and include/config/auto.conf but do not care if they are up-to-date. # Use auto.conf to show the error message -checked-configs := include/generated/autoconf.h include/config/auto.conf +checked-configs := include/generated/autoconf.h include/generated/rustc_cfg include/config/auto.conf missing-configs := $(filter-out $(wildcard $(checked-configs)), $(checked-configs)) ifdef missing-configs @@ -1266,7 +1266,8 @@ PHONY += prepare archprepare archprepare: outputmakefile archheaders archscripts scripts include/config/kernel.release \ asm-generic $(version_h) include/generated/utsrelease.h \ - include/generated/compile.h include/generated/autoconf.h remove-stale-files + include/generated/compile.h include/generated/autoconf.h \ + include/generated/rustc_cfg remove-stale-files prepare0: archprepare $(Q)$(MAKE) $(build)=scripts/mod