summaryrefslogtreecommitdiff
path: root/glibc/glibc_2.3.2.oe
blob: c5ae1b4a3b04efb4b744b7745eb3cd122d61b00d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
DESCRIPTION="GNU C Library"
LICENSE="LGPL"
SECTION="libs"
PRIORITY=required
MAINTAINER="Chris Larson <kergoth@handhelds.org>"

SRC_URI=ftp://ftp.gnu.org/gnu/glibc/glibc-2.3.2.tar.gz \
	ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.3.2.tar.gz \
	http://www.uclibc.org/downloads/toolchain/kernel-headers-2.4.21.tar.bz2
SRC_URI_append=' file://${FILESDIR}/noinfo.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/10_cvs.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/30_glibc232-base.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/50_glibc232-arm-dwarf2-buildfix.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/50_glibc232-m68k-dwarf2-buildfix.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/50_glibc232-mips-buildfix.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/50_glibc23-hppa-entry.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/80_glibc232-futimes-buildfix.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/80_glibc232-iconvdata-fix.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/80_glibc232-locales-header.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/80_glibc232-wcsmbs-fix.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/81_glibc232-utimes-fix.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/alpha-crti.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/alpha-pic.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/alpha-pwrite.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/arm-no-hwcap.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/arm-output-format.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/fhs-linux-paths.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc22-eo_EO.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc22-locales.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/glibc22-m68k-compat.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc22-m68k-fpic.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc22-nss-upgrade.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc22-ttyname-devfs.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/glibc23-01-hppa-dl-machine.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-07-hppa-atomicity.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-asserth-decls.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/glibc23-cmov.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-ctype-compat.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-errno.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-function-compat.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-hppa-compat.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-hppa-malloc8.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/glibc23-hppa-Rminkernel.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/glibcbug.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/hurd-enable-ldconfig.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/ldconfig.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/ldd.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/libgcc-compat-all.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/libgcc-compat-other.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/librt-mips.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/locale-es_AR.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/locales-stuff.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/locales-supported.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/lo_LA.UTF-8_not_supported.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/makeconfig.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/nss_compat-shadow.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/powerpc-sysconf.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/revert-old-libio.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/s390-tls.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/sparc64-fixups.patch;patch=1'
SRC_URI_append=' file://${FILESDIR}/sparcv8-target.patch;patch=1;pnum=0'
SRC_URI_append=' file://${FILESDIR}/syslog-backrev.patch;patch=1;pnum=0'
#SRC_URI_append=' file://${FILESDIR}/dyn-ldconfig.diff;patch=1;pnum=0'
PROVIDES=virtual/libc

S="${WORKDIR}/${P}"
B="${WORKDIR}/build-${TARGET_SYS}"

inherit autotools

EXTRA_OECONF="--with-elf --disable-profile --enable-add-ons=linuxthreads --with-elf --enable-shared --with-headers=${WORKDIR}/linux/include --without-cvs --enable-kernel=2.4.6"

glibcbuild_do_unpack () {
	mv "${WORKDIR}/linuxthreads" "${WORKDIR}/linuxthreads_db" "${S}/"
# kernel headers
	cp -a "${FILESDIR}/version.h" "${FILESDIR}/autoconf.h" "${WORKDIR}/linux/include/linux/"
	if [ -e "${FILESDIR}/asm-${TARGET_ARCH}-unistd.h" ]; then 
		cp -a "${FILESDIR}/asm-${TARGET_ARCH}-unistd.h" "${WORKDIR}/linux/include/asm-${TARGET_ARCH}/unistd.h"
	fi
	case "${TARGET_ARCH}" in
	i686)
		TARGET_ARCH=i386
		;;
	i586)
		TARGET_ARCH=i386
		;;
	i486)
		TARGET_ARCH=i386
		;;
	esac
	if test !  -e ${WORKDIR}/linux/include/asm-$TARGET_ARCH; then
		oefatal unable to create asm symlink in kernel headers
	fi
	ln -sf "asm-$TARGET_ARCH" "${WORKDIR}/linux/include/asm"
}

python do_unpack () {
	oe.build.exec_func('base_do_unpack', d)
	oe.build.exec_func('glibcbuild_do_unpack', d)
}

do_configure () {
# override this function to avoid the autoconf/automake/aclocal/autoheader
# calls for now
	oe_runconf
}

do_compile_prepend() {
	touch sysdeps/${TARGET_ARCH}/framestate.c
}

rpcsvc = bootparam_prot.x nlm_prot.x rstat.x \
	 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
	 rusers.x spray.x nfs_prot.x rquota.x key_prot.x

do_compile_append() {
	(
		cd ${S}/sunrpc/rpcsvc
		for r in ${rpcsvc}; do
			h=`echo $r|sed -e's,\.x$,.h,'`
			rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
		done
	)
}

do_stage() {
	oe_runmake 'install_root=${STAGING_DIR}/target' \
		'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \
		'${STAGING_LIBDIR}/libc-${PV}.so' '${STAGING_LIBDIR}/libc.so.6' \
		install-headers install-lib
	echo 'GROUP ( libc.so.6 libc_nonshared.a )' > \
		'${STAGING_LIBDIR}/libc.so'
	mv '${STAGING_LIBDIR}/libpthread.so' '${STAGING_LIBDIR}/libpthread-old.so'
	cat '${STAGING_LIBDIR}/libpthread-old.so' | sed -e's,/lib/,,g' > '${STAGING_LIBDIR}/libpthread.so'
	cp -a '${WORKDIR}/linux/include/linux' '${STAGING_DIR}/target/include/'
	install -d ${STAGING_DIR}/target/include/gnu \
		   ${STAGING_DIR}/target/include/bits
	install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_DIR}/target/include/gnu/
	install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_DIR}/target/include/bits/
	for r in ${rpcsvc}; do
		h=`echo $r|sed -e's,\.x$,.h,'`
		install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_DIR}/target/include/rpcsvc/
	done
	cp -a '${WORKDIR}/linux/include/asm' '${STAGING_DIR}/target/include/'
	cp -a "${WORKDIR}/linux/include/`readlink ${WORKDIR}/linux/include/asm`" '${STAGING_DIR}/target/include/'
	install -m 0644 ${B}/libc_nonshared.a ${STAGING_LIBDIR}/
	install -m 0644 ${B}/libc_pic.a ${STAGING_LIBDIR}/
	install -m 0644 ${B}/libc.a ${STAGING_LIBDIR}/
}

do_install() {
	oe_runmake install_root=${D} install
	for r in ${rpcsvc}; do
		h=`echo $r|sed -e's,\.x$,.h,'`
		install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
	done
#	cp -a ${WORKDIR}/linux/include/linux ${D}/${includedir}/
#	cp -a ${WORKDIR}/linux/include/asm-${TARGET_ARCH}/* ${D}/${includedir}/asm/
}