merge of '7393275c6ccce67cadeb49d4afb3459e56edf8a9'
[vuplus_openembedded] / packages / glibc / eglibc-initial_svn.bb
1 require eglibc_${PV}.bb
2
3 DEPENDS = "linux-libc-headers"
4 PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
5 FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
6
7 PACKAGES = ""
8 PACKAGES_DYNAMIC = ""
9
10 do_configure () {
11         sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
12         chmod +x ${S}/configure
13         unset CFLAGS
14         find ${S} -name "configure" | xargs touch
15         CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
16                 --without-cvs --disable-sanity-checks \
17                 --with-headers=${STAGING_INCDIR} \
18                 --enable-hacker-mode
19         if grep -q GLIBC_2.3 ${S}/ChangeLog; then
20                 # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
21                 # Fortunately, we don't need errlist-compat.c, since we just need .h files,
22                 # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
23                 # Another workaround might be to tell configure to not use any cross options to $(CC).
24                 # The real fix would be to get install-headers to not generate errlist-compat.c.
25                 make sysdeps/gnu/errlist.c
26                 mkdir -p stdio-common
27                 touch stdio-common/errlist-compat.c
28         fi
29 }
30
31 do_compile () {
32         :
33 }
34
35 do_stage () {
36         oe_runmake cross-compiling=yes install_root=${STAGING_DIR_HOST} includedir=${layout_includedir} prefix="" install-headers
37
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
46 do_install () {
47         :
48 }