diff options
author | lixiaoyong <lixiaoyong19@huawei.com> | 2024-03-30 14:41:10 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-30 22:25:43 +0000 |
commit | f5e084ede60f98ae95319b24c46afdcde52013c9 (patch) | |
tree | 4c5f1f103c1c0a4fae7f9ce12650871668fffc61 /meta/classes-global | |
parent | 8203f61959d3edb95cd4be10c02a5494d5762830 (diff) | |
download | poky-f5e084ede60f98ae95319b24c46afdcde52013c9.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`.
(From OE-Core rev: daecdd577213da0c045e45c47e7acbd279956d41)
Signed-off-by: lixiaoyong <lixiaoyong19@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/utils.bbclass | 4 |
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() { | |||
15 | ;; | 15 | ;; |
16 | esac | 16 | esac |
17 | install -m 755 $1 $2/$libname | 17 | install -m 755 $1 $2/$libname |
18 | sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` | 18 | sonamelink=`${READELF} -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` |
19 | if [ -z $sonamelink ]; then | 19 | if [ -z $sonamelink ]; then |
20 | bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'." | 20 | bbfatal "oe_soinstall: $libname is missing ELF tag 'SONAME'." |
21 | fi | 21 | fi |
@@ -147,7 +147,7 @@ oe_libinstall() { | |||
147 | # special case hack for non-libtool .so.#.#.# links | 147 | # special case hack for non-libtool .so.#.#.# links |
148 | baselibfile=`basename "$libfile"` | 148 | baselibfile=`basename "$libfile"` |
149 | if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then | 149 | if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then |
150 | sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` | 150 | sonamelink=`${READELF} -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'` |
151 | solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'` | 151 | solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'` |
152 | if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then | 152 | if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then |
153 | __runcmd ln -sf $baselibfile $destpath/$sonamelink | 153 | __runcmd ln -sf $baselibfile $destpath/$sonamelink |