From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags
Date: Tue, 24 Jan 2012 07:28:18 +0200 [thread overview]
Message-ID: <20120124052818.GA13673@sapphire.tkos.co.il> (raw)
In-Reply-To: <6fb3d3263d9c8989b75248f74261197562233489.1325622133.git.thomas.petazzoni@free-electrons.com>
Hi Thomas,
On Tue, Jan 03, 2012 at 09:22:46PM +0100, Thomas Petazzoni wrote:
> The BR2_TARGET_OPTIMIZATION flags were not used by the external
> toolchain wrapper, which broke the multilib selection logic of
> multilib external toolchains. It also simplifies the compilation of
> external programs since all flags are properly passed automatically by
> the toolchain wrapper.
This patch supersedes the one from Matias Garcia
(http://lists.busybox.net/pipermail/buildroot/2011-July/043944.html) and fixes
the multiple arguments problem mentioned by Peter
(http://lists.busybox.net/pipermail/buildroot/2011-July/044639.html). I've
used it to build an e500v2 based filesystem with the CodeSourcery toolchain.
Tested-by: Baruch Siach <baruch@tkos.co.il>
Thanks,
baruch
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> toolchain/toolchain-external/ext-tool.mk | 8 ++++++++
> .../toolchain-external/ext-toolchain-wrapper.c | 3 +++
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
> index 1e62201..b768c0b 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -150,6 +150,14 @@ TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
> TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
> endif
>
> +ifneq ($(BR2_TARGET_OPTIMIZATION),)
> +TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
> +# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each
> +# flag is a separate argument when used in execv() by the external
> +# toolchain wrapper.
> +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)",)'
> +endif
> +
> ifeq ($(BR2_SOFT_FLOAT),y)
> TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
> TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_SOFTFLOAT=1
> diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> index cc404f3..719f13b 100644
> --- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
> +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> @@ -40,6 +40,9 @@ static char *predef_args[] = {
> #ifdef BR_VFPFLOAT
> "-mfpu=vfp",
> #endif /* BR_VFPFLOAT */
> +#ifdef BR_ADDITIONAL_CFLAGS
> + BR_ADDITIONAL_CFLAGS
> +#endif
> };
>
> static const char *get_basename(const char *name)
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2012-01-24 5:28 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH Thomas Petazzoni
2012-01-16 8:40 ` Arnout Vandecappelle
2012-01-03 20:22 ` [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors Thomas Petazzoni
2012-01-04 8:44 ` Peter Korsgaard
2012-01-04 8:50 ` Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain Thomas Petazzoni
2012-01-04 7:48 ` Thomas De Schampheleire
2012-01-04 8:21 ` Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories Thomas Petazzoni
2012-01-04 7:55 ` Thomas De Schampheleire
2012-01-04 8:24 ` Thomas Petazzoni
2012-01-04 8:37 ` Thomas De Schampheleire
2012-01-03 20:22 ` [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags Thomas Petazzoni
2012-01-24 5:28 ` Baruch Siach [this message]
2012-01-03 20:22 ` [Buildroot] [PATCH 06/14] external-toolchain: remove 2009q1 ARM Sourcery toolchain Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 07/14] external-toolchain: add Sourcery CodeBench ARM 2011.09 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 08/14] external-toolchain: bump MIPS 2011.03 from -93 to -110 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03 Thomas Petazzoni
2012-01-04 8:09 ` Thomas De Schampheleire
2012-01-04 8:24 ` Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 10/14] external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 11/14] external-toolchain: Blackfin.uclinux.org 2011R1-RC4 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 12/14] external-toolchain: details on selecting the multilib variants Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 13/14] external-toolchain: run checks even on extracted toolchains Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 14/14] external-toolchain: adjust check for uClibc static toolchains Thomas Petazzoni
2012-01-04 8:16 ` [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas De Schampheleire
2012-01-16 8:42 ` Arnout Vandecappelle
2012-01-16 17:22 ` Thomas Petazzoni
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=20120124052818.GA13673@sapphire.tkos.co.il \
--to=baruch@tkos.co.il \
--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