History

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.

Jiafu He committed 16 years ago

Commit 4b024241 parent abe94c71 file · +1 −1Browse files

Unified · Split

scripts/Makefile.build+1−1
@@ -82,7 +82,7 @@ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),) · 81 unmodified lines
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