diff options
author | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-04-20 15:08:02 +0000 |
---|---|---|
committer | Marcin Juszkiewicz <hrw@openedhand.com> | 2007-04-20 15:08:02 +0000 |
commit | 8c878bebdc8d71e04a420ccad573807e55295b2d (patch) | |
tree | 192cacdc01802c1661c9d8c1ebd55507e62ce91f /meta/packages/gcc | |
parent | 67e6cc2f64f8682b766b586acc9b39ed9ea20633 (diff) | |
download | poky-8c878bebdc8d71e04a420ccad573807e55295b2d.tar.gz |
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
Diffstat (limited to 'meta/packages/gcc')
-rw-r--r-- | meta/packages/gcc/gcc-cross-sdk_4.1.1.bb | 38 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-package-sdk.inc | 47 | ||||
-rw-r--r-- | meta/packages/gcc/gcc4-build-sdk.inc | 25 |
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 0000000000..eaf7e7024a --- /dev/null +++ b/meta/packages/gcc/gcc-cross-sdk_4.1.1.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | DESCRIPTION = "The GNU cc and gcc C compilers." | ||
2 | require gcc_${PV}.bb | ||
3 | PR = "r0" | ||
4 | |||
5 | inherit sdk | ||
6 | |||
7 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}" | ||
8 | |||
9 | DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc" | ||
10 | PACKAGES = "${PN}" | ||
11 | |||
12 | require gcc4-build-sdk.inc | ||
13 | require gcc-package-sdk.inc | ||
14 | |||
15 | SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \ | ||
16 | file://100-uclibc-conf.patch;patch=1 \ | ||
17 | file://110-arm-eabi.patch;patch=1 \ | ||
18 | file://200-uclibc-locale.patch;patch=1 \ | ||
19 | file://300-libstdc++-pic.patch;patch=1 \ | ||
20 | file://301-missing-execinfo_h.patch;patch=1 \ | ||
21 | file://302-c99-snprintf.patch;patch=1 \ | ||
22 | file://303-c99-complex-ugly-hack.patch;patch=1 \ | ||
23 | file://304-index_macro.patch;patch=1 \ | ||
24 | file://602-sdk-libstdc++-includes.patch;patch=1 \ | ||
25 | file://740-sh-pr24836.patch;patch=1 \ | ||
26 | file://800-arm-bigendian.patch;patch=1 \ | ||
27 | file://arm-nolibfloat.patch;patch=1 \ | ||
28 | file://arm-softfloat.patch;patch=1 \ | ||
29 | file://gcc41-configure.in.patch;patch=1 \ | ||
30 | file://arm-thumb.patch;patch=1 \ | ||
31 | file://arm-thumb-cache.patch;patch=1 \ | ||
32 | file://ldflags.patch;patch=1 \ | ||
33 | file://cse.patch;patch=1 \ | ||
34 | file://unbreak-armv4t.patch;patch=1 \ | ||
35 | file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \ | ||
36 | file://gcc-4.1.1-pr13685-1.patch;patch=1 \ | ||
37 | file://gcc-ignore-cache.patch;patch=1 \ | ||
38 | " | ||
diff --git a/meta/packages/gcc/gcc-package-sdk.inc b/meta/packages/gcc/gcc-package-sdk.inc new file mode 100644 index 0000000000..1e5f2aaa5d --- /dev/null +++ b/meta/packages/gcc/gcc-package-sdk.inc | |||
@@ -0,0 +1,47 @@ | |||
1 | # Packages emitted by our gcc-cross builds. | ||
2 | # | ||
3 | INHIBIT_PACKAGE_STRIP ?= "" | ||
4 | HAS_G2C ?= "yes" | ||
5 | HAS_GFORTRAN ?= "no" | ||
6 | OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}" | ||
7 | INHIBIT_PACKAGE_STRIP = "1" | ||
8 | |||
9 | |||
10 | python do_package() { | ||
11 | if bb.data.getVar('DEBIAN_NAMES', d, 1): | ||
12 | bb.data.setVar('PKG_libgcc', 'libgcc1', d) | ||
13 | bb.build.exec_func('package_do_package', d) | ||
14 | } | ||
15 | |||
16 | do_install () { | ||
17 | oe_runmake 'DESTDIR=${D}' install | ||
18 | |||
19 | # Move libgcc_s into /lib | ||
20 | mkdir -p ${D}${base_libdir} | ||
21 | if [ -f ${D}${base_libdir}/libgcc_s.so.? ]; then | ||
22 | # Already in the right location | ||
23 | : | ||
24 | elif [ -f ${D}${prefix}/lib/libgcc_s.so.? ]; then | ||
25 | mv -f ${D}${prefix}/lib/libgcc_s.so.* ${D}${base_libdir} | ||
26 | else | ||
27 | mv -f ${D}${prefix}/*/lib/libgcc_s.so.* ${D}${base_libdir} | ||
28 | fi | ||
29 | |||
30 | # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr | ||
31 | mkdir -p ${D}${libdir} | ||
32 | mv -f ${D}${prefix}/*/lib/libstdc++.so.* ${D}${libdir} | ||
33 | if [ "${HAS_G2C}" = "yes" ]; then | ||
34 | mv -f ${D}${prefix}/*/lib/libg2c.so.* ${D}${libdir} | ||
35 | fi | ||
36 | if [ "${HAS_GFORTRAN}" = "yes" ]; then | ||
37 | mv -f ${D}${prefix}/*/lib/libgfortran*.so.* ${D}${libdir} | ||
38 | fi | ||
39 | |||
40 | # Manually run the target stripper since we won't get it run by | ||
41 | # the packaging. | ||
42 | if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then | ||
43 | ${TARGET_PREFIX}strip ${D}${libdir}/libstdc++.so.* | ||
44 | ${TARGET_PREFIX}strip ${D}${libdir}/libg2c.so.* || true | ||
45 | ${TARGET_PREFIX}strip ${D}${base_libdir}/libgcc_s.so.* | ||
46 | fi | ||
47 | } | ||
diff --git a/meta/packages/gcc/gcc4-build-sdk.inc b/meta/packages/gcc/gcc4-build-sdk.inc new file mode 100644 index 0000000000..86aa566e5c --- /dev/null +++ b/meta/packages/gcc/gcc4-build-sdk.inc | |||
@@ -0,0 +1,25 @@ | |||
1 | USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}' | ||
2 | |||
3 | STAGING_TARGET_INCDIR = "${STAGING_DIR}/${TARGET_SYS}/include" | ||
4 | STAGING_TARGET_LIBDIR = "${STAGING_DIR}/${TARGET_SYS}/lib" | ||
5 | |||
6 | do_configure () { | ||
7 | (cd ${S} && gnu-configize) || die "failure running gnu-configize" | ||
8 | (cd ${S}/libstdc++-v3 && autoreconf) | ||
9 | oe_runconf | ||
10 | mkdir -p gcc | ||
11 | ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as | ||
12 | ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld | ||
13 | ln -sf ${STAGING_TARGET_INCDIR}/* ${S}/include | ||
14 | ln -sf ${STAGING_TARGET_LIBDIR}/crt*.o gcc/ | ||
15 | } | ||
16 | |||
17 | do_compile () { | ||
18 | export CC="${BUILD_CC}" | ||
19 | export AR_FOR_TARGET="${TARGET_SYS}-ar" | ||
20 | export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" | ||
21 | export LD_FOR_TARGET="${TARGET_SYS}-ld" | ||
22 | export NM_FOR_TARGET="${TARGET_SYS}-nm" | ||
23 | export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" | ||
24 | oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}" | ||
25 | } | ||