blob: 5975fd26c7ab6d9c4619c569bc56e89e6bcb0913 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001DEPENDS = "linux-libc-headers virtual/${TARGET_PREFIX}gcc-initial libgcc-initial"
2PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
3
4PACKAGES = ""
5PACKAGES_DYNAMIC = ""
6
7STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
8STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
9TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
10
11do_configure () {
12 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
13 find ${S} -name "configure" | xargs touch
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050014 cfgscript=`python -c "import os; print os.path.relpath('${S}', '.')"`/configure
15 $cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 --prefix=/usr \
17 --without-cvs --disable-sanity-checks \
18 --with-headers=${STAGING_DIR_TARGET}${includedir} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050019 --enable-hacker-mode --enable-addons
20}
21
22do_compile () {
23 :
24}
25
26do_install () {
27 oe_runmake cross-compiling=yes install_root=${D} \
28 includedir='${includedir}' prefix='${prefix}' \
29 install-bootstrap-headers=yes install-headers
30
31 oe_runmake csu/subdir_lib
32 mkdir -p ${D}${libdir}/
33 install -m 644 csu/crt[1in].o ${D}${libdir}
34
35 # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
36 # so do them by hand. We can tolerate an empty stubs.h for the moment.
37 # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
38 mkdir -p ${D}${includedir}/gnu/
39 touch ${D}${includedir}/gnu/stubs.h
40 cp ${S}/include/features.h ${D}${includedir}/features.h
41
42 if [ -e ${B}/bits/stdio_lim.h ]; then
43 cp ${B}/bits/stdio_lim.h ${D}${includedir}/bits/
44 fi
45 # add links to linux-libc-headers: final glibc build need this.
46 for t in linux asm asm-generic; do
47 ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
48 done
49}
50
51do_install_locale() {
52 :
53}
54
55do_siteconfig () {
56 :
57}
58
59SSTATEPOSTINSTFUNCS += "glibcinitial_sstate_postinst"
60glibcinitial_sstate_postinst() {
61 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
62 then
63 # Recreate the symlinks to ensure they point to the correct location
64 for t in linux asm asm-generic; do
65 rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t
66 ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/
67 done
68 fi
69}
70
71do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
72
73# We don't install any scripts so there is nothing to evacuate
74do_evacuate_scripts () {
75 :
76}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050077
78inherit nopackages