diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc_2.38.bb')
-rw-r--r-- | meta/recipes-core/glibc/glibc_2.38.bb | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc_2.38.bb b/meta/recipes-core/glibc/glibc_2.38.bb new file mode 100644 index 0000000000..851aa612b1 --- /dev/null +++ b/meta/recipes-core/glibc/glibc_2.38.bb | |||
@@ -0,0 +1,128 @@ | |||
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[CVE-2023-25139] = "cpe-stable-backport: This is integrated into the 2.37 branch as of 07b9521fc6" | ||
20 | |||
21 | DEPENDS += "gperf-native bison-native" | ||
22 | |||
23 | NATIVESDKFIXES ?= "" | ||
24 | NATIVESDKFIXES:class-nativesdk = "\ | ||
25 | file://0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \ | ||
26 | file://0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \ | ||
27 | file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \ | ||
28 | file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \ | ||
29 | file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \ | ||
30 | file://0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch \ | ||
31 | " | ||
32 | |||
33 | SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | ||
34 | file://etc/ld.so.conf \ | ||
35 | file://generate-supported.mk \ | ||
36 | file://makedbs.sh \ | ||
37 | \ | ||
38 | ${NATIVESDKFIXES} \ | ||
39 | file://0009-yes-within-the-path-sets-wrong-config-variables.patch \ | ||
40 | file://0010-eglibc-Cross-building-and-testing-instructions.patch \ | ||
41 | file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \ | ||
42 | file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \ | ||
43 | file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \ | ||
44 | file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \ | ||
45 | file://0015-powerpc-Do-not-ask-compiler-for-finding-arch.patch \ | ||
46 | file://0016-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \ | ||
47 | file://0017-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \ | ||
48 | file://0018-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \ | ||
49 | file://0019-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ | ||
50 | file://0020-tzselect.ksh-Use-bin-sh-default-shell-interpreter.patch \ | ||
51 | file://0021-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ | ||
52 | file://0022-Avoid-hardcoded-build-time-paths-in-the-output-binar.patch \ | ||
53 | " | ||
54 | S = "${WORKDIR}/git" | ||
55 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
56 | |||
57 | PACKAGES_DYNAMIC = "" | ||
58 | |||
59 | # the -isystem in bitbake.conf screws up glibc do_stage | ||
60 | BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" | ||
61 | TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}" | ||
62 | |||
63 | GLIBC_BROKEN_LOCALES = "" | ||
64 | |||
65 | GLIBCPIE ??= "" | ||
66 | |||
67 | EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | ||
68 | --disable-profile \ | ||
69 | --disable-debug --without-gd \ | ||
70 | --enable-clocale=gnu \ | ||
71 | --with-headers=${STAGING_INCDIR} \ | ||
72 | --without-selinux \ | ||
73 | --enable-tunables \ | ||
74 | --enable-bind-now \ | ||
75 | --enable-stack-protector=strong \ | ||
76 | --disable-crypt \ | ||
77 | --with-default-link \ | ||
78 | --disable-werror \ | ||
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="" LD="${HOST_PREFIX}ld.bfd ${TOOLCHAIN_OPTIONS}" oe_runconf | ||
108 | } | ||
109 | |||
110 | LDFLAGS += "-fuse-ld=bfd" | ||
111 | CC += "-fuse-ld=bfd" | ||
112 | |||
113 | do_compile () { | ||
114 | base_do_compile | ||
115 | echo "Adjust ldd script" | ||
116 | if [ -n "${RTLDLIST}" ] | ||
117 | then | ||
118 | prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'` | ||
119 | # remove duplicate entries | ||
120 | newrtld=`echo $(printf '%s\n' ${prevrtld} ${RTLDLIST} | LC_ALL=C sort -u)` | ||
121 | echo "ldd \"${prevrtld} ${RTLDLIST}\" -> \"${newrtld}\"" | ||
122 | sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${newrtld}\"#" | ||
123 | fi | ||
124 | } | ||
125 | |||
126 | require glibc-package.inc | ||
127 | |||
128 | BBCLASSEXTEND = "nativesdk" | ||