[meta-xilinx] [PATCH] xilinx-versions: Fix libc-*.so path for aarch64

Manjukumar Matha manjukumar.harthikote-matha at xilinx.com
Mon Dec 21 12:57:43 PST 2015


Fix search path for libc-*.so for aarch64 xilinx toolchain.
Currently it returns the version as UNKNOWN for libc, this
patch fixes it

Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha at xilinx.com>
---
 conf/distro/include/xilinx-versions.inc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/conf/distro/include/xilinx-versions.inc b/conf/distro/include/xilinx-versions.inc
index 4e44f07..94e2849 100644
--- a/conf/distro/include/xilinx-versions.inc
+++ b/conf/distro/include/xilinx-versions.inc
@@ -42,6 +42,8 @@ def csl_get_gcc_version(d):
 		return version
 
 def xilinx_get_libc_version(d):
+	import fnmatch
+
 	syspath = d.expand('${EXTERNAL_TOOLCHAIN_SYSROOT}')
 	if not syspath:
 		return 'UNKNOWN'
@@ -51,9 +53,9 @@ def xilinx_get_libc_version(d):
 		libpath = syspath + '/sgxx-glibc/lib/'
 
 	if os.path.exists(libpath):
-		for file in os.listdir(libpath):
-			if file.find('libc-') == 0:
-				return file[5:-3]
+		for root,dirs,files in os.walk(libpath):
+			for filename in fnmatch.filter(files,'libc-*.so'):
+				return filename[5:-3]
 	return 'UNKNOWN'
 
 def xilinx_get_kernel_version(d):
-- 
2.1.4




More information about the meta-xilinx mailing list