From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Sat, 05 Feb 2011 09:56:25 +1100 Subject: [U-Boot] [PATCH] Introduce a new linker flag LDFLAGS_FINAL In-Reply-To: <20110201135136.0817fe5a@udp111988uds.am.freescale.net> References: <1296498767-26408-1-git-send-email-Haiying.Wang@freescale.com> <20110131193309.745E7D4D67C@gemini.denx.de> <20110131135548.50d65759@udp111988uds.am.freescale.net> <20110201073401.1B343B187@gemini.denx.de> <20110201102446.23b4a2e9@udp111988uds.am.freescale.net> <20110201193229.7C545B187@gemini.denx.de> <20110201135136.0817fe5a@udp111988uds.am.freescale.net> Message-ID: <4D4C8419.3080103@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/02/11 06:51, Scott Wood wrote: > On Tue, 1 Feb 2011 20:32:29 +0100 > Wolfgang Denk wrote: > >> Dear Scott Wood, >> >> In message <20110201102446.23b4a2e9@udp111988uds.am.freescale.net> you wrote: >>> >>> Prior to the introduction of LDFLAGS_u-boot, was LDFLAGS not what was >>> used? So before, anything that board/cpu code adds directly to LDFLAGS >>> (maybe they're supposed to use PLATFORM_LDFLAGS, but not all do) was >>> used in the final link. After 8aba9dc, only things in >>> PLATFORM_LDFLAGS plus -Bstatic and -T are used in the final link. >> >> And this is correct for all boards? > > By "this" do you mean the switch to PLATFORM_LDFLAGS in 8aba9dc, or the > switch back to LDFLAGS? It's not obvious to me that the dropping of > board/cpu modifications to LDFLAGS except during partial link was an > intentional change, or a correct one for all boards. > > The only case I see where it makes any difference at all is arch/i386, > which does LDFLAGS += --cref. From the description of --cref in the > linker manual, it probably actually belongs in LDFLAGS_FINAL, though > I'm not sure if it's harmless to include it in partial link or not. > Currently, with 8aba9dc, it's included *only* in partial link. > > It's also not clear to me what this option has to do with i386... it > looks like an arch-neutral debugging feature that doesn't affect the > actual u-boot image at all (the output goes into the map file). --cref can be dropped from x86 - I really should send a patch to rename i386 to x86 ;) Since x86 is currently a very simple platform to maintain (one CPU, one board) and I have been dealing with breakages do to non x86 cleanups for a while, I have no problem with tweaking the x86 linker options to be more arch neutral. Regards, Graeme