Skip to contentSkip to conversation

libtool: remove some paths form the build host are encountered on the target rootfs in /usr/bin/libtool.

PATCH New Shiqun Lin 1 participant 1 message Nov 3, 2014

lore
Share & tools
lore

Shiqun Lin

author
#0 lore raw

PATCH 1/1 libtool: remove some paths form the build host are encountered on the target rootfs in /usr/bin/libtool.

Resulted libtool contains references about paths from the build host

Below variables contains hard coded build paths from the host:
LTCC=
lt_sysroot=
sys_lib_search_path_spec=
LD=
CC=
compiler_lib_search_dirs=
predep_objects=
postdep_objects=
compiler_lib_search_path=

---
 meta/recipes-devtools/libtool/libtool_2.4.2.bb | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta/recipes-devtools/libtool/libtool_2.4.2.bb +11 -0
index a2eb4ea..268bbe1 100644
@@ -7,6 +7,17 @@ PR = "${INC_PR}.0"
 #
 SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
 
+do_install_append () {
+        sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
+            -e 's@${STAGING_DIR_HOST}@@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"@' \
+            -i ${D}${bindir}/libtool
+}
+
 libtool_sysroot_preprocess () {
 	rm -rf ${SYSROOT_DESTDIR}${bindir}/*
 	rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
Signature · 1 line
1.8.5.2.233.g932f7e4