diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-06 11:13:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-08-06 12:35:05 +0100 |
commit | c8815d2f21849deb9359706f54dc71490773415e (patch) | |
tree | d361b6864bc76cb52d3d836f49748e9f77183a04 /meta | |
parent | ed6beed4b309c5d9ccaa88e620ea27e5ee045757 (diff) | |
download | poky-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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-initial.inc | 14 |
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 | |||
28 | GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot" | ||
29 | |||
30 | do_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 | |||
27 | do_compile () { | 39 | do_compile () { |
28 | oe_runmake all-gcc all-target-libgcc | 40 | oe_runmake all-gcc all-target-libgcc |
29 | } | 41 | } |