Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Passing arguments to the linker when external toolchain is used.
Date: Sun, 25 Nov 2012 21:44:56 +0100	[thread overview]
Message-ID: <50B28348.7090701@mind.be> (raw)
In-Reply-To: <CAMJ=MEfp0Bevk141N4n8KAn2AzbRpEDfLX9513crSDLTxBKkwA@mail.gmail.com>

On 25/11/12 18:23, Ronny Meeus wrote:
>>> >>  In my application we need to create partially linked objects that will
>>> >>  be linked together in a final link step.
>>> >>  I see that the correct options (ABI etc) are passed to the compiler
>>> >>  via the ext-toolchain-wrapper construction, but for the linker this
>>> >>  technique is not used. It is directly invoked without modifying the
>>> >>  command line. If I want to create this partially linked file, I need
>>> >>  to pass an extra option the linker to indicate that is needs to use
>>> >>  the N32 abi (-melf32btsmipn32).
>> >
>> >
>> >    First of all, I don't understand why ld needs any option that we normally
>> >  pass to the compiler.  Do the -march, -mtune and -mfpu options even work
>> >  in ld?
> I think you miss-understood my mail.
> The linker needs a different option (-melf32btsmipn32) while the
> compiler needs -march, -mtune and -mfpu etc.
> For the compiler there is no issue, it is the linker for which no
> options are passed.

  In that case, why not just pass them with LDFLAGS?


> If you look to the changes I made to the wrapper, you can see that a
> completely different set of options can be passed to the linker. The
> compiler options are passed to the compiler while a different set of
> options is passed to the linker.

  Sorry, I didn't look at the patch in that much detail...


  Regards,
  Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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

  reply	other threads:[~2012-11-25 20:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23 13:04 [Buildroot] Passing arguments to the linker when external toolchain is used Ronny Meeus
2012-11-24 23:33 ` Arnout Vandecappelle
2012-11-25 17:23   ` Ronny Meeus
2012-11-25 20:44     ` Arnout Vandecappelle [this message]
2012-11-25 20:56       ` Ronny Meeus
2012-11-25 22:25         ` Arnout Vandecappelle
2012-11-26 20:45           ` Ronny Meeus
2012-11-26 22:33             ` Arnout Vandecappelle
2012-11-28 19:38               ` Ronny Meeus

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=50B28348.7090701@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