diff options
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-initial.inc')
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-initial.inc | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc new file mode 100644 index 0000000000..83b1d2cecf --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-initial.inc | |||
@@ -0,0 +1,80 @@ | |||
1 | require eglibc-common.inc | ||
2 | |||
3 | DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial" | ||
4 | PROVIDES = "virtual/${TARGET_PREFIX}libc-initial" | ||
5 | |||
6 | PACKAGES = "" | ||
7 | PACKAGES_DYNAMIC = "" | ||
8 | |||
9 | STAGINGCC = "gcc-cross-initial" | ||
10 | STAGINGCC_class-nativesdk = "gcc-crosssdk-initial" | ||
11 | TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" | ||
12 | |||
13 | do_configure () { | ||
14 | sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure | ||
15 | chmod +x ${S}/configure | ||
16 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | ||
17 | find ${S} -name "configure" | xargs touch | ||
18 | ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \ | ||
19 | --prefix=/usr \ | ||
20 | --without-cvs --disable-sanity-checks \ | ||
21 | --with-headers=${STAGING_DIR_TARGET}${includedir} \ | ||
22 | --with-kconfig=${STAGING_BINDIR_NATIVE} \ | ||
23 | --enable-hacker-mode --enable-addons | ||
24 | } | ||
25 | |||
26 | do_compile () { | ||
27 | : | ||
28 | } | ||
29 | |||
30 | do_install () { | ||
31 | oe_runmake cross-compiling=yes install_root=${D} \ | ||
32 | includedir='${includedir}' prefix='${prefix}' \ | ||
33 | install-bootstrap-headers=yes install-headers | ||
34 | |||
35 | oe_runmake csu/subdir_lib | ||
36 | mkdir -p ${D}${libdir}/ | ||
37 | install -m 644 csu/crt[1in].o ${D}${libdir} | ||
38 | |||
39 | # Two headers -- stubs.h and features.h -- aren't installed by install-headers, | ||
40 | # so do them by hand. We can tolerate an empty stubs.h for the moment. | ||
41 | # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html | ||
42 | mkdir -p ${D}${includedir}/gnu/ | ||
43 | touch ${D}${includedir}/gnu/stubs.h | ||
44 | cp ${S}/include/features.h ${D}${includedir}/features.h | ||
45 | |||
46 | if [ -e ${B}/bits/stdio_lim.h ]; then | ||
47 | cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/ | ||
48 | fi | ||
49 | # add links to linux-libc-headers: final eglibc build need this. | ||
50 | for t in linux asm asm-generic; do | ||
51 | ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/ | ||
52 | done | ||
53 | } | ||
54 | |||
55 | do_install_locale() { | ||
56 | : | ||
57 | } | ||
58 | |||
59 | do_siteconfig () { | ||
60 | : | ||
61 | } | ||
62 | |||
63 | SSTATEPOSTINSTFUNCS += "eglibcinitial_sstate_postinst" | ||
64 | eglibcinitial_sstate_postinst() { | ||
65 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
66 | then | ||
67 | # Recreate the symlinks to ensure they point to the correct location | ||
68 | for t in linux asm asm-generic; do | ||
69 | rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t | ||
70 | ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/ | ||
71 | done | ||
72 | fi | ||
73 | } | ||
74 | |||
75 | do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/" | ||
76 | |||
77 | # We don't install any scripts so there is nothing to evacuate | ||
78 | do_evacuate_scripts () { | ||
79 | : | ||
80 | } | ||