summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlixiaoyong <lixiaoyong19@huawei.com>2024-03-30 14:41:10 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-30 22:25:17 +0000
commitdaecdd577213da0c045e45c47e7acbd279956d41 (patch)
tree6a892210f8e93a3b06a00e25b1c8db1dd5c856af
parent22174e5b64cc46e3e5b9f45d0b7796e92f20a48c (diff)
downloadopenembedded-core-daecdd577213da0c045e45c47e7acbd279956d41.tar.gz
utils: enhance readelf command call with llvm
Replace `${HOST_PREFIX}readelf` with `${READELF}`. When utilizing llvm for compiling packages, the invocation of GNU readelf will consistently occur if the oe_soinstall and oe_libinstall functions, which are defined in utils.bbclass, are called. This behavior is unfriendly to llvm. So prefer `${READELF}` over `${HOST_PREFIX}readelf`. Signed-off-by: lixiaoyong <lixiaoyong19@huawei.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-global/utils.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes-global/utils.bbclass b/meta/classes-global/utils.bbclass
index 8d797ff126..957389928f 100644
--- a/meta/classes-global/utils.bbclass
+++ b/meta/classes-global/utils.bbclass
@@ -15,7 +15,7 @@ oe_soinstall() {
;;
esac
install -m 755 $1 $2/$libname
- sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
+ sonamelink=`${READELF} -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
if [ -z $sonamelink ]; then
bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'."
fi
@@ -147,7 +147,7 @@ oe_libinstall() {
# special case hack for non-libtool .so.#.#.# links
baselibfile=`basename "$libfile"`
if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
- sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
+ sonamelink=`${READELF} -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
__runcmd ln -sf $baselibfile $destpath/$sonamelink