3 ARM_INSTRUCTION_SET = "arm"
5 PACKAGES_DYNAMIC = "libc6*"
6 RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
10 # the -isystem in bitbake.conf screws up glibc do_stage
11 BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
12 TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
15 FILESPATHPKG =. "glibc-2.4:"
17 GLIBC_ADDONS ?= "ports,nptl,libidn"
19 GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
22 # For now, we will skip building of a gcc package if it is a uclibc one
23 # and our build is not a uclibc one, and we skip a glibc one if our build
26 # See the note in gcc/gcc_3.4.0.oe
29 python __anonymous () {
31 uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
33 raise bb.parse.SkipPackage("incompatible with target %s" %
34 bb.data.getVar('TARGET_OS', d, 1))
37 RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
39 # file://noinfo.patch;patch=1
40 # file://ldconfig.patch;patch=1;pnum=0
41 # file://arm-machine-gmon.patch;patch=1;pnum=0 \
43 # file://arm-ioperm.patch;patch=1;pnum=0 \
44 # file://ldd.patch;patch=1;pnum=0 \
45 SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
46 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2 \
47 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \
48 file://arm-memcpy.patch;patch=1 \
49 file://arm-longlong.patch;patch=1 \
50 file://fhs-linux-paths.patch;patch=1 \
51 file://dl-cache-libcmp.patch;patch=1 \
52 file://ldsocache-varrun.patch;patch=1 \
53 file://nptl-crosscompile.patch;patch=1 \
54 file://glibc-check_pf.patch;patch=1;pnum=0 \
55 # file://glibc-2.4-compile.patch;patch=1 \
56 # file://glibc-2.4-openat-3.patch;patch=1 \
57 # file://fixup-aeabi-syscalls.patch;patch=1 \
58 # file://zecke-sane-readelf.patch;patch=1 \
59 file://ldd-unbash.patch;patch=1 \
60 file://glibc-arm-IO-acquire-lock-fix.diff;patch=1 \
61 file://all_glibc-i586-chk.patch;patch=1 \
62 file://glibc-2.6.1-use-short-for-fnstsw.patch;patch=1 \
63 file://glibc-use-isystem-include-fixed.patch;patch=1 \
64 file://generic-bits_select.h \
65 file://generic-bits_types.h \
66 file://generic-bits_typesizes.h \
67 file://generic-bits_time.h \
68 file://etc/ld.so.conf \
69 file://generate-supported.mk \
70 file://march-i686.patch;patch=1;pnum=0 \
71 file://glibc-arm-no-asm-page.patch;patch=1 \
75 # Build fails on sh3 and sh4 without additional patches
76 SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
77 SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
79 #powerpc patches to add support for soft-float
80 SRC_URI_append_powerpc= " file://powerpc-sqrt-hack.diff;patch=1"
82 S = "${WORKDIR}/glibc-${PV}"
83 B = "${WORKDIR}/build-${TARGET_SYS}"
85 EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
86 --without-cvs --disable-profile --disable-debug --without-gd \
87 --enable-clocale=gnu \
88 --enable-add-ons=${GLIBC_ADDONS} \
89 --with-headers=${STAGING_INCDIR} \
91 ${GLIBC_EXTRA_OECONF}"
93 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
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
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/
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
131 # override this function to avoid the autoconf/automake/aclocal/autoheader
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."
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"
148 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
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"
160 require glibc-stage.inc
162 require glibc-package.inc