summaryrefslogtreecommitdiffstats
path: root/recipes/binutils/binutils-cross.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-06-04 17:50:32 -0700
committerKhem Raj <raj.khem@gmail.com>2010-06-05 06:52:42 -0700
commit208ece17f76686e0faa44b2a9223fcadb692a991 (patch)
tree4bf217129b591cde27930b8995e88fe8eb1a9c31 /recipes/binutils/binutils-cross.inc
parent55b15cba4bb1615ff195a0c7332319de953802f2 (diff)
downloadopenembedded-208ece17f76686e0faa44b2a9223fcadb692a991.tar.gz
binutils-cross: Build with --enable-shared and install libiberty-pic.a
* On systems where PIC matters (e.g. MIPS, x86_64) building target binutils fails because its configured with --enable-shared but when it tried to link a shared library (libopcode.so) then it pulls in libiberty.a from the sysroot which is installed by binutils-cross earlier. This version however is a static archive and linking it with shared libraries not only does not work but is wrong too. * This patch builds binutils-cross with --enable-shared and installs the PIC version of libiberty.a into sysroot as libiberty_pic.a now when target binutils is configured with --enable-shared and searches for PIC version of libiberty.a then it finds it correctly. * Move INC_PR to binutils.inc. Also noticed that several recipes do not use binutils.inc so did not touch them Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/binutils/binutils-cross.inc')
-rw-r--r--recipes/binutils/binutils-cross.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/recipes/binutils/binutils-cross.inc b/recipes/binutils/binutils-cross.inc
index bd22c92e16..432e1a7b06 100644
--- a/recipes/binutils/binutils-cross.inc
+++ b/recipes/binutils/binutils-cross.inc
@@ -6,10 +6,14 @@ PACKAGES = ""
EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
--program-prefix=${TARGET_PREFIX} \
--enable-install-libbfd \
- --disable-werror"
+ --enable-shared \
+ --disable-werror \
+ "
do_install () {
oe_runmake 'DESTDIR=${D}' install
+ install -m 0644 libiberty/pic/libiberty.a \
+ ${D}${libdir}/libiberty_pic.a
# We don't really need these, so we'll remove them...
rm -rf ${D}${CROSS_DIR}/lib/ldscripts
@@ -23,7 +27,3 @@ do_install () {
rmdir ${D}${CROSS_DIR}/${libdir}64 || :
rmdir ${D}${CROSS_DIR}/${prefix} || :
}
-
-do_stage () {
- use_do_install_for_stage
-}