1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

glibc: Upgrade to 2.34 release

bump localedef to get __attr_access_none and __attr_access definitions
replace /bin/bash instead of @BASH@ in ldd as @BASH@ has been substituted with /bin/bash now

package libc_malloc_debug.so.0

Detailed changelog [1]

[1] https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html

(From OE-Core rev: af4e1306a78cf8c508dd911f02c103af81bc1af5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2021-04-30 14:52:51 -07:00
committed by Richard Purdie
parent 77ce05bd36
commit ad454e0266
44 changed files with 136 additions and 1443 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ GCCVERSION ?= "11.%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.37%"
GDBVERSION ?= "10.%"
GLIBCVERSION ?= "2.33"
GLIBCVERSION ?= "2.34"
LINUXLIBCVERSION ?= "5.13%"
QEMUVERSION ?= "6.0%"
GOVERSION ?= "1.16%"
@@ -25,14 +25,14 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \
file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \
\
file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
file://0018-eglibc-Cross-building-and-testing-instructions.patch \
file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
file://0021-eglibc-Forward-port-cross-locale-generation-support.patch \
file://0022-Define-DUMMY_LOCALE_T-if-not-defined.patch \
file://0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
file://0018-Remove-bash-dependency-for-nscd-init-script.patch \
file://0019-eglibc-Cross-building-and-testing-instructions.patch \
file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
"
# Makes for a rather long rev (22 characters), but...
#
+1 -1
View File
@@ -22,4 +22,4 @@ ARM_INSTRUCTION_SET:armv6 = "arm"
#
COMPATIBLE_HOST:libc-musl:class-target = "null"
PV = "2.33"
PV = "2.34"
+2 -1
View File
@@ -1,6 +1,6 @@
INHIBIT_SYSROOT_STRIP = "1"
PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src"
PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage malloc-debug libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src"
# The ld.so in this glibc supports the GNU_HASH
RPROVIDES:${PN} = "eglibc rtld(GNU_HASH)"
@@ -30,6 +30,7 @@ FILES:ldd = "${bindir}/ldd"
FILES:libsegfault = "${base_libdir}/libSegFault*"
FILES:libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
FILES:libmemusage = "${base_libdir}/libmemusage.so"
FILES:malloc-debug = "${base_libdir}/libc_malloc_debug.so.0"
FILES:libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile ${localstatedir}/db/makedbs.sh"
RDEPENDS:libnss-db = "${PN}-utils"
FILES:glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
+4 -4
View File
@@ -1,7 +1,7 @@
SRCBRANCH ?= "release/2.33/master"
PV = "2.33"
SRCREV_glibc ?= "3f5080aedd164c1f92a53552dd3e0b82ac6d2bd3"
SRCREV_localedef ?= "bd644c9e6f3e20c5504da1488448173c69c56c28"
SRCBRANCH ?= "release/2.34/master"
PV = "2.34"
SRCREV_glibc ?= "ae37d06c7d127817ba43850f0f898b793d42aea7"
SRCREV_localedef ?= "95c0221703ad970a52445e9eaf91c4aff35eebef"
GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+1 -1
View File
@@ -42,7 +42,7 @@ PARALLEL_MAKE = ""
EXTRA_OEMAKE += "SHELL=/bin/bash"
do_configure:prepend() {
sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
sed -e "s#/bin/bash#/bin/sh#" -i ${S}/elf/ldd.bash.in
}
# Enable backtrace from abort()
@@ -1,4 +1,4 @@
From d1f1671034a222417f9a829dcaa4f0c3d4f8954d Mon Sep 17 00:00:00 2001
From d34ba0833cd811f8869a6262044af55f9e7b59d8 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Sat, 7 Dec 2019 09:59:22 -0800
Subject: [PATCH] localedef: Add hardlink resolver from util-linux
@@ -1,4 +1,4 @@
From 14d256e2db009f8bac9a265e8393d7ed25050df9 Mon Sep 17 00:00:00 2001
From d7bb36a9a27e5e4c3be6378493b41286513750e9 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Sat, 7 Dec 2019 10:01:37 -0800
Subject: [PATCH] localedef: fix-ups hardlink to make it compile
@@ -1,4 +1,4 @@
From 32a4b8ae046fe4bb1b19f61378d079d44deaede7 Mon Sep 17 00:00:00 2001
From 776a53db6afba8a7ff4412aba88b0679227877f9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:48:24 +0000
Subject: [PATCH] nativesdk-glibc: Look for host system ld.so.cache as well
@@ -30,10 +30,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 9e2089cfaa..ad01674027 100644
index a08df001af..d09daf9e41 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -2175,6 +2175,14 @@ _dl_map_object (struct link_map *loader, const char *name,
@@ -2196,6 +2196,14 @@ _dl_map_object (struct link_map *loader, const char *name,
}
}
@@ -48,7 +48,7 @@ index 9e2089cfaa..ad01674027 100644
#ifdef USE_LDCONFIG
if (fd == -1
&& (__glibc_likely ((mode & __RTLD_SECURE) == 0)
@@ -2233,14 +2241,6 @@ _dl_map_object (struct link_map *loader, const char *name,
@@ -2254,14 +2262,6 @@ _dl_map_object (struct link_map *loader, const char *name,
}
#endif
@@ -1,4 +1,4 @@
From aa8393bff257e4badfd208b88473ead175c69362 Mon Sep 17 00:00:00 2001
From df18bae1eeee55ecb9db36d13fe67c58355682eb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:50:00 +0000
Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 12 insertions(+)
diff --git a/elf/dl-load.c b/elf/dl-load.c
index ad01674027..f455207e79 100644
index d09daf9e41..2c6270e2a7 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1871,7 +1871,19 @@ open_path (const char *name, size_t namelen, int mode,
@@ -1892,7 +1892,19 @@ open_path (const char *name, size_t namelen, int mode,
given on the command line when rtld is run directly. */
return -1;
@@ -1,4 +1,4 @@
From 3ea08e491a8494ff03e598b5e0fc2d8131e75da9 Mon Sep 17 00:00:00 2001
From 6af8ce8eceed86addbc188f773a2d36d83ee4042 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:51:38 +0000
Subject: [PATCH] nativesdk-glibc: Raise the size of arrays containing dl paths
@@ -26,10 +26,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
8 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 32f3bef5ea..71f3a82dc0 100644
index 2b8da8650d..3d9787bda4 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -359,6 +359,10 @@ search_cache (const char *string_table, uint32_t string_table_size,
@@ -355,6 +355,10 @@ search_cache (const char *string_table, uint32_t string_table_size,
return best;
}
@@ -41,7 +41,7 @@ index 32f3bef5ea..71f3a82dc0 100644
_dl_cache_libcmp (const char *p1, const char *p2)
{
diff --git a/elf/dl-load.c b/elf/dl-load.c
index f455207e79..a144e24fcf 100644
index 2c6270e2a7..23018d2f7e 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -115,8 +115,8 @@ enum { ncapstr = 1, max_capstrlen = 0 };
@@ -56,7 +56,7 @@ index f455207e79..a144e24fcf 100644
SYSTEM_DIRS_LEN
};
diff --git a/elf/dl-usage.c b/elf/dl-usage.c
index 6e26818bd7..f09e8b93e5 100644
index 5ad3a72559..88f26d3692 100644
--- a/elf/dl-usage.c
+++ b/elf/dl-usage.c
@@ -25,6 +25,8 @@
@@ -77,7 +77,7 @@ index 6e26818bd7..f09e8b93e5 100644
--library-path PATH use given PATH instead of content of the environment\n\
variable LD_LIBRARY_PATH\n\
--glibc-hwcaps-prepend LIST\n\
@@ -266,7 +268,7 @@ setting environment variables (which would be inherited by subprocesses).\n\
@@ -267,7 +269,7 @@ setting environment variables (which would be inherited by subprocesses).\n\
\n\
This program interpreter self-identifies as: " RTLD "\n\
",
@@ -98,10 +98,10 @@ index 91966702ca..dc86c20e83 100644
+const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 28ed637a29..5d38a60c5d 100644
index 1037e8d0cf..ffdac84952 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -176,6 +176,9 @@ static struct argp argp =
@@ -177,6 +177,9 @@ static struct argp argp =
options, parse_opt, NULL, doc, NULL, more_help, NULL
};
@@ -112,7 +112,7 @@ index 28ed637a29..5d38a60c5d 100644
a platform. */
static int
diff --git a/elf/rtld.c b/elf/rtld.c
index 596b6ac3d9..1ccd33f668 100644
index fbbd60b446..fce9940f80 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -185,6 +185,7 @@ dso_name_valid_for_suid (const char *p)
@@ -124,11 +124,11 @@ index 596b6ac3d9..1ccd33f668 100644
static void
audit_list_init (struct audit_list *list)
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index 682f949834..7eed87bc9d 100644
index 62bee28769..67b60dc88c 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -36,7 +36,7 @@
#include <gconv_parseconfdir.h>
/* This is the default path where we look for module lists. */
-static const char default_gconv_path[] = GCONV_PATH;
@@ -1,4 +1,4 @@
From 19e3e45eb1838ee80af13c3d27fcff446773211e Mon Sep 17 00:00:00 2001
From b30f380cd88ae181a4a6a3a4784206ffe3ccd19b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:35:35 -0800
Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86
@@ -1,4 +1,4 @@
From 732d4f4954fe60718870048d0583a20a7a8a8540 Mon Sep 17 00:00:00 2001
From 24bffe9c2645cd6542e29cb57786dc703cced07b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 3 Aug 2018 09:55:12 -0700
Subject: [PATCH] nativesdk-glibc: Make relocatable install for locales
@@ -41,7 +41,7 @@ index ab09122b0c..f42cc75780 100644
else
/* We really have to load some data. First see whether the name is
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index 4177fc8972..40247b1e68 100644
index 512769eaec..436619091b 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -42,7 +42,7 @@
@@ -67,7 +67,7 @@ index b3d4da0185..22f9dc1140 100644
/* Load the locale data for CATEGORY from the file specified by *NAME.
If *NAME is "", use environment variables as specified by POSIX, and
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 575b208e82..5ec630c3a4 100644
index ca0a95be99..6b98895203 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b)
@@ -0,0 +1,32 @@
From 2761400989bcbf11e10bc85f90c3a2ba1305c4ae Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 6 Mar 2021 14:48:56 -0800
Subject: [PATCH] nativesdk-glibc: Fall back to faccessat on faccess2 returns
EPERM
Fedora-specific workaround for systemd-nspawn
Upstream-Status: Inappropriate [Distro Specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
sysdeps/unix/sysv/linux/faccessat.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c
index 13160d3249..ee3ddc9b79 100644
--- a/sysdeps/unix/sysv/linux/faccessat.c
+++ b/sysdeps/unix/sysv/linux/faccessat.c
@@ -30,7 +30,11 @@ __faccessat (int fd, const char *file, int mode, int flag)
#if __ASSUME_FACCESSAT2
return ret;
#else
- if (ret == 0 || errno != ENOSYS)
+ /* Fedora-specific workaround:
+ As a workround for a broken systemd-nspawn that returns
+ EPERM when a syscall is not allowed instead of ENOSYS
+ we must check for EPERM here and fall back to faccessat. */
+ if (ret == 0 || !(errno == ENOSYS || errno == EPERM))
return ret;
if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS))
@@ -1,4 +1,4 @@
From 3d58330390a7d4f4ed32f4a9c25628af3e0dd5c1 Mon Sep 17 00:00:00 2001
From 74923ca4b1ae0ed5a2478e7d265b37534f6815d7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:01:50 +0000
Subject: [PATCH] fsl e500/e5500/e6500/603e fsqrt implementation
@@ -1,4 +1,4 @@
From 3b5fe5b1a7390cde0f07351415e3891f62d1f7e0 Mon Sep 17 00:00:00 2001
From 5da3da7f2d276c2a6ae1b04419b28e96953803ec Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:15:07 +0000
Subject: [PATCH] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
@@ -1,4 +1,4 @@
From 6b6e1dcd707017598ea3bdc2d91a761943b62218 Mon Sep 17 00:00:00 2001
From 77f1c90d67a2f8852184fb8fd95cb0ed63065dc7 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:16:38 +0000
Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out
@@ -1,4 +1,4 @@
From 297bac9429260f8df495b81d3fae8ae4c6913f5f Mon Sep 17 00:00:00 2001
From add514edf4299d1bf540d85d0aa0bd5fe0d46b78 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:20:09 +0000
Subject: [PATCH] Quote from bug 1443 which explains what the patch does :
@@ -1,4 +1,4 @@
From f389babf3c920e68b7d7391556a78ebf62a21ebe Mon Sep 17 00:00:00 2001
From c5047b8f7d1a17324cfa02b99f07a70ebcec2cf2 Mon Sep 17 00:00:00 2001
From: Ting Liu <b28495@freescale.com>
Date: Wed, 19 Dec 2012 04:39:57 -0600
Subject: [PATCH] eglibc: run libm-err-tab.pl with specific dirs in ${S}
@@ -1,4 +1,4 @@
From 4b0d41a315e66f688fef7b0c2e2b6ce9fa16ec93 Mon Sep 17 00:00:00 2001
From 133870f12ba36686dd8df1311fac32a4c5b28579 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:24:46 +0000
Subject: [PATCH] __ieee754_sqrt{,f} are now inline functions and call out
@@ -1,4 +1,4 @@
From c062a462fee53a30a85d693c8288b5bd8fe4ec6e Mon Sep 17 00:00:00 2001
From b4613f814ba7ba5db95d18116172f81a83ac8f5b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:27:10 +0000
Subject: [PATCH] sysdeps/gnu/configure.ac: handle correctly
@@ -1,4 +1,4 @@
From 0bd39d8907953f18e01742f42b24647ac7689d0a Mon Sep 17 00:00:00 2001
From 7be3e82b66394a7b242e56c6fc609e858b8e2436 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
Subject: [PATCH] 'yes' within the path sets wrong config variables
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
index 83c3a23e44..a68c946277 100644
index 4c1fac49f3..597314f476 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -157,12 +157,12 @@ else
@@ -48,7 +48,7 @@ index 83c3a23e44..a68c946277 100644
else
libc_cv_aarch64_be=no
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
index 66f755078a..a32b265bbe 100644
index 3347c13fa1..4af163c0b6 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -17,8 +17,8 @@ AC_DEFINE(SUPPORT_STATIC_PIE)
@@ -1,4 +1,4 @@
From 3feb4213628f1485000ffe1d3fd26e37a7b14336 Mon Sep 17 00:00:00 2001
From 2731fa0c7463cd160361a8ac92f3bd7f984d953d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:33:03 +0000
Subject: [PATCH] timezone: re-written tzselect as posix sh
@@ -10,27 +10,19 @@ Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
timezone/Makefile | 2 +-
timezone/tzselect.ksh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
timezone/tzselect.ksh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/timezone/Makefile b/timezone/Makefile
index 395abfeebd..2d939edf75 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -123,7 +123,7 @@ $(testdata)/XT%: testdata/XT%
cp $< $@
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
- sed -e 's|/bin/bash|$(BASH)|' \
+ sed -e 's|/bin/bash|/bin/sh|' \
-e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
index 18fce27e24..70745f9d36 100755
index 18fce27e24..7705df83d7 100755
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.
@@ -34,7 +34,7 @@ REPORT_BUGS_TO=tz@iana.org
# Specify default values for environment variables if they are unset.
@@ -1,4 +1,4 @@
From f6119b98a9caa80642d69a97edc98f57ecef5c3c Mon Sep 17 00:00:00 2001
From 412d33bbfe42a10a9b1f62afcc73fe121a0363b0 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Dec 2015 14:33:02 -0800
Subject: [PATCH] Remove bash dependency for nscd init script
@@ -1,4 +1,4 @@
From 060ba13b5ac5e90517d540f009ebdcdcf62f9685 Mon Sep 17 00:00:00 2001
From db9674ffc6583a508da1a3cb044c3ccf3febaea1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:42:58 +0000
Subject: [PATCH] eglibc: Cross building and testing instructions
@@ -1,4 +1,4 @@
From f13c2f525e9bc82ce13e4cf486f7fe0831fc3fac Mon Sep 17 00:00:00 2001
From 7856684f76c100155cad11b5b236fb31234b6e28 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:49:28 +0000
Subject: [PATCH] eglibc: Help bootstrap cross toolchain
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 include/stubs-bootstrap.h
diff --git a/Makefile b/Makefile
index 50f99ca611..31eed15f02 100644
index f98d5a9e67..c36d04da0f 100644
--- a/Makefile
+++ b/Makefile
@@ -79,9 +79,18 @@ subdir-dirs = include
@@ -52,7 +52,7 @@ index 50f99ca611..31eed15f02 100644
ifeq (yes,$(build-shared))
headers += gnu/lib-names.h
endif
@@ -416,6 +425,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh
@@ -415,6 +424,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
@@ -69,7 +69,7 @@ index 50f99ca611..31eed15f02 100644
ifndef abi-variants
installed-stubs = $(inst_includedir)/gnu/stubs.h
else
@@ -442,6 +461,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
@@ -441,6 +460,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
install-others-nosubdir: $(installed-stubs)
endif
@@ -1,4 +1,4 @@
From 330c4e50e28e29c31fb8d6ab39cdbb2af4d3def7 Mon Sep 17 00:00:00 2001
From 111ab95a85314d1e70fb159a14250354cc69d899 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:55:53 +0000
Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 12 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
index e0938c4165..ca1d7da339 100644
index 9c734ff755..974e33b4b1 100644
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -2,6 +2,7 @@ libc {
@@ -3,6 +3,7 @@ libc {
GLIBC_2.2 {
# functions used in other libraries
__xstat64; __fxstat64; __lxstat64;
@@ -1,4 +1,4 @@
From 557ed640b26bd208ce8d4a6fd725b124893668d7 Mon Sep 17 00:00:00 2001
From 4e5de801a39d66b8bd93d09f5912dcbe5db4ef04 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 01:33:49 +0000
Subject: [PATCH] eglibc: Forward port cross locale generation support
@@ -148,7 +148,7 @@ index 4841bfd05d..ffcba1fd79 100644
return NULL;
}
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 0af21e05e2..4980b0c52f 100644
index b6406b775d..bfa4adba9c 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -349,7 +349,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
@@ -160,7 +160,7 @@ index 0af21e05e2..4980b0c52f 100644
uint32_t zero = 0;
/* Handle <U0000> as a single character. */
if (nwcs == 0)
@@ -1772,8 +1772,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
@@ -1775,8 +1775,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
if ((*eptr)->nwcs == runp->nwcs)
{
@@ -170,7 +170,7 @@ index 0af21e05e2..4980b0c52f 100644
if (c == 0)
{
@@ -2000,9 +1999,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
@@ -2003,9 +2002,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
one consecutive entry. */
if (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -183,7 +183,7 @@ index 0af21e05e2..4980b0c52f 100644
&& (runp->wcs[runp->nwcs - 1]
== runp->wcnext->wcs[runp->nwcs - 1] + 1))
{
@@ -2026,9 +2025,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
@@ -2029,9 +2028,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
runp = runp->wcnext;
while (runp->wcnext != NULL
&& runp->nwcs == runp->wcnext->nwcs
@@ -1,4 +1,4 @@
From c8df3cf4556d8d78a98675865395ce42f3b67109 Mon Sep 17 00:00:00 2001
From 9e07bc25e344152d7bf0712152d9c5fe4abcbf46 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 20 Apr 2016 21:11:00 -0700
Subject: [PATCH] Define DUMMY_LOCALE_T if not defined
@@ -1,4 +1,4 @@
From 2ec233ce078b74030de9195096058cd502fdc395 Mon Sep 17 00:00:00 2001
From 13bc0e53cc91e102472d532f28b3d44c30d291fc Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 3 Aug 2018 09:42:06 -0700
Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path
@@ -18,7 +18,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 25 insertions(+), 10 deletions(-)
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index 6bb189ae37..0711c5c44e 100644
index f38e835c52..8d8f8699b2 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
@@ -1,4 +1,4 @@
From f8289aa320b00f6db43213979cceab2325a7a611 Mon Sep 17 00:00:00 2001
From 50b605dece16606dd9d1c737e579c13725eab11d Mon Sep 17 00:00:00 2001
From: Mark Hatle <mark.hatle@windriver.com>
Date: Thu, 18 Aug 2016 14:07:58 -0500
Subject: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first
@@ -1,4 +1,4 @@
From 3156464f9a95bf1dafd2e22d19d7bf89c520acc1 Mon Sep 17 00:00:00 2001
From 99ab34278a6ebec134267412b4f619f43e278dea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 3 Aug 2018 09:44:00 -0700
Subject: [PATCH] intl: Emit no lines in bison generated files
@@ -1,4 +1,4 @@
From 881f5b8134afd9a30049b93fc79dda7a44947a5f Mon Sep 17 00:00:00 2001
From 3190ada9ecaec915794886a608221655c120f90c Mon Sep 17 00:00:00 2001
From: Martin Jansa <martin.jansa@gmail.com>
Date: Mon, 17 Dec 2018 21:36:18 +0000
Subject: [PATCH] locale: prevent maybe-uninitialized errors with -Os [BZ
@@ -1,4 +1,4 @@
From b4e0a034b12b313dcb82d22341bef6a66b3e9ef9 Mon Sep 17 00:00:00 2001
From 5d201a75918a0e181ee6206f701901fdb91baf81 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:11:22 +0000
Subject: [PATCH] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known names
@@ -1,4 +1,4 @@
From 2ae3ff3ae28abb1d0d100b4722da7ff188de9a30 Mon Sep 17 00:00:00 2001
From baba3c6021340a9070b734f931a15cea4cfe6c31 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 15 May 2020 17:05:45 -0700
Subject: [PATCH] wordsize.h: Unify the header between arm and aarch64
@@ -50,7 +50,7 @@ index 91da566b74..34fcdef1f1 100644
/* Determine the wordsize from the preprocessor defines.
- Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ Copyright (C) 2016-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1,4 +1,4 @@
From 5cc14938f05ae1354c8062f017a21f39d5fc9729 Mon Sep 17 00:00:00 2001
From 60aa53f547911163b42a1c436d695a15c87f34ee Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Aug 2020 14:31:16 -0700
Subject: [PATCH] powerpc: Do not ask compiler for finding arch
@@ -1,61 +0,0 @@
From 42d359350510506b87101cf77202fefcbfc790cb Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@linux-m68k.org>
Date: Thu, 27 May 2021 12:49:47 +0200
Subject: [PATCH] Use __pthread_attr_copy in mq_notify (bug 27896)
Make a deep copy of the pthread attribute object to remove a potential
use-after-free issue.
Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=42d359350510506b87101cf77202fefcbfc790cb]
CVE: CVE-2021-33574
Signed-off-by: Vinay Kumar <vinay.m.engg@gmail.com>
---
diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c
index cc575a0cdd8..6f46d29d1dc 100644
--- a/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/sysdeps/unix/sysv/linux/mq_notify.c
@@ -133,8 +133,11 @@ helper_thread (void *arg)
(void) __pthread_barrier_wait (&notify_barrier);
}
else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED)
- /* The only state we keep is the copy of the thread attributes. */
- free (data.attr);
+ {
+ /* The only state we keep is the copy of the thread attributes. */
+ pthread_attr_destroy (data.attr);
+ free (data.attr);
+ }
}
return NULL;
}
@@ -255,8 +258,14 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
if (data.attr == NULL)
return -1;
- memcpy (data.attr, notification->sigev_notify_attributes,
- sizeof (pthread_attr_t));
+ int ret = __pthread_attr_copy (data.attr,
+ notification->sigev_notify_attributes);
+ if (ret != 0)
+ {
+ free (data.attr);
+ __set_errno (ret);
+ return -1;
+ }
}
/* Construct the new request. */
@@ -269,8 +278,11 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, &se);
/* If it failed, free the allocated memory. */
- if (__glibc_unlikely (retval != 0))
- free (data.attr);
+ if (retval != 0 && data.attr != NULL)
+ {
+ pthread_attr_destroy (data.attr);
+ free (data.attr);
+ }
return retval;
}
@@ -1,31 +0,0 @@
Older seccomp-based filters used in container frameworks will block faccessat2
calls as it's a relatively new syscall. This isn't a big problem with
glibc <2.33 but 2.33 will call faccessat2 itself, get EPERM, and thenn be confused
about what to do as EPERM isn't an expected error code.
This manifests itself as mysterious errors, for example a kernel failing to link.
The root cause of bad seccomp filters is mostly fixed (systemd 247, Docker 20.10.0)
but we can't expect everyone to upgrade, so add a workaound (originally from
Red Hat) to handle EPERM like ENOSYS and fallback to faccessat().
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>
diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c
index 56cb6dcc8b4d58d3..5de75032bbc93a2c 100644
--- a/sysdeps/unix/sysv/linux/faccessat.c
+++ b/sysdeps/unix/sysv/linux/faccessat.c
@@ -34,7 +34,11 @@ faccessat (int fd, const char *file, int mode, int flag)
#if __ASSUME_FACCESSAT2
return ret;
#else
- if (ret == 0 || errno != ENOSYS)
+ /* Fedora-specific workaround:
+ As a workround for a broken systemd-nspawn that returns
+ EPERM when a syscall is not allowed instead of ENOSYS
+ we must check for EPERM here and fall back to faccessat. */
+ if (ret == 0 || !(errno == ENOSYS || errno == EPERM))
return ret;
if (flag & ~(AT_SYMLINK_NOFOLLOW | AT_EACCESS))
File diff suppressed because it is too large Load Diff
@@ -25,7 +25,7 @@ NATIVESDKFIXES:class-nativesdk = "\
file://0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
file://0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
file://0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch \
file://faccessat2-perm.patch \
file://0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch \
"
SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
@@ -34,30 +34,28 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
file://makedbs.sh \
\
${NATIVESDKFIXES} \
file://0008-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
file://0009-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
file://0010-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
file://0011-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
file://0012-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://0013-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
file://0014-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
file://0018-eglibc-Cross-building-and-testing-instructions.patch \
file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
file://0020-eglibc-Resolve-__fpscr_values-on-SH4.patch \
file://0021-eglibc-Forward-port-cross-locale-generation-support.patch \
file://0022-Define-DUMMY_LOCALE_T-if-not-defined.patch \
file://0023-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
file://0024-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
file://0025-intl-Emit-no-lines-in-bison-generated-files.patch \
file://0009-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
file://0010-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
file://0012-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
file://0013-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
file://0014-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
file://0016-yes-within-the-path-sets-wrong-config-variables.patch \
file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
file://0018-Remove-bash-dependency-for-nscd-init-script.patch \
file://0019-eglibc-Cross-building-and-testing-instructions.patch \
file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
file://0023-Define-DUMMY_LOCALE_T-if-not-defined.patch \
file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
file://0025-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \
file://0026-intl-Emit-no-lines-in-bison-generated-files.patch \
file://0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \
file://mte-backports.patch \
file://CVE-2021-33574.patch \
"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"