summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-12-12 16:07:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-12 23:10:51 +0000
commit07ce0296bbc4c09469ae13bf9f91d19496b60cc6 (patch)
tree83e5857ef30e957a486c8aee6c58f58d63b6eb42 /meta/conf
parentb1b0c315153a717d3b951f0264e2e52f33dedef1 (diff)
downloadast2050-yocto-poky-07ce0296bbc4c09469ae13bf9f91d19496b60cc6.zip
ast2050-yocto-poky-07ce0296bbc4c09469ae13bf9f91d19496b60cc6.tar.gz
external-sourcery-toolchain: remove
As per discussion on the mailing list [1], remove this largely unmaintained external toolchain support in favour of the maintained version in meta-sourcery [2]. Also correct the example and documentation.conf entries for TCMODE to match up with this change. [1] http://lists.openembedded.org/pipermail/openembedded-core/2013-December/087133.html [2] https://github.com/MentorEmbedded/meta-sourcery/ (From OE-Core rev: 7603b15415301679bccbcb89af688c211704a43a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/distro/include/csl-versions.inc107
-rw-r--r--meta/conf/distro/include/tcmode-external-csl.inc2
-rw-r--r--meta/conf/distro/include/tcmode-external-sourcery.inc128
-rw-r--r--meta/conf/documentation.conf2
4 files changed, 1 insertions, 238 deletions
diff --git a/meta/conf/distro/include/csl-versions.inc b/meta/conf/distro/include/csl-versions.inc
deleted file mode 100644
index 3938bf7..0000000
--- a/meta/conf/distro/include/csl-versions.inc
+++ /dev/null
@@ -1,107 +0,0 @@
-def csl_run(d, cmd, *args):
- import bb.process
- import subprocess
-
- topdir = d.getVar('TOPDIR', True)
- toolchain_path = d.getVar('EXTERNAL_TOOLCHAIN', True)
- if not toolchain_path:
- return 'UNKNOWN', 'UNKNOWN'
-
- target_prefix = d.getVar('TARGET_PREFIX', True)
- path = os.path.join(toolchain_path, 'bin', target_prefix + cmd)
- args = [path] + list(args)
-
- return bb.process.run(args, cwd=topdir, stderr=subprocess.PIPE)
-
-def csl_get_version(d):
- try:
- stdout, stderr = csl_run(d, 'gcc', '-v')
- except bb.process.CmdError as exc:
- bb.error('Failed to obtain CodeSourcery toolchain version: %s' % exc)
- bb.error('Make sure that MACHINE is set correctly in your local.conf and the toolchain supports %s.' % d.getVar("TARGET_ARCH", True))
- return 'UNKNOWN'
- else:
- last_line = stderr.splitlines()[-1]
- return last_line
-
-def csl_get_main_version(d):
- version = csl_get_version(d)
- if version != 'UNKNOWN':
- return version.split()[-1].rstrip(')')
- else:
- return version
-
-def csl_get_gcc_version(d):
- version = csl_get_version(d)
- if version != 'UNKNOWN':
- return version.split()[2]
- else:
- return version
-
-def csl_get_libc_version(d):
- syspath = d.expand('${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}')
- if not syspath:
- return 'UNKNOWN'
-
- libpath = syspath + '/libc/lib/'
- if not os.path.exists(libpath):
- libpath = syspath + '/libc/sgxx-glibc/lib/'
-
- if os.path.exists(libpath):
- for file in os.listdir(libpath):
- if file.find('libc-') == 0:
- return file[5:-3]
- return 'UNKNOWN'
-
-def csl_get_kernel_version(d):
- syspath = d.expand('${EXTERNAL_TOOLCHAIN}/${CSL_TARGET_SYS}')
- if not syspath:
- return 'UNKNOWN'
-
- vf = syspath + '/libc/usr/include/linux/version.h'
- if not os.path.exists(vf):
- vf = syspath + '/libc/sgxx-glibc/usr/include/linux/version.h'
-
- try:
- f = open(vf, 'r')
- except (OSError, IOError):
- return 'UNKNOWN'
-
- l = f.readlines();
- f.close();
- for s in l:
- if s.find('LINUX_VERSION_CODE') > 0:
- ver = int(s.split()[2])
- maj = ver / 65536
- ver = ver % 65536
- min = ver / 256
- ver = ver % 256
- return str(maj)+'.'+str(min)+'.'+str(ver)
- return 'UNKNOWN'
-
-def csl_get_gdb_version(d):
- try:
- stdout, stderr = csl_run(d, 'gdb', '-v')
- except bb.process.CmdError:
- return 'UNKNOWN'
- else:
- first_line = stdout.splitlines()[0]
- return first_line.split()[-1]
-
-python csl_version_handler () {
- d = e.data
- ld = d.createCopy()
- ld.finalize()
-
- d.setVar('CSL_VER_MAIN', csl_get_main_version(ld))
- d.setVar('CSL_VER_GCC', csl_get_gcc_version(ld))
- d.setVar('CSL_VER_LIBC', csl_get_libc_version(ld))
- d.setVar('CSL_VER_KERNEL', csl_get_kernel_version(ld))
- d.setVar('CSL_VER_GDB', csl_get_gdb_version(ld))
-}
-addhandler csl_version_handler
-csl_version_handler[eventmask] = "bb.event.ConfigParsed"
-
-# Ensure that any variable which includes the --sysroot (CC, CXX, etc) also
-# depends on the toolchain version
-TOOLCHAIN_OPTIONS[vardeps] += "CSL_VER_MAIN CSL_VER_GCC"
diff --git a/meta/conf/distro/include/tcmode-external-csl.inc b/meta/conf/distro/include/tcmode-external-csl.inc
deleted file mode 100644
index 9e530ab..0000000
--- a/meta/conf/distro/include/tcmode-external-csl.inc
+++ /dev/null
@@ -1,2 +0,0 @@
-TCMODE = "external-sourcery"
-require conf/distro/include/tcmode-${TCMODE}.inc
diff --git a/meta/conf/distro/include/tcmode-external-sourcery.inc b/meta/conf/distro/include/tcmode-external-sourcery.inc
deleted file mode 100644
index 5590f7a..0000000
--- a/meta/conf/distro/include/tcmode-external-sourcery.inc
+++ /dev/null
@@ -1,128 +0,0 @@
-#
-# Configuration to use external Sourcery G++ toolchain
-#
-
-EXTERNAL_TOOLCHAIN ?= "/usr/local/csl/${TARGET_ARCH}"
-
-TOOLCHAIN_PATH_ADD = "${EXTERNAL_TOOLCHAIN}/bin:"
-PATH =. "${TOOLCHAIN_PATH_ADD}"
-
-CSL_TARGET_SYS_powerpc ?= "powerpc-linux-gnu"
-CSL_TARGET_SYS_powerpc64 ?= "powerpc-linux-gnu"
-CSL_TARGET_SYS_arm ?= "arm-none-linux-gnueabi"
-CSL_TARGET_SYS_mips ?= "mips-linux-gnu"
-CSL_TARGET_SYS_mipsel ?= "mips-linux-gnu"
-CSL_TARGET_SYS_mips64 ?= "mips-linux-gnu"
-CSL_TARGET_SYS_i686 ?= "i686-pc-linux-gnu"
-CSL_TARGET_SYS_i586 ?= "i686-pc-linux-gnu"
-CSL_TARGET_SYS = "${TARGET_SYS}"
-
-TARGET_PREFIX = "${CSL_TARGET_SYS}-"
-
-PREFERRED_PROVIDER_linux-libc-headers = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_linux-libc-headers-dev = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}compilerlibs = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_libgcc = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_eglibc = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/libc = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/libintl = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/libiconv = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_glibc-thread-db = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/linux-libc-headers = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_virtual/linux-libc-headers-dev = "external-sourcery-toolchain"
-PREFERRED_PROVIDER_gdbserver ??= "external-sourcery-toolchain"
-
-# No need to re-compile the locale files
-GLIBC_INTERNAL_USE_BINARY_LOCALE = "precompiled"
-ENABLE_BINARY_LOCALE_GENERATION = ""
-
-TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}"
-
-# Point to the appropriate multilib sysroot from the external toolchain, whose
-# files will be extracted into the OE sysroot
-def exttc_run(d, cmd):
- try:
- return bb.process.run(cmd, shell=True, env={'PATH': d.getVar('PATH', True)})[0].rstrip()
- except (OSError, bb.process.CmdError):
- return ''
-
-EXTERNAL_TOOLCHAIN_SYSROOT_CMD = "${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} -print-sysroot"
-EXTERNAL_TOOLCHAIN_SYSROOT ??= "${@exttc_run(d, EXTERNAL_TOOLCHAIN_SYSROOT_CMD)}"
-
-# These bits are here temporarily to sidestep the need to use a separate set
-# of tune files to pass the appropriate multilib selection arguments to the
-# sourcery toolchain, as is needed to extract the sysroot content.
-TUNE_CCARGS_append_x86 = " -msgxx-glibc"
-
-CSL_MULTILIB_ARGS[ppce500] ?= "-te500v1"
-CSL_MULTILIB_ARGS[ppce500mc] ?= "-te500mc"
-CSL_MULTILIB_ARGS[ppce500v2] ?= "-te500v2"
-CSL_MULTILIB_ARGS[ppce600] ?= "-te600"
-
-def csl_multilib_arg(d):
- argument = d.getVarFlag('CSL_MULTILIB_ARGS', d.getVar('DEFAULTTUNE', True) or '')
- if argument:
- return argument
- else:
- return ''
-
-EXTERNAL_TOOLCHAIN_SYSROOT_CMD += "${@csl_multilib_arg(d)}"
-
-
-# Unfortunately, the CSL ia32 toolchain has non-prefixed binaries in its
-# bindir (e.g. gcc, ld). To avoid this messing up our build, we avoid adding
-# this bindir to our PATH, and instead add symlinks to the prefixed binaries
-# to our staging toolchain bindir.
-
-python toolchain_metadata_setup () {
- d = e.data
-
- l = d.createCopy()
- l.finalize()
- if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)):
- d.setVar('TOOLCHAIN_PATH_ADD', '')
-}
-addhandler toolchain_metadata_setup
-toolchain_metadata_setup[eventmask] = "bb.event.ConfigParsed"
-
-python toolchain_setup () {
- d = e.data
-
- if not d.getVar('TOOLCHAIN_PATH_ADD', True):
- populate_toolchain_links(d)
-}
-addhandler toolchain_setup
-toolchain_setup[eventmask] = "bb.event.BuildStarted"
-
-def populate_toolchain_links(d):
- import errno
- from glob import glob
-
- d = d.createCopy()
- d.finalize()
-
- pattern = d.expand('${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}*')
- files = glob(pattern)
- if not files:
- bb.fatal("Unable to populate toolchain binary symlinks in %s" % pattern)
-
- bindir = d.getVar('STAGING_BINDIR_TOOLCHAIN', True)
- bb.utils.mkdirhier(bindir)
- for f in files:
- base = os.path.basename(f)
- newpath = os.path.join(bindir, base)
- try:
- os.symlink(f, newpath)
- except OSError as exc:
- if exc.errno == errno.EEXIST:
- break
- bb.fatal("Unable to populate toolchain binary symlink for %s: %s" % (newpath, exc))
-
-require conf/distro/include/csl-versions.inc
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index a40b0b8..c96ddd3 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -260,7 +260,7 @@ TARGET_OS[doc] = "Specifies the target's operating system."
TARGET_PREFIX[doc] = "The prefix for the cross compile toolchain. E.g arm-linux- ."
TARGET_SYS[doc] = "The target system is composed out of TARGET_ARCH,TARGET_VENDOR and TARGET_OS."
TCLIBC[doc] = "Specifies which variant of the GNU standard C library (libc) to use during the build process. You can select eglibc or uclibc."
-TCMODE[doc] = "The toolchain selector. It selects the external toolchain built using the OpenEmbedded build system or a few supported combinations of the upstream GCC or CodeSourcery Labs toolchain."
+TCMODE[doc] = "Enables an external toolchain (where provided by an additional layer) if set to a value other than 'default'."
TEST_IMAGE[doc] = "Enable test booting of virtual machine images under the qemu emulator after any root filesystems are created and run tests against those images."
TIME[doc] = "The time the build was started HMS"
TMPDIR[doc] = "This variable is the temporary directory the OpenEmbedded build system uses when it does its work building images. By default, the TMPDIR variable is named tmp within the Build Directory."
OpenPOWER on IntegriCloud