blob: 18f40660ece08075a42247656a53c0cfe569c10e [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -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"
9
10SRCREV ?= "e742928c1592b43db6809db4f39e67be151cdd27"
11
12SRCBRANCH ?= "release/${PV}/master"
13
14GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
15UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
16
17SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
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-yes-within-the-path-sets-wrong-config-variables.patch \
29 file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
30 file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
31 file://0018-eglibc-Cross-building-and-testing-instructions.patch \
32 file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
33 file://0020-eglibc-cherry-picked-from.patch \
34 file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
35 file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
36 file://0023-eglibc-Install-PIC-archives.patch \
37 file://0025-eglibc-Forward-port-cross-locale-generation-support.patch \
38 file://0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch \
39"
40
41SRC_URI += "\
42 file://etc/ld.so.conf \
43 file://generate-supported.mk \
44"
45
46SRC_URI_append_class-nativesdk = "\
47 file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
48 file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
49 file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
50 file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
51"
52
53S = "${WORKDIR}/git"
54B = "${WORKDIR}/build-${TARGET_SYS}"
55
56PACKAGES_DYNAMIC = ""
57
58# the -isystem in bitbake.conf screws up glibc do_stage
59BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
60TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
61
62GLIBC_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"
63
64#
65# We will skip parsing glibc when target system C library selection is not glibc
66# this helps in easing out parsing for non-glibc system libraries
67#
68COMPATIBLE_HOST_libc-musl_class-target = "null"
69COMPATIBLE_HOST_libc-uclibc_class-target = "null"
70
71EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
72 --without-cvs --disable-profile \
73 --disable-debug --without-gd \
74 --enable-clocale=gnu \
75 --enable-add-ons \
76 --with-headers=${STAGING_INCDIR} \
77 --without-selinux \
78 --enable-obsolete-rpc \
79 ${GLIBC_EXTRA_OECONF}"
80
81EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
82EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
83
84
85do_patch_append() {
86 bb.build.exec_func('do_fix_readlib_c', d)
87}
88
89do_fix_readlib_c () {
90 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
91}
92
93do_configure () {
94# override this function to avoid the autoconf/automake/aclocal/autoheader
95# calls for now
96# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
97# version check and doesn't really help with anything
98 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
99 find ${S} -name "configure" | xargs touch
100 CPPFLAGS="" oe_runconf
101}
102
103rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
104 yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
105 rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
106
107do_compile () {
108 # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
109 unset LDFLAGS
110 base_do_compile
111 (
112 cd ${S}/sunrpc/rpcsvc
113 for r in ${rpcsvc}; do
114 h=`echo $r|sed -e's,\.x$,.h,'`
115 rm -f $h
116 ${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
117 done
118 )
119 echo "Adjust ldd script"
120 if [ -n "${RTLDLIST}" ]
121 then
122 prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
123 if [ "${prevrtld}" != "${RTLDLIST}" ]
124 then
125 sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
126 fi
127 fi
128
129}
130
131require glibc-package.inc
132
133BBCLASSEXTEND = "nativesdk"