linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / glibc / glibc_2.5.bb
blob1aa7c6ba56c90c0e1bf22dac71c0ad42317458fb
1 require glibc.inc
2 PR = "${INC_PR}.2"
4 COMPATIBLE_TARGET_SYS = "."
6 ARM_INSTRUCTION_SET = "arm"
8 PACKAGES_DYNAMIC = "libc6*"
9 RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
11 # the -isystem in bitbake.conf screws up glibc do_stage
12 BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
13 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
15 GLIBC_ADDONS ?= "ports,nptl,libidn"
17 GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
20 # For now, we will skip building of a gcc package if it is a uclibc one
21 # and our build is not a uclibc one, and we skip a glibc one if our build
22 # is a uclibc build.
24 # See the note in gcc/gcc_3.4.0.oe
27 python __anonymous () {
28 import bb, re
29 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
30 if uc_os:
31 raise bb.parse.SkipPackage("incompatible with target %s" %
32 bb.data.getVar('TARGET_OS', d, 1))
35 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
37 SRC_URI = "\
38 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2;name=archive \
39 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2;name=ports \
40 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2;name=libidn \
41 file://arm-memcpy.patch \
42 file://arm-longlong.patch \
43 file://fhs-linux-paths.patch \
44 file://dl-cache-libcmp.patch \
45 file://ldsocache-varrun.patch \
46 file://nptl-crosscompile.patch \
47 file://glibc-2.5-local-dynamic-resolvconf.patch;striplevel=0 \
48 file://glibc-check_pf.patch;striplevel=0 \
49 file://zecke-sane-readelf.patch \
50 file://ldd-unbash.patch \
51 file://glibc-2.6.1-use-short-for-fnstsw.patch \
52 file://glibc-arm-no-asm-page.patch \
53 file://generic-bits_select.h \
54 file://generic-bits_types.h \
55 file://generic-bits_typesizes.h \
56 file://generic-bits_time.h \
57 file://etc/ld.so.conf \
58 file://generate-supported.mk \
61 # Build fails on sh3 and sh4 without additional patches
62 SRC_URI_append_sh3 = " file://no-z-defs.patch"
63 SRC_URI_append_sh4 = " file://no-z-defs.patch"
65 # Powerpc patches to add support for soft-float
66 SRC_URI_append_powerpc = " file://ppc-sfp-machine.patch \
67 file://ppc-soft-fp-20070115.patch \
68 file://ppc-ld-nofpu-20070104.patch \
69 file://ppc-ports-ld-nofpu-20070114.patch \
70 file://powerpc-sqrt-hack.diff \
71 file://glibc-2.5-soft-fp-separate-strong-alias.patch"
73 SRC_URI_append_nios2 = " \
74 file://sysdeps-nios2.patch \
75 file://nios2-elf.patch \
76 file://nios2-iconv.patch \
77 file://nios2-ld-collate.patch \
80 S = "${WORKDIR}/glibc-${PV}"
81 B = "${WORKDIR}/build-${TARGET_SYS}"
83 EXTRA_OECONF = "\
84 --enable-kernel=${OLDEST_KERNEL} \
85 --without-cvs --disable-profile --disable-debug --without-gd \
86 --enable-clocale=gnu \
87 --enable-add-ons=${GLIBC_ADDONS} \
88 --with-headers=${STAGING_INCDIR} \
89 --without-selinux \
90 ${GLIBC_EXTRA_OECONF} \
93 EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
95 do_munge() {
96 # Integrate ports and libidn into tree
97 mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports
98 mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
100 # Ports isn't really working... Fix it
101 # Some of this is rather dirty, but it seems to be the only
102 # quick way to get this cruft to compile
103 rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
104 ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
105 cp ${S}/nptl/sysdeps/pthread/bits/sigthread.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
106 cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
107 cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
108 cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h
109 cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h
110 cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h
111 cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h
112 # Copy in generic stuff for not yet implemented headers
113 for i in ${S}/bits/*.h; do
114 F=`basename $i`
115 [ "$F" = "local_lim.h" ] && continue
116 [ "$F" = "errno.h" ] && continue
117 test -e ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/$F || test -e ${S}/ports/sysdeps/arm/bits/$F || test -e ${S}/sysdeps/unix/sysv/linux/bits/$F || test -e ${S}/sysdeps/ieee754/bits/$F || cp $i ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
118 done
119 # This is harmful; we need to get the one from nptl/sysdeps/pthreads
120 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h
121 # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h
122 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
123 # Obsoleted by sysdeps/gnu/bits/utmp.h
124 rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
127 addtask munge before do_patch after do_unpack
130 do_configure () {
131 # override this function to avoid the autoconf/automake/aclocal/autoheader
132 # calls for now
133 # don't pass CPPFLAGS into configure, since it upsets the kernel-headers
134 # version check and doesn't really help with anything
135 if [ -z "`which rpcgen`" ]; then
136 echo "rpcgen not found. Install glibc-devel."
137 exit 1
139 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
140 CPPFLAGS="" oe_runconf
143 rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
144 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
145 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
147 do_compile () {
148 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
149 unset LDFLAGS
150 base_do_compile
152 cd ${S}/sunrpc/rpcsvc
153 for r in ${rpcsvc}; do
154 h=`echo $r|sed -e's,\.x$,.h,'`
155 rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
156 done
160 require glibc-stage.inc
162 require glibc-package.inc
164 SRC_URI[archive.md5sum] = "1fb29764a6a650a4d5b409dda227ac9f"
165 SRC_URI[archive.sha256sum] = "9b2e12bb1eafb55ab2e5a868532b8e6ec39216c66c25b8998d7474bc4d4eb529"
166 SRC_URI[ports.md5sum] = "183f6d46e8fa5e4b2aff240ab1586c2e"
167 SRC_URI[ports.sha256sum] = "80c38a005325e7539012bd665fb8e06af9ee9bfc74efb236ebff121265bfd463"
168 SRC_URI[libidn.md5sum] = "8787868ba8962d9b125997ec2f25ac01"
169 SRC_URI[libidn.sha256sum] = "de77e49e0beee6061d4c6e480f322566ba25d4e5e018c456a18ea4a8da5c0ede"