diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-16 03:05:19 +0200 |
commit | c527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch) | |
tree | bb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-devtools/gcc/gcc-cross-initial.inc | |
download | poky-c527fd1f14c27855a37f2e8ac5346ce8d940ced2.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-cross-initial.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-initial.inc | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/meta/recipes-devtools/gcc/gcc-cross-initial.inc new file mode 100644 index 0000000000..81845386f9 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-cross-initial.inc | |||
@@ -0,0 +1,81 @@ | |||
1 | DEPENDS = "virtual/${TARGET_PREFIX}binutils ${NATIVEDEPS}" | ||
2 | PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial" | ||
3 | PACKAGES = "" | ||
4 | |||
5 | INHIBIT_AUTOTOOLS_DEPS = "1" | ||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | CROSS_TARGET_SYS_DIR_append = ".${PN}" | ||
9 | |||
10 | # This is intended to be a -very- basic config | ||
11 | # sysroot is needed in case we use libc-initial | ||
12 | EXTRA_OECONF = "--with-newlib \ | ||
13 | --without-headers \ | ||
14 | --disable-shared \ | ||
15 | --disable-threads \ | ||
16 | --disable-multilib \ | ||
17 | --disable-__cxa_atexit \ | ||
18 | --enable-languages=c \ | ||
19 | ${OPTSPACE} \ | ||
20 | --program-prefix=${TARGET_PREFIX} \ | ||
21 | --with-sysroot=${STAGING_DIR_TARGET} \ | ||
22 | --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \ | ||
23 | ${EXTRA_OECONF_INITIAL} \ | ||
24 | ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--with-ld=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}ld.bfd', '', d)} \ | ||
25 | ${EXTRA_OECONF_FPU}" | ||
26 | |||
27 | EXTRA_OECONF += " --with-native-system-header-dir=${SYSTEMHEADERS} " | ||
28 | |||
29 | GCCCROSS_BUILDSYSROOT = "${B}/tmpsysroot" | ||
30 | |||
31 | do_configure_prepend () { | ||
32 | sysr=${GCCCROSS_BUILDSYSROOT}${target_includedir} | ||
33 | mkdir -p $sysr | ||
34 | for t in linux asm asm-generic; do | ||
35 | rm -f $sysr/$t | ||
36 | ln -s ${STAGING_DIR_TARGET}${target_includedir}/$t $sysr/ | ||
37 | done | ||
38 | } | ||
39 | |||
40 | do_compile () { | ||
41 | oe_runmake all-gcc all-target-libgcc | ||
42 | } | ||
43 | do_install () { | ||
44 | oe_runmake 'DESTDIR=${D}' install-gcc install-target-libgcc | ||
45 | |||
46 | # We don't really need this (here shares/ contains man/, info/, locale/). | ||
47 | rm -rf ${D}${datadir}/ | ||
48 | |||
49 | # We use libiberty from binutils | ||
50 | find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f | ||
51 | find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f | ||
52 | |||
53 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
54 | # found. These need to be relative paths so they work in different locations. | ||
55 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
56 | install -d $dest | ||
57 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | ||
58 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t | ||
59 | done | ||
60 | # fixed limits.h infact includes the so called real limits.h | ||
61 | # which should come from libc but when we build libc-initial | ||
62 | # then bunch of configure tests include fixed limits.h which in turn | ||
63 | # includes real limits.h but this real limits.h is not staged yet | ||
64 | # so we overwirte the generated include-fixed/limits.h for gcc-cross-initial | ||
65 | # to get rid references to real limits.h | ||
66 | cp gcc/include-fixed/limits.h ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/limits.h | ||
67 | } | ||
68 | # | ||
69 | # Override the default sysroot staging copy since this won't look like a target system | ||
70 | # | ||
71 | sysroot_stage_all() { | ||
72 | sysroot_stage_dir ${D} ${SYSROOT_DESTDIR} | ||
73 | install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/ | ||
74 | install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ | ||
75 | mv ${SYSROOT_DESTDIR}${target_base_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/ || true | ||
76 | mv ${SYSROOT_DESTDIR}${target_libdir}/* ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/ || true | ||
77 | } | ||
78 | |||
79 | do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/" | ||
80 | do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/" | ||
81 | |||