From: Stany MARCEL <stanypub@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2 v2] toolchain: Add the possibility to have a mcpu option with wrapper
Date: Tue, 1 Nov 2011 13:19:16 +0100 [thread overview]
Message-ID: <1320149956-3072-1-git-send-email-stanypub@gmail.com> (raw)
In-Reply-To: <201111011151.35278.yann.morin.1998@anciens.enib.fr>
Permit to define the mcpu of the external toolchain wrapper, based on
BR2_GCC_TARGET_CPU.
Signed-off-by: Stany MARCEL <stanypub@gmail.com>
---
Changes for v2:
* Spurious empty line removed
* CPU setting positionned above ABI one
toolchain/toolchain-external/ext-tool.mk | 5 +++++
.../toolchain-external/ext-toolchain-wrapper.c | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 572917f..a52621c 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -127,6 +127,7 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS = \
-DBR_SYSROOT='"$(STAGING_DIR)"'
CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
+CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
@@ -140,6 +141,10 @@ ifneq ($(CC_TARGET_ARCH_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
endif
+ifneq ($(CC_TARGET_CPU_),)
+TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
+TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
+endif
ifneq ($(CC_TARGET_ABI_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
index 3e23061..cc404f3 100644
--- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
@@ -28,6 +28,9 @@ static char *predef_args[] = {
#ifdef BR_TUNE
"-mtune=" BR_TUNE,
#endif /* BR_TUNE */
+#ifdef BR_CPU
+ "-mcpu=" BR_CPU,
+#endif
#ifdef BR_ABI
"-mabi=" BR_ABI,
#endif
--
1.7.1
next prev parent reply other threads:[~2011-11-01 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 0:53 [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Stany MARCEL
2011-11-01 0:53 ` [Buildroot] [PATCH 2/2] toolchain: Add the possibility to have a mcpu option with wrapper Stany MARCEL
2011-11-01 10:51 ` Yann E. MORIN
2011-11-01 12:19 ` Stany MARCEL [this message]
2011-11-01 15:35 ` [Buildroot] [PATCH 2/2 v2] " Yann E. MORIN
2011-11-02 10:48 ` Peter Korsgaard
2011-11-01 10:46 ` [Buildroot] [PATCH 1/2] toolchain: Correct test for external tools symlink creation Yann E. MORIN
2011-11-02 10:46 ` Peter Korsgaard
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=1320149956-3072-1-git-send-email-stanypub@gmail.com \
--to=stanypub@gmail.com \
--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