summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-06 11:13:06 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-06 12:35:05 +0100
commitc8815d2f21849deb9359706f54dc71490773415e (patch)
treed361b6864bc76cb52d3d836f49748e9f77183a04
parented6beed4b309c5d9ccaa88e620ea27e5ee045757 (diff)
downloadpoky-c8815d2f21849deb9359706f54dc71490773415e.tar.gz
gcc-cross-initial: Ensure it uses an isolated sysroot
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. (From OE-Core rev: 9c304eae0724474902fe2f3150adc6af115af9ba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index a515fb0cc6..543a94a768 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 \
19 ${OPTSPACE} \ 19 ${OPTSPACE} \
20 --program-prefix=${TARGET_PREFIX} \ 20 --program-prefix=${TARGET_PREFIX} \
21 --with-sysroot=${STAGING_DIR_TARGET} \ 21 --with-sysroot=${STAGING_DIR_TARGET} \
22 --with-build-sysroot=${STAGING_DIR_TARGET} \ 22 --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
23 ${EXTRA_OECONF_INITIAL} \ 23 ${EXTRA_OECONF_INITIAL} \
24 ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \ 24 ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \
25 ${EXTRA_OECONF_FPU}" 25 ${EXTRA_OECONF_FPU}"
26 26
27
28GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot"
29
30do_configure_prepend () {
31 sysr=${GCCCROSS_BUILDSYSROOT}${target_includedir}
32 mkdir -p $sysr
33 for t in linux asm asm-generic; do
34 rm -f $sysr/$t
35 ln -s ${STAGING_DIR_TARGET}${target_includedir}/$t $sysr/
36 done
37}
38
27do_compile () { 39do_compile () {
28 oe_runmake all-gcc all-target-libgcc 40 oe_runmake all-gcc all-target-libgcc
29} 41}