]> code.ossystems Code Review - openembedded-core.git/commitdiff
qt-mobility: remove /usr/lib from ld rpath-link option
authorRoy.Li <rongqing.li@windriver.com>
Mon, 24 Jun 2013 05:08:03 +0000 (13:08 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Jun 2013 16:43:42 +0000 (17:43 +0100)
Remove /usr/lib from ld rpath-link option to fix the below build error:

       bitbake_build/tmp/sysroots/x86-kvm-guest/usr/lib/libpng16.so.16:
        undefined reference to `inflateReset2@ZLIB_1.2.3.4'

since sysroot seems not work for rpath-link, and "rpath-link,/usr/lib" makes
ld to search host libraries for target libraries, once host has different
version zlib, the error will happen.

qmake uses QT_MOBILITY_LIB to generate "rpath-link,/usr/lib" when do_configure
but we can not add sysroot into QT_MOBILITY_LIB, since QT_MOBILITY_LIB is dir
which libraries will be installed to, so I remove this dir from rpath-link
before do_compile

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-qt/qt4/qt-mobility_1.2.0.inc

index b0e4278a16ddc28e2f7981cf5f41ed653e9eb09f..aba84ab3b94bc98466dcccc3498a896e5b85f210 100644 (file)
@@ -59,6 +59,12 @@ do_configure_prepend() {
        echo CONFIG += ${qtm_embedded} >>./config.pri
 }
 
+do_compile_prepend() {
+       for NAME in `find ./ -name Makefile` ; do
+           sed -e 's:-Wl,-rpath-link,${libdir}::g' -i $NAME 
+       done
+}
+
 do_install() {
        for NAME in */*.prf
        do