diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc_2.37.bb')
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.37.bb | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc_2.37.bb b/meta/recipes-core/glibc/glibc_2.37.bb new file mode 100644 index 0000000000..f299a3004a --- /dev/null +++ b/meta/recipes-core/glibc/glibc_2.37.bb | |||
@@ -0,0 +1,126 @@ | |||
1 | require glibc.inc | ||
2 | require glibc-version.inc | ||
3 | |||
4 | CVE_CHECK_IGNORE += "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." | ||
11 | CVE_CHECK_IGNORE += "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 | ||
17 | CVE_CHECK_IGNORE += "CVE-2019-1010025" | ||
18 | |||
19 | # This has been integrated into the 2.36 branch as of c399271 so is now fixed | ||
20 | CVE_CHECK_IGNORE += "CVE-2022-39046" | ||
21 | |||
22 | DEPENDS += "gperf-native bison-native" | ||
23 | |||
24 | NATIVESDKFIXES ?= "" | ||
25 | NATIVESDKFIXES:class-nativesdk = "\ | ||
26 | file://0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ | ||
27 | file://0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ | ||
28 | file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ | ||
29 | file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ | ||
30 | file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \ | ||
31 | file://0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch \ | ||
32 | " | ||
33 | |||
34 | SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | ||
35 | file://etc/ld.so.conf \ | ||
36 | file://generate-supported.mk \ | ||
37 | file://makedbs.sh \ | ||
38 | \ | ||
39 | ${NATIVESDKFIXES} \ | ||
40 | file://0009-yes-within-the-path-sets-wrong-config-variables.patch \ | ||
41 | file://0010-eglibc-Cross-building-and-testing-instructions.patch \ | ||
42 | file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \ | ||
43 | file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \ | ||
44 | file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \ | ||
45 | file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ | ||
46 | file://0015-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ | ||
47 | file://0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ | ||
48 | file://0017-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \ | ||
49 | file://0018-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \ | ||
50 | file://0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ | ||
51 | file://0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch \ | ||
52 | file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ | ||
53 | file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ | ||
54 | " | ||
55 | S = "${WORKDIR}/git" | ||
56 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
57 | |||
58 | PACKAGES_DYNAMIC = "" | ||
59 | |||
60 | # the -isystem in bitbake.conf screws up glibc do_stage | ||
61 | BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" | ||
62 | TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" | ||
63 | |||
64 | GLIBC_BROKEN_LOCALES = "" | ||
65 | |||
66 | GLIBCPIE ??= "" | ||
67 | |||
68 | EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | ||
69 | --disable-profile \ | ||
70 | --disable-debug --without-gd \ | ||
71 | --enable-clocale=gnu \ | ||
72 | --with-headers=${STAGING_INCDIR} \ | ||
73 | --without-selinux \ | ||
74 | --enable-tunables \ | ||
75 | --enable-bind-now \ | ||
76 | --enable-stack-protector=strong \ | ||
77 | --disable-crypt \ | ||
78 | --with-default-link \ | ||
79 | ${@bb.utils.contains_any('SELECTED_OPTIMIZATION', '-O0 -Og', '--disable-werror', '', d)} \ | ||
80 | ${GLIBCPIE} \ | ||
81 | ${GLIBC_EXTRA_OECONF}" | ||
82 | |||
83 | EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}" | ||
84 | |||
85 | EXTRA_OECONF:append:x86 = " ${@bb.utils.contains_any('TUNE_FEATURES', 'i586 c3', '--disable-cet', '--enable-cet', d)}" | ||
86 | EXTRA_OECONF:append:x86-64 = " --enable-cet" | ||
87 | |||
88 | PACKAGECONFIG ??= "nscd memory-tagging" | ||
89 | PACKAGECONFIG[nscd] = "--enable-nscd,--disable-nscd" | ||
90 | PACKAGECONFIG[memory-tagging] = "--enable-memory-tagging,--disable-memory-tagging" | ||
91 | |||
92 | do_patch:append() { | ||
93 | bb.build.exec_func('do_fix_readlib_c', d) | ||
94 | } | ||
95 | |||
96 | do_fix_readlib_c () { | ||
97 | sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c | ||
98 | } | ||
99 | |||
100 | do_configure () { | ||
101 | # override this function to avoid the autoconf/automake/aclocal/autoheader | ||
102 | # calls for now | ||
103 | # don't pass CPPFLAGS into configure, since it upsets the kernel-headers | ||
104 | # version check and doesn't really help with anything | ||
105 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | ||
106 | find ${S} -name "configure" | xargs touch | ||
107 | CPPFLAGS="" oe_runconf | ||
108 | } | ||
109 | |||
110 | LDFLAGS += "-fuse-ld=bfd" | ||
111 | do_compile () { | ||
112 | base_do_compile | ||
113 | echo "Adjust ldd script" | ||
114 | if [ -n "${RTLDLIST}" ] | ||
115 | then | ||
116 | prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` | ||
117 | # remove duplicate entries | ||
118 | newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | LC_ALL=C sort -u)` | ||
119 | echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\"" | ||
120 | sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#" | ||
121 | fi | ||
122 | } | ||
123 | |||
124 | require glibc-package.inc | ||
125 | |||
126 | BBCLASSEXTEND = "nativesdk" | ||