summaryrefslogtreecommitdiffstats
path: root/meta/conf/distro
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2012-06-01 15:53:56 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-05 22:56:32 +0100
commit286a4904d2bf135050532c7cbc3e5dfcc1ed7ed1 (patch)
tree4e1810a72162692408a294da26d8b2e95b4ec134 /meta/conf/distro
parent9205cba286e54576f95a5894d3953dcda43cf8bf (diff)
downloadpoky-286a4904d2bf135050532c7cbc3e5dfcc1ed7ed1.tar.gz
external-sourcery: extract src and dest sysroot paths from gcc
Rather than hardcoding the multilib path in a map, and hardcoding dest sysroot symlink creation in a hook, now we just use -print-sysroot for both, and pass the appropriate multilib args to the toolchain for particular tunes. (From OE-Core rev: b9a9c28f7052884b2a6a33cf73cb6d7e2e3d11ff) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/distro')
-rw-r--r--meta/conf/distro/include/tcmode-external-sourcery.inc51
1 files changed, 33 insertions, 18 deletions
diff --git a/meta/conf/distro/include/tcmode-external-sourcery.inc b/meta/conf/distro/include/tcmode-external-sourcery.inc
index 79fef25bd0..ede4403d4c 100644
--- a/meta/conf/distro/include/tcmode-external-sourcery.inc
+++ b/meta/conf/distro/include/tcmode-external-sourcery.inc
@@ -42,24 +42,39 @@ ENABLE_BINARY_LOCALE_GENERATION = ""
42 42
43TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}" 43TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
44 44
45# Translate to CodeSourcery's names for their optimized files in the toolchain 45# Point to the appropriate multilib sysroot from the external toolchain, whose
46def csl_target_core(d): 46# files will be extracted into the OE sysroot
47 coredata = { 47def exttc_run(d, cmd):
48 'armv7a-vfp-neon': 'armv7-a-neon', 48 try:
49 'i586': 'sgxx-glibc', 49 return bb.process.run(cmd, shell=True, env={'PATH': d.getVar('PATH', True)})[0].rstrip()
50 'i686': 'sgxx-glibc', 50 except (OSError, bb.process.CmdError):
51 'core2': 'sgxx-glibc', 51 return ''
52 'mips': 'mips32', 52
53 'mipsel': 'el', 53EXTERNAL_TOOLCHAIN_SYSROOT_CMD = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-sysroot"
54 'powerpc-nf': 'nof', 54EXTERNAL_TOOLCHAIN_SYSROOT ??= "${@exttc_run(d, EXTERNAL_TOOLCHAIN_SYSROOT_CMD)}"
55 'ppce500': 'te500v1', 55
56 'ppce500mc': 'te500mc', 56# These bits are here temporarily to sidestep the need to use a separate set
57 'ppce500v2': 'te500v2', 57# of tune files to pass the appropriate multilib selection arguments to the
58 'ppce600': 'te600' 58# sourcery toolchain, as is needed to extract the sysroot content.
59 } 59CSL_MULTILIB_ARGS[i586] ?= "-msgxx-glibc"
60 return coredata.get(d.getVar('TUNE_PKGARCH', True), '') 60CSL_MULTILIB_ARGS[i686] ?= "-msgxx-glibc"
61 61CSL_MULTILIB_ARGS[core2] ?= "-msgxx-glibc"
62CSL_TARGET_CORE ?= "${@csl_target_core(d)}" 62CSL_MULTILIB_ARGS[x86] ?= "-msgxx-glibc"
63CSL_MULTILIB_ARGS[x86-64] ?= "-msgxx-glibc"
64CSL_MULTILIB_ARGS[ppce500] ?= "-te500v1"
65CSL_MULTILIB_ARGS[ppce500mc] ?= "-te500mc"
66CSL_MULTILIB_ARGS[ppce500v2] ?= "-te500v2"
67CSL_MULTILIB_ARGS[ppce600] ?= "-te600"
68
69def csl_multilib_arg(d):
70 argument = d.getVarFlag('CSL_MULTILIB_ARGS', d.getVar('DEFAULTTUNE', True) or '')
71 if argument:
72 return argument
73 else:
74 return ''
75
76EXTERNAL_TOOLCHAIN_SYSROOT_CMD += "${@csl_multilib_arg(d)}"
77
63 78
64# Unfortunately, the CSL ia32 toolchain has non-prefixed binaries in its 79# Unfortunately, the CSL ia32 toolchain has non-prefixed binaries in its
65# bindir (e.g. gcc, ld). To avoid this messing up our build, we avoid adding 80# bindir (e.g. gcc, ld). To avoid this messing up our build, we avoid adding