mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-03 22:44:37 +02:00
Merge pull request #89 from kergoth/glibc-collateral-versions
Align PV of glibc collateral recipes with glibc-external
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.pyc
|
||||
*.pyo
|
||||
@@ -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')
|
||||
|
||||
1
core/recipes-core/glibc/glibc-mtrace_%.bbappend
Normal file
1
core/recipes-core/glibc/glibc-mtrace_%.bbappend
Normal file
@@ -0,0 +1 @@
|
||||
require recipes-external/glibc/glibc-external-version.inc
|
||||
1
core/recipes-core/glibc/glibc-scripts_%.bbappend
Normal file
1
core/recipes-core/glibc/glibc-scripts_%.bbappend
Normal file
@@ -0,0 +1 @@
|
||||
require recipes-external/glibc/glibc-external-version.inc
|
||||
12
recipes-external/glibc/glibc-external-version.inc
Normal file
12
recipes-external/glibc/glibc-external-version.inc
Normal 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)}"
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user