nativesdk-libtool: sanitize the script, remove buildpaths

Use the same sed command to sanitize libtool script for target recipe
and nativesdk one. Otherwise fails with buildpaths QA error:

ERROR: nativesdk-libtool-2.5.0-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/libtool in package nativesdk-libtool contains reference to TMPDIR [buildpaths]

(From OE-Core rev: f08df9adf290fb6cbebff24df6bbbbe8e5ce95e0)

Upstream-Status: Backport[https://git.yoctoproject.org/poky/commit/?id=89e184da6c9d95a99fd34334df5ac6c5ae87f13a]

(From OE-Core rev: a720df7ad77af1f8b1c00a211c88537e5f23edbc)

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 89e184da6c)
Signed-off-by: Nikhil R <nikhilr5@kpit.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Denys Dmytriyenko 2025-03-20 17:46:43 +01:00 committed by Steve Sakoman
parent 25a23bd2d5
commit 52bee5a085
3 changed files with 15 additions and 14 deletions

View File

@ -1,4 +1,5 @@
require libtool-${PV}.inc
require remove-buildpaths.inc
SRC_URI += "file://multilib.patch"
@ -15,20 +16,6 @@ SYSROOT_DIRS_IGNORE += " \
ACLOCALEXTRAPATH:class-target = ""
do_install:append () {
sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
-e "s@${DEBUG_PREFIX_MAP}@@g" \
-e 's@${STAGING_DIR_HOST}@@g' \
-e 's@${STAGING_DIR_NATIVE}@@g' \
-e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(compiler_lib_search_dirs="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(predep_objects="\).*@\1"@' \
-e 's@^\(postdep_objects="\).*@\1"@' \
-e "s@${HOSTTOOLS_DIR}/@@g" \
-i ${D}${bindir}/libtool
}
inherit multilib_script
MULTILIB_SCRIPTS = "${PN}:${bindir}/libtool"

View File

@ -1,4 +1,5 @@
require libtool-${PV}.inc
require remove-buildpaths.inc
FILESEXTRAPATHS =. "${FILE_DIRNAME}/libtool:"

View File

@ -0,0 +1,13 @@
do_install:append () {
sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
-e "s@${DEBUG_PREFIX_MAP}@@g" \
-e 's@${STAGING_DIR_HOST}@@g' \
-e 's@${STAGING_DIR_NATIVE}@@g' \
-e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(compiler_lib_search_dirs="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
-e 's@^\(predep_objects="\).*@\1"@' \
-e 's@^\(postdep_objects="\).*@\1"@' \
-e "s@${HOSTTOOLS_DIR}/@@g" \
-i ${D}${bindir}/libtool
}