summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-cross-initial.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-08-15 23:12:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-21 12:15:31 +0100
commitb0faebd1f07e1616004bd19664395932e7c2c48f (patch)
treeb22560eca81f271e91e0712cb9a2026460f610d0 /meta/recipes-devtools/gcc/gcc-cross-initial.inc
parent91746bab6b29bd7610ae08dfadd6a869c504c62d (diff)
downloadpoky-b0faebd1f07e1616004bd19664395932e7c2c48f.tar.gz
gcc-cross: Make gcc-cross-initial as the only intermediate gcc stage
Now glibc can be compiled with gcc-cross-initial therefore prepare the stage to drop gcc-cross-intermediate Also drop arm-nolibfloat.patch should not be needed anymore half of changes in this patch are meant for OABI which we dont use anymore (From OE-Core rev: 30617bde61a3b0a0944b49a0c9fb7159dacbb19f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-cross-initial.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial.inc50
1 files changed, 39 insertions, 11 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index 543a94a768..be47f85ef8 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -19,12 +19,11 @@ 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=${GCCCROSS_BUILDSYSROOT} \ 22 --with-build-sysroot=${STAGING_DIR_TARGET} \
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" 27GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot"
29 28
30do_configure_prepend () { 29do_configure_prepend () {
@@ -39,13 +38,42 @@ do_configure_prepend () {
39do_compile () { 38do_compile () {
40 oe_runmake all-gcc all-target-libgcc 39 oe_runmake all-gcc all-target-libgcc
41} 40}
42# fixed limits.h infact includes the so called real limits.h 41do_install () {
43# which should come from libc but when we build libc-initial 42 oe_runmake 'DESTDIR=${D}' install-gcc install-target-libgcc
44# then bunch of configure tests include fixed limits.h which in turn 43
45# includes real limits.h but this real limits.h is not staged yet 44 # We don't really need this (here shares/ contains man/, info/, locale/).
46# so we overwirte the generated include-fixed/limits.h for gcc-cross-initial 45 rm -rf ${D}${datadir}/
47# to get rid references to real limits.h 46
48 47 # We use libiberty from binutils
49do_install_append () { 48 find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f
50 cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h 49 find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f
50
51 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
52 # found. These need to be relative paths so they work in different locations.
53 dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
54 install -d $dest
55 for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do
56 ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t
57 done
58 # fixed limits.h infact includes the so called real limits.h
59 # which should come from libc but when we build libc-initial
60 # then bunch of configure tests include fixed limits.h which in turn
61 # includes real limits.h but this real limits.h is not staged yet
62 # so we overwirte the generated include-fixed/limits.h for gcc-cross-initial
63 # to get rid references to real limits.h
64 cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h
65}
66#
67# Override the default sysroot staging copy since this won't look like a target system
68#
69sysroot_stage_all() {
70 sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
71 install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/
72 install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/
73 mv ${SYSROOT_DESTDIR}${target_base_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/ || true
74 mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true
51} 75}
76
77do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST} ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}"
78do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST} ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}"
79