eglibc: Bump the SRCREV to get new fixes.
[openembedded.git] / recipes / eglibc / eglibc_2.10.bb
1 require eglibc.inc
2
3 DEPENDS += "gperf-native"
4 FILESPATHPKG =. "eglibc-svn:"
5 PV = "2.10"
6 PR = "${INC_PR}.1"
7 SVN_REV="8873"
8 EGLIBC_BRANCH="eglibc-2_10"
9 SRC_URI = "svn://svn.eglibc.org/branches;module=eglibc-2_10;rev=${SVN_REV};proto=svn \
10            file://eglibc-svn-arm-lowlevellock-include-tls.patch;patch=1 \
11            file://etc/ld.so.conf \
12            file://generate-supported.mk"
13 S = "${WORKDIR}/${EGLIBC_BRANCH}/libc"
14 B = "${WORKDIR}/build-${TARGET_SYS}"
15
16 PACKAGES_DYNAMIC = "libc6*"
17 RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
18 PROVIDES_${PN}-dbg = "glibc-dbg"
19
20 # the -isystem in bitbake.conf screws up glibc do_stage
21 BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
22 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
23
24 GLIBC_ADDONS ?= "ports,nptl,libidn"
25
26 GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
27
28 #
29 # For now, we will skip building of a gcc package if it is a uclibc one
30 # and our build is not a uclibc one, and we skip a glibc one if our build
31 # is a uclibc build.
32 #
33 # See the note in gcc/gcc_3.4.0.oe
34 #
35
36 python __anonymous () {
37     import bb, re
38     uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
39     if uc_os:
40         raise bb.parse.SkipPackage("incompatible with target %s" %
41                                    bb.data.getVar('TARGET_OS', d, 1))
42 }
43
44 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
45                 --without-cvs --disable-profile --disable-debug --without-gd \
46                 --enable-clocale=gnu \
47                 --enable-add-ons=${GLIBC_ADDONS},ports \
48                 --with-headers=${STAGING_INCDIR} \
49                 --without-selinux \
50                 ${GLIBC_EXTRA_OECONF}"
51
52 EXTRA_OECONF += "${@get_eglibc_fpu_setting(bb, d)}"
53
54 do_unpack_append() {
55         bb.build.exec_func('do_move_ports', d)
56 }
57
58 do_move_ports() {
59         if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then
60             rm -rf ${S}/ports
61             mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
62         fi
63 }
64
65 do_configure () {
66 # override this function to avoid the autoconf/automake/aclocal/autoheader
67 # calls for now
68 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
69 # version check and doesn't really help with anything
70         if [ -z "`which rpcgen`" ]; then
71                 echo "rpcgen not found.  Install glibc-devel."
72                 exit 1
73         fi
74         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
75         find ${S} -name "configure" | xargs touch
76         CPPFLAGS="" oe_runconf
77 }
78
79 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
80           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
81           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
82
83 do_compile () {
84         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
85         unset LDFLAGS
86         base_do_compile
87         (
88                 cd ${S}/sunrpc/rpcsvc
89                 for r in ${rpcsvc}; do
90                         h=`echo $r|sed -e's,\.x$,.h,'`
91                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
92                 done
93         )
94 }
95
96 require eglibc-stage.inc
97
98 require eglibc-package.bbclass