summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2007-04-20 15:08:02 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2007-04-20 15:08:02 +0000
commit8c878bebdc8d71e04a420ccad573807e55295b2d (patch)
tree192cacdc01802c1661c9d8c1ebd55507e62ce91f
parent67e6cc2f64f8682b766b586acc9b39ed9ea20633 (diff)
downloadopenembedded-core-8c878bebdc8d71e04a420ccad573807e55295b2d.tar.gz
openembedded-core-8c878bebdc8d71e04a420ccad573807e55295b2d.tar.bz2
openembedded-core-8c878bebdc8d71e04a420ccad573807e55295b2d.tar.xz
openembedded-core-8c878bebdc8d71e04a420ccad573807e55295b2d.zip
gcc-cross-sdk: added 4.1.1 (builds ok on x86_32)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1527 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/gcc/gcc-cross-sdk_4.1.1.bb38
-rw-r--r--meta/packages/gcc/gcc-package-sdk.inc47
-rw-r--r--meta/packages/gcc/gcc4-build-sdk.inc25
3 files changed, 110 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-cross-sdk_4.1.1.bb b/meta/packages/gcc/gcc-cross-sdk_4.1.1.bb
new file mode 100644
index 000000000..eaf7e7024
--- /dev/null
+++ b/meta/packages/gcc/gcc-cross-sdk_4.1.1.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "The GNU cc and gcc C compilers."
+require gcc_${PV}.bb
+PR = "r0"
+
+inherit sdk
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PACKAGES = "${PN}"
+
+require gcc4-build-sdk.inc
+require gcc-package-sdk.inc
+
+SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://110-arm-eabi.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-thumb.patch;patch=1 \
+ file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://cse.patch;patch=1 \
+ file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://gcc-4.1.1-pr13685-1.patch;patch=1 \
+ file://gcc-ignore-cache.patch;patch=1 \
+ "
diff --git a/meta/packages/gcc/gcc-package-sdk.inc b/meta/packages/gcc/gcc-package-sdk.inc
new file mode 100644
index 000000000..1e5f2aaa5
--- /dev/null
+++ b/meta/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.* || true
+ ${TARGET_PREFIX}strip ${D}${base_libdir}/libgcc_s.so.*
+ fi
+}
diff --git a/meta/packages/gcc/gcc4-build-sdk.inc b/meta/packages/gcc/gcc4-build-sdk.inc
new file mode 100644
index 000000000..86aa566e5
--- /dev/null
+++ b/meta/packages/gcc/gcc4-build-sdk.inc
@@ -0,0 +1,25 @@
+USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
+
+STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include"
+STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib"
+
+do_configure () {
+ (cd ${S} && gnu-configize) || die "failure running gnu-configize"
+ (cd ${S}/libstdc++-v3 && autoreconf)
+ oe_runconf
+ mkdir -p gcc
+ ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as
+ ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld
+ ln -sf ${STAGING_TARGET_INCDIR}/* ${S}/include
+ ln -sf ${STAGING_TARGET_LIBDIR}/crt*.o gcc/
+}
+
+do_compile () {
+ export CC="${BUILD_CC}"
+ export AR_FOR_TARGET="${TARGET_SYS}-ar"
+ export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
+ export LD_FOR_TARGET="${TARGET_SYS}-ld"
+ export NM_FOR_TARGET="${TARGET_SYS}-nm"
+ export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
+ oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}"
+}