diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-04-15 16:18:29 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-05-07 13:03:30 +0100 |
| commit | df9e772bc7426ebb7001fba648138aad48add929 (patch) | |
| tree | 4e10c38be6821339b94b5133f83d0377e9ecacfb | |
| parent | f21e3abbaca517377f7492298b2781b3f38db483 (diff) | |
| download | poky-df9e772bc7426ebb7001fba648138aad48add929.tar.gz | |
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
(From OE-Core rev: 4e64f0bc62fd81f91d75a1f46230fff7c71650e2)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc index 4119960c63..e93cd50b20 100644 --- a/meta/recipes-devtools/binutils/binutils.inc +++ b/meta/recipes-devtools/binutils/binutils.inc | |||
| @@ -152,6 +152,11 @@ do_install () { | |||
| 152 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} | 152 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} |
| 153 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} | 153 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} |
| 154 | 154 | ||
| 155 | # insall pic version of libiberty if available | ||
| 156 | if [ -e ${B}/libiberty/pic/libiberty.a ]; then | ||
| 157 | install -Dm 0644 ${B}/libiberty/pic/libiberty.a ${D}${libdir}/libiberty.a | ||
| 158 | fi | ||
| 159 | |||
| 155 | cd ${D}${bindir} | 160 | cd ${D}${bindir} |
| 156 | 161 | ||
| 157 | # Symlinks for ease of running these on the native target | 162 | # Symlinks for ease of running these on the native target |
