]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kbuild: check the presence of include/generated/rustc_cfg
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 17 Sep 2024 14:16:39 +0000 (23:16 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 4 Nov 2024 08:53:09 +0000 (17:53 +0900)
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 <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Makefile

index 096b1e6cd96526ced7e75de7950b839d4931e3bb..9b30c42ce3b3ceb73b708f58dc4a63cbf425272d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -783,7 +783,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
@@ -1201,7 +1201,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