From dcf15ccf3cc9d55e77228ba8d526f967fc9791b4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 24 Jan 2017 13:18:12 +0000 Subject: gcc: Split builddir saving into its own sstate task When we stashed the gcc build directory for use in generating the various runtimes we were being lazy and just used the staging directory. With recipe specific sysroots this means we're copying a large chunk of data around with the cross compiler which we don't really need in most cases. Separate out the data into its own task and inject this into the configure step. We have to do that here since autotools will wipe out ${B} if it thinks we're rebuilding and we therefore have to time its recreation after that. This also takes the opportunity to remove some pointless (as far as I can tell) conditionals from the do_install code. Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-runtime.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc') diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index d56f82ac8d..00856ad8bc 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -32,9 +32,8 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ do_configure () { export CXX="${CXX} -nostdinc++ -nostdlib++" - mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` - target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` - hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B} + target=${TARGET_SYS} + for d in libgcc ${RUNTIMETARGET}; do echo "Configuring $d" rm -rf ${B}/$target/$d/ @@ -45,6 +44,8 @@ do_configure () { $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} done } +EXTRACONFFUNCS += "extract_stashed_builddir" +do_configure[depends] += "${COMPILERDEP}" do_compile () { target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` -- cgit v1.2.3