From: Sonic Zhang <sonic.adi@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v7 4/7] arch: toolchain: Introduce binary format FLAT types.
Date: Fri, 3 May 2013 18:39:37 +0800 [thread overview]
Message-ID: <1367577580-3518-4-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>
Just introduce the symbol and options in arch generic Config.in.
Add FLAT types specific compiling flags into package makefile.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
v5-change:
- Move FLAT types specific compiling flags back to package makefile.
The flags can't be set to compile Linux kernel.
v3-changes:
- Add dependancy to bfin and m68k
- Add help text for FLAT binary types.
- Split shared flat flags.
---
arch/Config.in | 26 ++++++++++++++++++++++++++
package/Makefile.in | 11 +++++++++++
2 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/arch/Config.in b/arch/Config.in
index 175add5..3ffe82e 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -211,6 +211,32 @@ config BR2_BINFMT_FLAT
endchoice
+# Set up flat binary type
+choice
+ prompt "FLAT Binary type"
+ depends on BR2_BINFMT_FLAT
+ default BR2_BINFMT_FLAT_ONE
+
+config BR2_BINFMT_FLAT_ONE
+ bool "One memory region"
+ help
+ All segments are linked into one memory region.
+
+config BR2_BINFMT_FLAT_SEP_DATA
+ bool "Separate data and code region"
+ depends on BR2_bfin || BR2_m68k
+ help
+ Allow for the data and text segments to be separated and placed in
+ different regions of memory.
+
+config BR2_BINFMT_FLAT_SHARED
+ bool "Shared binary"
+ depends on BR2_bfin || BR2_m68k
+ help
+ Allow to load and link indiviual FLAT binaries at run time.
+
+endchoice
+
if BR2_arm || BR2_armeb
source "arch/Config.in.arm"
endif
diff --git a/package/Makefile.in b/package/Makefile.in
index a8bf36b..dd3bc7d 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -103,6 +103,17 @@ TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET
TARGET_CXXFLAGS = $(TARGET_CFLAGS)
TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
+ifeq ($(BR2_BINFMT_FLAT_SHARED),y)
+TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0
+TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0
+TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0
+endif
+ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y)
+TARGET_LDFLAGS += -msep-data
+TARGET_CFLAGS += -msep-data
+TARGET_CXXFLAGS += -msep-data
+endif
+
ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG),y)
TARGET_CROSS=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-
else
--
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 ` [Buildroot] [PATCH v7 3/7] arch: toolchain: Introduce target CPU revision Sonic Zhang
2013-05-05 20:51 ` Peter Korsgaard
2013-05-03 10:39 ` Sonic Zhang [this message]
2013-05-05 20:55 ` [Buildroot] [PATCH v7 4/7] arch: toolchain: Introduce binary format FLAT types 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-4-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