From b51864d8e6c2954c0ac524b455dcf49a543408df Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Wed, 1 Jul 2015 11:06:33 -0700 Subject: [PATCH] glibc: don't install a multilib suffix of '.' This was causing it to package the entire sysroot in certain cases. Signed-off-by: Christopher Larson --- recipes-external/glibc/glibc-sysroot-setup.inc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recipes-external/glibc/glibc-sysroot-setup.inc b/recipes-external/glibc/glibc-sysroot-setup.inc index d5c95c1..e16f011 100644 --- a/recipes-external/glibc/glibc-sysroot-setup.inc +++ b/recipes-external/glibc/glibc-sysroot-setup.inc @@ -3,13 +3,17 @@ def sysroot_multilib_suffix(d): target_cc_arch = d.getVar('TARGET_CC_ARCH', True) options = d.getVar('TOOLCHAIN_OPTIONS', True) or d.expand('--sysroot=${STAGING_DIR_TARGET}') sysroot = external_run(d, 'gcc', *(target_cc_arch.split() + options.split() + ['-print-sysroot'])).rstrip() + staging = d.getVar('STAGING_DIR_HOST', True) - return os.path.relpath(sysroot, staging) + if sysroot == staging: + return '' + else: + return os.path.relpath(sysroot, staging) create_multilib_link () { dest="$1" multilib_suffix="${@sysroot_multilib_suffix(d)}" - if [ "$multilib_suffix" != "." ]; then + if [ -n "$multilib_suffix" ]; then rm -rf $dest/$multilib_suffix ln -s . $dest/$multilib_suffix fi