[U-Boot] [PATCH v3] Switch from archive libraries to partial linking

Sebastien Carlier sebastien.carlier at gmail.com
Wed Nov 10 13:24:51 CET 2010


On 2010-11-10 03:55:21, Mike Frysinger wrote:
> On Wednesday, November 10, 2010 03:07:08 Sebastien Carlier wrote:
> > On 2010-11-10 01:57:30, Mike Frysinger wrote:
> > > the config.mk looks weird:
> > > +cmd_link_o_target = $(if $(strip $1),\
> > > +                      $(LD) -r -o $@ $1 ,\
> > > +                      rm -f $@; $(AR) rcs $@ )
> > > 
> > > why do you need the rm/ar ?
> > 
> > The ar part is needed when there are no objets to link, as ld cannot
> > create an empty object out of nothing.  The rm part is to make sure that
> > the target is not a leftover object from a previous build (ar would
> > complain).
> 
> if you're going to copy from linux, you should move over relevant comments:
> # If the list of objects to link is empty, just create an empty built-in.o

I will include this comment in the next version of the patch.

I was wondering whether config.mk is the right place for this function;
would it be better in rules.mk instead?  Both config.mk and rules.mk end
up being included in all Makefile's.

Regards,
-- 
Sébastien


More information about the U-Boot mailing list