Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] binutils doesn't like -elf2flt option
Date: Mon, 17 Jun 2013 08:22:50 +0200	[thread overview]
Message-ID: <51BEAB3A.8010408@mind.be> (raw)
In-Reply-To: <kphffs$v5g$1@ger.gmane.org>

On 06/15/13 12:26, Adam Nielsen wrote:
> Hi all,
>
> I'm trying to compile a toolchain with elf2flt enabled, but I'm having
> problems getting binutils to compile.
>
> Normally the parameter "-W,-elf2flt" is passed to GCC to tell it to pass
> "-elf2flt" to the linker.  elf2flt then picks this up and does what it
> needs to, courtesy of a wrapper script around "ld".  I have set this
> parameter in TARGET_CFLAGS in one of the buildroot makefiles.
>
> However when I am compiling binutils, it seems that elf2flt has not been
> installed yet, so it is not recognising the -elf2flt option, and gives me
> this error:
>
> arm-buildroot-linux-uclibcgnueabi-gcc -o conftest -D_LARGEFILE_SOURCE
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -pipe -Os  -Wl,-elf2flt
> -DBR_BINFMT_FLAT   --static -Wl,-rpath -Wl,/foo conftest.c  >&5
> arm-buildroot-linux-uclibcgnueabi/bin/ld: warning: cannot find entry
> symbol lf2flt; defaulting to 00000000000080c0
>
> I think binutils needs to use elf2flt, otherwise any binaries it produces
> will not be in BFLT format, so I am guessing I need to tell buildroot to
> compile elf2flt before binutils.  Does this sound correct?  Is it even
> possible to compile something like that before binutils?  Or do I have to
> somehow avoid passing the -elf2flt parameter to binutils?  How might one
> achieve this?

  elf2flt already depends on binutils (it uses libbfd), so this won't 
work. And as Thomas mentioned, this is only relevant for target-binutils 
(which you probably don't even need).

  However, it looks like there is no explicit dependency on elf2flt when 
building the toolchain. Probably elf2flt should be added to BASE_TARGETS, 
to make sure it gets built before all the rest.

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  parent reply	other threads:[~2013-06-17  6:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15 10:26 [Buildroot] binutils doesn't like -elf2flt option Adam Nielsen
2013-06-16 16:03 ` Thomas Petazzoni
2013-06-17  6:22 ` Arnout Vandecappelle [this message]
2013-06-17  7:10   ` Adam Nielsen
2013-06-18 16:00     ` Arnout Vandecappelle
2013-06-18 20:34       ` Adam Nielsen
2013-06-19  6:25         ` Thomas Petazzoni
2013-06-19  8:03           ` Adam Nielsen
2013-06-19  8:21             ` Thomas Petazzoni
2013-06-19  9:56               ` Adam Nielsen
2013-06-19 10:06                 ` Thomas Petazzoni
2013-06-19 10:11                   ` Adam Nielsen
2013-06-19 10:16                     ` Thomas Petazzoni
2013-06-20  9:16                       ` Adam Nielsen

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=51BEAB3A.8010408@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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