From: Sonic Zhang <sonic.adi@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 3/7] arch: toolchain: Introduce binary formats BINFMT_*.
Date: Fri, 29 Mar 2013 17:50:39 +0800 [thread overview]
Message-ID: <1364550643-11793-3-git-send-email-sonic.adi@gmail.com> (raw)
In-Reply-To: <1364550643-11793-1-git-send-email-sonic.adi@gmail.com>
From: Sonic Zhang <sonic.zhang@analog.com>
v2-changes:
none
v1-changes:
- Just introduce the symbol and options in arch generic Config.in.
Append FLAT format link flags to external toolchain wrapper.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
arch/Config.in | 13 +++++++++++++
toolchain/toolchain-external/ext-tool.mk | 4 ++++
.../toolchain-external/ext-toolchain-wrapper.c | 3 +++
3 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/arch/Config.in b/arch/Config.in
index c341848..be475c0 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -177,6 +177,19 @@ config BR2_GCC_TARGET_CPU
config BR2_GCC_TARGET_CPU_REVISION
string
+# Set up target binary format
+choice
+ prompt "Target Binary Format"
+ default BR2_BINFMT_ELF
+config BR2_BINFMT_ELF
+ bool "ELF"
+config BR2_BINFMT_FDPIC
+ bool "FDPIC"
+config BR2_BINFMT_FLAT
+ bool "FLAT"
+ select BR2_PREFER_STATIC_LIB
+endchoice
+
if BR2_arm || BR2_armeb
source "arch/Config.in.arm"
endif
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 407e1ad..27fd296 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -164,6 +164,10 @@ ifneq ($(CC_TARGET_ABI_),)
TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
endif
+ifeq ($(BR2_BINFMT_FLAT),y)
+TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt
+TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_BINFMT_FLAT
+endif
ifneq ($(BR2_TARGET_OPTIMIZATION),)
TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
index a92bada..9a2fc70 100644
--- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
@@ -47,6 +47,9 @@ static char *predef_args[] = {
#ifdef BR_64
"-m64",
#endif
+#ifdef BR_BINFMT_FLAT
+ "-Wl,-elf2flt",
+#endif
#ifdef BR_ADDITIONAL_CFLAGS
BR_ADDITIONAL_CFLAGS
#endif
--
1.7.0.4
next prev parent reply other threads:[~2013-03-29 9:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-29 9:50 [Buildroot] [PATCH v2 1/7] arch: Add blackfin CPU choice Sonic Zhang
2013-03-29 9:50 ` [Buildroot] [PATCH v2 2/7] arch: toolchain: Introduce target CPU revision Sonic Zhang
2013-04-07 20:42 ` Thomas Petazzoni
2013-04-08 6:30 ` Sonic Zhang
2013-03-29 9:50 ` Sonic Zhang [this message]
2013-04-07 20:45 ` [Buildroot] [PATCH v2 3/7] arch: toolchain: Introduce binary formats BINFMT_* Thomas Petazzoni
2013-04-08 6:03 ` Sonic Zhang
2013-04-07 20:47 ` Thomas Petazzoni
2013-04-08 6:04 ` Sonic Zhang
2013-03-29 9:50 ` [Buildroot] [PATCH v2 4/7] arch: toolchain: Introduce binary format FLAT types Sonic Zhang
2013-04-07 20:51 ` Thomas Petazzoni
2013-04-08 6:43 ` Sonic Zhang
2013-04-12 3:39 ` Sonic Zhang
2013-04-13 14:31 ` Thomas Petazzoni
2013-04-16 10:26 ` Sonic Zhang
2013-04-16 10:46 ` Thomas Petazzoni
2013-04-17 9:02 ` Sonic Zhang
2013-04-23 5:57 ` Sonic Zhang
2013-03-29 9:50 ` [Buildroot] [PATCH v2 5/7] package: Introduce package-specific BINFMT_FLAT options Sonic Zhang
2013-04-07 21:27 ` Thomas Petazzoni
2013-04-10 5:47 ` Arnout Vandecappelle
2013-04-10 8:10 ` Sonic Zhang
2013-04-10 10:36 ` Arnout Vandecappelle
2013-03-29 9:50 ` [Buildroot] [PATCH v2 6/7] arch: Introduce blackfin-specific Makefile Sonic Zhang
2013-04-07 21:41 ` Thomas Petazzoni
2013-04-08 7:19 ` Sonic Zhang
2013-04-08 21:23 ` Thomas Petazzoni
2013-03-29 9:50 ` [Buildroot] [PATCH v2 7/7] package: Introduce NOMMU symbol Sonic Zhang
2013-04-07 20:39 ` [Buildroot] [PATCH v2 1/7] arch: Add blackfin CPU choice Thomas Petazzoni
2013-04-08 3:28 ` Sonic Zhang
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=1364550643-11793-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