5 ARM_INSTRUCTION_SET
= "arm"
7 PACKAGES_DYNAMIC
= "libc6*"
8 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}"
14 GLIBC_ADDONS ?
= "ports,nptl,libidn"
16 GLIBC_BROKEN_LOCALES
= " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
19 #
For now
, we will skip building of a gcc package
if it is a uclibc one
20 #
and our build is
not a uclibc one
, and we skip a glibc one
if our build
23 # See the note in gcc
/gcc_3.4
.0.oe
26 python __anonymous
() {
28 uc_os
= (re.match
('.
*uclibc$'
, bb.
data.getVar
('TARGET_OS'
, d
, 1)) != None
)
30 raise bb.parse.SkipPackage
("incompatible with target %s" %
31 bb.
data.getVar
('TARGET_OS'
, d
, 1))
34 RDEPENDS_$
{PN
}-dev
= "linux-libc-headers-dev"
36 SRC_URI
= "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2;name=archive \
37 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2;name=ports \
38 ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2;name=libidn \
39 file://nscd-init.patch;striplevel=0 \
40 file://arm-memcpy.patch \
41 file://arm-longlong.patch \
42 file://fhs-linux-paths.patch \
43 file://dl-cache-libcmp.patch \
44 file://ldsocache-varrun.patch \
45 file://nptl-crosscompile.patch \
46 file://glibc-check_pf.patch;striplevel=0 \
47 file://ldd-unbash.patch \
48 file://glibc-arm-IO-acquire-lock-fix.diff \
49 file://generic-bits_select.h \
50 file://generic-bits_types.h \
51 file://generic-bits_typesizes.h \
52 file://generic-bits_time.h \
53 file://etc/ld.so.conf \
54 file://generate-supported.mk \
55 file://march-i686.patch;striplevel=0 \
56 file://arm-lowlevellock-include-tls.patch \
57 file://glibc-2.9-enable-binutils-2.2.patch \
58 file://armv4t-interworking.patch \
59 file://PTR_MANGLE.patch \
62 # Build fails on sh3
and sh4 without additional patches
63 SRC_URI_append_sh3
= " file://no-z-defs.patch"
64 SRC_URI_append_sh4
= " file://no-z-defs.patch"
66 #powerpc patches
to add support
for soft
-float
67 SRC_URI_append_powerpc
= " file://powerpc-sqrt-hack.diff"
69 SRC_URI_append_nios2
= " \
70 file://sysdeps-nios2.patch \
71 file://nios2-elf.patch \
74 S
= "${WORKDIR}/glibc-${PV}"
75 B
= "${WORKDIR}/build-${TARGET_SYS}"
77 EXTRA_OECONF
= "--enable-kernel=${OLDEST_KERNEL} \
78 --without-cvs --disable-profile --disable-debug --without-gd \
79 --enable-clocale=gnu \
80 --enable-add-ons=${GLIBC_ADDONS} \
81 --with-headers=${STAGING_INCDIR} \
83 ${GLIBC_EXTRA_OECONF}"
85 EXTRA_OECONF
+= "${@get_glibc_fpu_setting(bb, d)}"
88 # Integrate ports
and libidn into tree
89 mv $
{WORKDIR
}/glibc
-ports
-$
{PV
} $
{S
}/ports
90 mv $
{WORKDIR
}/glibc
-libidn
-$
{PV
} $
{S
}/libidn
92 # Ports isn't really working... Fix it
93 # Some of this is rather dirty
, but it seems
to be the only
94 # quick way
to get this cruft
to compile
95 rm
-rf $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/linuxthreads
96 ln
-s nptl $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/linuxthreads
97 cp $
{S
}/nptl
/sysdeps
/pthread
/bits
/sigthread.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/
98 cp $
{S
}/sysdeps
/unix
/sysv
/linux
/i386
/bits
/wchar.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/
99 cp $
{S
}/sysdeps
/wordsize
-32/bits
/wordsize.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/
100 cp $
{WORKDIR
}/generic
-bits_select.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/select.h
101 cp $
{WORKDIR
}/generic
-bits_types.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/types.h
102 cp $
{WORKDIR
}/generic
-bits_typesizes.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/typesizes.h
103 cp $
{WORKDIR
}/generic
-bits_time.h $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/time.h
104 # Copy in generic stuff
for not yet implemented headers
105 for i in $
{S
}/bits
/*.h
; do
107 [ "$F" = "local_lim.h" ] && continue
108 [ "$F" = "errno.h" ] && continue
109 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
/
111 # This is harmful
; we need to get the one from nptl/sysdeps/pthreads
112 rm
-f $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/libc
-lock.h
113 # Obsoleted by sysdeps
/arm
/{fpu
,eabi
}/bits
/fenv.h
114 rm
-f $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/fenv.h
115 # Obsoleted by sysdeps
/gnu
/bits
/utmp.h
116 rm
-f $
{S
}/ports
/sysdeps
/unix
/sysv
/linux
/arm
/bits
/utmp.h
119 addtask munge
before do_patch
after do_unpack
123 #
/var
/db was
not included
to FHS
124 sed
-i s
:/var
/db
/nscd
:/var
/run
/nscd
: $
{S
}/nscd
/nscd.h
125 # override this
function to avoid the autoconf
/automake
/aclocal
/autoheader
127 # don't pass CPPFLAGS into configure
, since it upsets the kernel
-headers
128 # version check
and doesn't really help with anything
129 if [ -z
"`which rpcgen`" ]; then
130 echo
"rpcgen not found. Install glibc-devel."
133 (cd $
{S
} && gnu
-configize
) || die
"failure in running gnu-configize"
134 CPPFLAGS
="" oe_runconf
137 rpcsvc
= "bootparam_prot.x nlm_prot.x rstat.x \
138 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
139 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
142 #
-Wl
,-rpath
-link
<staging
>/lib in LDFLAGS can cause breakage
if another glibc is in staging
146 cd $
{S
}/sunrpc
/rpcsvc
147 for r in $
{rpcsvc
}; do
148 h
=`echo $r|sed
-e's
,\.x$
,.h
,'`
149 rpcgen
-h $r
-o $h || oewarn
"unable to generate header for $r"
154 require glibc
-stage.inc
156 require glibc
-package.inc
158 SRC_URI
[archive.md5sum
] = "ee71dedf724dc775e4efec9b823ed3be"
159 SRC_URI
[archive.sha256sum
] = "cbad3e637eab613184405a87a2bf08a41991a0e512a3ced60d120effc73de667"
160 SRC_URI
[ports.md5sum
] = "816b2d48a95ddc23b27fea03a1996443"
161 SRC_URI
[ports.sha256sum
] = "b1f1ec9720036a3a33598b8478eef102535444a083d5b5813a6981ed74ab4071"
162 SRC_URI
[libidn.md5sum
] = "8ef88560ec608d5923ee05eb5f0e15ea"
163 SRC_URI
[libidn.sha256sum
] = "0fa72d1dd06a30642d3bb20a659f4ed0f4af54a205d7102896b68169b38676dc"