summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc_2.35.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glibc/glibc_2.35.bb')
-rw-r--r--meta/recipes-core/glibc/glibc_2.35.bb122
1 files changed, 122 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb
new file mode 100644
index 0000000000..2903a4001f
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc_2.35.bb
@@ -0,0 +1,122 @@
1require glibc.inc
2require glibc-version.inc
3
4CVE_CHECK_WHITELIST += "CVE-2020-10029 CVE-2021-27645"
5
6# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010022
7# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010023
8# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010024
9# Upstream glibc maintainers dispute there is any issue and have no plans to address it further.
10# "this is being treated as a non-security bug and no real threat."
11CVE_CHECK_WHITELIST += "CVE-2019-1010022 CVE-2019-1010023 CVE-2019-1010024"
12
13# glibc https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-1010025
14# Allows for ASLR bypass so can bypass some hardening, not an exploit in itself, may allow
15# easier access for another. "ASLR bypass itself is not a vulnerability."
16# Potential patch at https://sourceware.org/bugzilla/show_bug.cgi?id=22853
17CVE_CHECK_WHITELIST += "CVE-2019-1010025"
18
19DEPENDS += "gperf-native bison-native make-native"
20
21NATIVESDKFIXES ?= ""
22NATIVESDKFIXES:class-nativesdk = "\
23 file://0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
24 file://0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
25 file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
26 file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
27 file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \
28 file://0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch \
29"
30
31SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
32 file://etc/ld.so.conf \
33 file://generate-supported.mk \
34 file://makedbs.sh \
35 \
36 ${NATIVESDKFIXES} \
37 file://0009-yes-within-the-path-sets-wrong-config-variables.patch \
38 file://0010-eglibc-Cross-building-and-testing-instructions.patch \
39 file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \
40 file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \
41 file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \
42 file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
43 file://0016-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
44 file://0017-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
45 file://0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
46 file://0019-powerpc-Do-not-ask-compiler-for-finding-arch.patch \
47 file://0021-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \
48 file://0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \
49 file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \
50 "
51S = "${WORKDIR}/git"
52B = "${WORKDIR}/build-${TARGET_SYS}"
53
54PACKAGES_DYNAMIC = ""
55
56# the -isystem in bitbake.conf screws up glibc do_stage
57BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
58TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
59
60GLIBC_BROKEN_LOCALES = ""
61
62GLIBCPIE ??= ""
63
64EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
65 --disable-profile \
66 --disable-debug --without-gd \
67 --enable-clocale=gnu \
68 --with-headers=${STAGING_INCDIR} \
69 --without-selinux \
70 --enable-tunables \
71 --enable-bind-now \
72 --enable-stack-protector=strong \
73 --disable-crypt \
74 --with-default-link \
75 ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \
76 ${GLIBCPIE} \
77 ${GLIBC_EXTRA_OECONF}"
78
79EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
80
81EXTRA_OECONF:append:x86 = " ${@bb.utils.contains_any('TUNE_FEATURES', 'i586 c3', '--disable-cet', '--enable-cet', d)}"
82EXTRA_OECONF:append:x86-64 = " --enable-cet"
83
84PACKAGECONFIG ??= "nscd memory-tagging"
85PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd"
86PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging"
87
88do_patch:append() {
89 bb.build.exec_func('do_fix_readlib_c', d)
90}
91
92do_fix_readlib_c () {
93 sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
94}
95
96do_configure () {
97# override this function to avoid the autoconf/automake/aclocal/autoheader
98# calls for now
99# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
100# version check and doesn't really help with anything
101 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
102 find ${S} -name "configure" | xargs touch
103 CPPFLAGS="" oe_runconf
104}
105
106LDFLAGS += "-fuse-ld=bfd"
107do_compile () {
108 base_do_compile
109 echo "Adjust ldd script"
110 if [ -n "${RTLDLIST}" ]
111 then
112 prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
113 # remove duplicate entries
114 newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | LC_ALL=C sort -u)`
115 echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\""
116 sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#"
117 fi
118}
119
120require glibc-package.inc
121
122BBCLASSEXTEND = "nativesdk"