Browse Source

Move HEADERS_MULTILIB_SUFFIX into external-common

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Christopher Larson 3 years ago
parent
commit
601aedb28a
2 changed files with 3 additions and 3 deletions
  1. 1 0
      classes/external-common.bbclass
  2. 2 3
      recipes-external/gcc/gcc-runtime-external.bb

+ 1 - 0
classes/external-common.bbclass

@@ -46,6 +46,7 @@ def fixed_oe_import(d, modules=None):
 EXTERNAL_IMPORTED := "${@fixed_oe_import(d, ['oe.external'])}"
 
 EXTERNAL_TOOLCHAIN_SYSROOT ?= "${@external_run(d, 'gcc', *(TARGET_CC_ARCH.split() + ['-print-sysroot'])).rstrip()}"
+EXTERNAL_HEADERS_MULTILIB_SUFFIX ?= "${@external_run(d, 'gcc', *('${TARGET_CC_ARCH}'.split() + ['-print-sysroot-headers-suffix'])).rstrip()}"
 EXTERNAL_TOOLCHAIN_LIBROOT ?= "${@external_run(d, 'gcc', *(TARGET_CC_ARCH.split() + ['-print-file-name=crtbegin.o'])).rstrip().replace('/crtbegin.o', '')}"
 EXTERNAL_LIBC_KERNEL_VERSION ?= "${@external_get_kernel_version("${EXTERNAL_TOOLCHAIN_SYSROOT}${prefix}")}"
 

+ 2 - 3
recipes-external/gcc/gcc-runtime-external.bb

@@ -17,13 +17,12 @@ python () {
 }
 
 target_libdir = "${libdir}"
-HEADERS_MULTILIB_SUFFIX ?= "${@external_run(d, 'gcc', *('${TARGET_CC_ARCH}'.split() + ['-print-sysroot-headers-suffix'])).rstrip()}"
 external_libroot = "${@os.path.realpath('${EXTERNAL_TOOLCHAIN_LIBROOT}').replace(os.path.realpath('${EXTERNAL_TOOLCHAIN}') + '/', '/')}"
 FILES_MIRRORS =. "\
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/|${external_libroot}/\n \
     ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/|/lib/gcc/${EXTERNAL_TARGET_SYS}/${BINV}/include/ \n \
     ${libdir}/gcc/${TARGET_SYS}/|${libdir}/gcc/${EXTERNAL_TARGET_SYS}/\n \
-    ${@'${includedir}/c\+\+/${GCC_VERSION}/${TARGET_SYS}/|${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}${HEADERS_MULTILIB_SUFFIX}/\n' if d.getVar('HEADERS_MULTILIB_SUFFIX') != 'UNKNOWN' else ''} \
+    ${@'${includedir}/c\+\+/${GCC_VERSION}/${TARGET_SYS}/|${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}${EXTERNAL_HEADERS_MULTILIB_SUFFIX}/\n' if d.getVar('EXTERNAL_HEADERS_MULTILIB_SUFFIX') != 'UNKNOWN' else ''} \
     ${includedir}/c\+\+/${GCC_VERSION}/${TARGET_SYS}/|${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}/\n \
 "
 
@@ -57,7 +56,7 @@ do_install_extra () {
     fi
 
     # Clear out the unused c++ header multilibs
-    multilib="${HEADERS_MULTILIB_SUFFIX}"
+    multilib="${EXTERNAL_HEADERS_MULTILIB_SUFFIX}"
     if [ "$multilib" != "UNKNOWN" ]; then
         for path in ${D}${includedir}/c++/${GCC_VERSION}/${TARGET_SYS}/*; do
             case ${path##*/} in