summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc-initial.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc-initial.inc')
-rw-r--r--meta/recipes-core/glibc/glibc-initial.inc53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc-initial.inc b/meta/recipes-core/glibc/glibc-initial.inc
new file mode 100644
index 0000000000..8d864db91a
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc-initial.inc
@@ -0,0 +1,53 @@
1SECTION = "libs"
2DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
3PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
4FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
5
6PACKAGES = ""
7PACKAGES_DYNAMIC = ""
8
9do_configure () {
10 sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure
11 chmod +x ${S}/configure
12 find ${S} -name "configure" | xargs touch
13 ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
14 --without-cvs --disable-sanity-checks \
15 --with-headers=${STAGING_DIR_TARGET}${includedir} \
16 --enable-hacker-mode
17 if grep -q GLIBC_2.3 ${S}/ChangeLog; then
18 # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
19 # Fortunately, we don't need errlist-compat.c, since we just need .h files,
20 # so work around this by creating a fake errlist-compat.c and satisfying its dependencies.
21 # Another workaround might be to tell configure to not use any cross options to $(CC).
22 # The real fix would be to get install-headers to not generate errlist-compat.c.
23 make sysdeps/gnu/errlist.c
24 mkdir -p stdio-common
25 touch stdio-common/errlist-compat.c
26 fi
27}
28
29do_compile () {
30 :
31}
32
33do_install () {
34 oe_runmake cross-compiling=yes install_root=${D} \
35 includedir='${includedir}' prefix='${prefix}' \
36 install-bootstrap-headers=yes install-headers
37
38 oe_runmake csu/subdir_lib
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 mkdir -p ${D}${libdir}/
50 install -m 644 csu/crt[1in].o ${D}${libdir}
51 ${CC} -nostdlib -nostartfiles -shared -x c /dev/null \
52 -o ${D}${libdir}/libc.so
53}