From f7337ee8c409761b569dab06e88d530f24b367d5 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 23 Feb 2012 19:07:46 -0800 Subject: 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 Signed-off-by: Richard Purdie --- .../recipes-devtools/gcc/gcc-configure-runtime.inc | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'meta/recipes-devtools/gcc/gcc-configure-runtime.inc') 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} done } 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/ done } 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 done 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" - -- cgit v1.2.3-54-g00ecf