Merge pull request #89 from kergoth/glibc-collateral-versions

Align PV of glibc collateral recipes with glibc-external
This commit is contained in:
Christopher Larson
2015-07-29 20:58:16 -07:00
7 changed files with 20 additions and 24 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*.pyc
*.pyo

View File

@@ -1,3 +1,5 @@
require recipes-external/glibc/glibc-external-version.inc
python () {
if d.getVar('TCMODE', True).startswith('external-sourcery'):
d.setVar('INHIBIT_PACKAGE_DEBUG_SPLIT', '1')

View File

@@ -0,0 +1 @@
require recipes-external/glibc/glibc-external-version.inc

View File

@@ -0,0 +1 @@
require recipes-external/glibc/glibc-external-version.inc

View File

@@ -0,0 +1,12 @@
def get_external_libc_version(d):
sopattern = os.path.join(d.getVar('base_libdir', True), 'libc-*.so')
found_paths = oe.external.find_sysroot_files([sopattern], d)
if found_paths:
so_paths = found_paths[0]
if so_paths:
soname = os.path.basename(so_paths[0])
return soname[5:-3]
return 'UNKNOWN'
PV := "${@get_external_libc_version(d)}"

View File

@@ -2,19 +2,7 @@ SRC_URI = "file://SUPPORTED"
require recipes-core/glibc/glibc-common.inc
inherit external-toolchain
def get_external_libc_version(d):
sopattern = os.path.join(d.getVar('base_libdir', True), 'libc-*.so')
found_paths = find_sysroot_files([sopattern], d)
if found_paths:
so_paths = found_paths[0]
if so_paths:
soname = os.path.basename(so_paths[0])
return soname[5:-3]
return 'UNKNOWN'
PV := "${@get_external_libc_version(d)}"
require recipes-external/glibc/glibc-external-version.inc
DEPENDS += "virtual/${TARGET_PREFIX}binutils \
linux-libc-headers"

View File

@@ -1,4 +1,5 @@
require recipes-core/glibc/glibc.inc
require recipes-external/glibc/glibc-external-version.inc
EXTERNAL_TOOLCHAIN_SYSROOT ?= "${@oe.external.run(d, 'gcc', *(TARGET_CC_ARCH.split() + ['-print-sysroot'])).rstrip()}"
@@ -11,17 +12,6 @@ EXTERNAL_PV_SUFFIX ?= ""
PV_prepend = "${@'${EXTERNAL_PV_PREFIX}' if '${EXTERNAL_PV_PREFIX}' else ''}"
PV_append = "${@'${EXTERNAL_PV_SUFFIX}' if '${EXTERNAL_PV_SUFFIX}' else ''}"
def get_external_libc_version(d):
sysroot = d.getVar('EXTERNAL_TOOLCHAIN_SYSROOT', True)
libpath = oe.path.join(sysroot, d.getVar('base_libdir', True))
if os.path.exists(libpath):
for filename in os.listdir(libpath):
if filename.startswith('libc-'):
return filename[5:-3]
return 'UNKNOWN'
PV := "${@get_external_libc_version(d)}"
SRC_PV = "${@'-'.join('${PV}'.split('-')[:-1])}"
INHIBIT_DEFAULT_DEPS = "1"