From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 13 Dec 2016 07:21:47 -0500 Subject: [U-Boot] Makefile: Fix linking with modern binutils In-Reply-To: References: <20161208032251.8774-1-joel@jms.id.au> <20161209142352.GA22675@bill-the-cat> Message-ID: <20161213122147.GV4248@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 Tue, Dec 13, 2016 at 03:31:24PM +1030, Joel Stanley wrote: > Hello Tom, > > On Sat, Dec 10, 2016 at 12:53 AM, Tom Rini wrote: > >> -LDFLAGS_u-boot += $(LDFLAGS_FINAL) > >> +# Avoid Not enough room for program headers on binutils 2.28 onwards. > >> +# Flag was introduced in 2.26 > >> +LDFLAGS_u-boot += $(LDFLAGS_FINAL) \ > >> + $(call ld-ifversion, -ge, 22600000, --no-dynamic-linker) > > > > This breaks on things like: > > $ arm-none-eabi-ld --version > > GNU ld (GNU Tools for ARM Embedded Processors) 2.24.0.20150921 > > The flag will only be added when the version is >= 2.26. Which part of > that version string will break the test? The whole of the string breaks the test. It comes out to 2037492100, is greater than is true, and tries to pass the flag which isn't know about in that version and fails. Note that we're slightly behind the Linux kernel version of the ld-version script, but dropping that one in (which does have a bugfix) gives 224000000 for the version. Perhaps it would give 226000000 or similar instead for what you've got and we need to update ld-version.sh in order to use this patch as-is? -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: