Merge branch 'org.openembedded.dev' of git://git.openembedded.net/openembedded into...
[vuplus_openembedded] / packages / glibc / glibc_2.3.5+cvs20050627.bb
1 require glibc.inc
2
3 FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-cvs-2.3.5"
4 SRCDATE = "20050627"
5 PR = "r22"
6
7 #Doesnt build for sh3
8 DEFAULT_PREFERENCE_sh3="-1"
9
10 GLIBC_ADDONS ?= "ports,linuxthreads"
11
12 GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN"
13
14 #
15 # For now, we will skip building of a gcc package if it is a uclibc one
16 # and our build is not a uclibc one, and we skip a glibc one if our build
17 # is a uclibc build.
18 #
19 # See the note in gcc/gcc_3.4.0.oe
20 #
21
22 python __anonymous () {
23     import bb, re
24     uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
25     if uc_os:
26         raise bb.parse.SkipPackage("incompatible with target %s" %
27                                    bb.data.getVar('TARGET_OS', d, 1))
28 }
29
30 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
31
32 #          file://noinfo.patch;patch=1
33 #          file://ldconfig.patch;patch=1;pnum=0
34 #          file://arm-machine-gmon.patch;patch=1;pnum=0 \
35 #          \
36 #          file://arm-ioperm.patch;patch=1;pnum=0 \
37 #          file://ldd.patch;patch=1;pnum=0 \
38 SRC_URI = "http://familiar.handhelds.org/source/v0.8.3/stash_libc_sources.redhat.com__20050627.tar.gz \
39            http://familiar.handhelds.org/source/v0.8.3/stash_ports_sources.redhat.com__20050627.tar.gz \
40            file://arm-audit.patch;patch=1 \
41            file://arm-audit2.patch;patch=1 \
42            file://arm-no-hwcap.patch;patch=1 \
43            file://arm-memcpy.patch;patch=1 \
44            file://arm-longlong.patch;patch=1;pnum=0 \
45            file://fhs-linux-paths.patch;patch=1 \
46            file://dl-cache-libcmp.patch;patch=1 \
47            file://ldsocache-varrun.patch;patch=1 \
48            file://5090_all_stubs-rule-fix.patch;patch=1 \
49            file://raise.patch;patch=1 \
50            file://zecke-sane-readelf.patch;patch=1 \
51            file://glibc-2.3.5-fix-weak-alias-arm.patch;patch=1 \
52            file://glibc-2.3.5-fix-weak-alias-arm-2.patch;patch=1 \
53            file://etc/ld.so.conf \
54            file://generate-supported.mk"
55
56 # seems to fail on tls platforms
57 SRC_URI_append_arm = " file://dyn-ldconfig-20041128.patch;patch=1"
58 SRC_URI_append_armeb = " file://dyn-ldconfig-20041128.patch;patch=1"
59
60 # Build fails on sh3 and sh4 without additional patches
61 SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1 \
62                        file://superh-fcntl.patch;patch=1;pnum=0"
63 SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1 \
64                        file://superh-fcntl.patch;patch=1;pnum=0"
65
66 S = "${WORKDIR}/libc"
67 B = "${WORKDIR}/build-${TARGET_SYS}"
68
69 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
70                 --without-cvs --disable-profile --disable-debug --without-gd \
71                 --enable-clocale=gnu \
72                 --enable-add-ons=${GLIBC_ADDONS} \
73                 --with-headers=${STAGING_INCDIR \
74                 --without-selinux \
75                 ${GLIBC_EXTRA_OECONF}"
76
77 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
78
79 #avoid too much optimization on ppc
80 CFLAGS_dht-walnut += " -O1 -g0 -fPIC -fno-inline-functions -fno-unit-at-a-time "
81
82 do_munge() {
83         # Integrate ports into tree
84         mv ${WORKDIR}/ports ${S}
85
86         # http://www.handhelds.org/hypermail/oe/51/5135.html
87         # Some files were moved around between directories on
88         # 2005-12-21, which means that any attempt to check out
89         # from CVS using a datestamp older than that will be doomed.
90         #
91         # This is a workaround for that problem.
92         rm -rf ${S}/bits
93 }
94
95 addtask munge before do_patch after do_unpack
96
97 export default_mmap_threshold_familiar = "32*1024"
98
99 do_configure () {
100         if [ "x$default_mmap_threshold" != "x" ]; then
101                 echo "malloc-CPPFLAGS=-DDEFAULT_MMAP_THRESHOLD=\"(${default_mmap_threshold})\"" >configparms
102         fi
103 # override this function to avoid the autoconf/automake/aclocal/autoheader
104 # calls for now
105 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
106 # version check and doesn't really help with anything
107         if [ -z "`which rpcgen`" ]; then
108                 echo "rpcgen not found.  Install glibc-devel."
109                 exit 1
110         fi
111         (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
112         CPPFLAGS="" oe_runconf
113 }
114
115 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
116           yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
117           rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
118
119 do_compile () {
120         # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
121         unset LDFLAGS
122         base_do_compile
123         (
124                 cd ${S}/sunrpc/rpcsvc
125                 for r in ${rpcsvc}; do
126                         h=`echo $r|sed -e's,\.x$,.h,'`
127                         rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
128                 done
129         )
130 }
131
132 require glibc-stage.inc
133
134 require glibc-package.bbclass