
On Tue, 15 Feb 2011 04:02:44 -0500 Mike Frysinger vapier@gentoo.org 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