From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1SyLVT-0007gR-DA for openembedded-core@lists.openembedded.org; Mon, 06 Aug 2012 13:29:55 +0200 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q76BIAdY027467 for ; Mon, 6 Aug 2012 12:18:10 +0100 Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23198-08 for ; Mon, 6 Aug 2012 12:18:06 +0100 (BST) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id q76BI2nm027461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 6 Aug 2012 12:18:03 +0100 Message-ID: <1344251885.9756.139.camel@ted> From: Richard Purdie To: openembedded-core Date: Mon, 06 Aug 2012 12:18:05 +0100 X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] gcc-cross-initial: Ensure it uses an isolated sysroot X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Patches and discussions about the oe-core layer List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2012 11:29:55 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit If we don't do this, a stale limits.h may be detected in STAGING_DIR_TARGET which would result in a different limits.h getting generated by gcc-cross-initial that references it. The referenced limits.h will then not get found by eglibc-initial causing rather strange build failures. The simplest solution is to create a temporary sysroot containing only the things gcc-cross-initial should care about and this results in a correct limits.h file regardless of what else may have been built. Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc index a515fb0..543a94a 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc @@ -19,11 +19,23 @@ EXTRA_OECONF = "--with-newlib \ ${OPTSPACE} \ --program-prefix=${TARGET_PREFIX} \ --with-sysroot=${STAGING_DIR_TARGET} \ - --with-build-sysroot=${STAGING_DIR_TARGET} \ + --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \ ${EXTRA_OECONF_INITIAL} \ ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \ ${EXTRA_OECONF_FPU}" + +GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot" + +do_configure_prepend () { + sysr=${GCCCROSS_BUILDSYSROOT}${target_includedir} + mkdir -p $sysr + for t in linux asm asm-generic; do + rm -f $sysr/$t + ln -s ${STAGING_DIR_TARGET}${target_includedir}/$t $sysr/ + done +} + do_compile () { oe_runmake all-gcc all-target-libgcc }