public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Makefile: Fix linking with modern binutils
Date: Tue, 13 Dec 2016 13:15:03 +0000	[thread overview]
Message-ID: <yw1x4m28vulk.fsf@unicorn.mansr.com> (raw)
In-Reply-To: <CACPK8Xe--O5xqogsM1SoGUgdm21K=UaJBgaD72N-u545YRbv2Q@mail.gmail.com> (Joel Stanley's message of "Tue, 13 Dec 2016 15:31:24 +1030")

Joel Stanley <joel@jms.id.au> writes:

> Hello Tom,
>
> On Sat, Dec 10, 2016 at 12:53 AM, Tom Rini <trini@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?
>
>> so please use ld-option instead to add this when supported, thanks!
>
> If you'd just prefer ld-option over ld-ifversion then I can send a
> different patch.

Always test for the actual thing you need whenever possible.  Version
checks are fragile and should be a last resort.  Consider what would
happen if someone backported that functionality to an older binutils
version.  Going by version number alone, the flag would not be used and
the build would fail.

-- 
M?ns Rullg?rd

      parent reply	other threads:[~2016-12-13 13:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08  3:22 [U-Boot] [PATCH] Makefile: Fix linking with modern binutils Joel Stanley
2016-12-08  4:52 ` Alan Modra
2016-12-08 22:22 ` Simon Glass
2016-12-09 14:23 ` [U-Boot] " Tom Rini
2016-12-13  5:01   ` Joel Stanley
2016-12-13 12:21     ` Tom Rini
2016-12-16  4:53       ` Joel Stanley
2016-12-13 13:15     ` Måns Rullgård [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1x4m28vulk.fsf@unicorn.mansr.com \
    --to=mans@mansr.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox