Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] toolchain: add user defined target LDFLAGS options
Date: Tue, 26 Jul 2011 17:00:59 +0200	[thread overview]
Message-ID: <87d3gx3x3o.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20110726131049.GA2881@sapphire.tkos.co.il> (Baruch Siach's message of "Tue, 26 Jul 2011 16:10:50 +0300")

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 >> Ah, that's something I hadn't considered. Thanks for the feedback. I was
 >> assuming one could pass something like "-fee -fi -fo -fum" in the text
 >> block, and this would be passed on to the wrapper.

 Baruch> Well, this string will be passed to the wrapper, but the whole
 Baruch> string will get stored in the same args[] entry. This means
 Baruch> that the compiler sees it as one long argument, not one
 Baruch> argument per word as should be.

 Baruch> A possible solution might be to split this string with strtok()
 Baruch> at run-time, but it looks inefficient, since we have all the
 Baruch> information we need at compile time.

I think it would be simpler to generate an include file containing

"arg1", "arg2", ... "argn"

instead and then simply #include that from ext-toolchain-wrapper.c
instead of passing all these options on the compiler cmdline.

This list could be created with something like:

$(patsubst %,\"%\"$(comma),$(CFLAGS))

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2011-07-26 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  9:21 [Buildroot] [PATCH] toolchain: add user defined target LDFLAGS options Baruch Siach
2011-07-25  6:34 ` Peter Korsgaard
2011-07-25  7:10   ` Baruch Siach
2011-07-25  7:16     ` Peter Korsgaard
2011-07-25  7:24       ` Baruch Siach
2011-07-25  7:28         ` Peter Korsgaard
2011-07-25 21:19       ` Matias Garcia
2011-07-26 13:10         ` Baruch Siach
2011-07-26 15:00           ` Peter Korsgaard [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=87d3gx3x3o.fsf@macbook.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --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