Re: [PATCH 51/73] db: Use cross libtool

Burton, Ross
2016-01-22T12:41:21Z

[-- Attachment #1: Type: text/plain, Size: 1923 bytes --]

On 17 January 2016 at 11:36, Khem Raj <raj.khem@gmail.com> wrote:

> 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

This fails to build on the autobuilder in poky-lsb configurations (which
turns on securityflags.inc):

/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
In function `__libc_csu_init':
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/work/i586-poky-linux/glibc/2.22-r0/git/csu/elf-init.c:87:
undefined reference to `__init_array_start'
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld:
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/qemux86/usr/lib/libc_nonshared.a(elf-init.oS):
relocation R_386_GOTOFF against undefined hidden symbol
`__init_array_start' can not be used when making a shared object
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world-lsb/build/build/tmp/sysroots/x86_64-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/5.3.0/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:884: recipe for target 'libdb_cxx-6.0.la' failed

Ross

[-- Attachment #2: Type: text/html, Size: 2442 bytes --]