aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-04-15 16:18:29 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-04-26 13:58:59 +0100
commit49eacd44ff65b524c02ab93401dc97745d28415f (patch)
treebdabd528d1184b2bb46b0daf2b497787ad17e4d4
parent0f2c415f50364e3b341e9b0d043ec973feacc2f1 (diff)
downloadopenembedded-core-contrib-49eacd44ff65b524c02ab93401dc97745d28415f.tar.gz
openembedded-core-contrib-49eacd44ff65b524c02ab93401dc97745d28415f.tar.bz2
openembedded-core-contrib-49eacd44ff65b524c02ab93401dc97745d28415f.zip
binutils: Install PIC version of libiberty.a
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>
-rw-r--r--meta/recipes-devtools/binutils/binutils.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index 4119960c634..e93cd50b206 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -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