path: root/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
diff options
authorKhem Raj <raj.khem@gmail.com>2012-02-23 19:07:46 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-26 14:48:48 +0100
commit7cf9f0597648c0bdaa080976d74acfbfc4c8443d (patch)
tree14766144daa76a935eb970bf250cd20a334cdb72 /meta/recipes-devtools/gcc/gcc-configure-runtime.inc
parent0e904103e9bd7fdb31bfcc129067511f9f45701b (diff)
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 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-configure-runtime.inc')
1 files changed, 14 insertions, 9 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index 34bfaeb960..d2e4ab334b 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -16,26 +16,32 @@ RUNTIMETARGET = "libssp libstdc++-v3"
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
- for d in ${RUNTIMETARGET}; do
+ mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
+ target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
+ cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
+ for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
- mkdir -p ${B}/$d/
- cd ${B}/$d/
+ rm -rf ${B}/$target/$d/
+ mkdir -p ${B}/$target/$d/
+ cd ${B}/$target/$d/
chmod a+x ${S}/$d/configure
${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
do_compile () {
- for d in ${RUNTIMETARGET}; do
- cd ${B}/$d/
- oe_runmake
+ target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
+ for d in libgcc ${RUNTIMETARGET}; do
+ cd ${B}/$target/$d/
+ oe_runmake MULTIBUILDTOP=${B}/$target/$d/
do_install () {
+ target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
for d in ${RUNTIMETARGET}; do
- cd ${B}/$d/
- oe_runmake 'DESTDIR=${D}' install
+ cd ${B}/$target/$d/
+ oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
chown -R root:root ${D}
@@ -45,4 +51,3 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"