linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: add extra-y to targets-for-modules
@ 2020-11-03  5:44 WANG Chao
  2020-11-23  5:23 ` Masahiro Yamada
  0 siblings, 1 reply; 11+ messages in thread
From: WANG Chao @ 2020-11-03  5:44 UTC (permalink / raw)
  To: linux-kernel; +Cc: Masahiro Yamada, linux-kbuild

extra-y target doesn't build for 'make M=...' since commit 6212804f2d78
("kbuild: do not create built-in objects for external module builds").

This especially breaks kpatch, which is using 'extra-y := kpatch.lds'
and 'make M=...' to build livepatch patch module.

Add extra-y to targets-for-modules so that such kind of build works
properly.

Signed-off-by: WANG Chao <chao.wang@ucloud.cn>
---
 scripts/Makefile.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index ae647379b579..0113a042d643 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -86,7 +86,7 @@ ifdef need-builtin
 targets-for-builtin += $(obj)/built-in.a
 endif
 
-targets-for-modules := $(patsubst %.o, %.mod, $(filter %.o, $(obj-m)))
+targets-for-modules := $(extra-y) $(patsubst %.o, %.mod, $(filter %.o, $(obj-m)))
 
 ifdef need-modorder
 targets-for-modules += $(obj)/modules.order
-- 
2.29.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-01-17 13:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  5:44 [PATCH] kbuild: add extra-y to targets-for-modules WANG Chao
2020-11-23  5:23 ` Masahiro Yamada
2020-11-23 15:04   ` WANG Chao
2020-11-25 13:42     ` Masahiro Yamada
2020-12-08  9:20       ` WANG Chao
2020-12-08 14:31         ` Artem Savkov
2020-12-16  6:14           ` Masahiro Yamada
2020-12-16 23:04             ` Joe Lawrence
2020-12-17  8:26               ` Masahiro Yamada
2020-12-17 11:51                 ` Artem Savkov
2020-12-17 12:04                 ` Artem Savkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).