From ad856cde593366bcd0d6cf4c6dfec12ec58c0b20 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 8 Sep 2009 20:45:43 -0700 Subject: binutils-cross: Do not install libibery.a in wrong place * This interferes with canadian cross build of binutils because it finds cross libiberty.a where as it needs the target one. Signed-off-by: Khem Raj --- recipes/binutils/binutils-cross.inc | 7 ------- recipes/binutils/binutils_cvs.bb | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 8 deletions(-) (limited to 'recipes/binutils') diff --git a/recipes/binutils/binutils-cross.inc b/recipes/binutils/binutils-cross.inc index 384d18cfa7..5808c1fbda 100644 --- a/recipes/binutils/binutils-cross.inc +++ b/recipes/binutils/binutils-cross.inc @@ -22,13 +22,6 @@ do_stage () { rmdir ${CROSS_DIR}/${libdir} || : rmdir ${CROSS_DIR}/${libdir}64 || : rmdir ${CROSS_DIR}/${prefix} || : - - # We want to move this into the target specific location - mkdir -p ${STAGING_DIR_TARGET}/lib - mv -f ${CROSS_DIR}/lib/libiberty.a ${STAGING_DIR_TARGET}/lib || \ - mv -f ${CROSS_DIR}/lib64/libiberty.a ${STAGING_DIR_TARGET}/lib - rmdir ${CROSS_DIR}/lib || : - rmdir ${CROSS_DIR}/lib64 || : } do_install () { diff --git a/recipes/binutils/binutils_cvs.bb b/recipes/binutils/binutils_cvs.bb index ad4dd2b474..88dcd78c90 100644 --- a/recipes/binutils/binutils_cvs.bb +++ b/recipes/binutils/binutils_cvs.bb @@ -21,8 +21,34 @@ do_compile () { oe_runmake all-ld all-binutils all-gas } do_install () { - oe_runmake install-ld install-binutils install-gas + autotools_do_install install-ld install-binutils install-gas + + # We don't really need these, so we'll remove them... + rm -rf ${D}${libdir}/ldscripts + + # Fix the /usr/${TARGET_SYS}/bin/* links + for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do + rm -f $l + ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ + | tr -s / \ + | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l + done + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + cd ${D}${bindir} + + # Symlinks for ease of running these on the native target + for p in ${TARGET_SYS}-* ; do + ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` + done + + rm ${D}${bindir}/ar ${D}${bindir}/strings } + do_stage () { oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/ oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/ -- cgit v1.2.3