From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Fri, 21 Feb 2014 09:33:43 -0700 Subject: [U-Boot] [PATCH] kbuild,tegra124: add dummy obj- for Kbuild In-Reply-To: <20140221204505.40BB.AA925319@jp.panasonic.com> References: <20140220172429.A188.AA925319@jp.panasonic.com> <53062A19.1020702@wwwdotorg.org> <20140221204505.40BB.AA925319@jp.panasonic.com> Message-ID: <53077FE7.50903@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/21/2014 04:45 AM, Masahiro Yamada wrote: > On Thu, 20 Feb 2014 09:15:21 -0700 Stephen Warren wrote: >> On 02/20/2014 01:24 AM, Masahiro Yamada wrote: >>> On Wed, 19 Feb 2014 09:36:14 -0700 Stephen Warren wrote: >>>> On 02/19/2014 07:46 AM, Albert ARIBAUD wrote: >>>>> On Wed, 19 Feb 2014 22:26:43 +0900, Masahiro wrote: >>>>> >>>>>> In Kbuild, every makefile must have non-empty obj- or obj-y. >>>>>> Otherwise, built-in.o will not be created and the link stage >>>>>> will fail. >>>> ... >>>>>> diff --git a/arch/arm/cpu/armv7/tegra124/Makefile b/arch/arm/cpu/armv7/tegra124/Makefile >>>> ... >>>>>> +# necessary to create built-in.o >>>>>> +obj- := __dummy__.o >>>> >>>> obj- or obj-y? >>> >>> Definitely obj-. >> >> Really? Why would such a variable even exist or be used. Only obj-n or >> obj-y should exist; "" isn't a valid y/n value. > > All defined CONFIG macros are included in > include/autoconf.mk (and include/spl-autoconf.mk, > include/tpl-autoconf.mk for SPL, TPL, respectively) > > If CONFIG_FOO is defined in your config header, > CONFIG_FOO=y will apear in include/autoconf.mk > Otherwise, it does not appear in include/autoconf.mk. ... > Is this clearer now? OK, that makes sense. I would have expected that Kbuild could detect obj-y is empty, and skip building builtin.o, and skip attempting to link it in to the parent directory too. However, if it doesn't do that, then this all makes sense. Thanks.