summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-cross.inc
diff options
context:
space:
mode:
authorJulian Pidancet <julian.pidancet@gmail.com>2011-11-16 01:01:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-29 11:22:06 +0000
commit7edf5cff9c8815f74804082fef4f0dfcdbab3cf6 (patch)
treef1a3201603c9ecf4eed2abb15cba5d4166ed4f45 /meta/recipes-devtools/binutils/binutils-cross.inc
parentf4791847cd22fbb874d471be4abfe5ef5711bd42 (diff)
downloadpoky-7edf5cff9c8815f74804082fef4f0dfcdbab3cf6.tar.gz
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. (From OE-Core rev: 99e295ef30ba02db3966c66619807c037ef5089f) Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-cross.inc')
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
index 982224ff2f..f07907ef13 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -10,7 +10,8 @@ EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
10 --disable-werror \ 10 --disable-werror \
11 --disable-nls \ 11 --disable-nls \
12 --enable-poison-system-directories \ 12 --enable-poison-system-directories \
13 ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)}" 13 ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default', '', d)} \
14 ${@base_contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
14 15
15do_install () { 16do_install () {
16 oe_runmake 'DESTDIR=${D}' install 17 oe_runmake 'DESTDIR=${D}' install