summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc_2.20.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc_2.20.bb')
-rw-r--r--meta/recipes-core/glibc/glibc_2.20.bb165
1 files changed, 165 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc_2.20.bb b/meta/recipes-core/glibc/glibc_2.20.bb
new file mode 100644
index 0000000000..a0736cdeec
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc_2.20.bb
@@ -0,0 +1,165 @@
1require glibc.inc
2
3DEPENDS += "gperf-native kconfig-frontends-native"
4
5PV = "2.20"
6
7SRCREV = "b8079dd0d360648e4e8de48656c5c38972621072"
8
9SRC_URI = "git://sourceware.org/git/glibc.git;branch=release/${PV}/master \
10 file://IO-acquire-lock-fix.patch \
11 file://mips-rld-map-check.patch \
12 file://etc/ld.so.conf \
13 file://generate-supported.mk \
14 file://glibc.fix_sqrt2.patch \
15 file://multilib_readlib.patch \
16 file://ppc-sqrt_finite.patch \
17 file://ppc_slow_ieee754_sqrt.patch \
18 file://add_resource_h_to_wait_h.patch \
19 file://fsl-ppc-no-fsqrt.patch \
20 file://0001-R_ARM_TLS_DTPOFF32.patch \
21 file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
22 file://fix-tibetian-locales.patch \
23 file://ppce6500-32b_slow_ieee754_sqrt.patch \
24 file://grok_gold.patch \
25 file://fix_am_rootsbindir.patch \
26 ${EGLIBCPATCHES} \
27 ${CVEPATCHES} \
28 "
29EGLIBCPATCHES = "\
30 file://timezone-re-written-tzselect-as-posix-sh.patch \
31 file://eglibc.patch \
32 file://option-groups.patch \
33 file://GLRO_dl_debug_mask.patch \
34 file://eglibc-header-bootstrap.patch \
35 file://eglibc-resolv-dynamic.patch \
36 file://eglibc-ppc8xx-cache-line-workaround.patch \
37 file://eglibc-sh4-fpscr_values.patch \
38 file://eglibc-use-option-groups.patch \
39 "
40# file://eglibc-install-pic-archives.patch \
41# file://initgroups_keys.patch \
42#
43CVEPATCHES = "\
44 file://CVE-2015-1781-resolv-nss_dns-dns-host.c-buffer-overf.patch \
45"
46
47CVEPATCHES = "\
48 file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \
49 file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \
50 file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \
51 "
52LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
53 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
54 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
55 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
56
57SRC_URI_append_class-nativesdk = " file://ld-search-order.patch \
58 file://relocatable_sdk.patch \
59 file://relocatable_sdk_fix_openpath.patch \
60 "
61S = "${WORKDIR}/git"
62B = "${WORKDIR}/build-${TARGET_SYS}"
63
64PACKAGES_DYNAMIC = ""
65
66# the -isystem in bitbake.conf screws up glibc do_stage
67BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
68TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
69
70GLIBC_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"
71
72#
73# For now, we will skip building of a gcc package if it is a uclibc one
74# and our build is not a uclibc one, and we skip a glibc one if our build
75# is a uclibc build.
76#
77# See the note in gcc/gcc_3.4.0.oe
78#
79
80python __anonymous () {
81 import re
82 uc_os = (re.match('.*uclibc$', d.getVar('TARGET_OS', True)) != None)
83 if uc_os:
84 raise bb.parse.SkipPackage("incompatible with target %s" %
85 d.getVar('TARGET_OS', True))
86}
87
88EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
89 --without-cvs --disable-profile \
90 --disable-debug --without-gd \
91 --enable-clocale=gnu \
92 --enable-add-ons \
93 --with-headers=${STAGING_INCDIR} \
94 --without-selinux \
95 --enable-obsolete-rpc \
96 --with-kconfig=${STAGING_BINDIR_NATIVE} \
97 --disable-nscd \
98 ${GLIBC_EXTRA_OECONF}"
99
100EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
101EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
102
103
104do_patch_append() {
105 bb.build.exec_func('do_fix_readlib_c', d)
106}
107
108# for mips glibc now builds syscall tables for all abi's
109# so we make sure that we choose right march option which is
110# compatible with o32,n32 and n64 abi's
111# e.g. -march=mips32 is not compatible with n32 and n64 therefore
112# we filter it out in such case -march=from-abi which will be
113# mips1 when using o32 and mips3 when using n32/n64
114
115TUNE_CCARGS_mips := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
116TUNE_CCARGS_mipsel := "${@oe_filter_out('-march=mips32', '${TUNE_CCARGS}', d)}"
117
118do_fix_readlib_c () {
119 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
120}
121
122do_configure () {
123# override this function to avoid the autoconf/automake/aclocal/autoheader
124# calls for now
125# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
126# version check and doesn't really help with anything
127 if [ -z "`which rpcgen`" ]; then
128 echo "rpcgen not found. Install glibc-devel."
129 exit 1
130 fi
131 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
132 find ${S} -name "configure" | xargs touch
133 CPPFLAGS="" oe_runconf
134}
135
136rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
137 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
138 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
139
140do_compile () {
141 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
142 unset LDFLAGS
143 base_do_compile
144 (
145 cd ${S}/sunrpc/rpcsvc
146 for r in ${rpcsvc}; do
147 h=`echo $r|sed -e's,\.x$,.h,'`
148 rpcgen -h $r -o $h || bbwarn "unable to generate header for $r"
149 done
150 )
151 echo "Adjust ldd script"
152 if [ -n "${RTLDLIST}" ]
153 then
154 prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
155 if [ "${prevrtld}" != "${RTLDLIST}" ]
156 then
157 sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
158 fi
159 fi
160
161}
162
163require glibc-package.inc
164
165BBCLASSEXTEND = "nativesdk"