binutils-cross-sdk_cvs.bb: Use special do_install for cvs version.
authorKhem Raj <raj.khem@gmail.com>
Fri, 21 May 2010 07:19:00 +0000 (00:19 -0700)
committerKhem Raj <raj.khem@gmail.com>
Fri, 21 May 2010 07:21:48 +0000 (00:21 -0700)
* Remove do_stage for binutils_cvs
* do_install is special for binutils cvs becasue
  binutils cvs checks out whole src tree
  hence it can not use autotools install funciton
  because that will install all tools that are in
  sourceware src repo. We only want all-ld all-binutils
  and all-gas.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
recipes/binutils/binutils-cross-sdk_cvs.bb
recipes/binutils/binutils_cvs.bb

index b01afc4..ebaa0c9 100644 (file)
@@ -1,4 +1,33 @@
 require binutils_cvs.bb
 require binutils-cross-sdk.inc
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 FILESPATHPKG .= ":binutils-cvs"
+
+do_install () {
+        oe_runmake 'DESTDIR=${D}' 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
+}
index b335767..43a984f 100644 (file)
@@ -1,7 +1,7 @@
 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
 PV = "2.20+cvs${SRCDATE}"
 INC_PR = "r5"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 require binutils.inc
 
@@ -49,14 +49,3 @@ do_install () {
         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}/
-        oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/
-        install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/
-        install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/
-        install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/
-        install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/
-        install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/
-        install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/
-}