kbuild: Fix linking error built-in.o no such file or directory

Previous thread: CRIS: Don't use mask_irq as symbol name by Linux Kernel Mailing List on Tuesday, June 1, 2010 - 9:59 am. (1 message)

Next thread: nconfig: mark local functions as such by Linux Kernel Mailing List on Tuesday, June 1, 2010 - 9:59 am. (1 message)
From: Linux Kernel Mailing List
Date: Tuesday, June 1, 2010 - 9:59 am

Gitweb:     http://git.kernel.org/linus/4b024242e8a4e9679fa327ea03958b89f89096c9
Commit:     4b024242e8a4e9679fa327ea03958b89f89096c9
Parent:     abe94c756c08d50566c09a65b9c7fe72f83071c5
Author:     Jiafu He <jay@goldhive.com>
AuthorDate: Thu Dec 17 18:22:13 2009 -0700
Committer:  Michal Marek <mmarek@suse.cz>
CommitDate: Tue Feb 2 14:33:54 2010 +0100

    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>
---
 scripts/Makefile.build |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 0b94d2f..e4deb73 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -82,7 +82,7 @@ ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
 lib-target := $(obj)/lib.a
 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
 endif
 
--

Previous thread: CRIS: Don't use mask_irq as symbol name by Linux Kernel Mailing List on Tuesday, June 1, 2010 - 9:59 am. (1 message)

Next thread: nconfig: mark local functions as such by Linux Kernel Mailing List on Tuesday, June 1, 2010 - 9:59 am. (1 message)