From c17f10edcebcb8a9b66343808296485a4f14aca0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 1 Sep 2024 21:22:28 +0900 Subject: [PATCH] fix Signed-off-by: Masahiro Yamada --- scripts/Makefile.modfinal | 8 +++----- scripts/{mod/modinfo.c => module-common.c} | 0 scripts/package/install-extmod-build | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) rename scripts/{mod/modinfo.c => module-common.c} (100%) diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal index dde09dc4ba11..6c3112fb3d92 100644 --- a/scripts/Makefile.modfinal +++ b/scripts/Makefile.modfinal @@ -30,10 +30,8 @@ quiet_cmd_cc_o_c = CC [M] $@ %.mod.o: %.mod.c FORCE $(call if_changed_dep,cc_o_c) -ifeq ($(KBUILD_EXTMOD),) -scripts/mod/modinfo.o: scripts/mod/modinfo.c FORCE +$(extmod_prefix).module-common.o: $(srctree)/scripts/module-common.c FORCE $(call if_changed_dep,cc_o_c) -endif quiet_cmd_ld_ko_o = LD [M] $@ cmd_ld_ko_o += \ @@ -59,13 +57,13 @@ if_changed_except = $(if $(call newer_prereqs_except,$(2))$(cmd-check), \ printf '%s\n' 'savedcmd_$@ := $(make-cmd)' > $(dot-target).cmd, @:) # Re-generate module BTFs if either module's .ko or vmlinux changed -%.ko: %.o %.mod.o scripts/module.lds scripts/mod/modinfo.o $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE +%.ko: %.o %.mod.o $(extmod_prefix)/.module-common.o scripts/module.lds $(and $(CONFIG_DEBUG_INFO_BTF_MODULES),$(KBUILD_BUILTIN),vmlinux) FORCE +$(call if_changed_except,ld_ko_o,vmlinux) ifdef CONFIG_DEBUG_INFO_BTF_MODULES +$(if $(newer-prereqs),$(call cmd,btf_ko)) endif -targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o) scripts/mod/modinfo.o +targets += $(modules:%.o=%.ko) $(modules:%.o=%.mod.o) $(extmod_prefix).module-common.o # Add FORCE to the prerequisites of a target to force it to be always rebuilt. # --------------------------------------------------------------------------- diff --git a/scripts/mod/modinfo.c b/scripts/module-common.c similarity index 100% rename from scripts/mod/modinfo.c rename to scripts/module-common.c diff --git a/scripts/package/install-extmod-build b/scripts/package/install-extmod-build index 15fab6d5dd56..d2c9cacecc0c 100755 --- a/scripts/package/install-extmod-build +++ b/scripts/package/install-extmod-build @@ -37,7 +37,6 @@ mkdir -p "${destdir}" echo include/config/auto.conf echo include/config/kernel.release echo include/generated - echo scripts/mod/modinfo.o find_in_scripts if is_enabled CONFIG_GCC_PLUGINS; then @@ -79,4 +78,4 @@ if [ "${CC}" != "${HOSTCC}" ] && is_enabled CONFIG_CC_CAN_LINK; then rm -f "${destdir}/Kbuild" "${destdir}/scripts/Kbuild" fi -find "${destdir}" \( -name '.*.cmd' -o \( -name '*.o' -a -! -path '*/scripts/mod/modinfo.o' \) \) -delete +find "${destdir}" \( -name '.*.cmd' -o -name '*.o' \) -delete -- 2.43.0