aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils.inc
diff options
context:
space:
mode:
authorJulian Pidancet <julian.pidancet@gmail.com>2011-11-16 01:01:59 +0000
committerSaul Wold <sgw@linux.intel.com>2011-11-29 00:20:07 -0800
commit99e295ef30ba02db3966c66619807c037ef5089f (patch)
treefb1de8855050e2b15a548296bc354cc03ce9fd97 /meta/recipes-devtools/binutils/binutils.inc
parent529d45a3daaeb60ecee8b15778c3b70d7992cd1f (diff)
downloadopenembedded-core-contrib-99e295ef30ba02db3966c66619807c037ef5089f.tar.gz
openembedded-core-contrib-99e295ef30ba02db3966c66619807c037ef5089f.tar.bz2
openembedded-core-contrib-99e295ef30ba02db3966c66619807c037ef5089f.zip
Introduce multiarch DISTRO_FEATURE
This patch introduces a distro feature which enables gcc to produce both 32bit and 64bit code, and enables binutils to operate on both 32bit and 64bit binaries. It differs from multilib toolchains in that it does not require to compile a version of the libc for each architecture variant. However, the code produced for the secondary architecture will not be linkable against the libc. v2: - Renamed the feature name from "biarch" to "multiarch". The GCC installation manual claims that the mips-linux can be made a tri-arch compiler (http://gcc.gnu.org/install/configure.html) - For x86_64, the compiler is made bi-arch by default, so nothing has to be done in particular. - I analyzed the gcc/config.gcc from GCC sources and added in this patch all the architectures that could be made biarch with the version of gcc currently used in OE, which are powerpc, and sparc, in addition to x86. mips and s390 will probably be supported in future versions of gcc. For x86 and sparc, only the --enable-targets=all option is valid to make this work (this option doesn't have any other side effects than making the compiler bi-arch). For powerpc, I used the --enable-targets=powerpc64 option (although 'all' also works). Note: - Untested on powerpc and sparc. But I believe it works the same as with x86. - gcc in meta-toolchain is also made multiarch. Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils.inc')
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 58fee854e3..51e425791c 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -49,7 +49,8 @@ B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
--enable-install-libbfd \
- --enable-shared"
+ --enable-shared \
+ ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
EXTRA_OECONF_virtclass-native = "--enable-target=all --enable-64-bit-bfd --enable-install-libbfd"