From: Sonic Zhang <sonic.adi@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v7 3/7] arch: toolchain: Introduce target CPU revision.
Date: Fri, 3 May 2013 18:39:36 +0800 [thread overview]
Message-ID: <1367577580-3518-3-git-send-email-sonic.adi@gmail.com> (raw)
In-Reply-To: <1367577580-3518-1-git-send-email-sonic.adi@gmail.com>
From: Sonic Zhang <sonic.zhang@analog.com>
Adds the possibility to have a free-form CPU revision string and append it
to the target CPU. Only Blackfin actually uses this option.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
v6-changes:
- The cpu revision test should have a $(call qstrip) to be effective.
- Add cpu revision to toolchain/gcc/gcc-uclibc-4.x.mk as well.
v3-changes:
- Detail the help text and fix the line length.
---
arch/Config.in | 3 +++
arch/Config.in.bfin | 8 ++++++++
toolchain/gcc/gcc-uclibc-4.x.mk | 6 +++++-
toolchain/toolchain-external/ext-tool.mk | 4 ++++
4 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/arch/Config.in b/arch/Config.in
index 27a29c6..175add5 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -174,6 +174,9 @@ config BR2_GCC_TARGET_ABI
config BR2_GCC_TARGET_CPU
string
+config BR2_GCC_TARGET_CPU_REVISION
+ string
+
# Set up target binary format
choice
prompt "Target Binary Format"
diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin
index ac96620..f755c8d 100644
--- a/arch/Config.in.bfin
+++ b/arch/Config.in.bfin
@@ -97,3 +97,11 @@ config BR2_GCC_TARGET_CPU
default bf548 if BR2_bf548
default bf549 if BR2_bf549
default bf561 if BR2_bf561
+
+config BR2_GCC_TARGET_CPU_REVISION
+ string "Target CPU revision"
+ help
+ Specify a target CPU revision, which will be appended to the
+ value of the -mcpu option. For example, if the selected CPU is
+ bf609, and then selected CPU revision is "0.0", then gcc will
+ receive the -mcpu=bf609-0.0 option.
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index bdc38cd..7fd7bdb 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -85,7 +85,11 @@ ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
endif
ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
-GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
+GCC_WITH_CPU:=--with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
+else
+GCC_WITH_CPU:=--with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU))
+endif
endif
# AVR32 GCC special configuration
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 92183a4..57ea266 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -134,7 +134,11 @@ TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += \
endif
CC_TARGET_TUNE_:=$(call qstrip,$(BR2_GCC_TARGET_TUNE))
+ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU))
+else
+CC_TARGET_CPU_:=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
+endif
CC_TARGET_ARCH_:=$(call qstrip,$(BR2_GCC_TARGET_ARCH))
CC_TARGET_ABI_:=$(call qstrip,$(BR2_GCC_TARGET_ABI))
--
1.7.0.4
next prev parent reply other threads:[~2013-05-03 10:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 10:39 [Buildroot] [PATCH v7 1/7] arch: toolchain: Introduce binary formats BINFMT_* Sonic Zhang
2013-05-03 10:39 ` [Buildroot] [PATCH v7 2/7] arch: Add blackfin CPU choice Sonic Zhang
2013-05-05 20:49 ` Peter Korsgaard
2013-05-03 10:39 ` Sonic Zhang [this message]
2013-05-05 20:51 ` [Buildroot] [PATCH v7 3/7] arch: toolchain: Introduce target CPU revision Peter Korsgaard
2013-05-03 10:39 ` [Buildroot] [PATCH v7 4/7] arch: toolchain: Introduce binary format FLAT types Sonic Zhang
2013-05-05 20:55 ` Peter Korsgaard
2013-05-03 10:39 ` [Buildroot] [PATCH v7 5/7] package: Introduce package-specific BINFMT_FLAT options Sonic Zhang
2013-05-05 20:56 ` Peter Korsgaard
2013-05-03 10:39 ` [Buildroot] [PATCH v7 6/7] arch: toolchain: Install blackfin FDPIC and FLAT libraries in external toolchain makefile Sonic Zhang
2013-05-03 18:48 ` Thomas Petazzoni
2013-05-06 7:35 ` Sonic Zhang
2013-05-03 10:39 ` [Buildroot] [PATCH v7 7/7] package: Introduce NOMMU symbol Sonic Zhang
2013-05-05 20:48 ` [Buildroot] [PATCH v7 1/7] arch: toolchain: Introduce binary formats BINFMT_* 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=1367577580-3518-3-git-send-email-sonic.adi@gmail.com \
--to=sonic.adi@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