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

Mike Frysinger
2010-11-10T08:55:21Z

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
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101110/7e357a49/attachment.pgp