Skip to content

Commit 4b02424

Browse files
Jiafu Hemichal42
authored andcommitted
kbuild: Fix linking error built-in.o no such file or directory
This patch fixes the link error "built-in.o: no such file or directory". The problem happens if "dirx/Makefile" contains only "obj-m += diry/ dirz/" and the empty "dirx/built-in.o" is missing. Adding $(subdir-m) into check for builtin-target fixes this error. Signed-off-by: Jiafu He <jay@goldhive.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent abe94c7 commit 4b02424

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/Makefile.build‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
8282
lib-target := $(obj)/lib.a
8383
endif
8484

85-
ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(lib-target)),)
85+
ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(subdir-m) $(lib-target)),)
8686
builtin-target := $(obj)/built-in.o
8787
endif
8888

0 commit comments

Comments
 (0)