mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-18 05:02:18 +02:00
glibc-external: find errno.h via normal sysroot search methods
Signed-off-by: Christopher Larson <kergoth@gmail.com>
This commit is contained in:
@@ -4,12 +4,12 @@ require recipes-core/glibc/glibc-common.inc
|
|||||||
inherit external-toolchain
|
inherit external-toolchain
|
||||||
|
|
||||||
def get_external_libc_version(d):
|
def get_external_libc_version(d):
|
||||||
sysroot = d.getVar('EXTERNAL_TOOLCHAIN_SYSROOT', True)
|
sopattern = os.path.join(d.getVar('base_libdir', True), 'libc-*.so')
|
||||||
libpath = os.path.join(sysroot, 'lib')
|
found_paths = find_sysroot_files([sopattern], d)
|
||||||
if os.path.exists(libpath):
|
if found_paths:
|
||||||
for filename in os.listdir(libpath):
|
so_paths = found_paths[0]
|
||||||
if filename.startswith('libc-'):
|
soname = os.path.basename(so_paths[0])
|
||||||
return filename[5:-3]
|
return soname[5:-3]
|
||||||
|
|
||||||
return 'UNKNOWN'
|
return 'UNKNOWN'
|
||||||
|
|
||||||
@@ -25,20 +25,20 @@ PROVIDES += "glibc \
|
|||||||
virtual/libiconv"
|
virtual/libiconv"
|
||||||
|
|
||||||
def get_external_libc_license(d):
|
def get_external_libc_license(d):
|
||||||
sysroot = d.getVar('EXTERNAL_TOOLCHAIN_SYSROOT', True)
|
errnosearch = os.path.join(d.getVar('includedir', True), 'errno.h')
|
||||||
incpath = os.path.join(sysroot, d.getVar('includedir', True)[1:])
|
found = find_sysroot_files([errnosearch], d)
|
||||||
errnopath = os.path.join(incpath, 'errno.h')
|
if found:
|
||||||
|
errno_paths = found[0]
|
||||||
|
with open(errno_paths[0], 'rU') as f:
|
||||||
|
text = f.read()
|
||||||
|
|
||||||
with open(errnopath, 'rU') as f:
|
lictext = """ The GNU C Library is free software; you can redistribute it and/or
|
||||||
text = f.read()
|
|
||||||
|
|
||||||
lictext = """ The GNU C Library is free software; you can redistribute it and/or
|
|
||||||
modify it under the terms of the GNU Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
License as published by the Free Software Foundation; either
|
License as published by the Free Software Foundation; either
|
||||||
version 2.1 of the License, or (at your option) any later version."""
|
version 2.1 of the License, or (at your option) any later version."""
|
||||||
|
|
||||||
if lictext in text:
|
if lictext in text:
|
||||||
return 'LGPL-2.1+'
|
return 'LGPL-2.1+'
|
||||||
|
|
||||||
return 'UNKNOWN'
|
return 'UNKNOWN'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user