netboot-launcher-efl: Bump version to 0.2.2 and fix download link.
[openembedded.git] / recipes / glibc / glibc-initial.inc
1 SECTION = "libs"
2 DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
3 PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
4
5 PACKAGES = ""
6 PACKAGES_DYNAMIC = ""
7
8 do_configure () {
9         sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
10         chmod +x ${S}/configure
11         find ${S} -name "configure" | xargs touch
12         ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
13                 --without-cvs --disable-sanity-checks \
14                 --with-headers=${STAGING_DIR_TARGET}${layout_includedir} \
15                 --enable-hacker-mode
16         if grep -q GLIBC_2.3 ${S}/ChangeLog; then
17                 # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
18                 # Fortunately, we don't need errlist-compat.c, since we just need .h files,
19                 # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
20                 # Another workaround might be to tell configure to not use any cross options to $(CC).
21                 # The real fix would be to get install-headers to not generate errlist-compat.c.
22                 make sysdeps/gnu/errlist.c
23                 mkdir -p stdio-common
24                 touch stdio-common/errlist-compat.c
25         fi
26 }
27
28 do_compile () {
29         :
30 }
31
32 do_stage () {
33         oe_runmake cross-compiling=yes install_root=${STAGING_DIR_HOST} \
34         includedir='${layout_includedir}' prefix='${layout_prefix}' \
35         install-bootstrap-headers=yes install-headers
36
37         oe_runmake csu/subdir_lib
38         # Two headers -- stubs.h and features.h -- aren't installed by install-headers,
39         # so do them by hand.  We can tolerate an empty stubs.h for the moment.
40         # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html
41         mkdir -p ${STAGING_INCDIR}/gnu
42         touch ${STAGING_INCDIR}/gnu/stubs.h
43         cp ${S}/include/features.h ${STAGING_INCDIR}/features.h
44
45         if [ -e ${B}/bits/stdio_lim.h ]; then
46                 cp ${B}/bits/stdio_lim.h  ${STAGING_INCDIR}/bits/
47         fi
48         mkdir -p ${STAGING_DIR_TARGET}${layout_libdir}
49         install -m 644 csu/crt[1in].o ${STAGING_DIR_TARGET}${layout_libdir}
50         ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
51                 -o ${STAGING_DIR_TARGET}${layout_libdir}/libc.so
52 }
53
54 do_install () {
55         :
56 }