[U-Boot] [PATCH 04/13] arm: keystone: Move cmd_ddr3 to a common place

Tom Rini trini at konsulko.com
Tue Dec 19 12:40:29 UTC 2017


On Tue, Dec 19, 2017 at 10:31:19AM +0530, Lokesh Vutla wrote:
> 
> 
> On Tuesday 19 December 2017 01:33 AM, Tom Rini wrote:
> > On Mon, Dec 18, 2017 at 03:04:16PM +0530, Lokesh Vutla wrote:
> > 
> >> Move cmd_ddr3 to board/ti/common/ in order to make
> >> it build for non-keystone TI platforms.
> >>
> >> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
> > [snip]
> >> diff --git a/board/ti/common/Makefile b/board/ti/common/Makefile
> >> index 7170eac81e..66025040bc 100644
> >> --- a/board/ti/common/Makefile
> >> +++ b/board/ti/common/Makefile
> >> @@ -4,3 +4,6 @@
> >>  #
> >>  
> >>  obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o
> >> +ifndef CONFIG_SPL_BUILD
> >> +obj-${CONFIG_CMD_DDR3} += cmd_ddr3.o
> >> +endif
> > 
> > We shouldn't need games like that now to have all strings be discarded,
> > now that we're mandating gcc-6 or later.  Thanks!
> 
> whithout guarding with !SPL_BUILD, following build erroris seen if
> SPL_ENV is not enabled:
> 
> #
> env/built-in.o:(.data.env_htab+0xc): undefined reference to
> `env_flags_validate'
> lib/built-in.o: In function `hsearch_r':
> /home/lokesh/working/mainline/u-boot/lib/hashtable.c:380: undefined
> reference to `env_callback_init'
> /home/lokesh/working/mainline/u-boot/lib/hashtable.c:382: undefined
> reference to `env_flags_init'
> scripts/Makefile.spl:343: recipe for target 'spl/u-boot-spl' failed
> make[1]: *** [spl/u-boot-spl] Error 1
> Makefile:1400: recipe for target 'spl/u-boot-spl' failed
> make: *** [spl/u-boot-spl] Error 2
> 
> 
> gcc-6 is being used. Am I missing something?

Hmmm, I would have expected it to be gc'd away.  But I guess we're
forcing commands to be linked in for some reason, I'll dig more just so
I know again but disregard my comment about removing the guard, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171219/45f81ab2/attachment.sig>


More information about the U-Boot mailing list