Skip to contentSkip to conversation

kbuild: fix single *.ko build

PATCH In review Masahiro Yamada 3 participants 3 messages Jan 1, 2023 – Jan 2, 2023 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: fix single *.ko build

The single *.ko build is broken since commit f65a486821cf ("kbuild:
change module.order to list *.o instead of *.ko").

Fixes f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko")

---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 7cfbf3d15466..a0536633cdf6 100644
@@ -1989,7 +1989,7 @@ $(single-no-ko): $(build-dir)
 # Remove MODORDER when done because it is not the real one.
 PHONY += single_modules
 single_modules: $(single-no-ko) modules_prepare
-	$(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$m;) } > $(MODORDER)
+	$(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$(m:%.ko=%.o);) } > $(MODORDER)
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
 ifneq ($(KBUILD_MODPOST_NOFINAL),1)
 	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Masahiro Yamada

The single *.ko build is broken since commit f65a486821cf ("kbuild:
change module.order to list *.o instead of *.ko").

Happy new 2023,

will this go into kbuild.git#fixes?

Thanks.

Regards,
-Sedat-

Quoted 24 lines
Fixes f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko")

---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -2
index 7cfbf3d15466..a0536633cdf6 100644
@@ -1989,7 +1989,7 @@ $(single-no-ko): $(build-dir)
 # Remove MODORDER when done because it is not the real one.
 PHONY += single_modules
 single_modules: $(single-no-ko) modules_prepare
-       $(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$m;) } > $(MODORDER)
+       $(Q){ $(foreach m, $(single-ko), echo $(extmod_prefix)$(m:%.ko=%.o);) } > $(MODORDER)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
 ifneq ($(KBUILD_MODPOST_NOFINAL),1)
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
--

2.34.1

Tested-by on v1 1/1
#2 lore raw
In reply to Masahiro Yamada
Quoted 6 lines · Masahiro Yamada

The single *.ko build is broken since commit f65a486821cf ("kbuild:
change module.order to list *.o instead of *.ko").

Fixes f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko")

regards,
Marc

Signature · 4 lines
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |