Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / recipes / glibc / glibc_2.3.6.bb
1 require glibc.inc
2
3 PR = "r5"
4
5 #FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.3.6', '${FILE_DIRNAME}/orig/glibc', '${FILE_DIRNAME}/orig/files', '${FILE_DIRNAME}/orig' ], d)}"
6
7 GLIBC_ADDONS ?= "linuxthreads"
8
9 #           ${CROSSTOOL_PATCH_URL}glibc-2.3.5-cygwin.patch;patch=1
10
11 CROSSTOOL_PATCH_URL = "http://www.kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/"
12 SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
13            ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-${PV}.tar.bz2 \
14            ${CROSSTOOL_PATCH_URL}glibc-2.3.5-sh-lowlevellock.patch;patch=1 \
15            ${CROSSTOOL_PATCH_URL}glibc-2.3.5-sh-memset.patch;patch=1 \
16            ${CROSSTOOL_PATCH_URL}glibc-2.3.6-allow-gcc-4.0-arm.patch;patch=1 \
17            ${CROSSTOOL_PATCH_URL}glibc-2.3.6-allow-gcc-4.0-elf.patch;patch=1 \
18            ${CROSSTOOL_PATCH_URL}glibc-2.3.6-configure-apple-as.patch;patch=1 \
19            ${CROSSTOOL_PATCH_URL}glibc-2.3.6-fix-pr631.patch;patch=1 \
20            ${CROSSTOOL_PATCH_URL}glibc-fp-byteorder.patch;patch=1 \
21            ${CROSSTOOL_PATCH_URL}glibc-mips-bootstrap-gcc-header-install.patch;patch=1 \
22            ${CROSSTOOL_PATCH_URL}arm-ctl_bus_isa.patch;patch=1 \
23            ${CROSSTOOL_PATCH_URL}make-install-lib-all.patch;patch=1 \
24            ${CROSSTOOL_PATCH_URL}maybe/glibc-2.3.6-allow-gcc-4.0-powerpc32.patch;patch=1 \
25            file://glibc-2.3.6-bind-already-defined-on-powerpc.patch;patch=1 \
26            file://glibc-2.3.6-allow-gcc-4.1-powerpc32-initfini.s.patch;patch=1 \
27            file://glibc-2.3.6-linuxthreads-allow-gcc-4.1-powerpc32-initfini.s.patch;patch=1 \
28            file://late-install-loop-break.patch;patch=1 \
29            file://glibc-arm-socket-weakalias.patch;patch=1 \
30            file://glibc-2.3.6-linuxthreads-pthread-raise.patch;patch=1 \
31            file://glibc-cross_sunrpc.patch;patch=1 \
32            file://etc/ld.so.conf \
33            file://generate-supported.mk"
34
35 S = "${WORKDIR}/glibc-${PV}"
36 B = "${WORKDIR}/build-${TARGET_SYS}"
37
38 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
39 RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
40
41 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
42                 --without-cvs --disable-profile --disable-debug --without-gd \
43                 --enable-clocale=gnu \
44                 --enable-add-ons=${GLIBC_ADDONS} \
45                 --with-headers=${STAGING_INCDIR} \
46                 ${GLIBC_EXTRA_OECONF}"
47
48 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
49
50 glibc_do_unpack () {
51         mv "${WORKDIR}/linuxthreads" "${WORKDIR}/linuxthreads_db" "${S}/"
52 }
53
54 python do_unpack () {
55         bb.build.exec_func('base_do_unpack', d)
56         bb.build.exec_func('glibc_do_unpack', d)
57 }
58
59 do_configure () {
60 # override this function to avoid the autoconf/automake/aclocal/autoheader
61 # calls for now
62 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
63 # version check and doesn't really help with anything
64         if [ -z "`which rpcgen`" ]; then
65                 echo "rpcgen not found.  Install glibc-devel."
66                 exit 1
67         fi
68         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
69         CPPFLAGS="" libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes oe_runconf
70 }
71
72 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
73           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
74           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
75
76 do_compile () {
77         # this really is arm specific
78         touch ${S}/sysdeps/arm/framestate.c
79         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
80         unset LDFLAGS
81         base_do_compile
82         (
83                 cd ${S}/sunrpc/rpcsvc
84                 for r in ${rpcsvc}; do
85                         h=`echo $r|sed -e's,\.x$,.h,'`
86                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
87                 done
88         )
89 }
90
91 do_stage_prepend() {
92         ( cd ${S} ; patch -p1 < ${WORKDIR}/late-install-loop-break.patch )
93 }
94
95 require glibc-stage.inc
96
97 require glibc-package.bbclass