summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/libgcc_4.6.bb
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-02-23 19:07:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-30 11:37:23 +0100
commitf7337ee8c409761b569dab06e88d530f24b367d5 (patch)
treee3116f8ac86cbcc8641235f50a31570548825a89 /meta/recipes-devtools/gcc/libgcc_4.6.bb
parentf66cc57e7282f7d278245dac0281f00e5131a934 (diff)
downloadpoky-f7337ee8c409761b569dab06e88d530f24b367d5.tar.gz
gcc: Stash the gcc-cross builddir to reuse in libgcc and gcc-runtime
Currently we stash the libgcc install tree and then reuse that to populate libgcc recipe later. This mechanism does not work for gcc 4.7/trunk since now libstdc++ needs access to build tree of libgcc. This patch stashes the gcc-cross build tree and then reuses this in libgcc as well as in gcc-runtime recipe builds. Now we build libgcc in the libgcc recipe instead of just using the prebuilt install tree core-image-minimal build/run tested on all qemu machines (From OE-Core rev: 7cf9f0597648c0bdaa080976d74acfbfc4c8443d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/libgcc_4.6.bb')
-rw-r--r--meta/recipes-devtools/gcc/libgcc_4.6.bb33
1 files changed, 24 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/libgcc_4.6.bb b/meta/recipes-devtools/gcc/libgcc_4.6.bb
index 9a8b20d87c..9db7243531 100644
--- a/meta/recipes-devtools/gcc/libgcc_4.6.bb
+++ b/meta/recipes-devtools/gcc/libgcc_4.6.bb
@@ -1,6 +1,7 @@
1require gcc-${PV}.inc 1require gcc-${PV}.inc
2 2
3INHIBIT_DEFAULT_DEPS = "1" 3INHIBIT_DEFAULT_DEPS = "1"
4
4DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" 5DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
5 6
6PKGSUFFIX = "" 7PKGSUFFIX = ""
@@ -23,15 +24,26 @@ FILES_libgcov${PKGSUFFIX}-dev = " \
23 24
24FILES_${PN}-dbg += "${base_libdir}/.debug/" 25FILES_${PN}-dbg += "${base_libdir}/.debug/"
25 26
26do_configure[noexec] = "1" 27do_configure () {
27do_compile[noexec] = "1"
28
29do_install () {
30 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` 28 target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
31
32 # Install libgcc from our gcc-cross saved data
33 install -d ${D}${base_libdir} ${D}${libdir} 29 install -d ${D}${base_libdir} ${D}${libdir}
34 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D} 30 cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${B}
31 mkdir -p ${B}/${PN}
32 cd ${B}/${PN}
33 chmod a+x ${S}/${PN}/configure
34 ${S}/${PN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
35}
36
37do_compile () {
38 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
39 cd ${B}/${PN}
40 oe_runmake MULTIBUILDTOP=${B}/$target/${PN}/
41}
42
43do_install () {
44 target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
45 cd ${B}/${PN}
46 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${PN}/ install
35 47
36 # Move libgcc_s into /lib 48 # Move libgcc_s into /lib
37 mkdir -p ${D}${base_libdir} 49 mkdir -p ${D}${base_libdir}
@@ -41,8 +53,11 @@ do_install () {
41 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true 53 mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true
42 fi 54 fi
43 55
44 chown -R root:root ${D} 56 # install the runtime in /usr/lib/ not in /usr/lib/gcc on target
45 chmod +x ${D}${base_libdir}/libgcc_s.so.* 57 # so that cross-gcc can find it in the sysroot
58
59 mv ${D}${libdir}/gcc/* ${D}${libdir}
60 rm -rf ${D}${libdir}/gcc/
46} 61}
47 62
48do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package" 63do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"