summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc_2.15.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc_2.15.bb')
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.15.bb232
1 files changed, 232 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc_2.15.bb b/meta/recipes-core/eglibc/eglibc_2.15.bb
new file mode 100644
index 0000000000..6d66342d59
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc_2.15.bb
@@ -0,0 +1,232 @@
1require eglibc.inc
2
3SRCREV = "16540"
4
5DEPENDS += "gperf-native"
6PR_append = "+svnr${SRCPV}"
7
8EGLIBC_BRANCH="eglibc-2_15"
9SRC_URI = "svn://www.eglibc.org/svn/branches/;module=${EGLIBC_BRANCH};proto=http \
10 file://eglibc-svn-arm-lowlevellock-include-tls.patch \
11 file://IO-acquire-lock-fix.patch \
12 file://mips-rld-map-check.patch \
13 file://stack-protector-test.patch \
14 file://armv4-eabi-compile-fix.patch \
15 file://etc/ld.so.conf \
16 file://generate-supported.mk \
17 file://ppc-sqrt.patch \
18 file://multilib_readlib.patch \
19 file://eglibc-rpc-export-again.patch \
20 file://glibc-2.14-libdl-crash.patch \
21 file://use-sysroot-cxx-headers.patch \
22 file://x86_fenv.patch \
23 file://ppc-sqrt_finite.patch \
24 "
25LIC_FILES_CHKSUM = "file://LICENSES;md5=98a1128c4b58120182cbea3b1752d8b9 \
26 file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
27 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
28 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff "
29
30SRC_URI_append_virtclass-nativesdk = " file://ld-search-order.patch"
31S = "${WORKDIR}/${EGLIBC_BRANCH}/libc"
32B = "${WORKDIR}/build-${TARGET_SYS}"
33
34PACKAGES_DYNAMIC = "libc6*"
35RPROVIDES_${PN}-dev = "libc6-dev virtual-libc-dev"
36PROVIDES_${PN}-dbg = "glibc-dbg"
37
38# the -isystem in bitbake.conf screws up glibc do_stage
39BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
40TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
41
42GLIBC_ADDONS ?= "ports,nptl,libidn"
43
44GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
45
46FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
47
48#
49# For now, we will skip building of a gcc package if it is a uclibc one
50# and our build is not a uclibc one, and we skip a glibc one if our build
51# is a uclibc build.
52#
53# See the note in gcc/gcc_3.4.0.oe
54#
55
56python __anonymous () {
57 import bb, re
58 uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', 1)) != None)
59 if uc_os:
60 raise bb.parse.SkipPackage("incompatible with target %s" %
61 d.getVar('TARGET_OS', 1))
62}
63
64export libc_cv_slibdir = "${base_libdir}"
65
66EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
67 --without-cvs --disable-profile --disable-debug --without-gd \
68 --enable-clocale=gnu \
69 --enable-add-ons=${GLIBC_ADDONS},ports \
70 --with-headers=${STAGING_INCDIR} \
71 --without-selinux \
72 ${GLIBC_EXTRA_OECONF}"
73
74EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
75
76do_unpack_append() {
77 bb.build.exec_func('do_move_ports', d)
78}
79
80do_move_ports() {
81 if test -d ${WORKDIR}/${EGLIBC_BRANCH}/ports ; then
82 rm -rf ${S}/ports
83 mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/
84 fi
85}
86
87do_patch_append() {
88 bb.build.exec_func('do_fix_ia_headers', d)
89 bb.build.exec_func('do_fix_readlib_c', d)
90}
91
92# for mips eglibc now builds syscall tables for all abi's
93# so we make sure that we choose right march option which is
94# compatible with o32,n32 and n64 abi's
95# e.g. -march=mips32 is not compatible with n32 and n64 therefore
96# we filter it out in such case -march=from-abi which will be
97# mips1 when using o32 and mips3 when using n32/n64
98
99TUNE_CCARGS_mips := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
100
101# We need to ensure that all of the i386 and x86_64 headers are identical
102# to support the multilib case. We do this by copying headers from x86_64
103# to i386 directories. Normally when hand building eglibc or a combined
104# system you would build 32-bit, and then overwrite any files with the x86_64
105# versions.
106#
107# Each time eglibc is updated, this will need to be re-evaluated. In order
108# to do this, disable this function. Build eglibc for a 32-bit and a 64-bit
109# IA32 target. Compare the contents of the include files -- comments specific
110# to the x86_64 version compared to the 32-bit one.
111#
112# For eglibc 2.13, each conflict noted below:
113# bits/a.out.h - Add support for __WORDSIZE = 64
114# bits/byteswap.h - Copyright date mismatch, add support for __WORDSIZE = 64
115# bits/endian.h - Comment mismatch
116# bits/environment.h - add support for __WORDSIZE = 64
117# bits/fcntl.h - Comment/Copyright date mismatch, add support for __WORDSIZE = 64
118# bits/fenv.h - Copyright date mismatch, add support for __WORDSIZE = 64
119# bits/huge_vall.h - Comment/Copyright date mismatch, remove support for older gcc
120# bits/link.h - Function name difference, add x86_64 definitions
121# bits/mathdef.h - Copyright date mismatch, add support for __WORDSIZE = 64
122# bits/mathinline.h - Copyright date mismatch, contributed by mismatch, remove support for older gcc/assembly optimization, add support for __WORDSIZE = 64
123# bits/mman.h - Header/Copyright date mismatch, add MAP_32BIT definition
124# bits/msq.h - Copyright date mismatch, add __WORDSIZE = 32 definitions
125# bits/pthread_type.h -- Contributed by added, add support for __WORDSIZE = 64
126# bits/select.h - Copyright date mismatch, add support for __WORDSIZE = 64
127# bits/semaphore.h - Copyright date mismatch, add support for __WORDSIZE = 64
128# bits/sem.h - Copyright date mismatch
129# bits/setjmp.h - Copyrgiht date mismatch, add support for __WORDSIZE = 64
130# bits/shm.h - Copyright date mismatch, add support for __WORDSIZE = 32
131# bits/sigcontext.h - Copyright date mismatch, license wording mismatch, add support for __WORDSIZE = 32
132# bits/stat.h - Copyright date mismatch, add support for __WORDSIZE = 32 and __WORDSIZE = 64
133# bits/string.h - Header/Copyright date mismatch, remove assembly optimizations
134# bits/syscall.h - different order, some different syscalls listed
135# bits/wchar.h - Change the way the definitions are done
136# bits/wordsize.h - Different header, remove license notice, add __x86_64__ support
137# bits/xtitypes.h - Header difference, different typedef format
138# bits/fpu_control.h - header difference, revised comments, updated assembly macros
139# sys/debugreg.h - Copyright date mismatch, new definition and added __WORDSIZE=64 support
140# sys/epoll.h - Copyright date mismatch, slightly different definitions
141# sys/io.h - Copyright date mismatch, slightly different assembly formats
142# sys/perm.h - Copyright date mismatch
143# sys/procfs.h - Copyright date mismatch, support for __WORDSIZE = 32
144# sys/reg.h - Copyright date mismatch, support for __WORDSIZE = 64
145# sys/ucontext.h - Copyright date mismatch, support for __WORDSIZE = 64
146# sys/user.h - Copyright date mismatch, support for __WORDSIZE = 64
147#
148# we rm something to return to the default version
149#
150do_fix_ia_headers() {
151 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h ${S}/sysdeps/unix/sysv/linux/i386/bits/a.out.h
152 cp ${S}/sysdeps/x86_64/bits/byteswap.h ${S}/sysdeps/i386/bits/byteswap.h
153 cp ${S}/sysdeps/x86_64/bits/endian.h ${S}/sysdeps/i386/bits/endian.h
154 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/environments.h ${S}/sysdeps/unix/sysv/linux/i386/bits/environments.h
155 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h ${S}/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
156 cp ${S}/sysdeps/x86_64/fpu/bits/fenv.h ${S}/sysdeps/i386/fpu/bits/fenv.h
157 rm ${S}/sysdeps/i386/bits/huge_vall.h
158 cp ${S}/sysdeps/x86_64/bits/link.h ${S}/sysdeps/i386/bits/link.h
159 cp ${S}/sysdeps/x86_64/bits/mathdef.h ${S}/sysdeps/i386/bits/mathdef.h
160 cp ${S}/sysdeps/x86_64/fpu/bits/mathinline.h ${S}/sysdeps/i386/fpu/bits/mathinline.h
161 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/mman.h ${S}/sysdeps/unix/sysv/linux/i386/bits/mman.h
162 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/msq.h ${S}/sysdeps/unix/sysv/linux/i386/bits/msq.h
163 cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
164 cp ${S}/sysdeps/x86_64/bits/select.h ${S}/sysdeps/i386/bits/select.h
165 cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
166 rm ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
167 cp ${S}/sysdeps/x86_64/bits/setjmp.h ${S}/sysdeps/i386/bits/setjmp.h
168 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/shm.h ${S}/sysdeps/unix/sysv/linux/i386/bits/shm.h
169 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h ${S}/sysdeps/unix/sysv/linux/i386/bits/sigcontext.h
170 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/stat.h ${S}/sysdeps/unix/sysv/linux/i386/bits/stat.h
171 rm ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
172 # Skip syscall.h, see do_install
173 rm ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
174 cp ${S}/sysdeps/x86_64/bits/wordsize.h ${S}/sysdeps/i386/bits/wordsize.h
175 cp ${S}/sysdeps/x86_64/bits/xtitypes.h ${S}/sysdeps/i386/bits/xtitypes.h
176 # i386 version is correct, x86_64 is incorrect for fpu_control.h
177 cp ${S}/sysdeps/i386/fpu_control.h ${S}/sysdeps/x86_64/fpu_control.h
178 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h ${S}/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
179 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h ${S}/sysdeps/unix/sysv/linux/i386/sys/epoll.h
180 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/io.h ${S}/sysdeps/unix/sysv/linux/i386/sys/io.h
181 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/perm.h ${S}/sysdeps/unix/sysv/linux/i386/sys/perm.h
182 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h ${S}/sysdeps/unix/sysv/linux/i386/sys/procfs.h
183 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/reg.h ${S}/sysdeps/unix/sysv/linux/i386/sys/reg.h
184 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h ${S}/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
185 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/user.h ${S}/sysdeps/unix/sysv/linux/i386/sys/user.h
186}
187
188do_fix_readlib_c () {
189 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
190}
191
192do_configure () {
193# override this function to avoid the autoconf/automake/aclocal/autoheader
194# calls for now
195# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
196# version check and doesn't really help with anything
197 if [ -z "`which rpcgen`" ]; then
198 echo "rpcgen not found. Install glibc-devel."
199 exit 1
200 fi
201 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
202 find ${S} -name "configure" | xargs touch
203 CPPFLAGS="" oe_runconf
204}
205
206rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
207 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
208 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
209
210do_compile () {
211 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
212 unset LDFLAGS
213 base_do_compile
214 (
215 cd ${S}/sunrpc/rpcsvc
216 for r in ${rpcsvc}; do
217 h=`echo $r|sed -e's,\.x$,.h,'`
218 rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
219 done
220 )
221 echo "Adjust ldd script"
222 if [ -n "${RTLDLIST}" ]
223 then
224 sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
225 sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
226 fi
227
228}
229
230require eglibc-package.inc
231
232BBCLASSEXTEND = "nativesdk"