From 7bf1138a013c50ce37ad5efd039009df7182a44e Mon Sep 17 00:00:00 2001 From: Michael Powell Date: Thu, 19 Jul 2012 08:19:26 -0400 Subject: [PATCH] Append -msgxx-glibc to TUNE_CCARGS for x86 PRO tools only Lite toolchains don't include support for native libraries and thus -msgxx-glibc is not a valid option. Added a check to see if the tools contain a license directory to determine whether a pro (true) or lite (false) toolchain is being used and set TUNE_CCARGS_append_x86 accordingly. Tested with both Lite and pro toolchains. Signed-off-by: Michael Powell --- conf/distro/include/tcmode-external-sourcery.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/conf/distro/include/tcmode-external-sourcery.inc b/conf/distro/include/tcmode-external-sourcery.inc index 7bd621a..1494cd4 100644 --- a/conf/distro/include/tcmode-external-sourcery.inc +++ b/conf/distro/include/tcmode-external-sourcery.inc @@ -48,11 +48,6 @@ ENABLE_BINARY_LOCALE_GENERATION = "" TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_HOST}" -# 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" - # 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 @@ -81,6 +76,10 @@ python toolchain_metadata_setup () { if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/bin/gcc', l)): d.setVar('TOOLCHAIN_PATH_ADD', '') + if os.path.exists(bb.data.expand('${EXTERNAL_TOOLCHAIN}/license', l)): + # Assuming use of a CodeBench Pro toolchain + d.setVar('TUNE_CCARGS_append_x86', " -msgxx-glibc") + # The external toolchain may not have been built with the yocto preferred # gnu hash setting, so ensure that the corresponding sanity check is a # warning, not an error.