[U-Boot] [PATCH] common: Link with GCC instead of LD

Tom Rini trini at ti.com
Wed Oct 31 23:48:25 CET 2012


On Wed, Oct 31, 2012 at 11:36:18PM +0100, Wolfgang Denk wrote:

> Dear Marek Vasut,
> 
> In message <1351701168-7293-1-git-send-email-marex at denx.de> you wrote:
> > Flip over from linking with LD to linking with GCC. This has some
> > long-term benefits, like easy path to enabling LTO.
> 
> Could you please explain these supposed benefits in a bit more detail?
> Please excuse my ignorance, but so far I see just added complexity,
> but I don't see what it buys us.

Complexity is arguable.  Most projects don't call ld directly but let
gcc call ld.  Doing this brings us in line with what other projects do.
As an aside, from my time with CodeSourcery folks directly calling ld
was discouraged I swear, but I don't have some reference to back that
up.  Finally, as Marek said but didn't explain, this brings us a step
closer to being able to enable LTO (link time optimization) which may
(but we need to experiment) be beneficial in terms of size and
performance (since in short gcc re-decides things like positioning,
inlining based on the whole program state at link time).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121031/a4863bc0/attachment.pgp>


More information about the U-Boot mailing list