blob: a13b7f94bb07e89e02efeb016f54e376a9a0780c [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001require glibc.inc
2
3LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
4 file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
6 file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
7
8DEPENDS += "gperf-native kconfig-frontends-native"
9
10SRCREV ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c"
11
Patrick Williamsf1e5d692016-03-30 15:21:19 -050012SRCBRANCH ?= "release/${PV}/master"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
14GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
15
Patrick Williamsf1e5d692016-03-30 15:21:19 -050016SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017 file://0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch \
18 file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
19 file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
20 file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
21 file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
22 file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
23 file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
24 file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
25 file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
26 file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
27 file://0014-Add-unused-attribute.patch \
28 file://0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \
29 file://0016-yes-within-the-path-sets-wrong-config-variables.patch \
30 file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
31 file://0018-eglibc-Cross-building-and-testing-instructions.patch \
32 file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \
33 file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
34 file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \
35 file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \
36 file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \
37 file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \
38 file://0025-eglibc-Install-PIC-archives.patch \
39 file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
40 file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
Patrick Williamsd7e96312015-09-22 08:09:05 -050041 file://nscd-no-bash.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050042 file://strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch \
43 file://0028-Clear-ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA-for-prel.patch \
44 file://CVE-2015-8777.patch \
45 file://CVE-2015-8779.patch \
46 file://CVE-2015-9761_1.patch \
47 file://CVE-2015-9761_2.patch \
48 file://CVE-2015-8776.patch \
49 file://CVE-2015-7547.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050"
51
52SRC_URI += "\
53 file://etc/ld.so.conf \
54 file://generate-supported.mk \
55"
56
57SRC_URI_append_class-nativesdk = "\
58 file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
59 file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
60 file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
Patrick Williamsf1e5d692016-03-30 15:21:19 -050061 file://use_64bit_atomics.patch \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062"
63
64S = "${WORKDIR}/git"
65B = "${WORKDIR}/build-${TARGET_SYS}"
66
67PACKAGES_DYNAMIC = ""
68
69# the -isystem in bitbake.conf screws up glibc do_stage
70BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
71TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
72
73GLIBC_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"
74
75#
76# We will skip parsing glibc when target system C library selection is not glibc
77# this helps in easing out parsing for non-glibc system libraries
78#
79COMPATIBLE_HOST_libc-musl_class-target = "null"
80COMPATIBLE_HOST_libc-uclibc_class-target = "null"
81
82EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
83 --without-cvs --disable-profile \
84 --disable-debug --without-gd \
85 --enable-clocale=gnu \
86 --enable-add-ons \
87 --with-headers=${STAGING_INCDIR} \
88 --without-selinux \
89 --enable-obsolete-rpc \
90 --with-kconfig=${STAGING_BINDIR_NATIVE} \
91 ${GLIBC_EXTRA_OECONF}"
92
93EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
94EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
95
96
97do_patch_append() {
98 bb.build.exec_func('do_fix_readlib_c', d)
99}
100
101do_fix_readlib_c () {
102 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
103}
104
105do_configure () {
106# override this function to avoid the autoconf/automake/aclocal/autoheader
107# calls for now
108# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
109# version check and doesn't really help with anything
110 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
111 find ${S} -name "configure" | xargs touch
112 CPPFLAGS="" oe_runconf
113}
114
115rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
116 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
117 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
118
119do_compile () {
120 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
121 unset LDFLAGS
122 base_do_compile
123 (
124 cd ${S}/sunrpc/rpcsvc
125 for r in ${rpcsvc}; do
126 h=`echo $r|sed -e's,\.x$,.h,'`
127 rm -f $h
128 ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
129 done
130 )
131 echo "Adjust ldd script"
132 if [ -n "${RTLDLIST}" ]
133 then
134 prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
135 if [ "${prevrtld}" != "${RTLDLIST}" ]
136 then
137 sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
138 fi
139 fi
140
141}
142
143require glibc-package.inc
144
145BBCLASSEXTEND = "nativesdk"