summaryrefslogtreecommitdiff
path: root/packages/gcc/gcc-package-sdk.inc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-02-14 09:21:05 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-02-14 09:21:05 +0000
commit8761f3cf74f5555413f2d9100b36e78c791bfc1e (patch)
treebaeb8588e9cf908c56394c9ec6fc2a48c6a7c607 /packages/gcc/gcc-package-sdk.inc
parent865d6f6b46e4f64ca51a4ca055b71d42e543230c (diff)
gcc-cross-sdk: Move common data into sdk .inc files. Add gcc-cross-sdk-3.4.3.
Diffstat (limited to 'packages/gcc/gcc-package-sdk.inc')
-rw-r--r--packages/gcc/gcc-package-sdk.inc47
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/gcc/gcc-package-sdk.inc b/packages/gcc/gcc-package-sdk.inc
new file mode 100644
index 0000000000..9d44fb51ab
--- /dev/null
+++ b/packages/gcc/gcc-package-sdk.inc
@@ -0,0 +1,47 @@
+# Packages emitted by our gcc-cross builds.
+#
+INHIBIT_PACKAGE_STRIP ?= ""
+HAS_G2C ?= "yes"
+HAS_GFORTRAN ?= "no"
+OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
+INHIBIT_PACKAGE_STRIP = "1"
+
+
+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 [ -f ${D}${base_libdir}/libgcc_s.so.? ]; then
+ # Already in the right location
+ :
+ elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then
+ 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
+ mkdir -p ${D}${libdir}
+ mv -f ${D}${prefix}/*/lib/libstdc++.so.* ${D}${libdir}
+ if [ "${HAS_G2C}" = "yes" ]; then
+ mv -f ${D}${prefix}/*/lib/libg2c.so.* ${D}${libdir}
+ fi
+ if [ "${HAS_GFORTRAN}" = "yes" ]; then
+ mv -f ${D}${prefix}/*/lib/libgfortran*.so.* ${D}${libdir}
+ fi
+
+ # 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}${libdir}/libstdc++.so.*
+ ${TARGET_PREFIX}strip ${D}${libdir}/libg2c.so.*
+ ${TARGET_PREFIX}strip ${D}${base_libdir}/libgcc_s.so.*
+ fi
+}