From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 31 Oct 2012 23:51:35 +0100 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: <201210312351.35977.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang Denk, > 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? Yes, thanks for the review (I really needed one from you on this)! So, here comes the list: 1) It's cool to link with gcc, duh ;-) 2) You can enable LTO eventually -- long term plan -- which proved can shrink the code size a bit 3) Usage of LLVM/CLANG is now much more straightforward 4) Binutils usually lag behind the GCC development a bit, by using GCC to do the link, we can remedy this problem But actually, the 2) is the most important part. LTO will hopefully help us optimize U-Boot for size even better than it is now. But that will still need much more research. So this is only a patch that shall prepare the groundwork for this further research. > Please excuse my ignorance, but so far I see just added complexity, > but I don't see what it buys us. > > Best regards, > > Wolfgang Denk Best regards, Marek Vasut