summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorJulian Pidancet <julian.pidancet@gmail.com>2011-12-01 00:01:56 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-30 23:36:08 (GMT)
commita4b7188efdbae86087d907f0503d8f2a25247594 (patch)
tree685f6f7dbf3267201327137183b9f60a30b7b415 /meta/recipes-devtools/gcc
parentf340e3937fd5ac3963de6c6b29d56dd92d962864 (diff)
downloadpoky-a4b7188efdbae86087d907f0503d8f2a25247594.tar.gz
Fix multiarch DISTRO_FEATURE
Make get_gcc_multiarch_setting more elegant. Use a dictionnary to store the config options and replace bb.data.getVar with d.getVar. Remove i686 from the architecture list because it doesn't seem to be a valid TARGET_ARCH any more in OE. Configure gdb (gdb and gdb-cross) with --enable-64-bit-bfd if multiarch DISTRO_FEATURE is present (From OE-Core rev: 0b42b2fc118bef8ce0d1473b146673182f5d1f78) Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc17
1 files changed, 10 insertions, 7 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 7ec2f7e..fe112d9 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -22,13 +22,16 @@ def get_gcc_mips_plt_setting(bb, d):
22 return "" 22 return ""
23 23
24def get_gcc_multiarch_setting(bb, d): 24def get_gcc_multiarch_setting(bb, d):
25 if 'multiarch' in bb.data.getVar('DISTRO_FEATURES',d,1).split() : 25 target_arch = d.getVar('TARGET_ARCH', True)
26 if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'i586', 'i686' ] : 26 multiarch_options = {
27 return "--enable-targets=all" 27 "i586": "--enable-targets=all",
28 if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'powerpc' ] : 28 "powerpc": "--enable-targets=powerpc64",
29 return "--enable-targets=powerpc64" 29 "sparc": "--enable-targets=all",
30 if bb.data.getVar('TARGET_ARCH', d, 1) in [ 'sparc' ] : 30 }
31 return "--enable-targets=all" 31
32 if 'multiarch' in d.getVar('DISTRO_FEATURES', True).split() :
33 if target_arch in multiarch_options :
34 return multiarch_options[target_arch]
32 return "" 35 return ""
33 36
34# We really need HOST_SYS here for some packages and TARGET_SYS for others. 37# We really need HOST_SYS here for some packages and TARGET_SYS for others.