From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 15 Feb 2011 18:51:00 -0600 Subject: [U-Boot] [PATCH] Introduce a new linker flag LDFLAGS_FINAL In-Reply-To: <201102150402.45553.vapier@gentoo.org> References: <1296498767-26408-1-git-send-email-Haiying.Wang@freescale.com> <20110201202050.CA1CFB187@gemini.denx.de> <20110201144013.5924e63f@udp111988uds.am.freescale.net> <201102150402.45553.vapier@gentoo.org> Message-ID: <20110215185100.6c6e20fc@schlenkerla> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 15 Feb 2011 04:02:44 -0500 Mike Frysinger wrote: > so commit 8aba9dc is not something made for fun, but to fix real bugs people > were seeing while building with bi-endian toolchains (arm/superh/mips/probably > others), or bi-abi toolchains (blackfin/arm/probably others). Sure. But it had a side effect, and this patch is an attempt to fix that side effect without affecting the real purpose of 8aba9dc. > > This included anything that cpu/board code added to LDFLAGS -- some > > architectures added --gc-sections, x86 added --cref, etc. Since the above > > flags are added to LDFLAGS, rather than replacing them, these flags got > > used in the final link. > > > > Commit 8aba9dc introduces LDFLAGS_u-boot, so that LDFLAGS is no longer the > > source for the flags for the final link. It generates LDFLAGS_u-boot using > > PLATFORM_LDFLAGS, not LDFLAGS. It converts most of the board/cpu updates > > to LDFLAGS into LDFLAGS_u-boot, but it missed --cref. > > err, i dont think this is correct. LDFLAGS is no longer the *only* source for > the final link. if you look at the actual target, you'll see it using > $(LDFLAGS) $(LDFLAGS_$(@F)). Ah. So why is PLATFORM_LDFLAGS added into both LDFLAGS and LDFLAGS_u-boot? :-P -Scott