From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 31 Oct 2012 15:48:25 -0700 Subject: [U-Boot] [PATCH] common: Link with GCC instead of LD In-Reply-To: <20121031223618.E2C15200630@gemini.denx.de> References: <1351701168-7293-1-git-send-email-marex@denx.de> <20121031223618.E2C15200630@gemini.denx.de> Message-ID: <20121031224825.GA24095@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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@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: