]> code.ossystems Code Review - openembedded-core.git/commitdiff
binutils: Install PIC version of libiberty.a
authorKhem Raj <raj.khem@gmail.com>
Wed, 15 Apr 2020 23:18:29 +0000 (16:18 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 26 Apr 2020 12:58:59 +0000 (13:58 +0100)
some architectures e.g. mips complain in linking apps which have shared
libs that are linking with libiberty.a fixes errors like below

libiberty/../../libiberty/hashtab.c:285:(.text+0xf8): relocation R_MIPS_26 against `htab_create_typed_alloc' cannot be used when making a shared object; recompile with -fPIC

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/binutils/binutils.inc

index 4119960c634d19db7047bbee8bebfdb056a592fd..e93cd50b20694a3bf78e847a0ffc5088f14e2751 100644 (file)
@@ -152,6 +152,11 @@ do_install () {
        install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
        install -m 644 ${S}/include/libiberty.h ${D}${includedir}
 
+       # insall pic version of libiberty if available
+        if [ -e ${B}/libiberty/pic/libiberty.a ]; then
+               install -Dm 0644 ${B}/libiberty/pic/libiberty.a ${D}${libdir}/libiberty.a
+       fi
+
        cd ${D}${bindir}
 
        # Symlinks for ease of running these on the native target