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

Sebastien Carlier
2010-11-09T17:44:14Z

Dear Andr?,

On 2010-11-09 10:15:31, Andre Schwarz wrote:
> Date: Tue, 09 Nov 2010 10:15:31 +0100
> From: Andre Schwarz <andre.schwarz@matrix-vision.de>
> To: Sebastien Carlier <sebastien.carlier@gmail.com>
> CC: u-boot at lists.denx.de, Timur Tabi <timur@freescale.com>,
> Kim Phillips <kim.phillips@freescale.com>
> Subject: Re: [U-Boot] [PATCH] Switch from archive libraries to partial
> linking
> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15)
> Gecko/20101027 Thunderbird/3.0.10
>
> Sebastian,
>
> drivers/qe already has an object called "qe.o" ... renaming "qe.a"
> to "qe.o" doesn't work.

Thanks!

> I'd suggest to build libqe.o and also adapt Toplevel Makefile accordingly.

I did as you suggested, version 2 of the patch is available here:

http://www.denx.de/wiki/pub/U-Boot/TooBigPatches/0001-Switch-from-archive-libraries-to-partial-linking-v2.patch

> I also don't understand why ftd.c is not depending on CONFIG_QE.
> That's another question ... but leads to error having your patch applied.

Right, fdt.c should not be included in the build unless both CONFIG_QE
and CONFIG_OF_LIBFDT are defined. Previously this issue was hidden
because all of qe.a was discarded by the linker. Would the following
be a good fix for this problem?

-COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(and $(CONFIG_QE),$(CONFIG_OF_LIBFDT)) += fdt.o

Regards,
--
S?bastien