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