Add a pile of definitions from gcc-cross_3.3.4.bb to separate gcc-cross-sdk
authorFlorian Boor <florian.boor@kernelconcepts.de>
Fri, 22 Jul 2005 17:55:14 +0000 (17:55 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Fri, 22 Jul 2005 17:55:14 +0000 (17:55 +0000)
into several packages in order to avoid dependency trouble.

packages/gcc/gcc-cross-sdk_3.3.4.bb

index 562f671..e298b1c 100644 (file)
@@ -3,7 +3,11 @@ HOMEPAGE = "http://www.gnu.org/software/gcc/"
 SECTION = "devel"
 LICENSE = "GPL"
 MAINTAINER = "Phil Blundell <pb@handhelds.org>"
-PR = "r1"
+PR = "r2"
+include gcc_${PV}.bb
+
+# Files for these are defined in the main gcc.oe
+#PACKAGES = "libgcc libstdc++ libg2c"
 
 inherit autotools sdk
 
@@ -75,6 +79,39 @@ do_compile () {
        oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}" 
 }
 
-do_install () {
-       autotools_do_install
+#do_install () {
+#      autotools_do_install
+#}
+
+python do_package() {
+        if bb.data.getVar('DEBIAN_NAMES', d, 1):
+                bb.data.setVar('PKG_libgcc', 'libgcc1', d)
+        bb.build.exec_func('package_do_package', d)
 }
+
+do_install () {
+        oe_runmake 'DESTDIR=${D}' install
+
+        # Move libgcc_s into /lib
+        mkdir -p ${D}${base_libdir}
+        if [ "${BUILD_SYS}" == "${TARGET_SYS}" ]; then
+                # native builds drop one pathname component
+                mv -f ${D}${prefix}/lib/libgcc_s.so.* ${D}${base_libdir}
+        else
+                mv -f ${D}${prefix}/*/lib/libgcc_s.so.* ${D}${base_libdir}
+        fi
+
+        # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
+        TGT_LIBDIR=`echo ${libdir} | sed -e 's,${CROSS_DIR},/usr,'`
+        mkdir -p ${D}${TGT_LIBDIR}
+        mv -f ${D}${prefix}/*/lib/libstdc++.so.* ${D}${TGT_LIBDIR}
+        mv -f ${D}${prefix}/*/lib/libg2c.so.* ${D}${TGT_LIBDIR}
+
+        # Manually run the target stripper since we won't get it run by
+        # the packaging.
+        if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
+                ${TARGET_PREFIX}strip ${D}${TGT_LIBDIR}/libstdc++.so.*
+                ${TARGET_PREFIX}strip ${D}${TGT_LIBDIR}/libg2c.so.*
+                ${TARGET_PREFIX}strip ${D}${base_libdir}/libgcc_s.so.*
+        fi
+}
\ No newline at end of file