Commit 4b024242 authored by Jiafu He's avatar Jiafu He Committed by Michal Marek

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: default avatarJiafu He <jay@goldhive.com>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent abe94c75
...@@ -82,7 +82,7 @@ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),) ...@@ -82,7 +82,7 @@ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
lib-target := $(obj)/lib.a lib-target := $(obj)/lib.a
endif endif
ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(lib-target)),) ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(subdir-m) $(lib-target)),)
builtin-target := $(obj)/built-in.o builtin-target := $(obj)/built-in.o
endif endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment