[U-Boot] [PATCH v3 21/21] sandbox: Makefile changes to build sandbox architecture

Simon Glass sjg at chromium.org
Tue Oct 4 02:51:50 CEST 2011


Hi Mike,

On Mon, Oct 3, 2011 at 12:31 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Monday, September 26, 2011 20:10:55 Simon Glass wrote:
>> --- a/Makefile
>> +++ b/Makefile
>>
>> +ifneq ($(CPU),sandbox)
>>  OBJS  = $(CPUDIR)/start.o
>> +endif
>
> if you moved arch/sandbox/common/main.c to arch/sandbox/cpu/start.c, you
> wouldn't need this.  and logically, it seems like a good place for main() to
> be ...

Yes, this does make sense - it will change it.

>
>> +ifeq ($(CONFIG_SANDBOX),y)
>> +GEN_UBOOT = \
>> +             cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \
>> +                     -Wl,--start-group $(__LIBS) -Wl,--end-group \
>> +                     $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot
>
> unfortunate that you can't utilize UNDEF_SYM ...

Well I can add a hack to make it empty, but I'm not sure what it buys
us. The main issue is that I don't want to pass any link flags from
LDFLAGS, etc. I could put that magic into config.mk perhaps (and this
might be a better place for it), but it is something of a special case
wherever it goes.

>
>>  GEN_UBOOT = \
>> -             UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
>> -             sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;
>> +             UNDEF_SYM=`$(UNDEF)`; \
>
> i don't see you defining "UNDEF" anywhere in this patch series ...
> -mike
>

No I was experimenting with trying to make the Makefile more common -
will revert this.

Regards,
Simon


More information about the U-Boot mailing list