db: Use cross libtool

db is not reconfigured like usual autotools based components so it
generates its own libtool, and this libtool is not equipped to do cross
builds, e.g. when building using clang on musl, it misdirects linker to
use libstdc++.so from build host instead of target, the reason being it
does not understand sysroot.

Use cross libtool instead to build the target versions

Fixes errors like below

| libtool: link: arm-oe-linux-musleabi-ranlib .libs/libdb-6.0.a
|
/a/builder/mnt/build-oe/tmp-musl/sysroots/x86_64-linux/usr/bin/arm-oe-linux-musleabi/arm-oe-linux-musleabi-ld:
error: /usr/lib/libstdc++.so: incompatible target

(From OE-Core rev: d14b5e650e1e55e30abbd884a6bbd9b4feacd923)

(From OE-Core rev: 22e8a0cb730b7ff8b8ce4c409548b41ffd320dde)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj 2016-02-01 05:08:27 +00:00 committed by Richard Purdie
parent 64089c6ae6
commit 1b34f55a35
2 changed files with 2 additions and 0 deletions

View File

@ -76,6 +76,7 @@ MUTEX = ""
MUTEX_arm = "${ARM_MUTEX}"
MUTEX_armeb = "${ARM_MUTEX}"
EXTRA_OECONF += "${MUTEX}"
EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
# Cancel the site stuff - it's set for db3 and destroys the
# configure.

View File

@ -83,6 +83,7 @@ MUTEX = ""
MUTEX_arm = "${ARM_MUTEX}"
MUTEX_armeb = "${ARM_MUTEX}"
EXTRA_OECONF += "${MUTEX}"
EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
# Cancel the site stuff - it's set for db3 and destroys the
# configure.