[PATCH] kbuild: fix single *.ko build

Masahiro Yamada posted 1 patch 2 years, 8 months ago
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] kbuild: fix single *.ko build
Posted by Masahiro Yamada 2 years, 8 months ago
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")
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7cfbf3d15466..a0536633cdf6 100644
--- a/Makefile
+++ b/Makefile
@@ -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
Re: [PATCH] kbuild: fix single *.ko build
Posted by Marc Kleine-Budde 2 years, 8 months ago
On 01.01.2023 15:07:09, Masahiro Yamada wrote:
> 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")
> Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>

regards,
Marc

-- 
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 |
Re: [PATCH] kbuild: fix single *.ko build
Posted by Sedat Dilek 2 years, 8 months ago
On Sun, Jan 1, 2023 at 7:19 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> 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-

> Fixes: f65a486821cf ("kbuild: change module.order to list *.o instead of *.ko")
> Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 7cfbf3d15466..a0536633cdf6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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
>