summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2013-05-03 00:39:34 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-05-05 22:46:37 +0200
commit57133825c930a193ce9223b4372b900c4c84c9b9 (patch)
treed0bddeffcc17b52577ea2a9248dd5804454f4761 /toolchain
parentf88188f09e10d93a5804ac0719d4a597f6d66c1d (diff)
downloadbuildroot-novena-57133825c930a193ce9223b4372b900c4c84c9b9.tar.gz
buildroot-novena-57133825c930a193ce9223b4372b900c4c84c9b9.zip
arch: toolchain: Introduce binary formats BINFMT_*.
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> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/toolchain-external/Config.in12
-rw-r--r--toolchain/toolchain-external/ext-tool.mk4
-rw-r--r--toolchain/toolchain-external/ext-toolchain-wrapper.c3
3 files changed, 13 insertions, 6 deletions
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index b1aab6a2e..a93ada32e 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -784,12 +784,12 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203
default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209
- default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && !BR2_BFIN_FDPIC
- default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && BR2_BFIN_FDPIC
- default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && !BR2_BFIN_FDPIC
- default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BFIN_FDPIC
- default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && !BR2_BFIN_FDPIC
- default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BFIN_FDPIC
+ default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && BR2_BINFMT_FLAT
+ default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && BR2_BINFMT_FDPIC
+ default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BINFMT_FLAT
+ default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R1 && BR2_BINFMT_FDPIC
+ default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BINFMT_FLAT
+ default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 && BR2_BINFMT_FDPIC
default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 616f4535b..dce0299be 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -160,6 +160,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 a92badac0..9a2fc70b0 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