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

Lokesh Vutla
2017-12-19T05:01:19Z

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@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?

Thanks and regards,
Lokesh