[U-Boot] Makefile: Fix linking with modern binutils

Tom Rini trini at konsulko.com
Tue Dec 13 13:21:47 CET 2016


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 <trini at konsulko.com> 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: <http://lists.denx.de/pipermail/u-boot/attachments/20161213/e7a06ede/attachment.sig>


More information about the U-Boot mailing list