mirror of
https://abf.rosa.ru/djam/glibc.git
synced 2025-02-23 15:02:47 +00:00
2.36
This commit is contained in:
parent
90dad3a539
commit
57fdafec17
71 changed files with 3775 additions and 15778 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,3 +1,3 @@
|
|||
sources:
|
||||
glibc-2.33.tar.xz: c33953a648e5f6373211cc9f6d9b9647d862aa45
|
||||
glibc-2.36.tar.xz: 1477f605f419c439c03ef90e7851c0856ea679ea
|
||||
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
From c3fda489cfdb2260f9fec706e6fd7259858c4467 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Honermann <tom@honermann.net>
|
||||
Date: Sun, 24 Jul 2022 01:11:43 -0400
|
||||
Subject: [PATCH 01/15] stdlib: Suppress gcc diagnostic that char8_t is a
|
||||
keyword in C++20 in uchar.h.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
gcc 13 issues the following diagnostic for the uchar.h header when the
|
||||
-Wc++20-compat option is enabled in C++ modes that do not enable char8_t
|
||||
as a builtin type (C++17 and earlier by default; subject to _GNU_SOURCE
|
||||
and the gcc -f[no-]char8_t option).
|
||||
warning: identifier ‘char8_t’ is a keyword in C++20 [-Wc++20-compat]
|
||||
This change modifies the uchar.h header to suppress the diagnostic through
|
||||
the use of '#pragma GCC diagnostic' directives for gcc 10 and later (the
|
||||
-Wc++20-compat option was added in gcc version 10). Unfortunately, a bug
|
||||
in gcc currently prevents those directives from having the intended effect
|
||||
as reported at https://gcc.gnu.org/PR106423. A patch for that issue has
|
||||
been submitted and is available in the email thread archive linked below.
|
||||
https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598736.html
|
||||
|
||||
(cherry picked from commit 825f84f133bd840347dc49229b6d831f07d04775)
|
||||
---
|
||||
wcsmbs/uchar.h | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/wcsmbs/uchar.h b/wcsmbs/uchar.h
|
||||
index c37e8619a0..5f7139f279 100644
|
||||
--- a/wcsmbs/uchar.h
|
||||
+++ b/wcsmbs/uchar.h
|
||||
@@ -34,8 +34,16 @@
|
||||
/* Declare the C2x char8_t typedef in C2x modes, but only if the C++
|
||||
__cpp_char8_t feature test macro is not defined. */
|
||||
#if __GLIBC_USE (ISOC2X) && !defined __cpp_char8_t
|
||||
+#if __GNUC_PREREQ (10, 0) && defined __cplusplus
|
||||
+/* Suppress the diagnostic regarding char8_t being a keyword in C++20. */
|
||||
+# pragma GCC diagnostic push
|
||||
+# pragma GCC diagnostic ignored "-Wc++20-compat"
|
||||
+#endif
|
||||
/* Define the 8-bit character type. */
|
||||
typedef unsigned char char8_t;
|
||||
+#if __GNUC_PREREQ (10, 0) && defined __cplusplus
|
||||
+# pragma GCC diagnostic pop
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
#ifndef __USE_ISOCXX11
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From 33f1b4c1452b33991e670f636ebe98b90a405e10 Mon Sep 17 00:00:00 2001
|
||||
From: "H.J. Lu" <hjl.tools@gmail.com>
|
||||
Date: Fri, 29 Jul 2022 10:50:56 -0700
|
||||
Subject: [PATCH 02/15] wcsmbs: Add missing test-c8rtomb/test-mbrtoc8
|
||||
dependency
|
||||
|
||||
Make test-c8rtomb.out and test-mbrtoc8.out depend on $(gen-locales) for
|
||||
|
||||
xsetlocale (LC_ALL, "de_DE.UTF-8");
|
||||
xsetlocale (LC_ALL, "zh_HK.BIG5-HKSCS");
|
||||
|
||||
Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
|
||||
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
||||
(cherry picked from commit e03f5ccd6cc8f829416156eac75acee501626c1f)
|
||||
---
|
||||
wcsmbs/Makefile | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
|
||||
index e6b9e8743a..3d19d5556f 100644
|
||||
--- a/wcsmbs/Makefile
|
||||
+++ b/wcsmbs/Makefile
|
||||
@@ -73,6 +73,8 @@ $(objpfx)tst-wcstol-locale.out: $(gen-locales)
|
||||
$(objpfx)tst-wcstod-nan-locale.out: $(gen-locales)
|
||||
$(objpfx)tst-c16-surrogate.out: $(gen-locales)
|
||||
$(objpfx)tst-c32-state.out: $(gen-locales)
|
||||
+$(objpfx)test-c8rtomb.out: $(gen-locales)
|
||||
+$(objpfx)test-mbrtoc8.out: $(gen-locales)
|
||||
endif
|
||||
|
||||
$(objpfx)tst-wcstod-round: $(libm)
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From c74bb93cfdb04d49155b0e30983a3c866167bbca Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Thu, 4 Aug 2022 17:54:48 +0200
|
||||
Subject: [PATCH 03/15] dlfcn: Pass caller pointer to static dlopen
|
||||
implementation (bug 29446)
|
||||
|
||||
Fixes commit 0c1c3a771eceec46e66ce1183cf988e2303bd373 ("dlfcn: Move
|
||||
dlopen into libc").
|
||||
|
||||
(cherry picked from commit ed0185e4129130cbe081c221efb758fb400623ce)
|
||||
---
|
||||
NEWS | 7 +++++++
|
||||
dlfcn/dlopen.c | 2 +-
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index f61e521fc8..15f3dd2cdb 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -4,6 +4,13 @@ See the end for copying conditions.
|
||||
|
||||
Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
|
||||
using `glibc' in the "product" field.
|
||||
+
|
||||
+Version 2.36.1
|
||||
+
|
||||
+The following bugs are resolved with this release:
|
||||
+
|
||||
+ [29446] _dlopen now ignores dl_caller argument in static mode
|
||||
+
|
||||
|
||||
Version 2.36
|
||||
|
||||
diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
|
||||
index 2696dde4b1..9b07b4e132 100644
|
||||
--- a/dlfcn/dlopen.c
|
||||
+++ b/dlfcn/dlopen.c
|
||||
@@ -90,7 +90,7 @@ compat_symbol (libdl, ___dlopen, dlopen, GLIBC_2_1);
|
||||
void *
|
||||
__dlopen (const char *file, int mode, void *dl_caller)
|
||||
{
|
||||
- return dlopen_implementation (file, mode, RETURN_ADDRESS (0));
|
||||
+ return dlopen_implementation (file, mode, dl_caller);
|
||||
}
|
||||
|
||||
void *
|
||||
--
|
||||
2.37.2
|
||||
|
61
0004-Update-syscall-lists-for-Linux-5.19.patch
Normal file
61
0004-Update-syscall-lists-for-Linux-5.19.patch
Normal file
|
@ -0,0 +1,61 @@
|
|||
From ac47d8f6cf9744139adb12f540fb9cc610cac579 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Myers <joseph@codesourcery.com>
|
||||
Date: Tue, 2 Aug 2022 21:05:07 +0000
|
||||
Subject: [PATCH 04/15] Update syscall lists for Linux 5.19
|
||||
|
||||
Linux 5.19 has no new syscalls, but enables memfd_secret in the uapi
|
||||
headers for RISC-V. Update the version number in syscall-names.list
|
||||
to reflect that it is still current for 5.19 and regenerate the
|
||||
arch-syscall.h headers with build-many-glibcs.py update-syscalls.
|
||||
|
||||
Tested with build-many-glibcs.py.
|
||||
|
||||
(cherry picked from commit fccadcdf5bed7ee67a6cef4714e0b477d6c8472c)
|
||||
---
|
||||
sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h | 1 +
|
||||
sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h | 1 +
|
||||
sysdeps/unix/sysv/linux/syscall-names.list | 4 ++--
|
||||
3 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
|
||||
index bf4be80f8d..202520ee25 100644
|
||||
--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
|
||||
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
|
||||
@@ -122,6 +122,7 @@
|
||||
#define __NR_mbind 235
|
||||
#define __NR_membarrier 283
|
||||
#define __NR_memfd_create 279
|
||||
+#define __NR_memfd_secret 447
|
||||
#define __NR_migrate_pages 238
|
||||
#define __NR_mincore 232
|
||||
#define __NR_mkdirat 34
|
||||
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
|
||||
index d656aedcc2..4e65f337d4 100644
|
||||
--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
|
||||
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
|
||||
@@ -127,6 +127,7 @@
|
||||
#define __NR_mbind 235
|
||||
#define __NR_membarrier 283
|
||||
#define __NR_memfd_create 279
|
||||
+#define __NR_memfd_secret 447
|
||||
#define __NR_migrate_pages 238
|
||||
#define __NR_mincore 232
|
||||
#define __NR_mkdirat 34
|
||||
diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
|
||||
index 6c7b2f7011..028ad3107a 100644
|
||||
--- a/sysdeps/unix/sysv/linux/syscall-names.list
|
||||
+++ b/sysdeps/unix/sysv/linux/syscall-names.list
|
||||
@@ -21,8 +21,8 @@
|
||||
# This file can list all potential system calls. The names are only
|
||||
# used if the installed kernel headers also provide them.
|
||||
|
||||
-# The list of system calls is current as of Linux 5.18.
|
||||
-kernel 5.18
|
||||
+# The list of system calls is current as of Linux 5.19.
|
||||
+kernel 5.19
|
||||
|
||||
FAST_atomic_update
|
||||
FAST_cmpxchg
|
||||
--
|
||||
2.37.2
|
||||
|
34
0005-elf-Replace-strcpy-call-with-memcpy-BZ-29454.patch
Normal file
34
0005-elf-Replace-strcpy-call-with-memcpy-BZ-29454.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From 302bc33bc53c787da6e74162a7092e9c0fb964a8 Mon Sep 17 00:00:00 2001
|
||||
From: Noah Goldstein <goldstein.w.n@gmail.com>
|
||||
Date: Mon, 8 Aug 2022 11:26:22 +0800
|
||||
Subject: [PATCH 05/15] elf: Replace `strcpy` call with `memcpy` [BZ #29454]
|
||||
|
||||
GCC normally does this optimization for us in
|
||||
strlen_pass::handle_builtin_strcpy but only for optimized
|
||||
build. To avoid needing to include strcpy.S in the rtld build to
|
||||
support the debug build, just do the optimization by hand.
|
||||
|
||||
(cherry picked from commit 483cfe1a6a33d6335b1901581b41040d2d412511)
|
||||
---
|
||||
elf/dl-cache.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
|
||||
index 8bbf110d02..b97c17b3a9 100644
|
||||
--- a/elf/dl-cache.c
|
||||
+++ b/elf/dl-cache.c
|
||||
@@ -509,8 +509,9 @@ _dl_load_cache_lookup (const char *name)
|
||||
we are accessing. Therefore we must make the copy of the
|
||||
mapping data without using malloc. */
|
||||
char *temp;
|
||||
- temp = alloca (strlen (best) + 1);
|
||||
- strcpy (temp, best);
|
||||
+ size_t best_len = strlen (best) + 1;
|
||||
+ temp = alloca (best_len);
|
||||
+ memcpy (temp, best, best_len);
|
||||
return __strdup (temp);
|
||||
}
|
||||
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
From e982657073c4db21459ffd9e17bc505b1d64b876 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Mon, 15 Aug 2022 16:43:59 +0200
|
||||
Subject: [PATCH 06/15] Linux: Terminate subprocess on late failure in
|
||||
tst-pidfd (bug 29485)
|
||||
|
||||
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
||||
(cherry picked from commit f82e05ebb295cadd35f7372f652c72264da810ad)
|
||||
---
|
||||
NEWS | 1 +
|
||||
sysdeps/unix/sysv/linux/tst-pidfd.c | 7 +++++--
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 15f3dd2cdb..f8fb8db510 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -10,6 +10,7 @@ Version 2.36.1
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
[29446] _dlopen now ignores dl_caller argument in static mode
|
||||
+ [29485] Linux: Terminate subprocess on late failure in tst-pidfd
|
||||
|
||||
|
||||
Version 2.36
|
||||
diff --git a/sysdeps/unix/sysv/linux/tst-pidfd.c b/sysdeps/unix/sysv/linux/tst-pidfd.c
|
||||
index 037af22290..5711d1c312 100644
|
||||
--- a/sysdeps/unix/sysv/linux/tst-pidfd.c
|
||||
+++ b/sysdeps/unix/sysv/linux/tst-pidfd.c
|
||||
@@ -147,8 +147,11 @@ do_test (void)
|
||||
may be denied if the process doesn't have CAP_SYS_PTRACE or
|
||||
if a LSM security_ptrace_access_check denies access. */
|
||||
if (fd == -1 && errno == EPERM)
|
||||
- FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, "
|
||||
- "skipping test");
|
||||
+ {
|
||||
+ TEST_COMPARE (pidfd_send_signal (pidfd, SIGKILL, NULL, 0), 0);
|
||||
+ FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, "
|
||||
+ "skipping test");
|
||||
+ }
|
||||
TEST_VERIFY (fd > 0);
|
||||
|
||||
char *path = xasprintf ("/proc/%d/fd/%d", pid, remote_fd);
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
From 8b139cd4f1074ae0d95d9bff60db283a1ed72734 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Mon, 22 Aug 2022 11:04:47 +0200
|
||||
Subject: [PATCH 07/15] alpha: Fix generic brk system call emulation in
|
||||
__brk_call (bug 29490)
|
||||
|
||||
The kernel special-cases the zero argument for alpha brk, and we can
|
||||
use that to restore the generic Linux error handling behavior.
|
||||
|
||||
Fixes commit b57ab258c1140bc45464b4b9908713e3e0ee35aa ("Linux:
|
||||
Introduce __brk_call for invoking the brk system call").
|
||||
|
||||
(cherry picked from commit e7ad26ee3cb74e61d0637c888f24dd478d77af58)
|
||||
---
|
||||
NEWS | 1 +
|
||||
sysdeps/unix/sysv/linux/alpha/brk_call.h | 7 +++----
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index f8fb8db510..becab3ade9 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -11,6 +11,7 @@ The following bugs are resolved with this release:
|
||||
|
||||
[29446] _dlopen now ignores dl_caller argument in static mode
|
||||
[29485] Linux: Terminate subprocess on late failure in tst-pidfd
|
||||
+ [29490] alpha: New __brk_call implementation is broken
|
||||
|
||||
|
||||
Version 2.36
|
||||
diff --git a/sysdeps/unix/sysv/linux/alpha/brk_call.h b/sysdeps/unix/sysv/linux/alpha/brk_call.h
|
||||
index b8088cf13f..0b851b6c86 100644
|
||||
--- a/sysdeps/unix/sysv/linux/alpha/brk_call.h
|
||||
+++ b/sysdeps/unix/sysv/linux/alpha/brk_call.h
|
||||
@@ -21,8 +21,7 @@ __brk_call (void *addr)
|
||||
{
|
||||
unsigned long int result = INTERNAL_SYSCALL_CALL (brk, addr);
|
||||
if (result == -ENOMEM)
|
||||
- /* Mimic the default error reporting behavior. */
|
||||
- return addr;
|
||||
- else
|
||||
- return (void *) result;
|
||||
+ /* Mimic the generic error reporting behavior. */
|
||||
+ result = INTERNAL_SYSCALL_CALL (brk, 0);
|
||||
+ return (void *) result;
|
||||
}
|
||||
--
|
||||
2.37.2
|
||||
|
448
0008-socket-Check-lengths-before-advancing-pointer-in-CMS.patch
Normal file
448
0008-socket-Check-lengths-before-advancing-pointer-in-CMS.patch
Normal file
|
@ -0,0 +1,448 @@
|
|||
From d13a7a6f100576b1e30dc044b2e0c4cbcb6196f6 Mon Sep 17 00:00:00 2001
|
||||
From: Arjun Shankar <arjun@redhat.com>
|
||||
Date: Tue, 2 Aug 2022 11:10:25 +0200
|
||||
Subject: [PATCH 08/15] socket: Check lengths before advancing pointer in
|
||||
CMSG_NXTHDR
|
||||
|
||||
The inline and library functions that the CMSG_NXTHDR macro may expand
|
||||
to increment the pointer to the header before checking the stride of
|
||||
the increment against available space. Since C only allows incrementing
|
||||
pointers to one past the end of an array, the increment must be done
|
||||
after a length check. This commit fixes that and includes a regression
|
||||
test for CMSG_FIRSTHDR and CMSG_NXTHDR.
|
||||
|
||||
The Linux, Hurd, and generic headers are all changed.
|
||||
|
||||
Tested on Linux on armv7hl, i686, x86_64, aarch64, ppc64le, and s390x.
|
||||
|
||||
[BZ #28846]
|
||||
|
||||
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
||||
(cherry picked from commit 9c443ac4559a47ed99859bd80d14dc4b6dd220a1)
|
||||
---
|
||||
bits/socket.h | 40 ++++++++++--
|
||||
socket/Makefile | 1 +
|
||||
socket/tst-cmsghdr-skeleton.c | 92 +++++++++++++++++++++++++++
|
||||
socket/tst-cmsghdr.c | 56 ++++++++++++++++
|
||||
sysdeps/mach/hurd/bits/socket.h | 40 ++++++++++--
|
||||
sysdeps/unix/sysv/linux/bits/socket.h | 40 ++++++++++--
|
||||
sysdeps/unix/sysv/linux/cmsg_nxthdr.c | 36 ++++++++---
|
||||
7 files changed, 276 insertions(+), 29 deletions(-)
|
||||
create mode 100644 socket/tst-cmsghdr-skeleton.c
|
||||
create mode 100644 socket/tst-cmsghdr.c
|
||||
|
||||
diff --git a/bits/socket.h b/bits/socket.h
|
||||
index 2b99dea33b..aac8c49b00 100644
|
||||
--- a/bits/socket.h
|
||||
+++ b/bits/socket.h
|
||||
@@ -245,6 +245,12 @@ struct cmsghdr
|
||||
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
|
||||
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
|
||||
|
||||
+/* Given a length, return the additional padding necessary such that
|
||||
+ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
|
||||
+#define __CMSG_PADDING(len) ((sizeof (size_t) \
|
||||
+ - ((len) & (sizeof (size_t) - 1))) \
|
||||
+ & (sizeof (size_t) - 1))
|
||||
+
|
||||
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
|
||||
struct cmsghdr *__cmsg) __THROW;
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
@@ -254,18 +260,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
|
||||
_EXTERN_INLINE struct cmsghdr *
|
||||
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
|
||||
{
|
||||
+ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
|
||||
+ __mhdr->msg_controllen because the user is required to obtain the first
|
||||
+ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
|
||||
+ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
|
||||
+ trust the value of __cmsg->cmsg_len and therefore do not use it in any
|
||||
+ pointer arithmetic until we check its value. */
|
||||
+
|
||||
+ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
|
||||
+ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
|
||||
+
|
||||
+ size_t __size_needed = sizeof (struct cmsghdr)
|
||||
+ + __CMSG_PADDING (__cmsg->cmsg_len);
|
||||
+
|
||||
+ /* The current header is malformed, too small to be a full header. */
|
||||
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
|
||||
- /* The kernel header does this so there may be a reason. */
|
||||
return (struct cmsghdr *) 0;
|
||||
|
||||
+ /* There isn't enough space between __cmsg and the end of the buffer to
|
||||
+ hold the current cmsg *and* the next one. */
|
||||
+ if (((size_t)
|
||||
+ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
|
||||
+ < __size_needed)
|
||||
+ || ((size_t)
|
||||
+ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
|
||||
+ - __size_needed)
|
||||
+ < __cmsg->cmsg_len))
|
||||
+
|
||||
+ return (struct cmsghdr *) 0;
|
||||
+
|
||||
+ /* Now, we trust cmsg_len and can use it to find the next header. */
|
||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||
- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
|
||||
- + __mhdr->msg_controllen)
|
||||
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
||||
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
- /* No more entries. */
|
||||
- return (struct cmsghdr *) 0;
|
||||
return __cmsg;
|
||||
}
|
||||
#endif /* Use `extern inline'. */
|
||||
diff --git a/socket/Makefile b/socket/Makefile
|
||||
index 156eec6c85..2bde78387f 100644
|
||||
--- a/socket/Makefile
|
||||
+++ b/socket/Makefile
|
||||
@@ -34,6 +34,7 @@ routines := accept bind connect getpeername getsockname getsockopt \
|
||||
tests := \
|
||||
tst-accept4 \
|
||||
tst-sockopt \
|
||||
+ tst-cmsghdr \
|
||||
# tests
|
||||
|
||||
tests-internal := \
|
||||
diff --git a/socket/tst-cmsghdr-skeleton.c b/socket/tst-cmsghdr-skeleton.c
|
||||
new file mode 100644
|
||||
index 0000000000..4c6898569b
|
||||
--- /dev/null
|
||||
+++ b/socket/tst-cmsghdr-skeleton.c
|
||||
@@ -0,0 +1,92 @@
|
||||
+/* Test ancillary data header creation.
|
||||
+ Copyright (C) 2022 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+/* We use the preprocessor to generate the function/macro tests instead of
|
||||
+ using indirection because having all the macro expansions alongside
|
||||
+ each other lets the compiler warn us about suspicious pointer
|
||||
+ arithmetic across subsequent CMSG_{FIRST,NXT}HDR expansions. */
|
||||
+
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+#define RUN_TEST_CONCAT(suffix) run_test_##suffix
|
||||
+#define RUN_TEST_FUNCNAME(suffix) RUN_TEST_CONCAT (suffix)
|
||||
+
|
||||
+static void
|
||||
+RUN_TEST_FUNCNAME (CMSG_NXTHDR_IMPL) (void)
|
||||
+{
|
||||
+ struct msghdr m = {0};
|
||||
+ struct cmsghdr *cmsg;
|
||||
+ char cmsgbuf[3 * CMSG_SPACE (sizeof (PAYLOAD))] = {0};
|
||||
+
|
||||
+ m.msg_control = cmsgbuf;
|
||||
+ m.msg_controllen = sizeof (cmsgbuf);
|
||||
+
|
||||
+ /* First header should point to the start of the buffer. */
|
||||
+ cmsg = CMSG_FIRSTHDR (&m);
|
||||
+ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
|
||||
+
|
||||
+ /* If the first header length consumes the entire buffer, there is no
|
||||
+ space remaining for additional headers. */
|
||||
+ cmsg->cmsg_len = sizeof (cmsgbuf);
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg == NULL);
|
||||
+
|
||||
+ /* The first header length is so big, using it would cause an overflow. */
|
||||
+ cmsg = CMSG_FIRSTHDR (&m);
|
||||
+ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
|
||||
+ cmsg->cmsg_len = SIZE_MAX;
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg == NULL);
|
||||
+
|
||||
+ /* The first header leaves just enough space to hold another header. */
|
||||
+ cmsg = CMSG_FIRSTHDR (&m);
|
||||
+ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
|
||||
+ cmsg->cmsg_len = sizeof (cmsgbuf) - sizeof (struct cmsghdr);
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg != NULL);
|
||||
+
|
||||
+ /* The first header leaves space but not enough for another header. */
|
||||
+ cmsg = CMSG_FIRSTHDR (&m);
|
||||
+ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
|
||||
+ cmsg->cmsg_len ++;
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg == NULL);
|
||||
+
|
||||
+ /* The second header leaves just enough space to hold another header. */
|
||||
+ cmsg = CMSG_FIRSTHDR (&m);
|
||||
+ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
|
||||
+ cmsg->cmsg_len = CMSG_LEN (sizeof (PAYLOAD));
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg != NULL);
|
||||
+ cmsg->cmsg_len = sizeof (cmsgbuf)
|
||||
+ - CMSG_SPACE (sizeof (PAYLOAD)) /* First header. */
|
||||
+ - sizeof (struct cmsghdr);
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg != NULL);
|
||||
+
|
||||
+ /* The second header leaves space but not enough for another header. */
|
||||
+ cmsg = CMSG_FIRSTHDR (&m);
|
||||
+ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg != NULL);
|
||||
+ cmsg->cmsg_len ++;
|
||||
+ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
|
||||
+ TEST_VERIFY_EXIT (cmsg == NULL);
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
diff --git a/socket/tst-cmsghdr.c b/socket/tst-cmsghdr.c
|
||||
new file mode 100644
|
||||
index 0000000000..68c96d3c9d
|
||||
--- /dev/null
|
||||
+++ b/socket/tst-cmsghdr.c
|
||||
@@ -0,0 +1,56 @@
|
||||
+/* Test ancillary data header creation.
|
||||
+ Copyright (C) 2022 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <sys/socket.h>
|
||||
+#include <gnu/lib-names.h>
|
||||
+#include <support/xdlfcn.h>
|
||||
+#include <support/check.h>
|
||||
+
|
||||
+#define PAYLOAD "Hello, World!"
|
||||
+
|
||||
+/* CMSG_NXTHDR is a macro that calls an inline function defined in
|
||||
+ bits/socket.h. In case the function cannot be inlined, libc.so carries
|
||||
+ a copy. Both versions need to be tested. */
|
||||
+
|
||||
+#define CMSG_NXTHDR_IMPL CMSG_NXTHDR
|
||||
+#include "tst-cmsghdr-skeleton.c"
|
||||
+#undef CMSG_NXTHDR_IMPL
|
||||
+
|
||||
+static struct cmsghdr * (* cmsg_nxthdr) (struct msghdr *, struct cmsghdr *);
|
||||
+
|
||||
+#define CMSG_NXTHDR_IMPL cmsg_nxthdr
|
||||
+#include "tst-cmsghdr-skeleton.c"
|
||||
+#undef CMSG_NXTHDR_IMPL
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ static void *handle;
|
||||
+
|
||||
+ run_test_CMSG_NXTHDR ();
|
||||
+
|
||||
+ handle = xdlopen (LIBC_SO, RTLD_LAZY);
|
||||
+ cmsg_nxthdr = (struct cmsghdr * (*) (struct msghdr *, struct cmsghdr *))
|
||||
+ xdlsym (handle, "__cmsg_nxthdr");
|
||||
+
|
||||
+ run_test_cmsg_nxthdr ();
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#include <support/test-driver.c>
|
||||
diff --git a/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h
|
||||
index 5b35ea81ec..70fce4fb27 100644
|
||||
--- a/sysdeps/mach/hurd/bits/socket.h
|
||||
+++ b/sysdeps/mach/hurd/bits/socket.h
|
||||
@@ -249,6 +249,12 @@ struct cmsghdr
|
||||
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
|
||||
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
|
||||
|
||||
+/* Given a length, return the additional padding necessary such that
|
||||
+ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
|
||||
+#define __CMSG_PADDING(len) ((sizeof (size_t) \
|
||||
+ - ((len) & (sizeof (size_t) - 1))) \
|
||||
+ & (sizeof (size_t) - 1))
|
||||
+
|
||||
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
|
||||
struct cmsghdr *__cmsg) __THROW;
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
@@ -258,18 +264,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
|
||||
_EXTERN_INLINE struct cmsghdr *
|
||||
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
|
||||
{
|
||||
+ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
|
||||
+ __mhdr->msg_controllen because the user is required to obtain the first
|
||||
+ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
|
||||
+ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
|
||||
+ trust the value of __cmsg->cmsg_len and therefore do not use it in any
|
||||
+ pointer arithmetic until we check its value. */
|
||||
+
|
||||
+ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
|
||||
+ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
|
||||
+
|
||||
+ size_t __size_needed = sizeof (struct cmsghdr)
|
||||
+ + __CMSG_PADDING (__cmsg->cmsg_len);
|
||||
+
|
||||
+ /* The current header is malformed, too small to be a full header. */
|
||||
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
|
||||
- /* The kernel header does this so there may be a reason. */
|
||||
return (struct cmsghdr *) 0;
|
||||
|
||||
+ /* There isn't enough space between __cmsg and the end of the buffer to
|
||||
+ hold the current cmsg *and* the next one. */
|
||||
+ if (((size_t)
|
||||
+ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
|
||||
+ < __size_needed)
|
||||
+ || ((size_t)
|
||||
+ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
|
||||
+ - __size_needed)
|
||||
+ < __cmsg->cmsg_len))
|
||||
+
|
||||
+ return (struct cmsghdr *) 0;
|
||||
+
|
||||
+ /* Now, we trust cmsg_len and can use it to find the next header. */
|
||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||
- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
|
||||
- + __mhdr->msg_controllen)
|
||||
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
||||
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
- /* No more entries. */
|
||||
- return (struct cmsghdr *) 0;
|
||||
return __cmsg;
|
||||
}
|
||||
#endif /* Use `extern inline'. */
|
||||
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
|
||||
index 4f1f810ea1..539b8d7716 100644
|
||||
--- a/sysdeps/unix/sysv/linux/bits/socket.h
|
||||
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
|
||||
@@ -307,6 +307,12 @@ struct cmsghdr
|
||||
+ CMSG_ALIGN (sizeof (struct cmsghdr)))
|
||||
#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
|
||||
|
||||
+/* Given a length, return the additional padding necessary such that
|
||||
+ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
|
||||
+#define __CMSG_PADDING(len) ((sizeof (size_t) \
|
||||
+ - ((len) & (sizeof (size_t) - 1))) \
|
||||
+ & (sizeof (size_t) - 1))
|
||||
+
|
||||
extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
|
||||
struct cmsghdr *__cmsg) __THROW;
|
||||
#ifdef __USE_EXTERN_INLINES
|
||||
@@ -316,18 +322,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
|
||||
_EXTERN_INLINE struct cmsghdr *
|
||||
__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
|
||||
{
|
||||
+ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
|
||||
+ __mhdr->msg_controllen because the user is required to obtain the first
|
||||
+ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
|
||||
+ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
|
||||
+ trust the value of __cmsg->cmsg_len and therefore do not use it in any
|
||||
+ pointer arithmetic until we check its value. */
|
||||
+
|
||||
+ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
|
||||
+ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
|
||||
+
|
||||
+ size_t __size_needed = sizeof (struct cmsghdr)
|
||||
+ + __CMSG_PADDING (__cmsg->cmsg_len);
|
||||
+
|
||||
+ /* The current header is malformed, too small to be a full header. */
|
||||
if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
|
||||
- /* The kernel header does this so there may be a reason. */
|
||||
return (struct cmsghdr *) 0;
|
||||
|
||||
+ /* There isn't enough space between __cmsg and the end of the buffer to
|
||||
+ hold the current cmsg *and* the next one. */
|
||||
+ if (((size_t)
|
||||
+ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
|
||||
+ < __size_needed)
|
||||
+ || ((size_t)
|
||||
+ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
|
||||
+ - __size_needed)
|
||||
+ < __cmsg->cmsg_len))
|
||||
+
|
||||
+ return (struct cmsghdr *) 0;
|
||||
+
|
||||
+ /* Now, we trust cmsg_len and can use it to find the next header. */
|
||||
__cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
|
||||
+ CMSG_ALIGN (__cmsg->cmsg_len));
|
||||
- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
|
||||
- + __mhdr->msg_controllen)
|
||||
- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
|
||||
- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
|
||||
- /* No more entries. */
|
||||
- return (struct cmsghdr *) 0;
|
||||
return __cmsg;
|
||||
}
|
||||
#endif /* Use `extern inline'. */
|
||||
diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
|
||||
index 15b7a3a925..24f72b797a 100644
|
||||
--- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
|
||||
+++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
|
||||
@@ -23,18 +23,38 @@
|
||||
struct cmsghdr *
|
||||
__cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
|
||||
{
|
||||
+ /* We may safely assume that cmsg lies between mhdr->msg_control and
|
||||
+ mhdr->msg_controllen because the user is required to obtain the first
|
||||
+ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
|
||||
+ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
|
||||
+ trust the value of cmsg->cmsg_len and therefore do not use it in any
|
||||
+ pointer arithmetic until we check its value. */
|
||||
+
|
||||
+ unsigned char * msg_control_ptr = (unsigned char *) mhdr->msg_control;
|
||||
+ unsigned char * cmsg_ptr = (unsigned char *) cmsg;
|
||||
+
|
||||
+ size_t size_needed = sizeof (struct cmsghdr)
|
||||
+ + __CMSG_PADDING (cmsg->cmsg_len);
|
||||
+
|
||||
+ /* The current header is malformed, too small to be a full header. */
|
||||
if ((size_t) cmsg->cmsg_len < sizeof (struct cmsghdr))
|
||||
- /* The kernel header does this so there may be a reason. */
|
||||
- return NULL;
|
||||
+ return (struct cmsghdr *) 0;
|
||||
+
|
||||
+ /* There isn't enough space between cmsg and the end of the buffer to
|
||||
+ hold the current cmsg *and* the next one. */
|
||||
+ if (((size_t)
|
||||
+ (msg_control_ptr + mhdr->msg_controllen - cmsg_ptr)
|
||||
+ < size_needed)
|
||||
+ || ((size_t)
|
||||
+ (msg_control_ptr + mhdr->msg_controllen - cmsg_ptr
|
||||
+ - size_needed)
|
||||
+ < cmsg->cmsg_len))
|
||||
+
|
||||
+ return (struct cmsghdr *) 0;
|
||||
|
||||
+ /* Now, we trust cmsg_len and can use it to find the next header. */
|
||||
cmsg = (struct cmsghdr *) ((unsigned char *) cmsg
|
||||
+ CMSG_ALIGN (cmsg->cmsg_len));
|
||||
- if ((unsigned char *) (cmsg + 1) > ((unsigned char *) mhdr->msg_control
|
||||
- + mhdr->msg_controllen)
|
||||
- || ((unsigned char *) cmsg + CMSG_ALIGN (cmsg->cmsg_len)
|
||||
- > ((unsigned char *) mhdr->msg_control + mhdr->msg_controllen)))
|
||||
- /* No more entries. */
|
||||
- return NULL;
|
||||
return cmsg;
|
||||
}
|
||||
libc_hidden_def (__cmsg_nxthdr)
|
||||
--
|
||||
2.37.2
|
||||
|
24
0009-NEWS-Add-entry-for-bug-28846.patch
Normal file
24
0009-NEWS-Add-entry-for-bug-28846.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 5c62874f423af93e97b51bc9a57af228a546156f Mon Sep 17 00:00:00 2001
|
||||
From: Arjun Shankar <arjun@redhat.com>
|
||||
Date: Mon, 22 Aug 2022 18:21:14 +0200
|
||||
Subject: [PATCH 09/15] NEWS: Add entry for bug 28846
|
||||
|
||||
---
|
||||
NEWS | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index becab3ade9..ae30900bbc 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -9,6 +9,7 @@ Version 2.36.1
|
||||
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
+ [28846] CMSG_NXTHDR may trigger -Wstrict-overflow warning
|
||||
[29446] _dlopen now ignores dl_caller argument in static mode
|
||||
[29485] Linux: Terminate subprocess on late failure in tst-pidfd
|
||||
[29490] alpha: New __brk_call implementation is broken
|
||||
--
|
||||
2.37.2
|
||||
|
51
0010-glibcextract.py-Add-compile_c_snippet.patch
Normal file
51
0010-glibcextract.py-Add-compile_c_snippet.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
From 0062e7dd1c3674ece2daca53a898badd28b60421 Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Wed, 10 Aug 2022 16:24:06 -0300
|
||||
Subject: [PATCH 10/15] glibcextract.py: Add compile_c_snippet
|
||||
|
||||
It might be used on tests to check if a snippet build with the provided
|
||||
compiler and flags.
|
||||
|
||||
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
||||
(cherry picked from commit 841afa116e32b3c7195475769c26bf46fd870d32)
|
||||
---
|
||||
scripts/glibcextract.py | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
|
||||
index 43ab58ffe2..36d204c9b0 100644
|
||||
--- a/scripts/glibcextract.py
|
||||
+++ b/scripts/glibcextract.py
|
||||
@@ -17,6 +17,7 @@
|
||||
# License along with the GNU C Library; if not, see
|
||||
# <https://www.gnu.org/licenses/>.
|
||||
|
||||
+import collections
|
||||
import os.path
|
||||
import re
|
||||
import subprocess
|
||||
@@ -173,3 +174,21 @@ def compare_macro_consts(source_1, source_2, cc, macro_re, exclude_re=None,
|
||||
if not allow_extra_2:
|
||||
ret = 1
|
||||
return ret
|
||||
+
|
||||
+CompileResult = collections.namedtuple("CompileResult", "returncode output")
|
||||
+
|
||||
+def compile_c_snippet(snippet, cc, extra_cc_args=''):
|
||||
+ """Compile and return whether the SNIPPET can be build with CC along
|
||||
+ EXTRA_CC_ARGS compiler flags. Return a CompileResult with RETURNCODE
|
||||
+ being 0 for success, or the failure value and the compiler output.
|
||||
+ """
|
||||
+ with tempfile.TemporaryDirectory() as temp_dir:
|
||||
+ c_file_name = os.path.join(temp_dir, 'test.c')
|
||||
+ obj_file_name = os.path.join(temp_dir, 'test.o')
|
||||
+ with open(c_file_name, 'w') as c_file:
|
||||
+ c_file.write(snippet + '\n')
|
||||
+ cmd = cc.split() + extra_cc_args.split() + ['-c', '-o', obj_file_name,
|
||||
+ c_file_name]
|
||||
+ r = subprocess.run(cmd, check=False, stdout=subprocess.PIPE,
|
||||
+ stderr=subprocess.STDOUT)
|
||||
+ return CompileResult(r.returncode, r.stdout)
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 1cc5513114e76083669cba1b11252aad35525e69 Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Wed, 10 Aug 2022 14:24:44 -0300
|
||||
Subject: [PATCH 11/15] linux: Use compile_c_snippet to check linux/pidfd.h
|
||||
availability
|
||||
|
||||
Instead of tying to a specific kernel version.
|
||||
|
||||
Checked on x86_64-linux-gnu.
|
||||
|
||||
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
||||
(cherry picked from commit 1542019b69b7ec7b2cd34357af035e406d153631)
|
||||
---
|
||||
sysdeps/unix/sysv/linux/tst-pidfd-consts.py | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
|
||||
index 90cbb9be64..d732173abd 100644
|
||||
--- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
|
||||
+++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
|
||||
@@ -33,11 +33,13 @@ def main():
|
||||
help='C compiler (including options) to use')
|
||||
args = parser.parse_args()
|
||||
|
||||
- linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
|
||||
- # Linux started to provide pidfd.h with 5.10.
|
||||
- if linux_version_headers < (5, 10):
|
||||
+ if glibcextract.compile_c_snippet(
|
||||
+ '#include <linux/pidfd.h>',
|
||||
+ args.cc).returncode != 0:
|
||||
sys.exit (77)
|
||||
- linux_version_glibc = (5, 18)
|
||||
+
|
||||
+ linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
|
||||
+ linux_version_glibc = (5, 19)
|
||||
sys.exit(glibcextract.compare_macro_consts(
|
||||
'#include <sys/pidfd.h>\n',
|
||||
'#include <asm/fcntl.h>\n'
|
||||
--
|
||||
2.37.2
|
||||
|
31
0012-linux-Mimic-kernel-defition-for-BLOCK_SIZE.patch
Normal file
31
0012-linux-Mimic-kernel-defition-for-BLOCK_SIZE.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
From 4dad97e2a2e510c6b53a0add29a2188714fcf4ab Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Wed, 10 Aug 2022 14:24:45 -0300
|
||||
Subject: [PATCH 12/15] linux: Mimic kernel defition for BLOCK_SIZE
|
||||
|
||||
To avoid possible warnings if the kernel header is included before
|
||||
sys/mount.h.
|
||||
|
||||
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
||||
(cherry picked from commit c68b6044bc7945716431f1adc091b17c39b80a06)
|
||||
---
|
||||
sysdeps/unix/sysv/linux/sys/mount.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
index f965986ba8..df6b0dbb42 100644
|
||||
--- a/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
@@ -27,8 +27,8 @@
|
||||
#include <stddef.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
-#define BLOCK_SIZE 1024
|
||||
#define BLOCK_SIZE_BITS 10
|
||||
+#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
|
||||
|
||||
|
||||
/* These are the fs-independent mount-flags: up to 16 flags are
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From d48813227b63a0d92ea357ea0733229ed74e31ab Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Wed, 10 Aug 2022 14:24:46 -0300
|
||||
Subject: [PATCH 13/15] linux: Use compile_c_snippet to check linux/mount.h
|
||||
availability
|
||||
|
||||
Checked on x86_64-linux-gnu.
|
||||
|
||||
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
||||
(cherry picked from commit e1226cdc6b209539a92d32d5b620ba53fd35abf3)
|
||||
---
|
||||
sysdeps/unix/sysv/linux/tst-mount-consts.py | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/tst-mount-consts.py b/sysdeps/unix/sysv/linux/tst-mount-consts.py
|
||||
index a62f803123..be2ef2daf1 100755
|
||||
--- a/sysdeps/unix/sysv/linux/tst-mount-consts.py
|
||||
+++ b/sysdeps/unix/sysv/linux/tst-mount-consts.py
|
||||
@@ -33,6 +33,11 @@ def main():
|
||||
help='C compiler (including options) to use')
|
||||
args = parser.parse_args()
|
||||
|
||||
+ if glibcextract.compile_c_snippet(
|
||||
+ '#include <linux/mount.h>',
|
||||
+ args.cc).returncode != 0:
|
||||
+ sys.exit (77)
|
||||
+
|
||||
linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
|
||||
# Constants in glibc were updated to match Linux v5.16. When glibc
|
||||
# constants are updated this value should be updated to match the
|
||||
--
|
||||
2.37.2
|
||||
|
337
0014-linux-Fix-sys-mount.h-usage-with-kernel-headers.patch
Normal file
337
0014-linux-Fix-sys-mount.h-usage-with-kernel-headers.patch
Normal file
|
@ -0,0 +1,337 @@
|
|||
From bb1e8b0ca99b5cbedfae3e6245528a87d95ff3e2 Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Wed, 10 Aug 2022 14:24:47 -0300
|
||||
Subject: [PATCH 14/15] linux: Fix sys/mount.h usage with kernel headers
|
||||
|
||||
Now that kernel exports linux/mount.h and includes it on linux/fs.h,
|
||||
its definitions might clash with glibc exports sys/mount.h. To avoid
|
||||
the need to rearrange the Linux header to be always after glibc one,
|
||||
the glibc sys/mount.h is changed to:
|
||||
|
||||
1. Undefine the macros also used as enum constants. This covers prior
|
||||
inclusion of <linux/mount.h> (for instance MS_RDONLY).
|
||||
|
||||
2. Include <linux/mount.h> based on the usual __has_include check
|
||||
(needs to use __has_include ("linux/mount.h") to paper over GCC
|
||||
bugs.
|
||||
|
||||
3. Define enum fsconfig_command only if FSOPEN_CLOEXEC is not defined.
|
||||
(FSOPEN_CLOEXEC should be a very close proxy.)
|
||||
|
||||
4. Define struct mount_attr if MOUNT_ATTR_SIZE_VER0 is not defined.
|
||||
(Added in the same commit on the Linux side.)
|
||||
|
||||
This patch also adds some tests to check if including linux/fs.h and
|
||||
linux/mount.h after and before sys/mount.h does work.
|
||||
|
||||
Checked on x86_64-linux-gnu.
|
||||
|
||||
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
||||
(cherry picked from commit 774058d72942249f71d74e7f2b639f77184160a6)
|
||||
---
|
||||
sysdeps/unix/sysv/linux/Makefile | 8 +++
|
||||
sysdeps/unix/sysv/linux/sys/mount.h | 71 +++++++++++++++++---
|
||||
sysdeps/unix/sysv/linux/tst-mount-compile.py | 66 ++++++++++++++++++
|
||||
3 files changed, 137 insertions(+), 8 deletions(-)
|
||||
create mode 100755 sysdeps/unix/sysv/linux/tst-mount-compile.py
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
|
||||
index a139a16532..3ceda9fdbf 100644
|
||||
--- a/sysdeps/unix/sysv/linux/Makefile
|
||||
+++ b/sysdeps/unix/sysv/linux/Makefile
|
||||
@@ -265,6 +265,14 @@ $(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py
|
||||
< /dev/null > $@ 2>&1; $(evaluate-test)
|
||||
$(objpfx)tst-mount-consts.out: $(sysdeps-linux-python-deps)
|
||||
|
||||
+tests-special += $(objpfx)tst-mount-compile.out
|
||||
+$(objpfx)tst-mount-compile.out: ../sysdeps/unix/sysv/linux/tst-mount-compile.py
|
||||
+ $(sysdeps-linux-python) \
|
||||
+ ../sysdeps/unix/sysv/linux/tst-mount-compile.py \
|
||||
+ $(sysdeps-linux-python-cc) \
|
||||
+ < /dev/null > $@ 2>&1; $(evaluate-test)
|
||||
+$(objpfx)tst-mount-compile.out: $(sysdeps-linux-python-deps)
|
||||
+
|
||||
tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0
|
||||
|
||||
endif # $(subdir) == misc
|
||||
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
index df6b0dbb42..2e3fd6a7fe 100644
|
||||
--- a/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
@@ -27,6 +27,13 @@
|
||||
#include <stddef.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
+#ifdef __has_include
|
||||
+# if __has_include ("linux/mount.h")
|
||||
+# include "linux/mount.h"
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#define BLOCK_SIZE_BITS 10
|
||||
#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
|
||||
|
||||
@@ -35,69 +42,98 @@
|
||||
supported */
|
||||
enum
|
||||
{
|
||||
+#undef MS_RDONLY
|
||||
MS_RDONLY = 1, /* Mount read-only. */
|
||||
#define MS_RDONLY MS_RDONLY
|
||||
+#undef MS_NOSUID
|
||||
MS_NOSUID = 2, /* Ignore suid and sgid bits. */
|
||||
#define MS_NOSUID MS_NOSUID
|
||||
+#undef MS_NODEV
|
||||
MS_NODEV = 4, /* Disallow access to device special files. */
|
||||
#define MS_NODEV MS_NODEV
|
||||
+#undef MS_NOEXEC
|
||||
MS_NOEXEC = 8, /* Disallow program execution. */
|
||||
#define MS_NOEXEC MS_NOEXEC
|
||||
+#undef MS_SYNCHRONOUS
|
||||
MS_SYNCHRONOUS = 16, /* Writes are synced at once. */
|
||||
#define MS_SYNCHRONOUS MS_SYNCHRONOUS
|
||||
+#undef MS_REMOUNT
|
||||
MS_REMOUNT = 32, /* Alter flags of a mounted FS. */
|
||||
#define MS_REMOUNT MS_REMOUNT
|
||||
+#undef MS_MANDLOCK
|
||||
MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
|
||||
#define MS_MANDLOCK MS_MANDLOCK
|
||||
+#undef MS_DIRSYNC
|
||||
MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
|
||||
#define MS_DIRSYNC MS_DIRSYNC
|
||||
+#undef MS_NOSYMFOLLOW
|
||||
MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
|
||||
#define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
|
||||
+#undef MS_NOATIME
|
||||
MS_NOATIME = 1024, /* Do not update access times. */
|
||||
#define MS_NOATIME MS_NOATIME
|
||||
+#undef MS_NODIRATIME
|
||||
MS_NODIRATIME = 2048, /* Do not update directory access times. */
|
||||
#define MS_NODIRATIME MS_NODIRATIME
|
||||
+#undef MS_BIND
|
||||
MS_BIND = 4096, /* Bind directory at different place. */
|
||||
#define MS_BIND MS_BIND
|
||||
+#undef MS_MOVE
|
||||
MS_MOVE = 8192,
|
||||
#define MS_MOVE MS_MOVE
|
||||
+#undef MS_REC
|
||||
MS_REC = 16384,
|
||||
#define MS_REC MS_REC
|
||||
+#undef MS_SILENT
|
||||
MS_SILENT = 32768,
|
||||
#define MS_SILENT MS_SILENT
|
||||
+#undef MS_POSIXACL
|
||||
MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */
|
||||
#define MS_POSIXACL MS_POSIXACL
|
||||
+#undef MS_UNBINDABLE
|
||||
MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */
|
||||
#define MS_UNBINDABLE MS_UNBINDABLE
|
||||
+#undef MS_PRIVATE
|
||||
MS_PRIVATE = 1 << 18, /* Change to private. */
|
||||
#define MS_PRIVATE MS_PRIVATE
|
||||
+#undef MS_SLAVE
|
||||
MS_SLAVE = 1 << 19, /* Change to slave. */
|
||||
#define MS_SLAVE MS_SLAVE
|
||||
+#undef MS_SHARED
|
||||
MS_SHARED = 1 << 20, /* Change to shared. */
|
||||
#define MS_SHARED MS_SHARED
|
||||
+#undef MS_RELATIME
|
||||
MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */
|
||||
#define MS_RELATIME MS_RELATIME
|
||||
+#undef MS_KERNMOUNT
|
||||
MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */
|
||||
#define MS_KERNMOUNT MS_KERNMOUNT
|
||||
+#undef MS_I_VERSION
|
||||
MS_I_VERSION = 1 << 23, /* Update inode I_version field. */
|
||||
#define MS_I_VERSION MS_I_VERSION
|
||||
+#undef MS_STRICTATIME
|
||||
MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */
|
||||
#define MS_STRICTATIME MS_STRICTATIME
|
||||
+#undef MS_LAZYTIME
|
||||
MS_LAZYTIME = 1 << 25, /* Update the on-disk [acm]times lazily. */
|
||||
#define MS_LAZYTIME MS_LAZYTIME
|
||||
+#undef MS_ACTIVE
|
||||
MS_ACTIVE = 1 << 30,
|
||||
#define MS_ACTIVE MS_ACTIVE
|
||||
+#undef MS_NOUSER
|
||||
MS_NOUSER = 1 << 31
|
||||
#define MS_NOUSER MS_NOUSER
|
||||
};
|
||||
|
||||
/* Flags that can be altered by MS_REMOUNT */
|
||||
+#undef MS_RMT_MASK
|
||||
#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION \
|
||||
|MS_LAZYTIME)
|
||||
|
||||
|
||||
/* Magic mount flag number. Has to be or-ed to the flag values. */
|
||||
|
||||
+#undef MS_MGC_VAL
|
||||
#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
|
||||
#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
|
||||
|
||||
@@ -106,20 +142,35 @@ enum
|
||||
is probably as bad and I don't want to create yet another include
|
||||
file. */
|
||||
|
||||
+#undef BLKROSET
|
||||
#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
|
||||
+#undef BLKROGET
|
||||
#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
|
||||
+#undef BLKRRPART
|
||||
#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
|
||||
+#undef BLKGETSIZE
|
||||
#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
|
||||
+#undef BLKFLSBUF
|
||||
#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
|
||||
+#undef BLKRASET
|
||||
#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
|
||||
+#undef BLKRAGET
|
||||
#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
|
||||
+#undef BLKFRASET
|
||||
#define BLKFRASET _IO(0x12,100) /* Set filesystem read-ahead. */
|
||||
+#undef BLKFRAGET
|
||||
#define BLKFRAGET _IO(0x12,101) /* Get filesystem read-ahead. */
|
||||
+#undef BLKSECTSET
|
||||
#define BLKSECTSET _IO(0x12,102) /* Set max sectors per request. */
|
||||
+#undef BLKSECTGET
|
||||
#define BLKSECTGET _IO(0x12,103) /* Get max sectors per request. */
|
||||
+#undef BLKSSZGET
|
||||
#define BLKSSZGET _IO(0x12,104) /* Get block device sector size. */
|
||||
+#undef BLKBSZGET
|
||||
#define BLKBSZGET _IOR(0x12,112,size_t)
|
||||
+#undef BLKBSZSET
|
||||
#define BLKBSZSET _IOW(0x12,113,size_t)
|
||||
+#undef BLKGETSIZE64
|
||||
#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size. */
|
||||
|
||||
|
||||
@@ -157,6 +208,7 @@ enum
|
||||
#define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks. */
|
||||
|
||||
|
||||
+#ifndef MOUNT_ATTR_SIZE_VER0
|
||||
/* For mount_setattr. */
|
||||
struct mount_attr
|
||||
{
|
||||
@@ -165,6 +217,7 @@ struct mount_attr
|
||||
uint64_t propagation;
|
||||
uint64_t userns_fd;
|
||||
};
|
||||
+#endif
|
||||
|
||||
#define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */
|
||||
|
||||
@@ -185,26 +238,28 @@ struct mount_attr
|
||||
#define FSPICK_EMPTY_PATH 0x00000008
|
||||
|
||||
|
||||
+#ifndef FSOPEN_CLOEXEC
|
||||
/* The type of fsconfig call made. */
|
||||
enum fsconfig_command
|
||||
{
|
||||
FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
|
||||
-#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
|
||||
+# define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
|
||||
FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
|
||||
-#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
|
||||
+# define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
|
||||
FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
|
||||
-#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
|
||||
+# define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
|
||||
FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
|
||||
-#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
|
||||
+# define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
|
||||
FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
|
||||
-#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
|
||||
+# define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
|
||||
FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
|
||||
-#define FSCONFIG_SET_FD FSCONFIG_SET_FD
|
||||
+# define FSCONFIG_SET_FD FSCONFIG_SET_FD
|
||||
FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
|
||||
-#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
|
||||
+# define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
|
||||
FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
|
||||
-#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
|
||||
+# define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
|
||||
};
|
||||
+#endif
|
||||
|
||||
/* open_tree flags. */
|
||||
#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
||||
diff --git a/sysdeps/unix/sysv/linux/tst-mount-compile.py b/sysdeps/unix/sysv/linux/tst-mount-compile.py
|
||||
new file mode 100755
|
||||
index 0000000000..0ec74d4e0b
|
||||
--- /dev/null
|
||||
+++ b/sysdeps/unix/sysv/linux/tst-mount-compile.py
|
||||
@@ -0,0 +1,66 @@
|
||||
+#!/usr/bin/python3
|
||||
+# Check if glibc provided sys/mount.h can be used along related kernel
|
||||
+# headers.
|
||||
+# Copyright (C) 2022 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
|
||||
+# modify it under the terms of the GNU Lesser General Public
|
||||
+# License as published by the Free Software Foundation; either
|
||||
+# version 2.1 of the License, or (at your option) any later version.
|
||||
+#
|
||||
+# The GNU C Library is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# Lesser General Public License for more details.
|
||||
+#
|
||||
+# You should have received a copy of the GNU Lesser General Public
|
||||
+# License along with the GNU C Library; if not, see
|
||||
+# <https://www.gnu.org/licenses/>.
|
||||
+
|
||||
+import argparse
|
||||
+import sys
|
||||
+
|
||||
+import glibcextract
|
||||
+
|
||||
+
|
||||
+def main():
|
||||
+ """The main entry point."""
|
||||
+ parser = argparse.ArgumentParser(
|
||||
+ description='Check if glibc provided sys/mount.h can be '
|
||||
+ ' used along related kernel headers.')
|
||||
+ parser.add_argument('--cc', metavar='CC',
|
||||
+ help='C compiler (including options) to use')
|
||||
+ args = parser.parse_args()
|
||||
+
|
||||
+ if glibcextract.compile_c_snippet(
|
||||
+ '#include <linux/mount.h>',
|
||||
+ args.cc).returncode != 0:
|
||||
+ sys.exit (77)
|
||||
+
|
||||
+ def check(testname, snippet):
|
||||
+ # Add -Werror to catch macro redefinitions and _ISOMAC to avoid
|
||||
+ # internal glibc definitions.
|
||||
+ r = glibcextract.compile_c_snippet(snippet, args.cc,
|
||||
+ '-Werror -D_ISOMAC')
|
||||
+ if r.returncode != 0:
|
||||
+ print('error: test {}:\n{}'.format(testname, r.output.decode()))
|
||||
+ return r.returncode
|
||||
+
|
||||
+ status = max(
|
||||
+ check("sys/mount.h + linux/mount.h",
|
||||
+ "#include <sys/mount.h>\n"
|
||||
+ "#include <linux/mount.h>"),
|
||||
+ check("sys/mount.h + linux/fs.h",
|
||||
+ "#include <sys/mount.h>\n"
|
||||
+ "#include <linux/fs.h>"),
|
||||
+ check("linux/mount.h + sys/mount.h",
|
||||
+ "#include <linux/mount.h>\n"
|
||||
+ "#include <sys/mount.h>"),
|
||||
+ check("linux/fs.h + sys/mount.h",
|
||||
+ "#include <linux/fs.h>\n"
|
||||
+ "#include <sys/mount.h>"))
|
||||
+ sys.exit(status)
|
||||
+
|
||||
+if __name__ == '__main__':
|
||||
+ main()
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
From 3bd3c612e98a53ce60ed972f5cd2b90628b3cba5 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Tue, 16 Aug 2022 09:25:23 +0200
|
||||
Subject: [PATCH 15/15] Linux: Fix enum fsconfig_command detection in
|
||||
<sys/mount.h>
|
||||
|
||||
The #ifdef FSOPEN_CLOEXEC check did not work because the macro
|
||||
was always defined in this header prior to the check, so that
|
||||
the <linux/mount.h> contents did not matter.
|
||||
|
||||
Fixes commit 774058d72942249f71d74e7f2b639f77184160a6
|
||||
("linux: Fix sys/mount.h usage with kernel headers").
|
||||
|
||||
(cherry picked from commit 2955ef4b7c9b56fcd7abfeddef7ee83c60abff98)
|
||||
---
|
||||
sysdeps/unix/sysv/linux/sys/mount.h | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
index 2e3fd6a7fe..19841d0738 100644
|
||||
--- a/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
|
||||
@@ -188,9 +188,6 @@ enum
|
||||
};
|
||||
|
||||
|
||||
-/* fsopen flags. */
|
||||
-#define FSOPEN_CLOEXEC 0x00000001
|
||||
-
|
||||
/* fsmount flags. */
|
||||
#define FSMOUNT_CLOEXEC 0x00000001
|
||||
|
||||
@@ -261,6 +258,9 @@ enum fsconfig_command
|
||||
};
|
||||
#endif
|
||||
|
||||
+/* fsopen flags. */
|
||||
+#define FSOPEN_CLOEXEC 0x00000001
|
||||
+
|
||||
/* open_tree flags. */
|
||||
#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
||||
#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
|
||||
--
|
||||
2.37.2
|
||||
|
336
0016-syslog-Fix-large-messages-BZ-29536.patch
Normal file
336
0016-syslog-Fix-large-messages-BZ-29536.patch
Normal file
|
@ -0,0 +1,336 @@
|
|||
From b0e7888d1fa2dbd2d9e1645ec8c796abf78880b9 Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Sun, 28 Aug 2022 16:52:53 -0300
|
||||
Subject: [PATCH 16/22] syslog: Fix large messages (BZ#29536)
|
||||
|
||||
The a583b6add407c17cd change did not handle large messages that
|
||||
would require a heap allocation correctly, where the message itself
|
||||
is not take in consideration.
|
||||
|
||||
This patch fixes it and extend the tst-syslog to check for large
|
||||
messages as well.
|
||||
|
||||
Checked on x86_64-linux-gnu.
|
||||
|
||||
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
||||
(cherry picked from commit 52a5be0df411ef3ff45c10c7c308cb92993d15b1)
|
||||
---
|
||||
misc/syslog.c | 18 +++---
|
||||
misc/tst-syslog.c | 152 +++++++++++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 142 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/misc/syslog.c b/misc/syslog.c
|
||||
index 554089bfc4..b88f66c835 100644
|
||||
--- a/misc/syslog.c
|
||||
+++ b/misc/syslog.c
|
||||
@@ -193,28 +193,32 @@ __vsyslog_internal (int pri, const char *fmt, va_list ap,
|
||||
int vl = __vsnprintf_internal (bufs + l, sizeof bufs - l, fmt, apc,
|
||||
mode_flags);
|
||||
if (0 <= vl && vl < sizeof bufs - l)
|
||||
- {
|
||||
- buf = bufs;
|
||||
- bufsize = l + vl;
|
||||
- }
|
||||
+ buf = bufs;
|
||||
+ bufsize = l + vl;
|
||||
|
||||
va_end (apc);
|
||||
}
|
||||
|
||||
if (buf == NULL)
|
||||
{
|
||||
- buf = malloc (l * sizeof (char));
|
||||
+ buf = malloc ((bufsize + 1) * sizeof (char));
|
||||
if (buf != NULL)
|
||||
{
|
||||
/* Tell the cancellation handler to free this buffer. */
|
||||
clarg.buf = buf;
|
||||
|
||||
if (has_ts)
|
||||
- __snprintf (bufs, sizeof bufs,
|
||||
+ __snprintf (buf, l + 1,
|
||||
SYSLOG_HEADER (pri, timestamp, &msgoff, pid));
|
||||
else
|
||||
- __snprintf (bufs, sizeof bufs,
|
||||
+ __snprintf (buf, l + 1,
|
||||
SYSLOG_HEADER_WITHOUT_TS (pri, &msgoff));
|
||||
+
|
||||
+ va_list apc;
|
||||
+ va_copy (apc, ap);
|
||||
+ __vsnprintf_internal (buf + l, bufsize - l + 1, fmt, apc,
|
||||
+ mode_flags);
|
||||
+ va_end (apc);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/misc/tst-syslog.c b/misc/tst-syslog.c
|
||||
index e550d15796..1d332ece53 100644
|
||||
--- a/misc/tst-syslog.c
|
||||
+++ b/misc/tst-syslog.c
|
||||
@@ -68,21 +68,19 @@ static const int priorities[] =
|
||||
LOG_DEBUG
|
||||
};
|
||||
|
||||
-enum
|
||||
- {
|
||||
- ident_length = 64,
|
||||
- msg_length = 64
|
||||
- };
|
||||
+#define IDENT_LENGTH 64
|
||||
+#define MSG_LENGTH 1024
|
||||
|
||||
#define SYSLOG_MSG_BASE "syslog_message"
|
||||
#define OPENLOG_IDENT "openlog_ident"
|
||||
+static char large_message[MSG_LENGTH];
|
||||
|
||||
struct msg_t
|
||||
{
|
||||
int priority;
|
||||
int facility;
|
||||
- char ident[ident_length];
|
||||
- char msg[msg_length];
|
||||
+ char ident[IDENT_LENGTH];
|
||||
+ char msg[MSG_LENGTH];
|
||||
pid_t pid;
|
||||
};
|
||||
|
||||
@@ -147,6 +145,37 @@ check_syslog_message (const struct msg_t *msg, int msgnum, int options,
|
||||
return true;
|
||||
}
|
||||
|
||||
+static void
|
||||
+send_syslog_large (int options)
|
||||
+{
|
||||
+ int facility = LOG_USER;
|
||||
+ int priority = LOG_INFO;
|
||||
+
|
||||
+ syslog (facility | priority, "%s %d %d", large_message, facility,
|
||||
+ priority);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+send_vsyslog_large (int options)
|
||||
+{
|
||||
+ int facility = LOG_USER;
|
||||
+ int priority = LOG_INFO;
|
||||
+
|
||||
+ call_vsyslog (facility | priority, "%s %d %d", large_message, facility,
|
||||
+ priority);
|
||||
+}
|
||||
+
|
||||
+static bool
|
||||
+check_syslog_message_large (const struct msg_t *msg, int msgnum, int options,
|
||||
+ pid_t pid)
|
||||
+{
|
||||
+ TEST_COMPARE (msg->facility, LOG_USER);
|
||||
+ TEST_COMPARE (msg->priority, LOG_INFO);
|
||||
+ TEST_COMPARE_STRING (msg->msg, large_message);
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
send_openlog (int options)
|
||||
{
|
||||
@@ -179,6 +208,17 @@ send_openlog (int options)
|
||||
closelog ();
|
||||
}
|
||||
|
||||
+static void
|
||||
+send_openlog_large (int options)
|
||||
+{
|
||||
+ /* Define a non-default IDENT and a not default facility. */
|
||||
+ openlog (OPENLOG_IDENT, options, LOG_LOCAL0);
|
||||
+
|
||||
+ syslog (LOG_INFO, "%s %d %d", large_message, LOG_LOCAL0, LOG_INFO);
|
||||
+
|
||||
+ closelog ();
|
||||
+}
|
||||
+
|
||||
static bool
|
||||
check_openlog_message (const struct msg_t *msg, int msgnum,
|
||||
int options, pid_t pid)
|
||||
@@ -189,7 +229,7 @@ check_openlog_message (const struct msg_t *msg, int msgnum,
|
||||
int expected_priority = priorities[msgnum % array_length (priorities)];
|
||||
TEST_COMPARE (msg->priority, expected_priority);
|
||||
|
||||
- char expected_ident[ident_length];
|
||||
+ char expected_ident[IDENT_LENGTH];
|
||||
snprintf (expected_ident, sizeof (expected_ident), "%s%s%.0d%s:",
|
||||
OPENLOG_IDENT,
|
||||
options & LOG_PID ? "[" : "",
|
||||
@@ -211,15 +251,38 @@ check_openlog_message (const struct msg_t *msg, int msgnum,
|
||||
return true;
|
||||
}
|
||||
|
||||
+static bool
|
||||
+check_openlog_message_large (const struct msg_t *msg, int msgnum,
|
||||
+ int options, pid_t pid)
|
||||
+{
|
||||
+ char expected_ident[IDENT_LENGTH];
|
||||
+ snprintf (expected_ident, sizeof (expected_ident), "%s%s%.0d%s:",
|
||||
+ OPENLOG_IDENT,
|
||||
+ options & LOG_PID ? "[" : "",
|
||||
+ options & LOG_PID ? pid : 0,
|
||||
+ options & LOG_PID ? "]" : "");
|
||||
+
|
||||
+ TEST_COMPARE_STRING (msg->ident, expected_ident);
|
||||
+ TEST_COMPARE_STRING (msg->msg, large_message);
|
||||
+ TEST_COMPARE (msg->priority, LOG_INFO);
|
||||
+ TEST_COMPARE (msg->facility, LOG_LOCAL0);
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static struct msg_t
|
||||
parse_syslog_msg (const char *msg)
|
||||
{
|
||||
struct msg_t r = { .pid = -1 };
|
||||
int number;
|
||||
|
||||
+#define STRINPUT(size) XSTRINPUT(size)
|
||||
+#define XSTRINPUT(size) "%" # size "s"
|
||||
+
|
||||
/* The message in the form:
|
||||
- <179>Apr 8 14:51:19 tst-syslog: syslog message 176 3 */
|
||||
- int n = sscanf (msg, "<%3d>%*s %*d %*d:%*d:%*d %32s %64s %*d %*d",
|
||||
+ <179>Apr 8 14:51:19 tst-syslog: message 176 3 */
|
||||
+ int n = sscanf (msg, "<%3d>%*s %*d %*d:%*d:%*d " STRINPUT(IDENT_LENGTH)
|
||||
+ " " STRINPUT(MSG_LENGTH) " %*d %*d",
|
||||
&number, r.ident, r.msg);
|
||||
TEST_COMPARE (n, 3);
|
||||
|
||||
@@ -246,7 +309,7 @@ parse_syslog_console (const char *msg)
|
||||
|
||||
/* The message in the form:
|
||||
openlog_ident: syslog_message 128 0 */
|
||||
- int n = sscanf (msg, "%32s %64s %d %d",
|
||||
+ int n = sscanf (msg, STRINPUT(IDENT_LENGTH) " " STRINPUT(MSG_LENGTH) " %d %d",
|
||||
r.ident, r.msg, &facility, &priority);
|
||||
TEST_COMPARE (n, 4);
|
||||
|
||||
@@ -281,7 +344,7 @@ check_syslog_udp (void (*syslog_send)(int), int options,
|
||||
int msgnum = 0;
|
||||
while (1)
|
||||
{
|
||||
- char buf[512];
|
||||
+ char buf[2048];
|
||||
size_t l = xrecvfrom (server_udp, buf, sizeof (buf), 0,
|
||||
(struct sockaddr *) &addr, &addrlen);
|
||||
buf[l] = '\0';
|
||||
@@ -325,7 +388,7 @@ check_syslog_tcp (void (*syslog_send)(int), int options,
|
||||
|
||||
int client_tcp = xaccept (server_tcp, NULL, NULL);
|
||||
|
||||
- char buf[512], *rb = buf;
|
||||
+ char buf[2048], *rb = buf;
|
||||
size_t rbl = sizeof (buf);
|
||||
size_t prl = 0; /* Track the size of the partial record. */
|
||||
int msgnum = 0;
|
||||
@@ -393,20 +456,34 @@ check_syslog_console_read (FILE *fp)
|
||||
}
|
||||
|
||||
static void
|
||||
-check_syslog_console (void)
|
||||
+check_syslog_console_read_large (FILE *fp)
|
||||
+{
|
||||
+ char buf[2048];
|
||||
+ TEST_VERIFY (fgets (buf, sizeof (buf), fp) != NULL);
|
||||
+ struct msg_t msg = parse_syslog_console (buf);
|
||||
+
|
||||
+ TEST_COMPARE_STRING (msg.ident, OPENLOG_IDENT ":");
|
||||
+ TEST_COMPARE_STRING (msg.msg, large_message);
|
||||
+ TEST_COMPARE (msg.priority, LOG_INFO);
|
||||
+ TEST_COMPARE (msg.facility, LOG_LOCAL0);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+check_syslog_console (void (*syslog_send)(int),
|
||||
+ void (*syslog_check)(FILE *fp))
|
||||
{
|
||||
xmkfifo (_PATH_CONSOLE, 0666);
|
||||
|
||||
pid_t sender_pid = xfork ();
|
||||
if (sender_pid == 0)
|
||||
{
|
||||
- send_openlog (LOG_CONS);
|
||||
+ syslog_send (LOG_CONS);
|
||||
_exit (0);
|
||||
}
|
||||
|
||||
{
|
||||
FILE *fp = xfopen (_PATH_CONSOLE, "r+");
|
||||
- check_syslog_console_read (fp);
|
||||
+ syslog_check (fp);
|
||||
xfclose (fp);
|
||||
}
|
||||
|
||||
@@ -425,16 +502,28 @@ send_openlog_callback (void *clousure)
|
||||
}
|
||||
|
||||
static void
|
||||
-check_syslog_perror (void)
|
||||
+send_openlog_callback_large (void *clousure)
|
||||
+{
|
||||
+ int options = *(int *) clousure;
|
||||
+ send_openlog_large (options);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+check_syslog_perror (bool large)
|
||||
{
|
||||
struct support_capture_subprocess result;
|
||||
- result = support_capture_subprocess (send_openlog_callback,
|
||||
+ result = support_capture_subprocess (large
|
||||
+ ? send_openlog_callback_large
|
||||
+ : send_openlog_callback,
|
||||
&(int){LOG_PERROR});
|
||||
|
||||
FILE *mfp = fmemopen (result.err.buffer, result.err.length, "r");
|
||||
if (mfp == NULL)
|
||||
FAIL_EXIT1 ("fmemopen: %m");
|
||||
- check_syslog_console_read (mfp);
|
||||
+ if (large)
|
||||
+ check_syslog_console_read_large (mfp);
|
||||
+ else
|
||||
+ check_syslog_console_read (mfp);
|
||||
xfclose (mfp);
|
||||
|
||||
support_capture_subprocess_check (&result, "tst-openlog-child", 0,
|
||||
@@ -462,10 +551,31 @@ do_test (void)
|
||||
check_syslog_tcp (send_openlog, LOG_PID, check_openlog_message);
|
||||
|
||||
/* Check the LOG_CONS option. */
|
||||
- check_syslog_console ();
|
||||
+ check_syslog_console (send_openlog, check_syslog_console_read);
|
||||
|
||||
/* Check the LOG_PERROR option. */
|
||||
- check_syslog_perror ();
|
||||
+ check_syslog_perror (false);
|
||||
+
|
||||
+ /* Similar tests as before, but with a large message to trigger the
|
||||
+ syslog path that uses dynamically allocated memory. */
|
||||
+ memset (large_message, 'a', sizeof large_message - 1);
|
||||
+ large_message[sizeof large_message - 1] = '\0';
|
||||
+
|
||||
+ check_syslog_udp (send_syslog_large, 0, check_syslog_message_large);
|
||||
+ check_syslog_tcp (send_syslog_large, 0, check_syslog_message_large);
|
||||
+
|
||||
+ check_syslog_udp (send_vsyslog_large, 0, check_syslog_message_large);
|
||||
+ check_syslog_tcp (send_vsyslog_large, 0, check_syslog_message_large);
|
||||
+
|
||||
+ check_syslog_udp (send_openlog_large, 0, check_openlog_message_large);
|
||||
+ check_syslog_tcp (send_openlog_large, 0, check_openlog_message_large);
|
||||
+
|
||||
+ check_syslog_udp (send_openlog_large, LOG_PID, check_openlog_message_large);
|
||||
+ check_syslog_tcp (send_openlog_large, LOG_PID, check_openlog_message_large);
|
||||
+
|
||||
+ check_syslog_console (send_openlog_large, check_syslog_console_read_large);
|
||||
+
|
||||
+ check_syslog_perror (true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.37.2
|
||||
|
252
0017-elf-Call-__libc_early_init-for-reused-namespaces-bug.patch
Normal file
252
0017-elf-Call-__libc_early_init-for-reused-namespaces-bug.patch
Normal file
|
@ -0,0 +1,252 @@
|
|||
From 924e4f3eaa502ce82fccf8537f021a796d158771 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri, 26 Aug 2022 21:15:43 +0200
|
||||
Subject: [PATCH 17/22] elf: Call __libc_early_init for reused namespaces (bug
|
||||
29528)
|
||||
|
||||
libc_map is never reset to NULL, neither during dlclose nor on a
|
||||
dlopen call which reuses the namespace structure. As a result, if a
|
||||
namespace is reused, its libc is not initialized properly. The most
|
||||
visible result is a crash in the <ctype.h> functions.
|
||||
|
||||
To prevent similar bugs on namespace reuse from surfacing,
|
||||
unconditionally initialize the chosen namespace to zero using memset.
|
||||
|
||||
(cherry picked from commit d0e357ff45a75553dee3b17ed7d303bfa544f6fe)
|
||||
---
|
||||
NEWS | 1 +
|
||||
elf/Makefile | 25 ++++++++++++++++++
|
||||
elf/dl-open.c | 13 ++++++----
|
||||
elf/tst-dlmopen-twice-mod1.c | 37 ++++++++++++++++++++++++++
|
||||
elf/tst-dlmopen-twice-mod2.c | 50 ++++++++++++++++++++++++++++++++++++
|
||||
elf/tst-dlmopen-twice.c | 34 ++++++++++++++++++++++++
|
||||
6 files changed, 155 insertions(+), 5 deletions(-)
|
||||
create mode 100644 elf/tst-dlmopen-twice-mod1.c
|
||||
create mode 100644 elf/tst-dlmopen-twice-mod2.c
|
||||
create mode 100644 elf/tst-dlmopen-twice.c
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index ae30900bbc..6d31e5abba 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -13,6 +13,7 @@ The following bugs are resolved with this release:
|
||||
[29446] _dlopen now ignores dl_caller argument in static mode
|
||||
[29485] Linux: Terminate subprocess on late failure in tst-pidfd
|
||||
[29490] alpha: New __brk_call implementation is broken
|
||||
+ [29528] elf: Call __libc_early_init for reused namespaces
|
||||
|
||||
|
||||
Version 2.36
|
||||
diff --git a/elf/Makefile b/elf/Makefile
|
||||
index fd77d0c7c8..43353a4b08 100644
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -408,6 +408,7 @@ tests += \
|
||||
tst-dlmopen4 \
|
||||
tst-dlmopen-dlerror \
|
||||
tst-dlmopen-gethostbyname \
|
||||
+ tst-dlmopen-twice \
|
||||
tst-dlopenfail \
|
||||
tst-dlopenfail-2 \
|
||||
tst-dlopenrpath \
|
||||
@@ -834,6 +835,8 @@ modules-names += \
|
||||
tst-dlmopen1mod \
|
||||
tst-dlmopen-dlerror-mod \
|
||||
tst-dlmopen-gethostbyname-mod \
|
||||
+ tst-dlmopen-twice-mod1 \
|
||||
+ tst-dlmopen-twice-mod2 \
|
||||
tst-dlopenfaillinkmod \
|
||||
tst-dlopenfailmod1 \
|
||||
tst-dlopenfailmod2 \
|
||||
@@ -2967,3 +2970,25 @@ $(objpfx)tst-tls-allocation-failure-static-patched.out: \
|
||||
grep -q '^Fatal glibc error: Cannot allocate TLS block$$' $@ \
|
||||
&& grep -q '^status: 127$$' $@; \
|
||||
$(evaluate-test)
|
||||
+
|
||||
+$(objpfx)tst-audit-tlsdesc: $(objpfx)tst-audit-tlsdesc-mod1.so \
|
||||
+ $(objpfx)tst-audit-tlsdesc-mod2.so \
|
||||
+ $(shared-thread-library)
|
||||
+ifeq (yes,$(have-mtls-dialect-gnu2))
|
||||
+# The test is valid for all TLS types, but we want to exercise GNU2
|
||||
+# TLS if possible.
|
||||
+CFLAGS-tst-audit-tlsdesc-mod1.c += -mtls-dialect=gnu2
|
||||
+CFLAGS-tst-audit-tlsdesc-mod2.c += -mtls-dialect=gnu2
|
||||
+endif
|
||||
+$(objpfx)tst-audit-tlsdesc-dlopen: $(shared-thread-library)
|
||||
+$(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-audit-tlsdesc-mod1.so \
|
||||
+ $(objpfx)tst-audit-tlsdesc-mod2.so
|
||||
+$(objpfx)tst-audit-tlsdesc-mod1.so: $(objpfx)tst-audit-tlsdesc-mod2.so
|
||||
+$(objpfx)tst-audit-tlsdesc.out: $(objpfx)tst-auditmod-tlsdesc.so
|
||||
+tst-audit-tlsdesc-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so
|
||||
+$(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-auditmod-tlsdesc.so
|
||||
+tst-audit-tlsdesc-dlopen-ENV = LD_AUDIT=$(objpfx)tst-auditmod-tlsdesc.so
|
||||
+
|
||||
+$(objpfx)tst-dlmopen-twice.out: \
|
||||
+ $(objpfx)tst-dlmopen-twice-mod1.so \
|
||||
+ $(objpfx)tst-dlmopen-twice-mod2.so
|
||||
diff --git a/elf/dl-open.c b/elf/dl-open.c
|
||||
index a23e65926b..46e8066fd8 100644
|
||||
--- a/elf/dl-open.c
|
||||
+++ b/elf/dl-open.c
|
||||
@@ -844,11 +844,14 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
|
||||
_dl_signal_error (EINVAL, file, NULL, N_("\
|
||||
no more namespaces available for dlmopen()"));
|
||||
}
|
||||
- else if (nsid == GL(dl_nns))
|
||||
- {
|
||||
- __rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
|
||||
- ++GL(dl_nns);
|
||||
- }
|
||||
+
|
||||
+ if (nsid == GL(dl_nns))
|
||||
+ ++GL(dl_nns);
|
||||
+
|
||||
+ /* Initialize the new namespace. Most members are
|
||||
+ zero-initialized, only the lock needs special treatment. */
|
||||
+ memset (&GL(dl_ns)[nsid], 0, sizeof (GL(dl_ns)[nsid]));
|
||||
+ __rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
|
||||
|
||||
_dl_debug_update (nsid)->r_state = RT_CONSISTENT;
|
||||
}
|
||||
diff --git a/elf/tst-dlmopen-twice-mod1.c b/elf/tst-dlmopen-twice-mod1.c
|
||||
new file mode 100644
|
||||
index 0000000000..0eaf04948c
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-dlmopen-twice-mod1.c
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* Initialization of libc after dlmopen/dlclose/dlmopen (bug 29528). Module 1.
|
||||
+ Copyright (C) 2022 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+static void __attribute__ ((constructor))
|
||||
+init (void)
|
||||
+{
|
||||
+ puts ("info: tst-dlmopen-twice-mod1.so loaded");
|
||||
+ fflush (stdout);
|
||||
+}
|
||||
+
|
||||
+static void __attribute__ ((destructor))
|
||||
+fini (void)
|
||||
+{
|
||||
+ puts ("info: tst-dlmopen-twice-mod1.so about to be unloaded");
|
||||
+ fflush (stdout);
|
||||
+}
|
||||
+
|
||||
+/* Large allocation. The second module does not have this, so it
|
||||
+ should load libc at a different address. */
|
||||
+char large_allocate[16 * 1024 * 1024];
|
||||
diff --git a/elf/tst-dlmopen-twice-mod2.c b/elf/tst-dlmopen-twice-mod2.c
|
||||
new file mode 100644
|
||||
index 0000000000..40c6c01f96
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-dlmopen-twice-mod2.c
|
||||
@@ -0,0 +1,50 @@
|
||||
+/* Initialization of libc after dlmopen/dlclose/dlmopen (bug 29528). Module 2.
|
||||
+ Copyright (C) 2022 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <ctype.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+static void __attribute__ ((constructor))
|
||||
+init (void)
|
||||
+{
|
||||
+ puts ("info: tst-dlmopen-twice-mod2.so loaded");
|
||||
+ fflush (stdout);
|
||||
+}
|
||||
+
|
||||
+static void __attribute__ ((destructor))
|
||||
+fini (void)
|
||||
+{
|
||||
+ puts ("info: tst-dlmopen-twice-mod2.so about to be unloaded");
|
||||
+ fflush (stdout);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+run_check (void)
|
||||
+{
|
||||
+ puts ("info: about to call isalpha");
|
||||
+ fflush (stdout);
|
||||
+
|
||||
+ volatile char ch = 'a';
|
||||
+ if (!isalpha (ch))
|
||||
+ {
|
||||
+ puts ("error: isalpha ('a') is not true");
|
||||
+ fflush (stdout);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/elf/tst-dlmopen-twice.c b/elf/tst-dlmopen-twice.c
|
||||
new file mode 100644
|
||||
index 0000000000..449f3c8fa9
|
||||
--- /dev/null
|
||||
+++ b/elf/tst-dlmopen-twice.c
|
||||
@@ -0,0 +1,34 @@
|
||||
+/* Initialization of libc after dlmopen/dlclose/dlmopen (bug 29528). Main.
|
||||
+ Copyright (C) 2022 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <support/xdlfcn.h>
|
||||
+#include <support/check.h>
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ void *handle = xdlmopen (LM_ID_NEWLM, "tst-dlmopen-twice-mod1.so", RTLD_NOW);
|
||||
+ xdlclose (handle);
|
||||
+ handle = xdlmopen (LM_ID_NEWLM, "tst-dlmopen-twice-mod2.so", RTLD_NOW);
|
||||
+ int (*run_check) (void) = xdlsym (handle, "run_check");
|
||||
+ TEST_COMPARE (run_check (), 0);
|
||||
+ xdlclose (handle);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#include <support/test-driver.c>
|
||||
--
|
||||
2.37.2
|
||||
|
425
0018-Apply-asm-redirections-in-wchar.h-before-first-use.patch
Normal file
425
0018-Apply-asm-redirections-in-wchar.h-before-first-use.patch
Normal file
|
@ -0,0 +1,425 @@
|
|||
From 3c791f2031ca8f6b99e96b774ed1c505ceb93595 Mon Sep 17 00:00:00 2001
|
||||
From: Raphael Moreira Zinsly <rzinsly@linux.ibm.com>
|
||||
Date: Wed, 24 Aug 2022 11:43:37 -0300
|
||||
Subject: [PATCH 18/22] Apply asm redirections in wchar.h before first use
|
||||
|
||||
Similar to d0fa09a770, but for wchar.h. Fixes [BZ #27087] by applying
|
||||
all long double related asm redirections before using functions in
|
||||
bits/wchar2.h.
|
||||
Moves the function declarations from wcsmbs/bits/wchar2.h to a new file
|
||||
wcsmbs/bits/wchar2-decl.h that will be included first in wcsmbs/wchar.h.
|
||||
|
||||
Tested with build-many-glibcs.py.
|
||||
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
|
||||
(cherry picked from commit c7509d49c4e8fa494120c5ead21338559dad16f5)
|
||||
---
|
||||
include/bits/wchar2-decl.h | 1 +
|
||||
wcsmbs/Makefile | 5 +-
|
||||
wcsmbs/bits/wchar2-decl.h | 124 +++++++++++++++++++++++++++++++++++++
|
||||
wcsmbs/bits/wchar2.h | 72 ---------------------
|
||||
wcsmbs/wchar.h | 11 +++-
|
||||
5 files changed, 137 insertions(+), 76 deletions(-)
|
||||
create mode 100644 include/bits/wchar2-decl.h
|
||||
create mode 100644 wcsmbs/bits/wchar2-decl.h
|
||||
|
||||
diff --git a/include/bits/wchar2-decl.h b/include/bits/wchar2-decl.h
|
||||
new file mode 100644
|
||||
index 0000000000..00b1b93342
|
||||
--- /dev/null
|
||||
+++ b/include/bits/wchar2-decl.h
|
||||
@@ -0,0 +1 @@
|
||||
+#include <wcsmbs/bits/wchar2-decl.h>
|
||||
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
|
||||
index 3d19d5556f..4af102a3f6 100644
|
||||
--- a/wcsmbs/Makefile
|
||||
+++ b/wcsmbs/Makefile
|
||||
@@ -22,8 +22,9 @@ subdir := wcsmbs
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
-headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h \
|
||||
- bits/types/__mbstate_t.h bits/types/mbstate_t.h bits/types/wint_t.h
|
||||
+headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar2-decl.h \
|
||||
+ bits/wchar-ldbl.h uchar.h bits/types/__mbstate_t.h \
|
||||
+ bits/types/mbstate_t.h bits/types/wint_t.h
|
||||
|
||||
routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
|
||||
wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcstok wcsstr wmemchr \
|
||||
diff --git a/wcsmbs/bits/wchar2-decl.h b/wcsmbs/bits/wchar2-decl.h
|
||||
new file mode 100644
|
||||
index 0000000000..8e1735c33b
|
||||
--- /dev/null
|
||||
+++ b/wcsmbs/bits/wchar2-decl.h
|
||||
@@ -0,0 +1,124 @@
|
||||
+/* Checking macros for wchar functions. Declarations only.
|
||||
+ Copyright (C) 2004-2022 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <https://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#ifndef _BITS_WCHAR2_DECL_H
|
||||
+#define _BITS_WCHAR2_DECL_H 1
|
||||
+
|
||||
+#ifndef _WCHAR_H
|
||||
+# error "Never include <bits/wchar2-decl.h> directly; use <wchar.h> instead."
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1,
|
||||
+ const wchar_t *__restrict __s2, size_t __n,
|
||||
+ size_t __ns1) __THROW;
|
||||
+extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2,
|
||||
+ size_t __n, size_t __ns1) __THROW;
|
||||
+
|
||||
+
|
||||
+#ifdef __USE_GNU
|
||||
+
|
||||
+extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1,
|
||||
+ const wchar_t *__restrict __s2, size_t __n,
|
||||
+ size_t __ns1) __THROW;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
|
||||
+ size_t __ns) __THROW;
|
||||
+extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest,
|
||||
+ const wchar_t *__restrict __src,
|
||||
+ size_t __n) __THROW;
|
||||
+extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
|
||||
+ const wchar_t *__restrict __src,
|
||||
+ size_t __destlen) __THROW;
|
||||
+extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest,
|
||||
+ const wchar_t *__restrict __src, size_t __n,
|
||||
+ size_t __destlen) __THROW;
|
||||
+extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest,
|
||||
+ const wchar_t *__restrict __src, size_t __n,
|
||||
+ size_t __destlen) __THROW;
|
||||
+extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest,
|
||||
+ const wchar_t *__restrict __src,
|
||||
+ size_t __destlen) __THROW;
|
||||
+extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest,
|
||||
+ const wchar_t *__restrict __src,
|
||||
+ size_t __n, size_t __destlen) __THROW;
|
||||
+extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
|
||||
+ int __flag, size_t __s_len,
|
||||
+ const wchar_t *__restrict __format, ...)
|
||||
+ __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
|
||||
+extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
|
||||
+ int __flag, size_t __s_len,
|
||||
+ const wchar_t *__restrict __format,
|
||||
+ __gnuc_va_list __arg)
|
||||
+ __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
|
||||
+
|
||||
+#if __USE_FORTIFY_LEVEL > 1
|
||||
+
|
||||
+extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
|
||||
+ const wchar_t *__restrict __format, ...);
|
||||
+extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format,
|
||||
+ ...);
|
||||
+extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag,
|
||||
+ const wchar_t *__restrict __format,
|
||||
+ __gnuc_va_list __ap);
|
||||
+extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format,
|
||||
+ __gnuc_va_list __ap);
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n,
|
||||
+ __FILE *__restrict __stream) __wur;
|
||||
+
|
||||
+#ifdef __USE_GNU
|
||||
+
|
||||
+extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size,
|
||||
+ int __n, __FILE *__restrict __stream)
|
||||
+ __wur;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
|
||||
+ mbstate_t *__restrict __p,
|
||||
+ size_t __buflen) __THROW __wur;
|
||||
+extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst,
|
||||
+ const char **__restrict __src,
|
||||
+ size_t __len, mbstate_t *__restrict __ps,
|
||||
+ size_t __dstlen) __THROW;
|
||||
+extern size_t __wcsrtombs_chk (char *__restrict __dst,
|
||||
+ const wchar_t **__restrict __src,
|
||||
+ size_t __len, mbstate_t *__restrict __ps,
|
||||
+ size_t __dstlen) __THROW;
|
||||
+
|
||||
+#ifdef __USE_XOPEN2K8
|
||||
+
|
||||
+extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst,
|
||||
+ const char **__restrict __src, size_t __nmc,
|
||||
+ size_t __len, mbstate_t *__restrict __ps,
|
||||
+ size_t __dstlen) __THROW;
|
||||
+extern size_t __wcsnrtombs_chk (char *__restrict __dst,
|
||||
+ const wchar_t **__restrict __src,
|
||||
+ size_t __nwc, size_t __len,
|
||||
+ mbstate_t *__restrict __ps, size_t __dstlen)
|
||||
+ __THROW;
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#endif /* bits/wchar2-decl.h. */
|
||||
diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h
|
||||
index 0e017f458b..3f110efe57 100644
|
||||
--- a/wcsmbs/bits/wchar2.h
|
||||
+++ b/wcsmbs/bits/wchar2.h
|
||||
@@ -21,9 +21,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
-extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1,
|
||||
- const wchar_t *__restrict __s2, size_t __n,
|
||||
- size_t __ns1) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wmemcpy_alias,
|
||||
(wchar_t *__restrict __s1,
|
||||
const wchar_t *__restrict __s2, size_t __n),
|
||||
@@ -45,8 +42,6 @@ __NTH (wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wmemmove_chk (wchar_t *__s1, const wchar_t *__s2,
|
||||
- size_t __n, size_t __ns1) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wmemmove_alias, (wchar_t *__s1,
|
||||
const wchar_t *__s2,
|
||||
size_t __n), wmemmove);
|
||||
@@ -66,9 +61,6 @@ __NTH (wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n))
|
||||
|
||||
|
||||
#ifdef __USE_GNU
|
||||
-extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1,
|
||||
- const wchar_t *__restrict __s2, size_t __n,
|
||||
- size_t __ns1) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wmempcpy_alias,
|
||||
(wchar_t *__restrict __s1,
|
||||
const wchar_t *__restrict __s2,
|
||||
@@ -91,8 +83,6 @@ __NTH (wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2,
|
||||
#endif
|
||||
|
||||
|
||||
-extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
|
||||
- size_t __ns) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wmemset_alias, (wchar_t *__s, wchar_t __c,
|
||||
size_t __n), wmemset);
|
||||
extern wchar_t *__REDIRECT_NTH (__wmemset_chk_warn,
|
||||
@@ -110,9 +100,6 @@ __NTH (wmemset (wchar_t *__s, wchar_t __c, size_t __n))
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest,
|
||||
- const wchar_t *__restrict __src,
|
||||
- size_t __n) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wcscpy_alias,
|
||||
(wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src), wcscpy);
|
||||
@@ -127,9 +114,6 @@ __NTH (wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest,
|
||||
- const wchar_t *__restrict __src,
|
||||
- size_t __destlen) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wcpcpy_alias,
|
||||
(wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src), wcpcpy);
|
||||
@@ -144,9 +128,6 @@ __NTH (wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest,
|
||||
- const wchar_t *__restrict __src, size_t __n,
|
||||
- size_t __destlen) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wcsncpy_alias,
|
||||
(wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src,
|
||||
@@ -168,9 +149,6 @@ __NTH (wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest,
|
||||
- const wchar_t *__restrict __src, size_t __n,
|
||||
- size_t __destlen) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wcpncpy_alias,
|
||||
(wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src,
|
||||
@@ -192,9 +170,6 @@ __NTH (wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest,
|
||||
- const wchar_t *__restrict __src,
|
||||
- size_t __destlen) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wcscat_alias,
|
||||
(wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src), wcscat);
|
||||
@@ -209,9 +184,6 @@ __NTH (wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src))
|
||||
}
|
||||
|
||||
|
||||
-extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest,
|
||||
- const wchar_t *__restrict __src,
|
||||
- size_t __n, size_t __destlen) __THROW;
|
||||
extern wchar_t *__REDIRECT_NTH (__wcsncat_alias,
|
||||
(wchar_t *__restrict __dest,
|
||||
const wchar_t *__restrict __src,
|
||||
@@ -228,10 +200,6 @@ __NTH (wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src,
|
||||
}
|
||||
|
||||
|
||||
-extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n,
|
||||
- int __flag, size_t __s_len,
|
||||
- const wchar_t *__restrict __format, ...)
|
||||
- __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 6))) */;
|
||||
|
||||
extern int __REDIRECT_NTH_LDBL (__swprintf_alias,
|
||||
(wchar_t *__restrict __s, size_t __n,
|
||||
@@ -258,11 +226,6 @@ __NTH (swprintf (wchar_t *__restrict __s, size_t __n,
|
||||
: swprintf (s, n, __VA_ARGS__))
|
||||
#endif
|
||||
|
||||
-extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n,
|
||||
- int __flag, size_t __s_len,
|
||||
- const wchar_t *__restrict __format,
|
||||
- __gnuc_va_list __arg)
|
||||
- __THROW /* __attribute__ ((__format__ (__wprintf__, 5, 0))) */;
|
||||
|
||||
extern int __REDIRECT_NTH_LDBL (__vswprintf_alias,
|
||||
(wchar_t *__restrict __s, size_t __n,
|
||||
@@ -283,16 +246,6 @@ __NTH (vswprintf (wchar_t *__restrict __s, size_t __n,
|
||||
|
||||
#if __USE_FORTIFY_LEVEL > 1
|
||||
|
||||
-extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag,
|
||||
- const wchar_t *__restrict __format, ...);
|
||||
-extern int __wprintf_chk (int __flag, const wchar_t *__restrict __format,
|
||||
- ...);
|
||||
-extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag,
|
||||
- const wchar_t *__restrict __format,
|
||||
- __gnuc_va_list __ap);
|
||||
-extern int __vwprintf_chk (int __flag, const wchar_t *__restrict __format,
|
||||
- __gnuc_va_list __ap);
|
||||
-
|
||||
# ifdef __va_arg_pack
|
||||
__fortify_function int
|
||||
wprintf (const wchar_t *__restrict __fmt, ...)
|
||||
@@ -328,8 +281,6 @@ vfwprintf (__FILE *__restrict __stream,
|
||||
|
||||
#endif
|
||||
|
||||
-extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n,
|
||||
- __FILE *__restrict __stream) __wur;
|
||||
extern wchar_t *__REDIRECT (__fgetws_alias,
|
||||
(wchar_t *__restrict __s, int __n,
|
||||
__FILE *__restrict __stream), fgetws) __wur;
|
||||
@@ -351,9 +302,6 @@ fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
||||
}
|
||||
|
||||
#ifdef __USE_GNU
|
||||
-extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size,
|
||||
- int __n, __FILE *__restrict __stream)
|
||||
- __wur;
|
||||
extern wchar_t *__REDIRECT (__fgetws_unlocked_alias,
|
||||
(wchar_t *__restrict __s, int __n,
|
||||
__FILE *__restrict __stream), fgetws_unlocked)
|
||||
@@ -379,9 +327,6 @@ fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream)
|
||||
#endif
|
||||
|
||||
|
||||
-extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar,
|
||||
- mbstate_t *__restrict __p,
|
||||
- size_t __buflen) __THROW __wur;
|
||||
extern size_t __REDIRECT_NTH (__wcrtomb_alias,
|
||||
(char *__restrict __s, wchar_t __wchar,
|
||||
mbstate_t *__restrict __ps), wcrtomb) __wur;
|
||||
@@ -404,10 +349,6 @@ __NTH (wcrtomb (char *__restrict __s, wchar_t __wchar,
|
||||
}
|
||||
|
||||
|
||||
-extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst,
|
||||
- const char **__restrict __src,
|
||||
- size_t __len, mbstate_t *__restrict __ps,
|
||||
- size_t __dstlen) __THROW;
|
||||
extern size_t __REDIRECT_NTH (__mbsrtowcs_alias,
|
||||
(wchar_t *__restrict __dst,
|
||||
const char **__restrict __src,
|
||||
@@ -431,10 +372,6 @@ __NTH (mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
||||
}
|
||||
|
||||
|
||||
-extern size_t __wcsrtombs_chk (char *__restrict __dst,
|
||||
- const wchar_t **__restrict __src,
|
||||
- size_t __len, mbstate_t *__restrict __ps,
|
||||
- size_t __dstlen) __THROW;
|
||||
extern size_t __REDIRECT_NTH (__wcsrtombs_alias,
|
||||
(char *__restrict __dst,
|
||||
const wchar_t **__restrict __src,
|
||||
@@ -458,10 +395,6 @@ __NTH (wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src,
|
||||
|
||||
|
||||
#ifdef __USE_XOPEN2K8
|
||||
-extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst,
|
||||
- const char **__restrict __src, size_t __nmc,
|
||||
- size_t __len, mbstate_t *__restrict __ps,
|
||||
- size_t __dstlen) __THROW;
|
||||
extern size_t __REDIRECT_NTH (__mbsnrtowcs_alias,
|
||||
(wchar_t *__restrict __dst,
|
||||
const char **__restrict __src, size_t __nmc,
|
||||
@@ -485,11 +418,6 @@ __NTH (mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src,
|
||||
}
|
||||
|
||||
|
||||
-extern size_t __wcsnrtombs_chk (char *__restrict __dst,
|
||||
- const wchar_t **__restrict __src,
|
||||
- size_t __nwc, size_t __len,
|
||||
- mbstate_t *__restrict __ps, size_t __dstlen)
|
||||
- __THROW;
|
||||
extern size_t __REDIRECT_NTH (__wcsnrtombs_alias,
|
||||
(char *__restrict __dst,
|
||||
const wchar_t **__restrict __src,
|
||||
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
|
||||
index 5d6a40853d..c1321c7518 100644
|
||||
--- a/wcsmbs/wchar.h
|
||||
+++ b/wcsmbs/wchar.h
|
||||
@@ -864,14 +864,21 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
|
||||
|
||||
/* Define some macros helping to catch buffer overflows. */
|
||||
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||
-# include <bits/wchar2.h>
|
||||
+/* Declare all functions from bits/wchar2-decl.h first. */
|
||||
+# include <bits/wchar2-decl.h>
|
||||
#endif
|
||||
|
||||
-#include <bits/floatn.h>
|
||||
+/* The following headers provide asm redirections. These redirections must
|
||||
+ appear before the first usage of these functions, e.g. in bits/wchar.h. */
|
||||
#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
# include <bits/wchar-ldbl.h>
|
||||
#endif
|
||||
|
||||
+#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
|
||||
+/* Now include the function definitions and redirects too. */
|
||||
+# include <bits/wchar2.h>
|
||||
+#endif
|
||||
+
|
||||
__END_DECLS
|
||||
|
||||
#endif /* wchar.h */
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
From b3736d1a3c60a3ec9959bf3b38794958546bf6a2 Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Tue, 30 Aug 2022 13:35:52 -0300
|
||||
Subject: [PATCH 19/22] elf: Restore how vDSO dependency is printed with
|
||||
LD_TRACE_LOADED_OBJECTS (BZ #29539)
|
||||
|
||||
The d7703d3176d225d5743b21811d888619eba39e82 changed how vDSO like
|
||||
dependencies are printed, instead of just the name and address it
|
||||
follows other libraries mode and prints 'name => path'.
|
||||
|
||||
Unfortunately, this broke some ldd consumer that uses the output to
|
||||
filter out the program's dependencies. For instance CMake
|
||||
bundleutilities module [1], where GetPrequirite uses the regex to filter
|
||||
out 'name => path' [2].
|
||||
|
||||
This patch restore the previous way to print just the name and the
|
||||
mapping address.
|
||||
|
||||
Checked on x86_64-linux-gnu.
|
||||
|
||||
[1] https://github.com/Kitware/CMake/tree/master/Tests/BundleUtilities
|
||||
[2] https://github.com/Kitware/CMake/blob/master/Modules/GetPrerequisites.cmake#L733
|
||||
|
||||
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
||||
(cherry picked from commit 1e903124cec4492463d075c6c061a2a772db77bf)
|
||||
---
|
||||
NEWS | 2 +-
|
||||
elf/rtld.c | 6 ++++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 6d31e5abba..757ded85e0 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -14,7 +14,7 @@ The following bugs are resolved with this release:
|
||||
[29485] Linux: Terminate subprocess on late failure in tst-pidfd
|
||||
[29490] alpha: New __brk_call implementation is broken
|
||||
[29528] elf: Call __libc_early_init for reused namespaces
|
||||
-
|
||||
+ [29539] libc: LD_TRACE_LOADED_OBJECTS changed how vDSO library are
|
||||
|
||||
Version 2.36
|
||||
|
||||
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||
index cbbaf4a331..3e771a93d8 100644
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -2122,6 +2122,12 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
if (l->l_faked)
|
||||
/* The library was not found. */
|
||||
_dl_printf ("\t%s => not found\n", l->l_libname->name);
|
||||
+ else if (strcmp (l->l_libname->name, l->l_name) == 0)
|
||||
+ /* Print vDSO like libraries without duplicate name. Some
|
||||
+ consumers depend of this format. */
|
||||
+ _dl_printf ("\t%s (0x%0*Zx)\n", l->l_libname->name,
|
||||
+ (int) sizeof l->l_map_start * 2,
|
||||
+ (size_t) l->l_map_start);
|
||||
else
|
||||
_dl_printf ("\t%s => %s (0x%0*Zx)\n",
|
||||
DSO_FILENAME (l->l_libname->name),
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
From 645d94808aaa90fb1b20a25ff70bb50d9eb1d55b Mon Sep 17 00:00:00 2001
|
||||
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
Date: Mon, 5 Sep 2022 09:34:39 -0300
|
||||
Subject: [PATCH 20/22] syslog: Remove extra whitespace between timestamp and
|
||||
message (BZ#29544)
|
||||
|
||||
The rfc3164 clear states that a single space character must follow
|
||||
the timestamp field.
|
||||
|
||||
Checked on x86_64-linux-gnu.
|
||||
---
|
||||
misc/syslog.c | 2 +-
|
||||
misc/tst-syslog.c | 9 ++++++---
|
||||
2 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/misc/syslog.c b/misc/syslog.c
|
||||
index b88f66c835..f67d4b58a4 100644
|
||||
--- a/misc/syslog.c
|
||||
+++ b/misc/syslog.c
|
||||
@@ -167,7 +167,7 @@ __vsyslog_internal (int pri, const char *fmt, va_list ap,
|
||||
_nl_C_locobj_ptr);
|
||||
|
||||
#define SYSLOG_HEADER(__pri, __timestamp, __msgoff, pid) \
|
||||
- "<%d>%s %n%s%s%.0d%s: ", \
|
||||
+ "<%d>%s%n%s%s%.0d%s: ", \
|
||||
__pri, __timestamp, __msgoff, \
|
||||
LogTag == NULL ? __progname : LogTag, \
|
||||
"[" + (pid == 0), pid, "]" + (pid == 0)
|
||||
diff --git a/misc/tst-syslog.c b/misc/tst-syslog.c
|
||||
index 1d332ece53..3560b518a2 100644
|
||||
--- a/misc/tst-syslog.c
|
||||
+++ b/misc/tst-syslog.c
|
||||
@@ -275,16 +275,19 @@ parse_syslog_msg (const char *msg)
|
||||
{
|
||||
struct msg_t r = { .pid = -1 };
|
||||
int number;
|
||||
+ int wsb, wsa;
|
||||
|
||||
#define STRINPUT(size) XSTRINPUT(size)
|
||||
#define XSTRINPUT(size) "%" # size "s"
|
||||
|
||||
/* The message in the form:
|
||||
- <179>Apr 8 14:51:19 tst-syslog: message 176 3 */
|
||||
- int n = sscanf (msg, "<%3d>%*s %*d %*d:%*d:%*d " STRINPUT(IDENT_LENGTH)
|
||||
+ <179>Apr 8 14:51:19 tst-syslog: message 176 3 */
|
||||
+ int n = sscanf (msg, "<%3d>%*s %*d %*d:%*d:%*d%n %n" STRINPUT(IDENT_LENGTH)
|
||||
" " STRINPUT(MSG_LENGTH) " %*d %*d",
|
||||
- &number, r.ident, r.msg);
|
||||
+ &number, &wsb, &wsa, r.ident, r.msg);
|
||||
TEST_COMPARE (n, 3);
|
||||
+ /* It should only one space between timestamp and message. */
|
||||
+ TEST_COMPARE (wsa - wsb, 1);
|
||||
|
||||
r.facility = number & LOG_FACMASK;
|
||||
r.priority = number & LOG_PRIMASK;
|
||||
--
|
||||
2.37.2
|
||||
|
31
0021-Add-NEWS-entry-for-CVE-2022-39046.patch
Normal file
31
0021-Add-NEWS-entry-for-CVE-2022-39046.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
From b46412fb17e8bfc6c9e1f144bbcf833320c80f8a Mon Sep 17 00:00:00 2001
|
||||
From: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
||||
Date: Tue, 6 Sep 2022 09:31:50 -0400
|
||||
Subject: [PATCH 21/22] Add NEWS entry for CVE-2022-39046
|
||||
|
||||
(cherry picked from commit 76fe56020e7ef354685b2284580ac1630c078a2b)
|
||||
---
|
||||
NEWS | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 757ded85e0..10a7613f09 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -7,6 +7,13 @@ using `glibc' in the "product" field.
|
||||
|
||||
Version 2.36.1
|
||||
|
||||
+Security related changes:
|
||||
+
|
||||
+ CVE-2022-39046: When the syslog function is passed a crafted input
|
||||
+ string larger than 1024 bytes, it reads uninitialized memory from the
|
||||
+ heap and prints it to the target log file, potentially revealing a
|
||||
+ portion of the contents of the heap.
|
||||
+
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
[28846] CMSG_NXTHDR may trigger -Wstrict-overflow warning
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
From c399271c10bd00714504e8d4dfbec8aebf996dd4 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fvogt@suse.de>
|
||||
Date: Wed, 27 Jul 2022 11:44:07 +0200
|
||||
Subject: [PATCH 22/22] nscd: Fix netlink cache invalidation if epoll is used
|
||||
[BZ #29415]
|
||||
|
||||
Processes cache network interface information such as whether IPv4 or IPv6
|
||||
are enabled. This is only checked again if the "netlink timestamp" provided
|
||||
by nscd changed, which is triggered by netlink socket activity.
|
||||
|
||||
However, in the epoll handler for the netlink socket, it was missed to
|
||||
assign the new timestamp to the nscd database. The handler for plain poll
|
||||
did that properly, copy that over.
|
||||
|
||||
This bug caused that e.g. processes which started before network
|
||||
configuration got unusuable addresses from getaddrinfo, like IPv6 only even
|
||||
though only IPv4 is available:
|
||||
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1041
|
||||
|
||||
It's a bit hard to reproduce, so I verified this by checking the timestamp
|
||||
on calls to __check_pf manually. Without this patch it's stuck at 1, now
|
||||
it's increasing on network changes as expected.
|
||||
|
||||
Signed-off-by: Fabian Vogt <fvogt@suse.de>
|
||||
(cherry picked from commit 02ca25fef2785974011e9c5beecc99b900b69fd7)
|
||||
---
|
||||
NEWS | 1 +
|
||||
nscd/connections.c | 3 ++-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/NEWS b/NEWS
|
||||
index 10a7613f09..9360596fcc 100644
|
||||
--- a/NEWS
|
||||
+++ b/NEWS
|
||||
@@ -17,6 +17,7 @@ Security related changes:
|
||||
The following bugs are resolved with this release:
|
||||
|
||||
[28846] CMSG_NXTHDR may trigger -Wstrict-overflow warning
|
||||
+ [29415] nscd: Fix netlink cache invalidation if epoll is used
|
||||
[29446] _dlopen now ignores dl_caller argument in static mode
|
||||
[29485] Linux: Terminate subprocess on late failure in tst-pidfd
|
||||
[29490] alpha: New __brk_call implementation is broken
|
||||
diff --git a/nscd/connections.c b/nscd/connections.c
|
||||
index 61d1674eb4..531d2e83df 100644
|
||||
--- a/nscd/connections.c
|
||||
+++ b/nscd/connections.c
|
||||
@@ -2284,7 +2284,8 @@ main_loop_epoll (int efd)
|
||||
sizeof (buf))) != -1)
|
||||
;
|
||||
|
||||
- __bump_nl_timestamp ();
|
||||
+ dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
|
||||
+ = __bump_nl_timestamp ();
|
||||
}
|
||||
# endif
|
||||
else
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -1,75 +1,6 @@
|
|||
From 4483f2500825a84382c2a6a9ac60fc77954533d7 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Lothian <mike@fireburn.co.uk>
|
||||
Date: Tue, 4 Feb 2020 11:04:42 +0000
|
||||
Subject: [PATCH] Implement pthread_mutex_lock_any() and
|
||||
pthread_mutex_timedlock_any().
|
||||
|
||||
On newer Linux kernels, futex supports a WAIT_MULTIPLE operation that can be
|
||||
used to implement new locking functionality that allows a given application
|
||||
thread to sleep while waiting for one of multiple given locks to become
|
||||
available.
|
||||
|
||||
Patch-by: Pierre-Loup A. Griffais <pgriffais@valvesoftware.com>
|
||||
Rebased-by: Mike Lothian <mike@fireburn.co.uk>
|
||||
---
|
||||
nptl/Makefile | 1 +
|
||||
nptl/Versions | 2 +
|
||||
nptl/pthreadP.h | 5 +
|
||||
nptl/pthread_mutex_lock_any.c | 37 ++++
|
||||
nptl/pthread_mutex_timedlock_any.c | 193 ++++++++++++++++++
|
||||
sysdeps/nptl/lowlevellock-futex.h | 14 ++
|
||||
sysdeps/nptl/pthread.h | 10 +
|
||||
.../sysv/linux/x86_64/64/libpthread.abilist | 1 +
|
||||
8 files changed, 263 insertions(+)
|
||||
create mode 100644 nptl/pthread_mutex_lock_any.c
|
||||
create mode 100644 nptl/pthread_mutex_timedlock_any.c
|
||||
|
||||
diff --git a/nptl/Makefile b/nptl/Makefile
|
||||
index 89569c4f46..11368c93cb 100644
|
||||
--- a/nptl/Makefile
|
||||
+++ b/nptl/Makefile
|
||||
@@ -97,6 +97,7 @@ libpthread-routines = nptl-init nptlfreeres vars events version pt-interp \
|
||||
pthread_attr_getstack pthread_attr_setstack \
|
||||
pthread_mutex_init pthread_mutex_destroy \
|
||||
pthread_mutex_lock pthread_mutex_trylock \
|
||||
+ pthread_mutex_lock_any pthread_mutex_timedlock_any \
|
||||
pthread_mutex_timedlock pthread_mutex_unlock \
|
||||
pthread_mutex_cond_lock \
|
||||
pthread_mutexattr_init pthread_mutexattr_destroy \
|
||||
diff --git a/nptl/Versions b/nptl/Versions
|
||||
index aed118e717..df4a8313e2 100644
|
||||
--- a/nptl/Versions
|
||||
+++ b/nptl/Versions
|
||||
@@ -285,6 +285,8 @@ libpthread {
|
||||
mtx_init; mtx_lock; mtx_timedlock; mtx_trylock; mtx_unlock; mtx_destroy;
|
||||
call_once; cnd_broadcast; cnd_destroy; cnd_init; cnd_signal;
|
||||
cnd_timedwait; cnd_wait; tss_create; tss_delete; tss_get; tss_set;
|
||||
+
|
||||
+ pthread_mutex_lock_any; pthread_mutex_timedlock_any;
|
||||
}
|
||||
|
||||
GLIBC_2.30 {
|
||||
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
|
||||
index 6f94d6be31..87f4afff30 100644
|
||||
--- a/nptl/pthreadP.h
|
||||
+++ b/nptl/pthreadP.h
|
||||
@@ -395,6 +395,11 @@ extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex);
|
||||
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
|
||||
extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
|
||||
const struct timespec *__abstime);
|
||||
+extern int __pthread_mutex_lock_any (pthread_mutex_t *__mutex, int mutexcount,
|
||||
+ int *outlocked);
|
||||
+extern int __pthread_mutex_timedlock_any (pthread_mutex_t *__mutex, int count,
|
||||
+ const struct timespec *__abstime,
|
||||
+ int *outlocked);
|
||||
extern int __pthread_mutex_cond_lock (pthread_mutex_t *__mutex)
|
||||
attribute_hidden;
|
||||
extern void __pthread_mutex_cond_lock_adjust (pthread_mutex_t *__mutex)
|
||||
diff --git a/nptl/pthread_mutex_lock_any.c b/nptl/pthread_mutex_lock_any.c
|
||||
new file mode 100644
|
||||
index 0000000000..485c213a17
|
||||
--- /dev/null
|
||||
+++ b/nptl/pthread_mutex_lock_any.c
|
||||
diff -up glibc-2.35/nptl/pthread_mutex_lock_any.c.46~ glibc-2.35/nptl/pthread_mutex_lock_any.c
|
||||
--- glibc-2.35/nptl/pthread_mutex_lock_any.c.46~ 2022-02-03 11:21:15.315282335 +0100
|
||||
+++ glibc-2.35/nptl/pthread_mutex_lock_any.c 2022-02-03 11:21:15.315282335 +0100
|
||||
@@ -0,0 +1,37 @@
|
||||
+/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
|
@ -108,11 +39,9 @@ index 0000000000..485c213a17
|
|||
+}
|
||||
+
|
||||
+weak_alias (__pthread_mutex_lock_any, pthread_mutex_lock_any)
|
||||
diff --git a/nptl/pthread_mutex_timedlock_any.c b/nptl/pthread_mutex_timedlock_any.c
|
||||
new file mode 100644
|
||||
index 0000000000..a95687ce8e
|
||||
--- /dev/null
|
||||
+++ b/nptl/pthread_mutex_timedlock_any.c
|
||||
diff -up glibc-2.35/nptl/pthread_mutex_timedlock_any.c.46~ glibc-2.35/nptl/pthread_mutex_timedlock_any.c
|
||||
--- glibc-2.35/nptl/pthread_mutex_timedlock_any.c.46~ 2022-02-03 11:21:15.316282339 +0100
|
||||
+++ glibc-2.35/nptl/pthread_mutex_timedlock_any.c 2022-02-03 11:21:15.316282339 +0100
|
||||
@@ -0,0 +1,193 @@
|
||||
+/* Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
|
@ -307,19 +236,18 @@ index 0000000000..a95687ce8e
|
|||
+}
|
||||
+
|
||||
+weak_alias (__pthread_mutex_timedlock_any, pthread_mutex_timedlock_any)
|
||||
diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
|
||||
index 2209ca76a1..83f32bc8e8 100644
|
||||
--- a/sysdeps/nptl/lowlevellock-futex.h
|
||||
+++ b/sysdeps/nptl/lowlevellock-futex.h
|
||||
@@ -38,6 +38,7 @@
|
||||
#define FUTEX_WAKE_BITSET 10
|
||||
diff -up glibc-2.35/sysdeps/nptl/lowlevellock-futex.h.46~ glibc-2.35/sysdeps/nptl/lowlevellock-futex.h
|
||||
--- glibc-2.35/sysdeps/nptl/lowlevellock-futex.h.46~ 2022-02-03 06:27:54.000000000 +0100
|
||||
+++ glibc-2.35/sysdeps/nptl/lowlevellock-futex.h 2022-02-03 11:25:49.314310869 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
#define FUTEX_WAIT_REQUEUE_PI 11
|
||||
#define FUTEX_CMP_REQUEUE_PI 12
|
||||
+#define FUTEX_WAIT_MULTIPLE 13
|
||||
#define FUTEX_LOCK_PI2 13
|
||||
+#define FUTEX_WAIT_MULTIPLE 14
|
||||
#define FUTEX_PRIVATE_FLAG 128
|
||||
#define FUTEX_CLOCK_REALTIME 256
|
||||
|
||||
@@ -73,6 +74,14 @@
|
||||
@@ -62,6 +63,14 @@
|
||||
? -INTERNAL_SYSCALL_ERRNO (__ret) : 0); \
|
||||
})
|
||||
|
||||
|
@ -334,7 +262,7 @@ index 2209ca76a1..83f32bc8e8 100644
|
|||
/* For most of these macros, the return value is never really used.
|
||||
Nevertheless, the protocol is that each one returns a negated errno
|
||||
code for failure or zero for success. (Note that the corresponding
|
||||
@@ -89,6 +98,11 @@
|
||||
@@ -78,6 +87,11 @@
|
||||
__lll_private_flag (FUTEX_WAIT, private), \
|
||||
val, timeout)
|
||||
|
||||
|
@ -346,17 +274,17 @@ index 2209ca76a1..83f32bc8e8 100644
|
|||
/* Verify whether the supplied clockid is supported by
|
||||
lll_futex_clock_wait_bitset. */
|
||||
# define lll_futex_supported_clockid(clockid) \
|
||||
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
|
||||
index 8a403cbf36..f1f7332472 100644
|
||||
--- a/sysdeps/nptl/pthread.h
|
||||
+++ b/sysdeps/nptl/pthread.h
|
||||
@@ -753,7 +753,17 @@ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
|
||||
diff -up glibc-2.35/sysdeps/nptl/pthread.h.46~ glibc-2.35/sysdeps/nptl/pthread.h
|
||||
--- glibc-2.35/sysdeps/nptl/pthread.h.46~ 2022-02-03 06:27:54.000000000 +0100
|
||||
+++ glibc-2.35/sysdeps/nptl/pthread.h 2022-02-03 11:21:15.316282339 +0100
|
||||
@@ -794,7 +794,17 @@ extern int pthread_mutex_trylock (pthrea
|
||||
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
|
||||
__THROWNL __nonnull ((1));
|
||||
|
||||
+/* Lock any one of several mutexes. */
|
||||
+extern int pthread_mutex_lock_any (pthread_mutex_t *__mutexlist,
|
||||
+ int mutexcount, int *outlocked);
|
||||
+
|
||||
+
|
||||
#ifdef __USE_XOPEN2K
|
||||
+/* Lock any one of several mutexes, with timeout. */
|
||||
|
@ -364,19 +292,6 @@ index 8a403cbf36..f1f7332472 100644
|
|||
+ int mutexcount,
|
||||
+ const struct timespec *__restrict
|
||||
+ __abstime, int *outlocked);
|
||||
+
|
||||
/* Wait until lock becomes available, or specified time passes. */
|
||||
# ifndef __USE_TIME_BITS64
|
||||
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
|
||||
const struct timespec *__restrict
|
||||
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
|
||||
index 971269d2ef..54d966516c 100644
|
||||
--- a/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
|
||||
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist
|
||||
@@ -105,6 +105,7 @@ GLIBC_2.2.5 pthread_kill_other_threads_np F
|
||||
GLIBC_2.2.5 pthread_mutex_destroy F
|
||||
GLIBC_2.2.5 pthread_mutex_init F
|
||||
GLIBC_2.2.5 pthread_mutex_lock F
|
||||
+GLIBC_2.2.5 pthread_mutex_lock_any F
|
||||
GLIBC_2.2.5 pthread_mutex_timedlock F
|
||||
GLIBC_2.2.5 pthread_mutex_trylock F
|
||||
GLIBC_2.2.5 pthread_mutex_unlock F
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
diff -ruN a/nscd/netgroupcache.c b/nscd/netgroupcache.c
|
||||
--- a/nscd/netgroupcache.c 2020-02-01 20:52:50.000000000 +0900
|
||||
+++ b/nscd/netgroupcache.c 2021-04-16 09:10:09.046603554 +0900
|
||||
@@ -248,7 +248,7 @@
|
||||
: NULL);
|
||||
ndomain = (ndomain ? newbuf + ndomaindiff
|
||||
: NULL);
|
||||
- buffer = newbuf;
|
||||
+ *tofreep = buffer = newbuf;
|
||||
}
|
||||
|
||||
nhost = memcpy (buffer + bufused,
|
||||
@@ -319,7 +319,7 @@
|
||||
else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE)
|
||||
{
|
||||
buflen *= 2;
|
||||
- buffer = xrealloc (buffer, buflen);
|
||||
+ *tofreep = buffer = xrealloc (buffer, buflen);
|
||||
}
|
||||
else if (status == NSS_STATUS_RETURN
|
||||
|| status == NSS_STATUS_NOTFOUND
|
|
@ -1,76 +0,0 @@
|
|||
--- libc/elf/Makefile.aliasing~ 2012-12-02 22:11:45.000000000 +0100
|
||||
+++ libc/elf/Makefile 2012-12-27 19:46:13.396658450 +0100
|
||||
@@ -53,6 +53,7 @@ CFLAGS-dl-iterate-phdr.c = $(uses-callba
|
||||
ifeq ($(unwind-find-fde),yes)
|
||||
routines += unwind-dw2-fde-glibc
|
||||
shared-only-routines += unwind-dw2-fde-glibc
|
||||
+CFLAGS-unwind-dw2-fde-glibc.c += -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
before-compile = $(objpfx)trusted-dirs.h
|
||||
--- libc/inet/Makefile.aliasing~ 2012-08-28 16:14:43.000000000 +0200
|
||||
+++ libc/inet/Makefile 2012-12-27 19:48:23.933089723 +0100
|
||||
@@ -62,6 +62,8 @@ tests-$(OPTION_EGLIBC_ADVANCED_INET6) +=
|
||||
|
||||
include ../Rules
|
||||
|
||||
+CFLAGS-tst-inet6_rth.c += -fno-strict-aliasing
|
||||
+
|
||||
ifeq ($(have-thread-library),yes)
|
||||
|
||||
CFLAGS-gethstbyad_r.c = -fexceptions
|
||||
--- libc/nis/Makefile.aliasing~ 2012-05-12 17:44:41.000000000 +0200
|
||||
+++ libc/nis/Makefile 2012-12-27 19:46:13.396658450 +0100
|
||||
@@ -80,6 +80,8 @@ libnss_nisplus-inhibit-o = $(filter-out
|
||||
|
||||
include ../Rules
|
||||
|
||||
+CFLAGS-nis_findserv.c += -fno-strict-aliasing
|
||||
+CFLAGS-ypclnt.c += -fno-strict-aliasing
|
||||
|
||||
$(objpfx)libnss_compat.so: $(objpfx)libnsl.so$(libnsl.so-version)
|
||||
$(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \
|
||||
--- libc/nss/Makefile.aliasing~ 2012-10-10 17:35:46.000000000 +0200
|
||||
+++ libc/nss/Makefile 2012-12-27 19:46:13.396658450 +0100
|
||||
@@ -147,6 +147,7 @@ $(libnss_db-dbs:%=$(objpfx)%.c): $(objpf
|
||||
echo '#include "$<"') > $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
+CFLAGS-files-hosts.c += -fno-strict-aliasing
|
||||
|
||||
$(objpfx)makedb: $(makedb-modules:%=$(objpfx)%.o)
|
||||
|
||||
--- libc/resolv/Makefile.aliasing~ 2012-10-25 19:18:12.000000000 +0200
|
||||
+++ libc/resolv/Makefile 2012-12-27 19:46:13.396658450 +0100
|
||||
@@ -83,6 +83,7 @@ ifeq (yes,$(have-ssp))
|
||||
CFLAGS-libresolv += -fstack-protector
|
||||
endif
|
||||
CFLAGS-res_hconf.c = -fexceptions
|
||||
+CFLAGS-res_send.c += -fno-strict-aliasing
|
||||
|
||||
# The BIND code elicits some harmless warnings.
|
||||
+cflags += -Wno-strict-prototypes -Wno-write-strings
|
||||
--- libc/sunrpc/Makefile.aliasing~ 2012-05-26 19:46:57.000000000 +0200
|
||||
+++ libc/sunrpc/Makefile 2012-12-27 19:46:13.397658439 +0100
|
||||
@@ -164,6 +164,10 @@ sunrpc-CPPFLAGS = -D_RPC_THREAD_SAFE_
|
||||
CPPFLAGS += $(sunrpc-CPPFLAGS)
|
||||
BUILD_CPPFLAGS += $(sunrpc-CPPFLAGS)
|
||||
|
||||
+CFLAGS-clnt_tcp.c += -fno-strict-aliasing
|
||||
+CFLAGS-clnt_udp.c += -fno-strict-aliasing
|
||||
+CFLAGS-clnt_unix.c += -fno-strict-aliasing
|
||||
+
|
||||
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
|
||||
--- libc/sysdeps/powerpc/powerpc64/Makefile.aliasing~ 2012-12-27 19:46:13.392658496 +0100
|
||||
+++ libc/sysdeps/powerpc/powerpc64/Makefile 2012-12-27 19:46:13.397658439 +0100
|
||||
@@ -37,6 +37,8 @@ CFLAGS-rtld-strnlen.os = $(no-special-re
|
||||
|
||||
CFLAGS-libc-start.c += -fno-asynchronous-unwind-tables
|
||||
|
||||
+CFLAGS-gmon-start.c += -fno-strict-aliasing
|
||||
+
|
||||
ifeq ($(subdir),csu)
|
||||
sysdep_routines += hp-timing
|
||||
elide-routines.os += hp-timing
|
|
@ -1,12 +0,0 @@
|
|||
diff -up glibc-2.33/po/fr.po.37~ glibc-2.33/po/fr.po
|
||||
--- glibc-2.33/po/fr.po.37~ 2021-02-02 00:15:42.693990072 +0100
|
||||
+++ glibc-2.33/po/fr.po 2021-02-02 00:17:05.609964010 +0100
|
||||
@@ -5651,7 +5651,7 @@ msgstr "Trop de fichiers ouverts dans le
|
||||
#. TRANS modes on an ordinary file.
|
||||
#: sysdeps/gnu/errlist.h:170
|
||||
msgid "Inappropriate ioctl for device"
|
||||
-msgstr "Ioctl() inappropré pour un périphérique"
|
||||
+msgstr "Ioctl() inapproprié pour un périphérique"
|
||||
|
||||
#. TRANS An attempt to execute a file that is currently open for writing, or
|
||||
#. TRANS write to a file that is currently being executed. Often using a
|
|
@ -1,11 +0,0 @@
|
|||
--- glibc-2.27/locale/programs/locarchive.c.0100~ 2018-02-02 20:28:32.043266608 +0100
|
||||
+++ glibc-2.27/locale/programs/locarchive.c 2018-02-02 20:29:20.894352169 +0100
|
||||
@@ -1391,7 +1391,7 @@ add_locales_to_archive (size_t nlist, ch
|
||||
{
|
||||
char fullname[fnamelen + 2 * strlen (d->d_name) + 7];
|
||||
|
||||
- if (d_type == DT_UNKNOWN)
|
||||
+ if (d_type == DT_UNKNOWN || d_type == DT_LNK)
|
||||
{
|
||||
strcpy (stpcpy (stpcpy (fullname, fname), "/"),
|
||||
d->d_name);
|
|
@ -1,26 +0,0 @@
|
|||
--- libc/nss/nsswitch.c.nssUpgrade~ 2012-10-10 17:35:46.000000000 +0200
|
||||
+++ libc/nss/nsswitch.c 2012-12-27 20:00:24.390443900 +0100
|
||||
@@ -399,9 +399,20 @@ nss_load_library (service_user *ni)
|
||||
ni->library->lib_handle = __libc_dlopen (shlib_name);
|
||||
if (ni->library->lib_handle == NULL)
|
||||
{
|
||||
- /* Failed to load the library. */
|
||||
- ni->library->lib_handle = (void *) -1l;
|
||||
- __set_errno (saved_errno);
|
||||
+ /* Failed to load the library. Try a fallback. */
|
||||
+ int n = __snprintf(shlib_name, shlen, "libnss_%s.so.%d.%d",
|
||||
+ ni->library->name, __GLIBC__, __GLIBC_MINOR__);
|
||||
+ if (n >= shlen)
|
||||
+ ni->library->lib_handle = NULL;
|
||||
+ else
|
||||
+ ni->library->lib_handle = __libc_dlopen (shlib_name);
|
||||
+
|
||||
+ if (ni->library->lib_handle == NULL)
|
||||
+ {
|
||||
+ /* Ok, really fail now. */
|
||||
+ ni->library->lib_handle = (void *) -1l;
|
||||
+ __set_errno (saved_errno);
|
||||
+ }
|
||||
}
|
||||
# ifdef USE_NSCD
|
||||
else if (is_nscd)
|
|
@ -1,44 +0,0 @@
|
|||
--- glibc-2.16.90-97bc38d7/misc/tst-error1.c.orig 2012-09-26 15:21:29.672179348 -0300
|
||||
+++ glibc-2.16.90-97bc38d7/misc/tst-error1.c 2012-09-26 15:21:59.422180301 -0300
|
||||
@@ -16,8 +16,8 @@ do_test (int argc, char *argv[])
|
||||
for (int i = 0; i < 1000; ++i)
|
||||
memcpy (&buf[i * (sizeof (str) - 1)], str, sizeof (str));
|
||||
error (0, 0, str);
|
||||
- error (0, 0, buf);
|
||||
- error (0, 0, buf);
|
||||
+ error (0, 0, "%s", buf);
|
||||
+ error (0, 0, "%s", buf);
|
||||
error (0, 0, str);
|
||||
return 0;
|
||||
}
|
||||
--- glibc-2.16.90-97bc38d7/posix/regexbug1.c.orig 2012-09-26 15:23:13.175182590 -0300
|
||||
+++ glibc-2.16.90-97bc38d7/posix/regexbug1.c 2012-09-26 15:23:32.198183235 -0300
|
||||
@@ -18,7 +18,7 @@ main (void)
|
||||
{
|
||||
char buf[100];
|
||||
regerror (reerr, &re, buf, sizeof buf);
|
||||
- error (EXIT_FAILURE, 0, buf);
|
||||
+ error (EXIT_FAILURE, 0, "%s", buf);
|
||||
}
|
||||
|
||||
if (regexec (&re, "002", 2, ma, 0) != 0)
|
||||
@@ -35,7 +35,7 @@ main (void)
|
||||
{
|
||||
char buf[100];
|
||||
regerror (reerr, &re, buf, sizeof buf);
|
||||
- error (EXIT_FAILURE, 0, buf);
|
||||
+ error (EXIT_FAILURE, 0, "%s", buf);
|
||||
}
|
||||
|
||||
if (regexec (&re, "002", 2, ma, 0) != 0)
|
||||
--- glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c.orig 2012-09-26 15:23:52.887183970 -0300
|
||||
+++ glibc-2.16.90-97bc38d7/stdio-common/test-vfprintf.c 2012-09-26 15:24:13.870184603 -0300
|
||||
@@ -92,7 +92,7 @@ main (void)
|
||||
fprintf (fp, "%s", large);
|
||||
fprintf (fp, "%.*s", 30000, large);
|
||||
large[20000] = '\0';
|
||||
- fprintf (fp, large);
|
||||
+ fprintf (fp, "%s", large);
|
||||
fprintf (fp, "%-1.300000000s", "hello");
|
||||
|
||||
if (fflush (fp) != 0 || ferror (fp) != 0 || fclose (fp) != 0)
|
|
@ -1,7 +1,8 @@
|
|||
--- glibc-2.18/rt/Makefile.tsp~ 2013-08-17 14:36:45.795373985 +0200
|
||||
+++ glibc-2.18/rt/Makefile 2013-08-17 14:37:45.341629554 +0200
|
||||
@@ -73,3 +73,13 @@ $(addprefix $(objpfx),$(tests)): $(objpf
|
||||
endif
|
||||
diff -up glibc-2.34/rt/Makefile.39~ glibc-2.34/rt/Makefile
|
||||
--- glibc-2.34/rt/Makefile.39~ 2021-08-02 10:35:18.780415863 +0200
|
||||
+++ glibc-2.34/rt/Makefile 2021-08-02 10:35:56.864655876 +0200
|
||||
@@ -114,3 +114,13 @@ endif
|
||||
endif # !$(pthread-in-libc)
|
||||
|
||||
tst-mqueue7-ARGS = -- $(host-test-program-cmd)
|
||||
+
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
--- glibc-2.27/Makeconfig.0133~ 2018-02-02 20:36:50.869704855 +0100
|
||||
+++ glibc-2.27/Makeconfig 2018-02-02 20:37:32.598866637 +0100
|
||||
@@ -360,6 +360,10 @@ else
|
||||
diff -up glibc-2.36/Makeconfig.35~ glibc-2.36/Makeconfig
|
||||
--- glibc-2.36/Makeconfig.35~ 2022-08-02 13:08:59.219749575 +0200
|
||||
+++ glibc-2.36/Makeconfig 2022-08-02 13:11:51.923013290 +0200
|
||||
@@ -109,7 +109,6 @@ endif
|
||||
#### Do NOT edit this file.
|
||||
####
|
||||
|
||||
-
|
||||
# Common prefix for machine-independent installation directories.
|
||||
ifeq ($(origin prefix),undefined) # ifndef would override explicit empty value.
|
||||
prefix = /usr/local
|
||||
@@ -358,6 +357,10 @@ else
|
||||
real-static-start-installed-name = $(static-start-installed-name)
|
||||
endif
|
||||
|
||||
|
@ -8,6 +17,6 @@
|
|||
+LDFLAGS.so += -fuse-ld=bfd
|
||||
+LDFLAGS-rtld += -fuse-ld=bfd
|
||||
+
|
||||
ifeq (yesyes,$(build-shared)$(have-z-combreloc))
|
||||
combreloc-LDFLAGS = -Wl,-z,combreloc
|
||||
LDFLAGS.so += $(combreloc-LDFLAGS)
|
||||
relro-LDFLAGS = -Wl,-z,relro
|
||||
LDFLAGS.so += $(relro-LDFLAGS)
|
||||
LDFLAGS-rtld += $(relro-LDFLAGS)
|
||||
|
|
|
@ -1,28 +1,20 @@
|
|||
diff -ruN a/string/strcoll_l.c b/string/strcoll_l.c
|
||||
--- a/string/strcoll_l.c 2021-02-02 02:15:33.000000000 +0900
|
||||
+++ b/string/strcoll_l.c 2021-09-17 13:36:43.564148616 +0900
|
||||
diff -up glibc-2.29/locale/weight.h.omv~ glibc-2.29/locale/weight.h
|
||||
diff -up glibc-2.29/string/strcoll_l.c.omv~ glibc-2.29/string/strcoll_l.c
|
||||
--- glibc-2.29/string/strcoll_l.c.omv~ 2019-02-01 01:52:36.824032337 +0100
|
||||
+++ glibc-2.29/string/strcoll_l.c 2019-02-01 01:56:42.412484448 +0100
|
||||
@@ -40,7 +40,11 @@
|
||||
#define CONCAT1(a,b) a##b
|
||||
|
||||
#include "../locale/localeinfo.h"
|
||||
+/* See Line 178+ */
|
||||
+DIAG_PUSH_NEEDS_COMMENT;
|
||||
+DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
|
||||
+DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
|
||||
#include WEIGHT_H
|
||||
+DIAG_POP_NEEDS_COMMENT;
|
||||
|
||||
/* Track status while looking for sequences in a string. */
|
||||
typedef struct
|
||||
@@ -181,7 +185,7 @@
|
||||
ensures that seq->save_idx was saved to first and contains a
|
||||
valid value. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
- DIAG_IGNORE_Os_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
|
||||
+ DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
|
||||
len = weights[idx++];
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
/* Skip over indices of previous levels. */
|
||||
@@ -292,7 +296,7 @@
|
||||
@@ -292,7 +296,7 @@ STRCOLL (const STRING_TYPE *s1, const ST
|
||||
|
||||
int result = 0, rule = 0;
|
||||
|
||||
|
@ -31,12 +23,12 @@ diff -ruN a/string/strcoll_l.c b/string/strcoll_l.c
|
|||
seq1.back_us and seq2.back_us might be used uninitialized.
|
||||
Sometimes this warning appears at locations in locale/weightwc.h
|
||||
where the actual use is, but on architectures other than x86_64,
|
||||
@@ -300,7 +304,7 @@
|
||||
@@ -300,7 +304,7 @@ STRCOLL (const STRING_TYPE *s1, const ST
|
||||
seq2. This uninitialized use is impossible for the same reason
|
||||
as described in comments in locale/weightwc.h. */
|
||||
DIAG_PUSH_NEEDS_COMMENT;
|
||||
- DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
|
||||
+ DIAG_IGNORE_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
|
||||
+ DIAG_IGNORE_Os_NEEDS_COMMENT (8, "-Wmaybe-uninitialized");
|
||||
coll_seq seq1, seq2;
|
||||
DIAG_POP_NEEDS_COMMENT;
|
||||
seq1.len = 0;
|
|
@ -1,7 +1,7 @@
|
|||
diff -up glibc-2.31.20200715/csu/Makefile.54~ glibc-2.31.20200715/csu/Makefile
|
||||
--- glibc-2.31.20200715/csu/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/csu/Makefile 2020-07-15 23:58:52.458734215 +0200
|
||||
@@ -114,7 +114,7 @@ endif
|
||||
diff -up glibc-2.36/csu/Makefile.37~ glibc-2.36/csu/Makefile
|
||||
--- glibc-2.36/csu/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/csu/Makefile 2022-08-02 13:12:29.205993485 +0200
|
||||
@@ -115,7 +115,7 @@ endif
|
||||
asm-CPPFLAGS += -I$(objpfx).
|
||||
|
||||
# Enable unwinding so backtrace unwinds to __libc_start_main
|
||||
|
@ -10,22 +10,21 @@ diff -up glibc-2.31.20200715/csu/Makefile.54~ glibc-2.31.20200715/csu/Makefile
|
|||
|
||||
include ../Rules
|
||||
|
||||
diff -up glibc-2.31.20200715/debug/Makefile.54~ glibc-2.31.20200715/debug/Makefile
|
||||
--- glibc-2.31.20200715/debug/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/debug/Makefile 2020-07-15 23:58:52.458734215 +0200
|
||||
@@ -109,6 +109,8 @@ CPPFLAGS-tst-longjmp_chk2.c += -D_FORTIF
|
||||
CFLAGS-tst-longjmp_chk3.c += -fexceptions -fasynchronous-unwind-tables
|
||||
diff -up glibc-2.36/debug/Makefile.37~ glibc-2.36/debug/Makefile
|
||||
--- glibc-2.36/debug/Makefile.37~ 2022-08-02 13:12:29.205993485 +0200
|
||||
+++ glibc-2.36/debug/Makefile 2022-08-02 13:12:51.373989783 +0200
|
||||
@@ -111,6 +111,7 @@ CFLAGS-tst-longjmp_chk3.c += -fexception
|
||||
CPPFLAGS-tst-longjmp_chk3.c += -D_FORTIFY_SOURCE=1
|
||||
|
||||
CPPFLAGS-tst-realpath-chk.c += -D_FORTIFY_SOURCE=2
|
||||
CPPFLAGS-tst-read-chk-cancel.c += -D_FORTIFY_SOURCE=2
|
||||
+CFLAGS-longjmp_chk.c += -fno-strict-aliasing
|
||||
+
|
||||
# We know these tests have problems with format strings, this is what
|
||||
# we are testing. Disable that warning. They are also testing
|
||||
# deprecated functions (notably gets) so disable that warning as well.
|
||||
diff -up glibc-2.31.20200715/inet/Makefile.54~ glibc-2.31.20200715/inet/Makefile
|
||||
--- glibc-2.31.20200715/inet/Makefile.54~ 2020-07-15 23:58:52.458734215 +0200
|
||||
+++ glibc-2.31.20200715/inet/Makefile 2020-07-15 23:59:22.037104247 +0200
|
||||
@@ -109,6 +109,20 @@ CFLAGS-getnetgrent_r.c += -fexceptions
|
||||
|
||||
# _FORTIFY_SOURCE tests.
|
||||
# Auto-generate tests for _FORTIFY_SOURCE for different levels, compilers and
|
||||
diff -up glibc-2.36/inet/Makefile.37~ glibc-2.36/inet/Makefile
|
||||
--- glibc-2.36/inet/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/inet/Makefile 2022-08-02 13:12:29.206993485 +0200
|
||||
@@ -110,6 +110,20 @@ CFLAGS-getnetgrent_r.c += -fexceptions
|
||||
CFLAGS-tst-checks-posix.c += -std=c99
|
||||
CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
|
||||
|
||||
|
@ -46,10 +45,10 @@ diff -up glibc-2.31.20200715/inet/Makefile.54~ glibc-2.31.20200715/inet/Makefile
|
|||
endif
|
||||
|
||||
# Install the rpc database file.
|
||||
diff -up glibc-2.31.20200715/libio/libioP.h.54~ glibc-2.31.20200715/libio/libioP.h
|
||||
--- glibc-2.31.20200715/libio/libioP.h.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/libio/libioP.h 2020-07-15 23:58:52.458734215 +0200
|
||||
@@ -842,8 +842,8 @@ extern struct _IO_FILE_plus _IO_stderr_;
|
||||
diff -up glibc-2.36/libio/libioP.h.37~ glibc-2.36/libio/libioP.h
|
||||
--- glibc-2.36/libio/libioP.h.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/libio/libioP.h 2022-08-02 13:12:29.206993485 +0200
|
||||
@@ -841,8 +841,8 @@ extern struct _IO_FILE_plus _IO_stderr_;
|
||||
static inline bool
|
||||
_IO_legacy_file (FILE *fp)
|
||||
{
|
||||
|
@ -60,7 +59,7 @@ diff -up glibc-2.31.20200715/libio/libioP.h.54~ glibc-2.31.20200715/libio/libioP
|
|||
}
|
||||
#endif
|
||||
|
||||
@@ -853,8 +853,8 @@ static inline void
|
||||
@@ -852,8 +852,8 @@ static inline void
|
||||
_IO_deallocate_file (FILE *fp)
|
||||
{
|
||||
/* The current stream variables. */
|
||||
|
@ -71,9 +70,9 @@ diff -up glibc-2.31.20200715/libio/libioP.h.54~ glibc-2.31.20200715/libio/libioP
|
|||
return;
|
||||
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
|
||||
if (_IO_legacy_file (fp))
|
||||
diff -up glibc-2.31.20200715/libio/Makefile.54~ glibc-2.31.20200715/libio/Makefile
|
||||
--- glibc-2.31.20200715/libio/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/libio/Makefile 2020-07-15 23:58:52.458734215 +0200
|
||||
diff -up glibc-2.36/libio/Makefile.37~ glibc-2.36/libio/Makefile
|
||||
--- glibc-2.36/libio/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/libio/Makefile 2022-08-02 13:12:29.206993485 +0200
|
||||
@@ -154,6 +154,19 @@ CFLAGS-iofopen.c += -fexceptions
|
||||
CFLAGS-iofopen64.c += -fexceptions
|
||||
CFLAGS-oldtmpfile.c += -fexceptions
|
||||
|
@ -94,9 +93,9 @@ diff -up glibc-2.31.20200715/libio/Makefile.54~ glibc-2.31.20200715/libio/Makefi
|
|||
|
||||
CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\"
|
||||
|
||||
diff -up glibc-2.31.20200715/locale/Makefile.54~ glibc-2.31.20200715/locale/Makefile
|
||||
--- glibc-2.31.20200715/locale/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/locale/Makefile 2020-07-15 23:58:52.458734215 +0200
|
||||
diff -up glibc-2.36/locale/Makefile.37~ glibc-2.36/locale/Makefile
|
||||
--- glibc-2.36/locale/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/locale/Makefile 2022-08-02 13:12:29.206993485 +0200
|
||||
@@ -106,6 +106,7 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH
|
||||
CFLAGS-charmap.c += -Wno-write-strings -Wno-char-subscripts
|
||||
CFLAGS-locfile.c += -Wno-write-strings -Wno-char-subscripts
|
||||
|
@ -105,21 +104,21 @@ diff -up glibc-2.31.20200715/locale/Makefile.54~ glibc-2.31.20200715/locale/Make
|
|||
|
||||
# Set libof-* for each routine.
|
||||
cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
|
||||
diff -up glibc-2.31.20200715/misc/Makefile.54~ glibc-2.31.20200715/misc/Makefile
|
||||
--- glibc-2.31.20200715/misc/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/misc/Makefile 2020-07-15 23:58:52.458734215 +0200
|
||||
@@ -142,6 +142,8 @@ CFLAGS-sbrk.op = $(no-stack-protector)
|
||||
CFLAGS-brk.o = $(no-stack-protector)
|
||||
CFLAGS-brk.op = $(no-stack-protector)
|
||||
diff -up glibc-2.36/misc/Makefile.37~ glibc-2.36/misc/Makefile
|
||||
--- glibc-2.36/misc/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/misc/Makefile 2022-08-02 13:12:29.207993484 +0200
|
||||
@@ -156,6 +156,8 @@ CFLAGS-mmap.op = $(no-stack-protector)
|
||||
CFLAGS-mmap64.o = $(no-stack-protector)
|
||||
CFLAGS-mmap64.op = $(no-stack-protector)
|
||||
|
||||
+CFLAGS-tsearch.c += -fno-strict-aliasing
|
||||
+
|
||||
include ../Rules
|
||||
|
||||
$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
|
||||
diff -up glibc-2.31.20200715/nis/Makefile.54~ glibc-2.31.20200715/nis/Makefile
|
||||
--- glibc-2.31.20200715/nis/Makefile.54~ 2020-07-15 23:58:52.458734215 +0200
|
||||
+++ glibc-2.31.20200715/nis/Makefile 2020-07-15 23:59:49.717449495 +0200
|
||||
diff -up glibc-2.36/nis/Makefile.37~ glibc-2.36/nis/Makefile
|
||||
--- glibc-2.36/nis/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/nis/Makefile 2022-08-02 13:12:29.207993484 +0200
|
||||
@@ -52,6 +52,7 @@ endif # have-GLIBC_2.28
|
||||
|
||||
include ../Rules
|
||||
|
@ -128,12 +127,12 @@ diff -up glibc-2.31.20200715/nis/Makefile.54~ glibc-2.31.20200715/nis/Makefile
|
|||
|
||||
libnsl-libc = $(common-objpfx)linkobj/libc.so
|
||||
# Target-specific variable setting to link objects using deprecated
|
||||
diff -up glibc-2.31.20200715/nptl/Makefile.54~ glibc-2.31.20200715/nptl/Makefile
|
||||
--- glibc-2.31.20200715/nptl/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/nptl/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -254,6 +254,22 @@ CFLAGS-fsync.c += -fexceptions -fasynchr
|
||||
diff -up glibc-2.36/nptl/Makefile.37~ glibc-2.36/nptl/Makefile
|
||||
--- glibc-2.36/nptl/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/nptl/Makefile 2022-08-02 13:12:29.207993484 +0200
|
||||
@@ -262,6 +262,22 @@ CFLAGS-sem_clockwait.c = -fexceptions -f
|
||||
|
||||
CFLAGS-pt-system.c += -fexceptions
|
||||
CFLAGS-futex-internal.c += -fexceptions -fasynchronous-unwind-tables
|
||||
|
||||
+CFLAGS-pthread_create.c += -fno-strict-aliasing
|
||||
+CFLAGS-sem_clockwait.c += -fno-strict-aliasing
|
||||
|
@ -154,9 +153,9 @@ diff -up glibc-2.31.20200715/nptl/Makefile.54~ glibc-2.31.20200715/nptl/Makefile
|
|||
LDLIBS-tst-once5 = -lstdc++
|
||||
CFLAGS-tst-thread_local1.o = -std=gnu++11
|
||||
LDLIBS-tst-thread_local1 = -lstdc++
|
||||
diff -up glibc-2.31.20200715/nscd/Makefile.54~ glibc-2.31.20200715/nscd/Makefile
|
||||
--- glibc-2.31.20200715/nscd/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/nscd/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
diff -up glibc-2.36/nscd/Makefile.37~ glibc-2.36/nscd/Makefile
|
||||
--- glibc-2.36/nscd/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/nscd/Makefile 2022-08-02 13:12:29.207993484 +0200
|
||||
@@ -79,6 +79,14 @@ CFLAGS-nscd_gethst_r.c += -fexceptions
|
||||
CFLAGS-nscd_getai.c += -fexceptions
|
||||
CFLAGS-nscd_initgroups.c += -fexceptions
|
||||
|
@ -172,22 +171,25 @@ diff -up glibc-2.31.20200715/nscd/Makefile.54~ glibc-2.31.20200715/nscd/Makefile
|
|||
CPPFLAGS-nscd += -D_FORTIFY_SOURCE=2
|
||||
|
||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||
diff -up glibc-2.31.20200715/nss/Makefile.54~ glibc-2.31.20200715/nss/Makefile
|
||||
--- glibc-2.31.20200715/nss/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/nss/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -183,3 +183,6 @@ $(objpfx)tst-nss-files-alias-leak: $(lib
|
||||
diff -up glibc-2.36/nss/Makefile.37~ glibc-2.36/nss/Makefile
|
||||
--- glibc-2.36/nss/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/nss/Makefile 2022-08-02 13:12:29.207993484 +0200
|
||||
@@ -206,6 +206,9 @@ endif
|
||||
$(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so
|
||||
$(objpfx)tst-nss-files-alias-truncated: $(libdl)
|
||||
$(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so
|
||||
+
|
||||
|
||||
+CFLAGS-getnssent_r.c += -fno-strict-aliasing
|
||||
+CFLAGS-digits_dots.c += -fno-strict-aliasing
|
||||
diff -up glibc-2.31.20200715/posix/Makefile.54~ glibc-2.31.20200715/posix/Makefile
|
||||
--- glibc-2.31.20200715/posix/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/posix/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -249,6 +249,13 @@ CFLAGS-execvp.os = -fomit-frame-pointer
|
||||
CFLAGS-execlp.os = -fomit-frame-pointer
|
||||
+
|
||||
# Disable DT_RUNPATH on NSS tests so that the glibc internal NSS
|
||||
# functions can load testing NSS modules via DT_RPATH.
|
||||
LDFLAGS-tst-nss-test1 = -Wl,--disable-new-dtags
|
||||
diff -up glibc-2.36/posix/Makefile.37~ glibc-2.36/posix/Makefile
|
||||
--- glibc-2.36/posix/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/posix/Makefile 2022-08-02 13:12:29.208993484 +0200
|
||||
@@ -281,6 +281,13 @@ CFLAGS-execlp.os = -fomit-frame-pointer
|
||||
CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-fork.c = $(libio-mtsafe)
|
||||
|
||||
+CFLAGS-glob.c += -fno-strict-aliasing
|
||||
+CFLAGS-glob-lstat-compat.c += -fno-strict-aliasing
|
||||
|
@ -199,10 +201,10 @@ diff -up glibc-2.31.20200715/posix/Makefile.54~ glibc-2.31.20200715/posix/Makefi
|
|||
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
|
||||
--none random --col --color --colour
|
||||
|
||||
diff -up glibc-2.31.20200715/resolv/Makefile.54~ glibc-2.31.20200715/resolv/Makefile
|
||||
--- glibc-2.31.20200715/resolv/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/resolv/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -144,6 +144,19 @@ include ../gen-locales.mk
|
||||
diff -up glibc-2.36/resolv/Makefile.37~ glibc-2.36/resolv/Makefile
|
||||
--- glibc-2.36/resolv/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/resolv/Makefile 2022-08-02 13:12:29.208993484 +0200
|
||||
@@ -216,6 +216,19 @@ include ../gen-locales.mk
|
||||
|
||||
CFLAGS-res_hconf.c += -fexceptions
|
||||
|
||||
|
@ -222,35 +224,36 @@ diff -up glibc-2.31.20200715/resolv/Makefile.54~ glibc-2.31.20200715/resolv/Make
|
|||
# The DNS NSS modules needs the resolver.
|
||||
$(objpfx)libnss_dns.so: $(objpfx)libresolv.so
|
||||
|
||||
diff -up glibc-2.31.20200715/rt/Makefile.54~ glibc-2.31.20200715/rt/Makefile
|
||||
--- glibc-2.31.20200715/rt/Makefile.54~ 2020-07-15 23:58:52.453734152 +0200
|
||||
+++ glibc-2.31.20200715/rt/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -59,6 +59,8 @@ CFLAGS-mq_timedreceive.c += -fexceptions
|
||||
diff -up glibc-2.36/rt/Makefile.37~ glibc-2.36/rt/Makefile
|
||||
--- glibc-2.36/rt/Makefile.37~ 2022-08-02 13:12:29.115993511 +0200
|
||||
+++ glibc-2.36/rt/Makefile 2022-08-02 13:12:29.208993484 +0200
|
||||
@@ -100,6 +100,8 @@ CFLAGS-aio_suspend.c += -fexceptions
|
||||
CFLAGS-mq_timedreceive.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-mq_timedsend.c += -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-librt-cancellation.c += -fasynchronous-unwind-tables
|
||||
|
||||
+CFLAGS-timer_create.c += -fno-strict-aliasing
|
||||
+
|
||||
LDFLAGS-rt.so = -Wl,--enable-new-dtags,-z,nodelete
|
||||
|
||||
$(objpfx)librt.so: $(shared-thread-library)
|
||||
diff -up glibc-2.31.20200715/setjmp/Makefile.54~ glibc-2.31.20200715/setjmp/Makefile
|
||||
--- glibc-2.31.20200715/setjmp/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/setjmp/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -31,6 +31,9 @@ tests := tst-setjmp jmpbug bug269-setjm
|
||||
tst-sigsetjmp tst-setjmp-static
|
||||
tests-static := tst-setjmp-static
|
||||
diff -up glibc-2.36/setjmp/Makefile.37~ glibc-2.36/setjmp/Makefile
|
||||
--- glibc-2.36/setjmp/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/setjmp/Makefile 2022-08-02 13:12:29.208993484 +0200
|
||||
@@ -36,6 +36,10 @@ tests-internal := \
|
||||
|
||||
gen-as-const-headers += jmp_buf-macros.sym
|
||||
|
||||
+CFLAGS-sigjmp.c += -fno-strict-aliasing
|
||||
+CFLAGS-longjmp.c += -fno-strict-aliasing
|
||||
+CFLAGS-longjmp_chk.c += -fno-strict-aliasing
|
||||
|
||||
+
|
||||
include ../Rules
|
||||
|
||||
diff -up glibc-2.31.20200715/stdio-common/Makefile.54~ glibc-2.31.20200715/stdio-common/Makefile
|
||||
--- glibc-2.31.20200715/stdio-common/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/stdio-common/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -152,6 +152,10 @@ $(objpfx)tst-errno-manual.out: tst-errno
|
||||
$(objpfx)tst-setjmp-fp: $(libm)
|
||||
diff -up glibc-2.36/stdio-common/Makefile.37~ glibc-2.36/stdio-common/Makefile
|
||||
--- glibc-2.36/stdio-common/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/stdio-common/Makefile 2022-08-02 13:12:29.209993484 +0200
|
||||
@@ -350,6 +350,10 @@ $(objpfx)tst-errno-manual.out: tst-errno
|
||||
|
||||
CFLAGS-vfprintf.c += -Wno-uninitialized
|
||||
CFLAGS-vfwprintf.c += -Wno-uninitialized
|
||||
|
@ -261,9 +264,9 @@ diff -up glibc-2.31.20200715/stdio-common/Makefile.54~ glibc-2.31.20200715/stdio
|
|||
|
||||
CFLAGS-tmpfile.c += -fexceptions
|
||||
CFLAGS-tmpfile64.c += -fexceptions
|
||||
diff -up glibc-2.31.20200715/sunrpc/Makefile.54~ glibc-2.31.20200715/sunrpc/Makefile
|
||||
--- glibc-2.31.20200715/sunrpc/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/sunrpc/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
diff -up glibc-2.36/sunrpc/Makefile.37~ glibc-2.36/sunrpc/Makefile
|
||||
--- glibc-2.36/sunrpc/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/sunrpc/Makefile 2022-08-02 13:12:29.209993484 +0200
|
||||
@@ -97,6 +97,21 @@ CFLAGS-pmap_rmt.c += -fexceptions
|
||||
CFLAGS-clnt_perr.c += -fexceptions
|
||||
CFLAGS-openchild.c += -fexceptions
|
||||
|
@ -286,10 +289,10 @@ diff -up glibc-2.31.20200715/sunrpc/Makefile.54~ glibc-2.31.20200715/sunrpc/Make
|
|||
$(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so
|
||||
$(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so
|
||||
diff -up glibc-2.31.20200715/support/Makefile.54~ glibc-2.31.20200715/support/Makefile
|
||||
--- glibc-2.31.20200715/support/Makefile.54~ 2020-07-15 17:58:07.000000000 +0200
|
||||
+++ glibc-2.31.20200715/support/Makefile 2020-07-15 23:58:52.459734227 +0200
|
||||
@@ -185,6 +185,8 @@ ifeq ($(build-shared),yes)
|
||||
diff -up glibc-2.36/support/Makefile.37~ glibc-2.36/support/Makefile
|
||||
--- glibc-2.36/support/Makefile.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/support/Makefile 2022-08-02 13:12:29.209993484 +0200
|
||||
@@ -217,6 +217,8 @@ ifeq ($(build-shared),yes)
|
||||
libsupport-inhibit-o += .o
|
||||
endif
|
||||
|
||||
|
@ -298,9 +301,9 @@ diff -up glibc-2.31.20200715/support/Makefile.54~ glibc-2.31.20200715/support/Ma
|
|||
CFLAGS-support_paths.c = \
|
||||
-DSRCDIR_PATH=\"`cd .. ; pwd`\" \
|
||||
-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
|
||||
diff -up glibc-2.32/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.omv~ glibc-2.32/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
|
||||
--- glibc-2.32/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.omv~ 2020-08-10 05:01:38.876042446 +0200
|
||||
+++ glibc-2.32/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h 2020-08-10 05:06:11.774020733 +0200
|
||||
diff -up glibc-2.36/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.37~ glibc-2.36/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
|
||||
--- glibc-2.36/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.37~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h 2022-08-02 13:12:29.209993484 +0200
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include <ldsodefs.h>
|
||||
|
|
206
glibc-2.33-clang-_Float32-_Float64.patch
Normal file
206
glibc-2.33-clang-_Float32-_Float64.patch
Normal file
|
@ -0,0 +1,206 @@
|
|||
diff -up glibc-2.33/bits/floatn-common.h.92~ glibc-2.33/bits/floatn-common.h
|
||||
--- glibc-2.33/bits/floatn-common.h.92~ 2021-02-01 18:15:33.000000000 +0100
|
||||
+++ glibc-2.33/bits/floatn-common.h 2021-07-10 03:25:10.190826118 +0200
|
||||
@@ -145,7 +145,7 @@ typedef _Complex float __cfloat16 __attr
|
||||
# endif
|
||||
|
||||
# if __HAVE_FLOAT32
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
# define __CFLOAT32 _Complex float
|
||||
# else
|
||||
# define __CFLOAT32 _Complex _Float32
|
||||
@@ -153,7 +153,7 @@ typedef _Complex float __cfloat16 __attr
|
||||
# endif
|
||||
|
||||
# if __HAVE_FLOAT64
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
# ifdef __NO_LONG_DOUBLE_MATH
|
||||
# define __CFLOAT64 _Complex long double
|
||||
# else
|
||||
@@ -165,7 +165,7 @@ typedef _Complex float __cfloat16 __attr
|
||||
# endif
|
||||
|
||||
# if __HAVE_FLOAT32X
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
# define __CFLOAT32X _Complex double
|
||||
# else
|
||||
# define __CFLOAT32X _Complex _Float32x
|
||||
@@ -173,7 +173,7 @@ typedef _Complex float __cfloat16 __attr
|
||||
# endif
|
||||
|
||||
# if __HAVE_FLOAT64X
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
# if __HAVE_FLOAT64X_LONG_DOUBLE
|
||||
# define __CFLOAT64X _Complex long double
|
||||
# else
|
||||
@@ -210,11 +210,11 @@ typedef float _Float16 __attribute__ ((_
|
||||
|
||||
# if __HAVE_FLOAT32
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef float _Float32;
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf32() (__builtin_huge_valf ())
|
||||
# define __builtin_inff32() (__builtin_inff ())
|
||||
# define __builtin_nanf32(x) (__builtin_nanf (x))
|
||||
@@ -234,11 +234,11 @@ typedef float _Float32;
|
||||
|
||||
# ifdef __NO_LONG_DOUBLE_MATH
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef long double _Float64;
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf64() (__builtin_huge_vall ())
|
||||
# define __builtin_inff64() (__builtin_infl ())
|
||||
# define __builtin_nanf64(x) (__builtin_nanl (x))
|
||||
@@ -247,11 +247,11 @@ typedef long double _Float64;
|
||||
|
||||
# else
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef double _Float64;
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf64() (__builtin_huge_val ())
|
||||
# define __builtin_inff64() (__builtin_inf ())
|
||||
# define __builtin_nanf64(x) (__builtin_nan (x))
|
||||
@@ -264,11 +264,11 @@ typedef double _Float64;
|
||||
|
||||
# if __HAVE_FLOAT32X
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef double _Float32x;
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf32x() (__builtin_huge_val ())
|
||||
# define __builtin_inff32x() (__builtin_inf ())
|
||||
# define __builtin_nanf32x(x) (__builtin_nan (x))
|
||||
@@ -281,11 +281,11 @@ typedef double _Float32x;
|
||||
|
||||
# if __HAVE_FLOAT64X_LONG_DOUBLE
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef long double _Float64x;
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf64x() (__builtin_huge_vall ())
|
||||
# define __builtin_inff64x() (__builtin_infl ())
|
||||
# define __builtin_nanf64x(x) (__builtin_nanl (x))
|
||||
@@ -294,11 +294,11 @@ typedef long double _Float64x;
|
||||
|
||||
# else
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef _Float128 _Float64x;
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf64x() (__builtin_huge_valf128 ())
|
||||
# define __builtin_inff64x() (__builtin_inff128 ())
|
||||
# define __builtin_nanf64x(x) (__builtin_nanf128 (x))
|
||||
@@ -311,11 +311,11 @@ typedef _Float128 _Float64x;
|
||||
|
||||
# if __HAVE_FLOAT128X
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
# error "_Float128x supported but no type"
|
||||
# endif
|
||||
|
||||
-# if !__GNUC_PREREQ (7, 0)
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined(__clang__)
|
||||
# define __builtin_huge_valf128x() ((_Float128x) __builtin_huge_val ())
|
||||
# define __builtin_inff128x() ((_Float128x) __builtin_inf ())
|
||||
# define __builtin_nanf128x(x) ((_Float128x) __builtin_nan (x))
|
||||
diff -up glibc-2.33/sysdeps/ieee754/ldbl-128/bits/floatn.h.92~ glibc-2.33/sysdeps/ieee754/ldbl-128/bits/floatn.h
|
||||
--- glibc-2.33/sysdeps/ieee754/ldbl-128/bits/floatn.h.92~ 2021-02-01 18:15:33.000000000 +0100
|
||||
+++ glibc-2.33/sysdeps/ieee754/ldbl-128/bits/floatn.h 2021-07-10 03:24:05.274345249 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
/* Defined to concatenate the literal suffix to be used with _Float128
|
||||
types, if __HAVE_FLOAT128 is 1. */
|
||||
# if __HAVE_FLOAT128
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
/* The literal suffix f128 exists only since GCC 7.0. */
|
||||
# define __f128(x) x##l
|
||||
# else
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
|
||||
# if __HAVE_FLOAT128
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
# define __CFLOAT128 _Complex long double
|
||||
# else
|
||||
# define __CFLOAT128 _Complex _Float128
|
||||
@@ -76,7 +76,7 @@
|
||||
# if __HAVE_FLOAT128
|
||||
|
||||
/* The type _Float128 exists only since GCC 7.0. */
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined __clang__
|
||||
typedef long double _Float128;
|
||||
# endif
|
||||
|
||||
diff -up glibc-2.33/sysdeps/x86/bits/floatn.h.92~ glibc-2.33/sysdeps/x86/bits/floatn.h
|
||||
--- glibc-2.33/sysdeps/x86/bits/floatn.h.92~ 2021-02-01 18:15:33.000000000 +0100
|
||||
+++ glibc-2.33/sysdeps/x86/bits/floatn.h 2021-07-10 03:24:05.274345249 +0200
|
||||
@@ -58,7 +58,7 @@
|
||||
/* Defined to concatenate the literal suffix to be used with _Float128
|
||||
types, if __HAVE_FLOAT128 is 1. */
|
||||
# if __HAVE_FLOAT128
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
/* The literal suffix f128 exists only since GCC 7.0. */
|
||||
# define __f128(x) x##q
|
||||
# else
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
|
||||
# if __HAVE_FLOAT128
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
/* Add a typedef for older GCC compilers which don't natively support
|
||||
_Complex _Float128. */
|
||||
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
|
||||
@@ -82,7 +82,7 @@ typedef _Complex float __cfloat128 __att
|
||||
# if __HAVE_FLOAT128
|
||||
|
||||
/* The type _Float128 exists only since GCC 7.0. */
|
||||
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
|
||||
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus || defined(__clang__)
|
||||
typedef __float128 _Float128;
|
||||
# endif
|
||||
|
||||
@@ -108,7 +108,7 @@ typedef __float128 _Float128;
|
||||
e.g.: __builtin_signbitf128, before GCC 6. However, there has never
|
||||
been a __builtin_signbitf128 in GCC and the type-generic builtin is
|
||||
only available since GCC 6. */
|
||||
-# if !__GNUC_PREREQ (6, 0)
|
||||
+# if !__GNUC_PREREQ (6, 0) || defined(__clang__)
|
||||
# define __builtin_signbitf128 __signbitf128
|
||||
# endif
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
diff -up glibc-2.33/stdlib/canonicalize.c.omv~ glibc-2.33/stdlib/canonicalize.c
|
||||
--- glibc-2.33/stdlib/canonicalize.c.omv~ 2021-02-02 01:00:04.338272299 +0100
|
||||
+++ glibc-2.33/stdlib/canonicalize.c 2021-02-02 00:56:17.245117135 +0100
|
||||
@@ -413,7 +413,10 @@ error_nomem:
|
||||
return failed ? NULL : resolved;
|
||||
}
|
||||
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
return scratch_buffer_dupfree (rname_buf, dest - rname);
|
||||
+#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
/* Return the canonical absolute name of file NAME. A canonical name
|
||||
diff -up glibc-2.33/elf/cache.c.omv~ glibc-2.33/elf/cache.c
|
||||
--- glibc-2.33/elf/cache.c.omv~ 2021-02-02 01:12:23.403424474 +0100
|
||||
+++ glibc-2.33/elf/cache.c 2021-02-02 01:18:28.015783023 +0100
|
||||
@@ -756,6 +756,7 @@ save_cache (const char *cache_name)
|
||||
/* Align file position to 4. */
|
||||
off64_t old_offset = lseek64 (fd, extension_offset, SEEK_SET);
|
||||
assert ((unsigned long long int) (extension_offset - old_offset) < 4);
|
||||
+ (void)old_offset; /* Prevent unused variable warning with NDEBUG --> assert = nothing */
|
||||
write_extensions (fd, str_offset, extension_offset);
|
||||
}
|
||||
|
16
glibc-2.33-gcc-11.1.patch
Normal file
16
glibc-2.33-gcc-11.1.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff -up glibc-2.33/sunrpc/netname.c.omv~ glibc-2.33/sunrpc/netname.c
|
||||
--- glibc-2.33/sunrpc/netname.c.omv~ 2021-05-11 21:34:01.180317491 +0200
|
||||
+++ glibc-2.33/sunrpc/netname.c 2021-05-11 21:36:17.125314747 +0200
|
||||
@@ -49,7 +49,12 @@ user2netname (char netname[MAXNETNAMELEN
|
||||
if ((strlen (dfltdom) + OPSYS_LEN + 3 + MAXIPRINT) > (size_t) MAXNETNAMELEN)
|
||||
return 0;
|
||||
|
||||
+ /* The check above makes sure the line below is actually ok, but
|
||||
+ * gcc 11.1 spews a warning... */
|
||||
+#pragma GCC diagnostic push
|
||||
+#pragma GCC diagnostic ignored "-Wformat-overflow"
|
||||
sprintf (netname, "%s.%d@%s", OPSYS, uid, dfltdom);
|
||||
+#pragma GCC diagnostic pop
|
||||
i = strlen (netname);
|
||||
if (netname[i - 1] == '.')
|
||||
netname[i - 1] = '\0';
|
24
glibc-2.33-no-x86-isa-level.patch
Normal file
24
glibc-2.33-no-x86-isa-level.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff -up glibc-2.35/sysdeps/x86/configure.48~ glibc-2.35/sysdeps/x86/configure
|
||||
--- glibc-2.35/sysdeps/x86/configure.48~ 2022-02-03 11:26:20.165426217 +0100
|
||||
+++ glibc-2.35/sysdeps/x86/configure 2022-02-03 11:27:41.422729679 +0100
|
||||
@@ -134,7 +134,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS
|
||||
test $ac_status = 0; }; }; then
|
||||
count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l`
|
||||
if test "$count" = 1; then
|
||||
- libc_cv_include_x86_isa_level=yes
|
||||
+ libc_cv_include_x86_isa_level=no # workaround for vbox bug https://forums.gentoo.org/viewtopic-p-8568765.html?sid=563ab671df23b2a550273edc2dea30a2
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*
|
||||
diff -up glibc-2.35/sysdeps/x86/configure.ac.48~ glibc-2.35/sysdeps/x86/configure.ac
|
||||
--- glibc-2.35/sysdeps/x86/configure.ac.48~ 2022-02-03 11:26:20.165426217 +0100
|
||||
+++ glibc-2.35/sysdeps/x86/configure.ac 2022-02-03 11:28:02.375807855 +0100
|
||||
@@ -101,7 +101,7 @@ libc_cv_include_x86_isa_level=no
|
||||
if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest conftest1.S conftest2.S); then
|
||||
count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l`
|
||||
if test "$count" = 1; then
|
||||
- libc_cv_include_x86_isa_level=yes
|
||||
+ libc_cv_include_x86_isa_level=no # workaround for vbox bug https://forums.gentoo.org/viewtopic-p-8568765.html?sid=563ab671df23b2a550273edc2dea30a2
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*])
|
64
glibc-2.34-allow-zstd-compressed-locales.patch
Normal file
64
glibc-2.34-allow-zstd-compressed-locales.patch
Normal file
|
@ -0,0 +1,64 @@
|
|||
diff -up glibc-2.34/localedata/Makefile.omv~ glibc-2.34/localedata/Makefile
|
||||
--- glibc-2.34/localedata/Makefile.omv~ 2022-01-06 18:06:45.391538999 +0100
|
||||
+++ glibc-2.34/localedata/Makefile 2022-01-06 18:08:26.399970061 +0100
|
||||
@@ -179,7 +179,7 @@ install-others := $(addprefix $(inst_i18
|
||||
$(locales))
|
||||
else
|
||||
install-others := $(addprefix $(inst_i18ndir)/, \
|
||||
- $(addsuffix .gz, $(charmaps)) \
|
||||
+ $(addsuffix .zst, $(charmaps)) \
|
||||
$(locales))
|
||||
endif
|
||||
|
||||
@@ -308,12 +308,12 @@ $(inst_i18ndir)/charmaps/%: charmaps/% $
|
||||
rm -f $@
|
||||
$(INSTALL_DATA) $< $@
|
||||
else
|
||||
-# Install the charmap files in gzipped format.
|
||||
-$(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
|
||||
+# Install the charmap files in zstd compressed format.
|
||||
+$(inst_i18ndir)/charmaps/%.zst: charmaps/% $(+force)
|
||||
$(make-target-directory)
|
||||
- rm -f $(@:.gz=) $@
|
||||
- $(INSTALL_DATA) $< $(@:.gz=)
|
||||
- gzip -9n $(@:.gz=)
|
||||
+ rm -f $(@:.zst=) $@
|
||||
+ $(INSTALL_DATA) $< $(@:.zst=)
|
||||
+ zstd --ultra -22 --rm $(@:.zst=)
|
||||
endif
|
||||
|
||||
# Install the locale source files in the appropriate directory.
|
||||
diff -up glibc-2.34/locale/programs/charmap-dir.c.omv~ glibc-2.34/locale/programs/charmap-dir.c
|
||||
--- glibc-2.34/locale/programs/charmap-dir.c.omv~ 2022-01-06 17:51:10.014329749 +0100
|
||||
+++ glibc-2.34/locale/programs/charmap-dir.c 2022-01-06 17:52:34.351961655 +0100
|
||||
@@ -224,12 +224,17 @@ charmap_open (const char *directory, con
|
||||
if (stream != NULL)
|
||||
return stream;
|
||||
|
||||
- memcpy (p, ".gz", 4);
|
||||
+ memcpy (p, ".zst\0", 5);
|
||||
+ stream = fopen_uncompressed (pathname, "zstd");
|
||||
+ if (stream != NULL)
|
||||
+ return stream;
|
||||
+
|
||||
+ memcpy (p, ".gz\0", 4);
|
||||
stream = fopen_uncompressed (pathname, "gzip");
|
||||
if (stream != NULL)
|
||||
return stream;
|
||||
|
||||
- memcpy (p, ".bz2", 5);
|
||||
+ memcpy (p, ".bz2\0", 5);
|
||||
stream = fopen_uncompressed (pathname, "bzip2");
|
||||
if (stream != NULL)
|
||||
return stream;
|
||||
diff -up glibc-2.34/Makerules.omv~ glibc-2.34/Makerules
|
||||
--- glibc-2.34/Makerules.omv~ 2022-01-06 18:05:12.594131276 +0100
|
||||
+++ glibc-2.34/Makerules 2022-01-06 18:06:40.799519105 +0100
|
||||
@@ -1410,6 +1410,7 @@ echo-headers:
|
||||
%.bz2: %; bzip2 -9vk $<
|
||||
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
|
||||
%.xz: %; xz -9evk $<
|
||||
+%.zst: %; zstd --ultra -22 --rm $<
|
||||
|
||||
# Common cleaning targets.
|
||||
|
40
glibc-2.34-headers-clang.patch
Normal file
40
glibc-2.34-headers-clang.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
diff -up glibc-2.34/include/sys/cdefs.h.omv~ glibc-2.34/include/sys/cdefs.h
|
||||
diff -up glibc-2.34/misc/sys/cdefs.h.omv~ glibc-2.34/misc/sys/cdefs.h
|
||||
--- glibc-2.34/misc/sys/cdefs.h.omv~ 2021-08-14 03:10:05.421588243 +0200
|
||||
+++ glibc-2.34/misc/sys/cdefs.h 2021-08-14 03:13:30.178192179 +0200
|
||||
@@ -465,7 +465,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#if __GNUC_PREREQ (8, 0)
|
||||
+#if __GNUC_PREREQ (8, 0) && !defined(__clang__)
|
||||
/* Describes a char array whose address can safely be passed as the first
|
||||
argument to strncpy and strncat, as the char array is not necessarily
|
||||
a NUL-terminated string. */
|
||||
@@ -476,7 +476,7 @@
|
||||
|
||||
/* Undefine (also defined in libc-symbols.h). */
|
||||
#undef __attribute_copy__
|
||||
-#if __GNUC_PREREQ (9, 0)
|
||||
+#if __GNUC_PREREQ (9, 0) && !defined(__clang__)
|
||||
/* Copies attributes from the declaration or type referenced by
|
||||
the argument. */
|
||||
# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
|
||||
@@ -596,7 +596,7 @@ _Static_assert (0, "IEEE 128-bits long d
|
||||
# define __HAVE_GENERIC_SELECTION 0
|
||||
#endif
|
||||
|
||||
-#if __GNUC_PREREQ (10, 0)
|
||||
+#if __GNUC_PREREQ (10, 0) && !defined(__clang__)
|
||||
/* Designates a 1-based positional argument ref-index of pointer type
|
||||
that can be used to access size-index elements of the pointed-to
|
||||
array according to access mode, or at least one element when
|
||||
@@ -613,7 +613,7 @@ _Static_assert (0, "IEEE 128-bits long d
|
||||
# define __attr_access_none(argno)
|
||||
#endif
|
||||
|
||||
-#if __GNUC_PREREQ (11, 0)
|
||||
+#if __GNUC_PREREQ (11, 0) && !defined(__clang__)
|
||||
/* Designates dealloc as a function to call to deallocate objects
|
||||
allocated by the declared function. */
|
||||
# define __attr_dealloc(dealloc, argno) \
|
|
@ -1,14 +0,0 @@
|
|||
diff -up glibc-2.34/sysdeps/unix/sysv/linux/Makefile.bero~ glibc-2.34/sysdeps/unix/sysv/linux/Makefile
|
||||
--- glibc-2.34/sysdeps/unix/sysv/linux/Makefile.bero~ 2021-09-22 21:04:37.378000000 +0000
|
||||
+++ glibc-2.34/sysdeps/unix/sysv/linux/Makefile 2021-09-22 21:06:55.990000000 +0000
|
||||
@@ -76,6 +76,10 @@ CFLAGS-open_by_handle_at.c = -fexception
|
||||
CFLAGS-sync_file_range.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-pselect32.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=(0x80000000-sysconf(_SC_PAGESIZE))"
|
||||
+# select.c is broken on i686 with -O3. Appears to be a compiler bug.
|
||||
+# "error: bp cannot be used in 'asm' here" where there's no asm code
|
||||
+# anywhere near.
|
||||
+CFLAGS-select.c = -O2
|
||||
|
||||
sysdep_headers += sys/mount.h sys/acct.h \
|
||||
sys/klog.h \
|
|
@ -1,41 +0,0 @@
|
|||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 710ce7e..3fe9e73 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -12,7 +12,7 @@ install:
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
|
||||
|
||||
-bench bench-clean:
|
||||
+bench bench-clean bench-build:
|
||||
$(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@
|
||||
|
||||
# Convenience target to rebuild ULPs for all math tests.
|
||||
diff --git a/Rules b/Rules
|
||||
index 4f9cdf3..42d0368 100644
|
||||
--- a/Rules
|
||||
+++ b/Rules
|
||||
@@ -83,7 +83,7 @@ common-generated += dummy.o dummy.c
|
||||
|
||||
# This makes all the auxiliary and test programs.
|
||||
|
||||
-.PHONY: others tests bench
|
||||
+.PHONY: others tests bench bench-build
|
||||
|
||||
ifeq ($(build-programs),yes)
|
||||
others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
|
||||
diff --git a/benchtests/Makefile b/benchtests/Makefile
|
||||
index fd3036d..7cbceaa 100644
|
||||
--- a/benchtests/Makefile
|
||||
+++ b/benchtests/Makefile
|
||||
@@ -103,6 +103,10 @@ bench-clean:
|
||||
|
||||
bench: $(timing-type) $(gen-locales) bench-set bench-func bench-malloc
|
||||
|
||||
+bench-build: bench-set-build bench-func-build
|
||||
+bench-set-build: $(binaries-benchset)
|
||||
+bench-func-build: $(binaries-bench) $(binaries-bench-malloc)
|
||||
+
|
||||
bench-set: $(binaries-benchset)
|
||||
for run in $^; do \
|
||||
echo "Running $${run}"; \
|
|
@ -1,270 +0,0 @@
|
|||
From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
|
||||
From: Mike FABIAN <mfabian@redhat.com>
|
||||
Date: Mon, 10 Aug 2015 15:58:12 +0200
|
||||
Subject: [PATCH] Add a C.UTF-8 locale
|
||||
|
||||
---
|
||||
localedata/SUPPORTED | 1 +
|
||||
localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 239 insertions(+)
|
||||
create mode 100644 localedata/locales/C
|
||||
|
||||
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||
index 8ca023e..2a78391 100644
|
||||
--- a/localedata/SUPPORTED
|
||||
+++ b/localedata/SUPPORTED
|
||||
@@ -1,6 +1,7 @@
|
||||
# This file names the currently supported and somewhat tested locales.
|
||||
# If you have any additions please file a glibc bug report.
|
||||
SUPPORTED-LOCALES=\
|
||||
+C.UTF-8/UTF-8 \
|
||||
aa_DJ.UTF-8/UTF-8 \
|
||||
aa_DJ/ISO-8859-1 \
|
||||
aa_ER/UTF-8 \
|
||||
diff --git a/localedata/locales/C b/localedata/locales/C
|
||||
new file mode 100644
|
||||
index 0000000..fdf460e
|
||||
--- /dev/null
|
||||
+++ b/localedata/locales/C
|
||||
@@ -0,0 +1,238 @@
|
||||
+escape_char /
|
||||
+comment_char %
|
||||
+% Locale for C locale in UTF-8
|
||||
+
|
||||
+LC_IDENTIFICATION
|
||||
+title "C locale"
|
||||
+source ""
|
||||
+address ""
|
||||
+contact ""
|
||||
+email "mfabian@redhat.com"
|
||||
+tel ""
|
||||
+fax ""
|
||||
+language "C"
|
||||
+territory ""
|
||||
+revision "1.0"
|
||||
+date "2015-08-10"
|
||||
+%
|
||||
+category "i18n:2012";LC_IDENTIFICATION
|
||||
+category "i18n:2012";LC_CTYPE
|
||||
+category "i18n:2012";LC_COLLATE
|
||||
+category "i18n:2012";LC_TIME
|
||||
+category "i18n:2012";LC_NUMERIC
|
||||
+category "i18n:2012";LC_MONETARY
|
||||
+category "i18n:2012";LC_MESSAGES
|
||||
+category "i18n:2012";LC_PAPER
|
||||
+category "i18n:2012";LC_NAME
|
||||
+category "i18n:2012";LC_ADDRESS
|
||||
+category "i18n:2012";LC_TELEPHONE
|
||||
+category "i18n:2012";LC_MEASUREMENT
|
||||
+END LC_IDENTIFICATION
|
||||
+
|
||||
+LC_CTYPE
|
||||
+copy "i18n"
|
||||
+
|
||||
+translit_start
|
||||
+include "translit_combining";""
|
||||
+translit_end
|
||||
+
|
||||
+END LC_CTYPE
|
||||
+
|
||||
+LC_COLLATE
|
||||
+order_start forward
|
||||
+<U0000>
|
||||
+..
|
||||
+<UFFFF>
|
||||
+<U10000>
|
||||
+..
|
||||
+<U1FFFF>
|
||||
+<U20000>
|
||||
+..
|
||||
+<U2FFFF>
|
||||
+<UE0000>
|
||||
+..
|
||||
+<UEFFFF>
|
||||
+<UF0000>
|
||||
+..
|
||||
+<UFFFFF>
|
||||
+<U100000>
|
||||
+..
|
||||
+<U10FFFF>
|
||||
+UNDEFINED
|
||||
+order_end
|
||||
+END LC_COLLATE
|
||||
+
|
||||
+LC_MONETARY
|
||||
+% This is the 14652 i18n fdcc-set definition for
|
||||
+% the LC_MONETARY category
|
||||
+% (except for the int_curr_symbol and currency_symbol, they are empty in
|
||||
+% the 14652 i18n fdcc-set definition and also empty in
|
||||
+% glibc/locale/C-monetary.c. But localedef complains in that case).
|
||||
+%
|
||||
+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
|
||||
+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
|
||||
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
|
||||
+% Using "$" for currency_symbol. But maybe <U00A4> would be better?
|
||||
+% U+00A4 is the "generic currency symbol"
|
||||
+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
|
||||
+currency_symbol "<U0024>"
|
||||
+mon_decimal_point "<U002E>"
|
||||
+mon_thousands_sep ""
|
||||
+mon_grouping -1
|
||||
+positive_sign ""
|
||||
+negative_sign "<U002D>"
|
||||
+int_frac_digits -1
|
||||
+frac_digits -1
|
||||
+p_cs_precedes -1
|
||||
+int_p_sep_by_space -1
|
||||
+p_sep_by_space -1
|
||||
+n_cs_precedes -1
|
||||
+int_n_sep_by_space -1
|
||||
+n_sep_by_space -1
|
||||
+p_sign_posn -1
|
||||
+n_sign_posn -1
|
||||
+%
|
||||
+END LC_MONETARY
|
||||
+
|
||||
+LC_NUMERIC
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_NUMERIC category.
|
||||
+%
|
||||
+decimal_point "<U002E>"
|
||||
+thousands_sep ""
|
||||
+grouping -1
|
||||
+END LC_NUMERIC
|
||||
+
|
||||
+LC_TIME
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_TIME category.
|
||||
+%
|
||||
+% Abbreviated weekday names (%a)
|
||||
+abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
|
||||
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
|
||||
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
|
||||
+ "<U0053><U0061><U0074>"
|
||||
+
|
||||
+% Full weekday names (%A)
|
||||
+day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
|
||||
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
|
||||
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
|
||||
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
|
||||
+
|
||||
+% Abbreviated month names (%b)
|
||||
+abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
|
||||
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
|
||||
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
|
||||
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
|
||||
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
|
||||
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
|
||||
+
|
||||
+% Full month names (%B)
|
||||
+mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
|
||||
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
|
||||
+ "<U004D><U0061><U0072><U0063><U0068>";/
|
||||
+ "<U0041><U0070><U0072><U0069><U006C>";/
|
||||
+ "<U004D><U0061><U0079>";/
|
||||
+ "<U004A><U0075><U006E><U0065>";/
|
||||
+ "<U004A><U0075><U006C><U0079>";/
|
||||
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
|
||||
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
|
||||
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
|
||||
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
|
||||
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
|
||||
+
|
||||
+% Week description, consists of three fields:
|
||||
+% 1. Number of days in a week.
|
||||
+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
|
||||
+% 3. The weekday number to be contained in the first week of the year.
|
||||
+%
|
||||
+% ISO 8601 conforming applications should use the values 7, 19971201 (a
|
||||
+% Monday), and 4 (Thursday), respectively.
|
||||
+week 7;19971201;4
|
||||
+first_weekday 1
|
||||
+first_workday 1
|
||||
+
|
||||
+% Appropriate date and time representation (%c)
|
||||
+% "%a %b %e %H:%M:%S %Y"
|
||||
+d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
|
||||
+
|
||||
+% Appropriate date representation (%x)
|
||||
+% "%m/%d/%y"
|
||||
+d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
|
||||
+
|
||||
+% Appropriate time representation (%X)
|
||||
+% "%H:%M:%S"
|
||||
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
|
||||
+
|
||||
+% Appropriate AM/PM time representation (%r)
|
||||
+% "%I:%M:%S %p"
|
||||
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
|
||||
+
|
||||
+% Equivalent of AM/PM (%p) "AM"/"PM"
|
||||
+%
|
||||
+am_pm "<U0041><U004D>";"<U0050><U004D>"
|
||||
+
|
||||
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
|
||||
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
|
||||
+END LC_TIME
|
||||
+
|
||||
+LC_MESSAGES
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_NUMERIC category.
|
||||
+%
|
||||
+yesexpr "<U005E><U005B><U0079><U0059><U005D>"
|
||||
+noexpr "<U005E><U005B><U006E><U004E><U005D>"
|
||||
+yesstr "<U0059><U0065><U0073>"
|
||||
+nostr "<U004E><U006F>"
|
||||
+END LC_MESSAGES
|
||||
+
|
||||
+LC_PAPER
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_PAPER category.
|
||||
+% (A4 paper, this is also used in the built in C/POSIX
|
||||
+% locale in glibc/locale/C-paper.c)
|
||||
+height 297
|
||||
+width 210
|
||||
+END LC_PAPER
|
||||
+
|
||||
+LC_NAME
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_NAME category.
|
||||
+% "%p%t%g%t%m%t%f"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
|
||||
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
|
||||
+<U0025><U006D><U0025><U0074><U0025><U0066>"
|
||||
+END LC_NAME
|
||||
+
|
||||
+LC_ADDRESS
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_ADDRESS category.
|
||||
+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
|
||||
+postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
|
||||
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
|
||||
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
|
||||
+<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
|
||||
+<U004E><U0025><U0063><U0025><U004E>"
|
||||
+END LC_ADDRESS
|
||||
+
|
||||
+LC_TELEPHONE
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_TELEPHONE category.
|
||||
+% "+%c %a %l"
|
||||
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
|
||||
+<U006C>"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
|
||||
+END LC_TELEPHONE
|
||||
+
|
||||
+LC_MEASUREMENT
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_MEASUREMENT category.
|
||||
+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
|
||||
+%metric
|
||||
+measurement 1
|
||||
+END LC_MEASUREMENT
|
||||
+
|
||||
--
|
||||
2.4.3
|
||||
|
|
@ -1,754 +0,0 @@
|
|||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/Banner glibc-2.17-931-g30bbc0c.new/c_stubs/Banner
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/Banner 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/Banner 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1 @@
|
||||
+The C stubs add-on version 2.1.2.
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/ChangeLog glibc-2.17-931-g30bbc0c.new/c_stubs/ChangeLog
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/ChangeLog 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/ChangeLog 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1,46 @@
|
||||
+2006-03-01 Jakub Jelinek <jakub@redhat.com>
|
||||
+
|
||||
+ * configure (libc_add_on_canonical, libc_add_on_subdir): Set.
|
||||
+
|
||||
+2001-08-07 Jakub Jelinek <jakub@redhat.com>
|
||||
+
|
||||
+ * gconv_stubs.c (__gconv_lookup_alias): Remove.
|
||||
+ (__gconv_NOOP, __gconv_compare_alias, __gconv_release_cache,
|
||||
+ __gconv_release_step): New.
|
||||
+
|
||||
+2001-06-07 Jakub Jelinek <jakub@redhat.com>
|
||||
+
|
||||
+ * gconv_stubs.c (__gconv_lookup_alias): New.
|
||||
+
|
||||
+2000-02-27 Cristian Gafton <gafton@redhat.com>
|
||||
+
|
||||
+ * gconv_stubs.c: Return __gconv_OK for:
|
||||
+ __gconv_transform_ascii_internal
|
||||
+ __gconv_transform_ucs2little_internal
|
||||
+ __gconv_transform_utf16_internal
|
||||
+ __gconv_transform_utf8_internal
|
||||
+ __gconv_transform_ucs2_internal
|
||||
+
|
||||
+2000-02-25 Cristian Gafton <gafton@redhat.com>
|
||||
+
|
||||
+ * gconv_stubs.c: add __c_stubs_is_compiled_in so we can detect when
|
||||
+ the library is linked in.
|
||||
+
|
||||
+Wed Dec 8 13:47:25 1999 Ivan Brunello <ivan.brunello@tiscalinet.it>
|
||||
+
|
||||
+ * Makefile (extra-objs): Changed stubs.o to gconv_stubs.o.
|
||||
+
|
||||
+Sun Dec 5 11:32:17 1999 H.J. Lu <hjl@gnu.org>
|
||||
+
|
||||
+ * gconv_stubs.c: Renamed from stubs.c.
|
||||
+ Support glibc 2.1.x.
|
||||
+
|
||||
+Mon Aug 23 16:42:05 1999 H.J. Lu <hjl@gnu.org>
|
||||
+
|
||||
+ * Banner: New.
|
||||
+ * COPYING.LIB: Likewise.
|
||||
+ * Makefile: Likewise.
|
||||
+ * README: Likewise.
|
||||
+ * configure: Likewise.
|
||||
+ * stubs.c: Likewise.
|
||||
+ * test-stdio.c: Likewise.
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/configure glibc-2.17-931-g30bbc0c.new/c_stubs/configure
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/configure 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/configure 2013-08-16 16:26:11.637020805 +0530
|
||||
@@ -0,0 +1,5 @@
|
||||
+# This is only to keep the GNU C library configure mechanism happy.
|
||||
+# This is a shell script fragment sourced by the main configure script.
|
||||
+
|
||||
+libc_add_on_canonical=
|
||||
+libc_add_on_subdirs=.
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/COPYING.LIB glibc-2.17-931-g30bbc0c.new/c_stubs/COPYING.LIB
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/COPYING.LIB 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/COPYING.LIB 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1,482 @@
|
||||
+ GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
+ Version 2, June 1991
|
||||
+
|
||||
+ Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
+ Everyone is permitted to copy and distribute verbatim copies
|
||||
+ of this license document, but changing it is not allowed.
|
||||
+
|
||||
+[This is the first released version of the library GPL. It is
|
||||
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
+
|
||||
+ Preamble
|
||||
+
|
||||
+ The licenses for most software are designed to take away your
|
||||
+freedom to share and change it. By contrast, the GNU General Public
|
||||
+Licenses are intended to guarantee your freedom to share and change
|
||||
+free software--to make sure the software is free for all its users.
|
||||
+
|
||||
+ This license, the Library General Public License, applies to some
|
||||
+specially designated Free Software Foundation software, and to any
|
||||
+other libraries whose authors decide to use it. You can use it for
|
||||
+your libraries, too.
|
||||
+
|
||||
+ When we speak of free software, we are referring to freedom, not
|
||||
+price. Our General Public Licenses are designed to make sure that you
|
||||
+have the freedom to distribute copies of free software (and charge for
|
||||
+this service if you wish), that you receive source code or can get it
|
||||
+if you want it, that you can change the software or use pieces of it
|
||||
+in new free programs; and that you know you can do these things.
|
||||
+
|
||||
+ To protect your rights, we need to make restrictions that forbid
|
||||
+anyone to deny you these rights or to ask you to surrender the rights.
|
||||
+These restrictions translate to certain responsibilities for you if
|
||||
+you distribute copies of the library, or if you modify it.
|
||||
+
|
||||
+ For example, if you distribute copies of the library, whether gratis
|
||||
+or for a fee, you must give the recipients all the rights that we gave
|
||||
+you. You must make sure that they, too, receive or can get the source
|
||||
+code. If you link a program with the library, you must provide
|
||||
+complete object files to the recipients so that they can relink them
|
||||
+with the library, after making changes to the library and recompiling
|
||||
+it. And you must show them these terms so they know their rights.
|
||||
+
|
||||
+ Our method of protecting your rights has two steps: (1) copyright
|
||||
+the library, and (2) offer you this license which gives you legal
|
||||
+permission to copy, distribute and/or modify the library.
|
||||
+
|
||||
+ Also, for each distributor's protection, we want to make certain
|
||||
+that everyone understands that there is no warranty for this free
|
||||
+library. If the library is modified by someone else and passed on, we
|
||||
+want its recipients to know that what they have is not the original
|
||||
+version, so that any problems introduced by others will not reflect on
|
||||
+the original authors' reputations.
|
||||
+
|
||||
+ Finally, any free program is threatened constantly by software
|
||||
+patents. We wish to avoid the danger that companies distributing free
|
||||
+software will individually obtain patent licenses, thus in effect
|
||||
+transforming the program into proprietary software. To prevent this,
|
||||
+we have made it clear that any patent must be licensed for everyone's
|
||||
+free use or not licensed at all.
|
||||
+
|
||||
+ Most GNU software, including some libraries, is covered by the ordinary
|
||||
+GNU General Public License, which was designed for utility programs. This
|
||||
+license, the GNU Library General Public License, applies to certain
|
||||
+designated libraries. This license is quite different from the ordinary
|
||||
+one; be sure to read it in full, and don't assume that anything in it is
|
||||
+the same as in the ordinary license.
|
||||
+
|
||||
+ The reason we have a separate public license for some libraries is that
|
||||
+they blur the distinction we usually make between modifying or adding to a
|
||||
+program and simply using it. Linking a program with a library, without
|
||||
+changing the library, is in some sense simply using the library, and is
|
||||
+analogous to running a utility program or application program. However, in
|
||||
+a textual and legal sense, the linked executable is a combined work, a
|
||||
+derivative of the original library, and the ordinary General Public License
|
||||
+treats it as such.
|
||||
+
|
||||
+ Because of this blurred distinction, using the ordinary General
|
||||
+Public License for libraries did not effectively promote software
|
||||
+sharing, because most developers did not use the libraries. We
|
||||
+concluded that weaker conditions might promote sharing better.
|
||||
+
|
||||
+ However, unrestricted linking of non-free programs would deprive the
|
||||
+users of those programs of all benefit from the free status of the
|
||||
+libraries themselves. This Library General Public License is intended to
|
||||
+permit developers of non-free programs to use free libraries, while
|
||||
+preserving your freedom as a user of such programs to change the free
|
||||
+libraries that are incorporated in them. (We have not seen how to achieve
|
||||
+this as regards changes in header files, but we have achieved it as regards
|
||||
+changes in the actual functions of the Library.) The hope is that this
|
||||
+will lead to faster development of free libraries.
|
||||
+
|
||||
+ The precise terms and conditions for copying, distribution and
|
||||
+modification follow. Pay close attention to the difference between a
|
||||
+"work based on the library" and a "work that uses the library". The
|
||||
+former contains code derived from the library, while the latter only
|
||||
+works together with the library.
|
||||
+
|
||||
+ Note that it is possible for a library to be covered by the ordinary
|
||||
+General Public License rather than by this special one.
|
||||
+
|
||||
+ GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
+
|
||||
+ 0. This License Agreement applies to any software library which
|
||||
+contains a notice placed by the copyright holder or other authorized
|
||||
+party saying it may be distributed under the terms of this Library
|
||||
+General Public License (also called "this License"). Each licensee is
|
||||
+addressed as "you".
|
||||
+
|
||||
+ A "library" means a collection of software functions and/or data
|
||||
+prepared so as to be conveniently linked with application programs
|
||||
+(which use some of those functions and data) to form executables.
|
||||
+
|
||||
+ The "Library", below, refers to any such software library or work
|
||||
+which has been distributed under these terms. A "work based on the
|
||||
+Library" means either the Library or any derivative work under
|
||||
+copyright law: that is to say, a work containing the Library or a
|
||||
+portion of it, either verbatim or with modifications and/or translated
|
||||
+straightforwardly into another language. (Hereinafter, translation is
|
||||
+included without limitation in the term "modification".)
|
||||
+
|
||||
+ "Source code" for a work means the preferred form of the work for
|
||||
+making modifications to it. For a library, complete source code means
|
||||
+all the source code for all modules it contains, plus any associated
|
||||
+interface definition files, plus the scripts used to control compilation
|
||||
+and installation of the library.
|
||||
+
|
||||
+ Activities other than copying, distribution and modification are not
|
||||
+covered by this License; they are outside its scope. The act of
|
||||
+running a program using the Library is not restricted, and output from
|
||||
+such a program is covered only if its contents constitute a work based
|
||||
+on the Library (independent of the use of the Library in a tool for
|
||||
+writing it). Whether that is true depends on what the Library does
|
||||
+and what the program that uses the Library does.
|
||||
+
|
||||
+ 1. You may copy and distribute verbatim copies of the Library's
|
||||
+complete source code as you receive it, in any medium, provided that
|
||||
+you conspicuously and appropriately publish on each copy an
|
||||
+appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
+all the notices that refer to this License and to the absence of any
|
||||
+warranty; and distribute a copy of this License along with the
|
||||
+Library.
|
||||
+
|
||||
+ You may charge a fee for the physical act of transferring a copy,
|
||||
+and you may at your option offer warranty protection in exchange for a
|
||||
+fee.
|
||||
+
|
||||
+ 2. You may modify your copy or copies of the Library or any portion
|
||||
+of it, thus forming a work based on the Library, and copy and
|
||||
+distribute such modifications or work under the terms of Section 1
|
||||
+above, provided that you also meet all of these conditions:
|
||||
+
|
||||
+ a) The modified work must itself be a software library.
|
||||
+
|
||||
+ b) You must cause the files modified to carry prominent notices
|
||||
+ stating that you changed the files and the date of any change.
|
||||
+
|
||||
+ c) You must cause the whole of the work to be licensed at no
|
||||
+ charge to all third parties under the terms of this License.
|
||||
+
|
||||
+ d) If a facility in the modified Library refers to a function or a
|
||||
+ table of data to be supplied by an application program that uses
|
||||
+ the facility, other than as an argument passed when the facility
|
||||
+ is invoked, then you must make a good faith effort to ensure that,
|
||||
+ in the event an application does not supply such function or
|
||||
+ table, the facility still operates, and performs whatever part of
|
||||
+ its purpose remains meaningful.
|
||||
+
|
||||
+ (For example, a function in a library to compute square roots has
|
||||
+ a purpose that is entirely well-defined independent of the
|
||||
+ application. Therefore, Subsection 2d requires that any
|
||||
+ application-supplied function or table used by this function must
|
||||
+ be optional: if the application does not supply it, the square
|
||||
+ root function must still compute square roots.)
|
||||
+
|
||||
+These requirements apply to the modified work as a whole. If
|
||||
+identifiable sections of that work are not derived from the Library,
|
||||
+and can be reasonably considered independent and separate works in
|
||||
+themselves, then this License, and its terms, do not apply to those
|
||||
+sections when you distribute them as separate works. But when you
|
||||
+distribute the same sections as part of a whole which is a work based
|
||||
+on the Library, the distribution of the whole must be on the terms of
|
||||
+this License, whose permissions for other licensees extend to the
|
||||
+entire whole, and thus to each and every part regardless of who wrote
|
||||
+it.
|
||||
+
|
||||
+Thus, it is not the intent of this section to claim rights or contest
|
||||
+your rights to work written entirely by you; rather, the intent is to
|
||||
+exercise the right to control the distribution of derivative or
|
||||
+collective works based on the Library.
|
||||
+
|
||||
+In addition, mere aggregation of another work not based on the Library
|
||||
+with the Library (or with a work based on the Library) on a volume of
|
||||
+a storage or distribution medium does not bring the other work under
|
||||
+the scope of this License.
|
||||
+
|
||||
+ 3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
+License instead of this License to a given copy of the Library. To do
|
||||
+this, you must alter all the notices that refer to this License, so
|
||||
+that they refer to the ordinary GNU General Public License, version 2,
|
||||
+instead of to this License. (If a newer version than version 2 of the
|
||||
+ordinary GNU General Public License has appeared, then you can specify
|
||||
+that version instead if you wish.) Do not make any other change in
|
||||
+these notices.
|
||||
+
|
||||
+ Once this change is made in a given copy, it is irreversible for
|
||||
+that copy, so the ordinary GNU General Public License applies to all
|
||||
+subsequent copies and derivative works made from that copy.
|
||||
+
|
||||
+ This option is useful when you wish to copy part of the code of
|
||||
+the Library into a program that is not a library.
|
||||
+
|
||||
+ 4. You may copy and distribute the Library (or a portion or
|
||||
+derivative of it, under Section 2) in object code or executable form
|
||||
+under the terms of Sections 1 and 2 above provided that you accompany
|
||||
+it with the complete corresponding machine-readable source code, which
|
||||
+must be distributed under the terms of Sections 1 and 2 above on a
|
||||
+medium customarily used for software interchange.
|
||||
+
|
||||
+ If distribution of object code is made by offering access to copy
|
||||
+from a designated place, then offering equivalent access to copy the
|
||||
+source code from the same place satisfies the requirement to
|
||||
+distribute the source code, even though third parties are not
|
||||
+compelled to copy the source along with the object code.
|
||||
+
|
||||
+ 5. A program that contains no derivative of any portion of the
|
||||
+Library, but is designed to work with the Library by being compiled or
|
||||
+linked with it, is called a "work that uses the Library". Such a
|
||||
+work, in isolation, is not a derivative work of the Library, and
|
||||
+therefore falls outside the scope of this License.
|
||||
+
|
||||
+ However, linking a "work that uses the Library" with the Library
|
||||
+creates an executable that is a derivative of the Library (because it
|
||||
+contains portions of the Library), rather than a "work that uses the
|
||||
+library". The executable is therefore covered by this License.
|
||||
+Section 6 states terms for distribution of such executables.
|
||||
+
|
||||
+ When a "work that uses the Library" uses material from a header file
|
||||
+that is part of the Library, the object code for the work may be a
|
||||
+derivative work of the Library even though the source code is not.
|
||||
+Whether this is true is especially significant if the work can be
|
||||
+linked without the Library, or if the work is itself a library. The
|
||||
+threshold for this to be true is not precisely defined by law.
|
||||
+
|
||||
+ If such an object file uses only numerical parameters, data
|
||||
+structure layouts and accessors, and small macros and small inline
|
||||
+functions (ten lines or less in length), then the use of the object
|
||||
+file is unrestricted, regardless of whether it is legally a derivative
|
||||
+work. (Executables containing this object code plus portions of the
|
||||
+Library will still fall under Section 6.)
|
||||
+
|
||||
+ Otherwise, if the work is a derivative of the Library, you may
|
||||
+distribute the object code for the work under the terms of Section 6.
|
||||
+Any executables containing that work also fall under Section 6,
|
||||
+whether or not they are linked directly with the Library itself.
|
||||
+
|
||||
+ 6. As an exception to the Sections above, you may also compile or
|
||||
+link a "work that uses the Library" with the Library to produce a
|
||||
+work containing portions of the Library, and distribute that work
|
||||
+under terms of your choice, provided that the terms permit
|
||||
+modification of the work for the customer's own use and reverse
|
||||
+engineering for debugging such modifications.
|
||||
+
|
||||
+ You must give prominent notice with each copy of the work that the
|
||||
+Library is used in it and that the Library and its use are covered by
|
||||
+this License. You must supply a copy of this License. If the work
|
||||
+during execution displays copyright notices, you must include the
|
||||
+copyright notice for the Library among them, as well as a reference
|
||||
+directing the user to the copy of this License. Also, you must do one
|
||||
+of these things:
|
||||
+
|
||||
+ a) Accompany the work with the complete corresponding
|
||||
+ machine-readable source code for the Library including whatever
|
||||
+ changes were used in the work (which must be distributed under
|
||||
+ Sections 1 and 2 above); and, if the work is an executable linked
|
||||
+ with the Library, with the complete machine-readable "work that
|
||||
+ uses the Library", as object code and/or source code, so that the
|
||||
+ user can modify the Library and then relink to produce a modified
|
||||
+ executable containing the modified Library. (It is understood
|
||||
+ that the user who changes the contents of definitions files in the
|
||||
+ Library will not necessarily be able to recompile the application
|
||||
+ to use the modified definitions.)
|
||||
+
|
||||
+ b) Accompany the work with a written offer, valid for at
|
||||
+ least three years, to give the same user the materials
|
||||
+ specified in Subsection 6a, above, for a charge no more
|
||||
+ than the cost of performing this distribution.
|
||||
+
|
||||
+ c) If distribution of the work is made by offering access to copy
|
||||
+ from a designated place, offer equivalent access to copy the above
|
||||
+ specified materials from the same place.
|
||||
+
|
||||
+ d) Verify that the user has already received a copy of these
|
||||
+ materials or that you have already sent this user a copy.
|
||||
+
|
||||
+ For an executable, the required form of the "work that uses the
|
||||
+Library" must include any data and utility programs needed for
|
||||
+reproducing the executable from it. However, as a special exception,
|
||||
+the source code distributed need not include anything that is normally
|
||||
+distributed (in either source or binary form) with the major
|
||||
+components (compiler, kernel, and so on) of the operating system on
|
||||
+which the executable runs, unless that component itself accompanies
|
||||
+the executable.
|
||||
+
|
||||
+ It may happen that this requirement contradicts the license
|
||||
+restrictions of other proprietary libraries that do not normally
|
||||
+accompany the operating system. Such a contradiction means you cannot
|
||||
+use both them and the Library together in an executable that you
|
||||
+distribute.
|
||||
+
|
||||
+ 7. You may place library facilities that are a work based on the
|
||||
+Library side-by-side in a single library together with other library
|
||||
+facilities not covered by this License, and distribute such a combined
|
||||
+library, provided that the separate distribution of the work based on
|
||||
+the Library and of the other library facilities is otherwise
|
||||
+permitted, and provided that you do these two things:
|
||||
+
|
||||
+ a) Accompany the combined library with a copy of the same work
|
||||
+ based on the Library, uncombined with any other library
|
||||
+ facilities. This must be distributed under the terms of the
|
||||
+ Sections above.
|
||||
+
|
||||
+ b) Give prominent notice with the combined library of the fact
|
||||
+ that part of it is a work based on the Library, and explaining
|
||||
+ where to find the accompanying uncombined form of the same work.
|
||||
+
|
||||
+ 8. You may not copy, modify, sublicense, link with, or distribute
|
||||
+the Library except as expressly provided under this License. Any
|
||||
+attempt otherwise to copy, modify, sublicense, link with, or
|
||||
+distribute the Library is void, and will automatically terminate your
|
||||
+rights under this License. However, parties who have received copies,
|
||||
+or rights, from you under this License will not have their licenses
|
||||
+terminated so long as such parties remain in full compliance.
|
||||
+
|
||||
+ 9. You are not required to accept this License, since you have not
|
||||
+signed it. However, nothing else grants you permission to modify or
|
||||
+distribute the Library or its derivative works. These actions are
|
||||
+prohibited by law if you do not accept this License. Therefore, by
|
||||
+modifying or distributing the Library (or any work based on the
|
||||
+Library), you indicate your acceptance of this License to do so, and
|
||||
+all its terms and conditions for copying, distributing or modifying
|
||||
+the Library or works based on it.
|
||||
+
|
||||
+ 10. Each time you redistribute the Library (or any work based on the
|
||||
+Library), the recipient automatically receives a license from the
|
||||
+original licensor to copy, distribute, link with or modify the Library
|
||||
+subject to these terms and conditions. You may not impose any further
|
||||
+restrictions on the recipients' exercise of the rights granted herein.
|
||||
+You are not responsible for enforcing compliance by third parties to
|
||||
+this License.
|
||||
+
|
||||
+ 11. If, as a consequence of a court judgment or allegation of patent
|
||||
+infringement or for any other reason (not limited to patent issues),
|
||||
+conditions are imposed on you (whether by court order, agreement or
|
||||
+otherwise) that contradict the conditions of this License, they do not
|
||||
+excuse you from the conditions of this License. If you cannot
|
||||
+distribute so as to satisfy simultaneously your obligations under this
|
||||
+License and any other pertinent obligations, then as a consequence you
|
||||
+may not distribute the Library at all. For example, if a patent
|
||||
+license would not permit royalty-free redistribution of the Library by
|
||||
+all those who receive copies directly or indirectly through you, then
|
||||
+the only way you could satisfy both it and this License would be to
|
||||
+refrain entirely from distribution of the Library.
|
||||
+
|
||||
+If any portion of this section is held invalid or unenforceable under any
|
||||
+particular circumstance, the balance of the section is intended to apply,
|
||||
+and the section as a whole is intended to apply in other circumstances.
|
||||
+
|
||||
+It is not the purpose of this section to induce you to infringe any
|
||||
+patents or other property right claims or to contest validity of any
|
||||
+such claims; this section has the sole purpose of protecting the
|
||||
+integrity of the free software distribution system which is
|
||||
+implemented by public license practices. Many people have made
|
||||
+generous contributions to the wide range of software distributed
|
||||
+through that system in reliance on consistent application of that
|
||||
+system; it is up to the author/donor to decide if he or she is willing
|
||||
+to distribute software through any other system and a licensee cannot
|
||||
+impose that choice.
|
||||
+
|
||||
+This section is intended to make thoroughly clear what is believed to
|
||||
+be a consequence of the rest of this License.
|
||||
+
|
||||
+ 12. If the distribution and/or use of the Library is restricted in
|
||||
+certain countries either by patents or by copyrighted interfaces, the
|
||||
+original copyright holder who places the Library under this License may add
|
||||
+an explicit geographical distribution limitation excluding those countries,
|
||||
+so that distribution is permitted only in or among countries not thus
|
||||
+excluded. In such case, this License incorporates the limitation as if
|
||||
+written in the body of this License.
|
||||
+
|
||||
+ 13. The Free Software Foundation may publish revised and/or new
|
||||
+versions of the Library General Public License from time to time.
|
||||
+Such new versions will be similar in spirit to the present version,
|
||||
+but may differ in detail to address new problems or concerns.
|
||||
+
|
||||
+Each version is given a distinguishing version number. If the Library
|
||||
+specifies a version number of this License which applies to it and
|
||||
+"any later version", you have the option of following the terms and
|
||||
+conditions either of that version or of any later version published by
|
||||
+the Free Software Foundation. If the Library does not specify a
|
||||
+license version number, you may choose any version ever published by
|
||||
+the Free Software Foundation.
|
||||
+
|
||||
+ 14. If you wish to incorporate parts of the Library into other free
|
||||
+programs whose distribution conditions are incompatible with these,
|
||||
+write to the author to ask for permission. For software which is
|
||||
+copyrighted by the Free Software Foundation, write to the Free
|
||||
+Software Foundation; we sometimes make exceptions for this. Our
|
||||
+decision will be guided by the two goals of preserving the free status
|
||||
+of all derivatives of our free software and of promoting the sharing
|
||||
+and reuse of software generally.
|
||||
+
|
||||
+ NO WARRANTY
|
||||
+
|
||||
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
+
|
||||
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
+DAMAGES.
|
||||
+
|
||||
+ END OF TERMS AND CONDITIONS
|
||||
+
|
||||
+ Appendix: How to Apply These Terms to Your New Libraries
|
||||
+
|
||||
+ If you develop a new library, and you want it to be of the greatest
|
||||
+possible use to the public, we recommend making it free software that
|
||||
+everyone can redistribute and change. You can do so by permitting
|
||||
+redistribution under these terms (or, alternatively, under the terms of the
|
||||
+ordinary General Public License).
|
||||
+
|
||||
+ To apply these terms, attach the following notices to the library. It is
|
||||
+safest to attach them to the start of each source file to most effectively
|
||||
+convey the exclusion of warranty; and each file should have at least the
|
||||
+"copyright" line and a pointer to where the full notice is found.
|
||||
+
|
||||
+ <one line to give the library's name and a brief idea of what it does.>
|
||||
+ Copyright (C) <year> <name of author>
|
||||
+
|
||||
+ This library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Library General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Library General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Library General Public
|
||||
+ License along with this library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
+ MA 02111-1307, USA
|
||||
+
|
||||
+Also add information on how to contact you by electronic and paper mail.
|
||||
+
|
||||
+You should also get your employer (if you work as a programmer) or your
|
||||
+school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
+necessary. Here is a sample; alter the names:
|
||||
+
|
||||
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
+
|
||||
+ <signature of Ty Coon>, 1 April 1990
|
||||
+ Ty Coon, President of Vice
|
||||
+
|
||||
+That's all there is to it!
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/gconv_stubs.c glibc-2.17-931-g30bbc0c.new/c_stubs/gconv_stubs.c
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/gconv_stubs.c 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/gconv_stubs.c 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1,126 @@
|
||||
+/* Provide gconv stub functions for the minimum static binaries.
|
||||
+ Copyright (C) 1999, 2001, 2003, 2004 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
|
||||
+ modify it under the terms of the GNU Library General Public License as
|
||||
+ published by the Free Software Foundation; either version 2 of the
|
||||
+ License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Library General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Library General Public
|
||||
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+ Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#include <features.h>
|
||||
+#include <string.h>
|
||||
+#include <wchar.h>
|
||||
+#include <bits/libc-lock.h>
|
||||
+#if __GNUC_PREREQ(3, 3)
|
||||
+# include <gconv_int.h>
|
||||
+#else
|
||||
+# include <gconv.h>
|
||||
+#endif
|
||||
+
|
||||
+__libc_lock_define_initialized (, __gconv_lock)
|
||||
+
|
||||
+/* hack for self identification */
|
||||
+int __c_stubs_is_compiled_in;
|
||||
+
|
||||
+/* Don't drag in the dynamic linker. */
|
||||
+void *__libc_stack_end;
|
||||
+
|
||||
+int attribute_hidden
|
||||
+__gconv_OK (void)
|
||||
+{
|
||||
+#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
|
||||
+ return __GCONV_OK;
|
||||
+#else
|
||||
+ return GCONV_OK;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+int attribute_hidden
|
||||
+__gconv_NOCONV (void)
|
||||
+{
|
||||
+#if __GLIBC__ > 2 || __GLIBC_MINOR__ > 1
|
||||
+ return __GCONV_NOCONV;
|
||||
+#else
|
||||
+ return GCONV_NOCONV;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+void attribute_hidden
|
||||
+__gconv_NOOP (void)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+internal_function
|
||||
+__gconv_compare_alias (const char *name1, const char *name2)
|
||||
+{
|
||||
+ return strcmp (name1, name2);
|
||||
+}
|
||||
+
|
||||
+wint_t
|
||||
+__gconv_btwoc_ascii (struct __gconv_step *step, unsigned char c)
|
||||
+{
|
||||
+ if (c < 0x80)
|
||||
+ return c;
|
||||
+ else
|
||||
+ return WEOF;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+#if __GNUC_PREREQ(3, 3)
|
||||
+# undef strong_alias
|
||||
+# define strong_alias(impl, name) \
|
||||
+ __typeof (name) name __attribute__ ((alias (#impl)))
|
||||
+#endif
|
||||
+
|
||||
+strong_alias (__gconv_OK,
|
||||
+ __gconv_close_transform);
|
||||
+strong_alias (__gconv_OK,
|
||||
+ __gconv_close);
|
||||
+
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv);
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_find_transform);
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_open);
|
||||
+
|
||||
+/* These transformations should not fail in normal conditions */
|
||||
+strong_alias (__gconv_OK,
|
||||
+ __gconv_transform_ascii_internal);
|
||||
+strong_alias (__gconv_OK,
|
||||
+ __gconv_transform_utf16_internal);
|
||||
+strong_alias (__gconv_OK,
|
||||
+ __gconv_transform_utf8_internal);
|
||||
+strong_alias (__gconv_OK,
|
||||
+ __gconv_transform_ucs2_internal);
|
||||
+
|
||||
+/* We can assume no conversion for these ones */
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_transform_internal_ascii);
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_transform_internal_ucs2);
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_transform_internal_ucs4);
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_transform_internal_utf16);
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_transform_internal_utf8);
|
||||
+
|
||||
+strong_alias (__gconv_NOCONV,
|
||||
+ __gconv_transliterate);
|
||||
+
|
||||
+strong_alias (__gconv_NOOP,
|
||||
+ __gconv_release_cache);
|
||||
+strong_alias (__gconv_NOOP,
|
||||
+ __gconv_release_step);
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/Makefile glibc-2.17-931-g30bbc0c.new/c_stubs/Makefile
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/Makefile 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/Makefile 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1,46 @@
|
||||
+# Copyright (C) 1999 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
|
||||
+# modify it under the terms of the GNU Library General Public License as
|
||||
+# published by the Free Software Foundation; either version 2 of the
|
||||
+# License, or (at your option) any later version.
|
||||
+
|
||||
+# The GNU C Library is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# Library General Public License for more details.
|
||||
+
|
||||
+# You should have received a copy of the GNU Library General Public
|
||||
+# License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||||
+# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
+# Boston, MA 02111-1307, USA.
|
||||
+
|
||||
+#
|
||||
+# Sub-makefile for the C stub add-on library.
|
||||
+#
|
||||
+subdir := c_stubs
|
||||
+
|
||||
+tests-static := test-stdio
|
||||
+tests := $(tests-static)
|
||||
+
|
||||
+libc_stubs-objs := gconv_stubs.o
|
||||
+
|
||||
+install-lib := libc_stubs.a
|
||||
+non-lib.a := libc_stubs.a
|
||||
+
|
||||
+extra-objs := gconv_stubs.o libc_stubs.a
|
||||
+
|
||||
+include ../Makeconfig
|
||||
+
|
||||
+CPPFLAGS += -I../iconv
|
||||
+
|
||||
+include ../Rules
|
||||
+
|
||||
+$(objpfx)libc_stubs.a: $(addprefix $(objpfx), $(libc_stubs-objs))
|
||||
+ -rm -f $@
|
||||
+ $(CC) -nostdlib -nostartfiles -r -o $@ $^
|
||||
+
|
||||
+lib: $(objpfx)libc_stubs.a
|
||||
+
|
||||
+$(objpfx)test-stdio: $(objpfx)libc_stubs.a
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/README glibc-2.17-931-g30bbc0c.new/c_stubs/README
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/README 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/README 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1,8 @@
|
||||
+This is a stub add-on library for the GNU C library version 2.1.2 and
|
||||
+above. It is used to create the smaller static binaries by stubbing
|
||||
+out the gconv related functions. The resulting binaries may not have
|
||||
+all the functionalities.
|
||||
+
|
||||
+H.J. Lu
|
||||
+hjl@gnu.org
|
||||
+12/05/1999
|
||||
diff -pruN glibc-2.17-931-g30bbc0c/c_stubs/test-stdio.c glibc-2.17-931-g30bbc0c.new/c_stubs/test-stdio.c
|
||||
--- glibc-2.17-931-g30bbc0c/c_stubs/test-stdio.c 1970-01-01 05:30:00.000000000 +0530
|
||||
+++ glibc-2.17-931-g30bbc0c.new/c_stubs/test-stdio.c 2011-10-19 16:34:41.000000000 +0530
|
||||
@@ -0,0 +1,8 @@
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+int
|
||||
+main (void)
|
||||
+{
|
||||
+ printf ("Hello world\n");
|
||||
+ return 0;
|
||||
+}
|
|
@ -1,22 +0,0 @@
|
|||
diff -urN glibc-2.20.mod/sysdeps/unix/sysv/linux/x86/elision-conf.c glibc-2.20/sysdeps/unix/sysv/linux/x86/elision-conf.c
|
||||
--- glibc-2.20.mod/sysdeps/unix/sysv/linux/x86/elision-conf.c 2014-09-27 00:25:46.443462345 -0400
|
||||
+++ glibc-2.20/sysdeps/unix/sysv/linux/x86/elision-conf.c 2014-09-27 00:29:53.586615813 -0400
|
||||
@@ -62,12 +62,16 @@
|
||||
char **argv __attribute__ ((unused)),
|
||||
char **environ)
|
||||
{
|
||||
- __elision_available = HAS_RTM;
|
||||
#ifdef ENABLE_LOCK_ELISION
|
||||
+ __elision_available = HAS_RTM;
|
||||
__pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
|
||||
-#endif
|
||||
if (!HAS_RTM)
|
||||
__elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
|
||||
+#else
|
||||
+ __elision_available = 0;
|
||||
+ __pthread_force_elision = 0;
|
||||
+ __elision_aconf.retry_try_xbegin = 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
#ifdef SHARED
|
|
@ -1,45 +0,0 @@
|
|||
From 70d0a630700f602a457832383161d261fe222db5 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Thu, 1 Jul 2010 13:14:26 +0200
|
||||
Subject: [PATCH] Fix PLT reference
|
||||
|
||||
* include/sys/resource.h (__getrlimit): Add hidden proto.
|
||||
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Add libc_hidden_weak.
|
||||
* sysdeps/mach/hurd/getrlimit.c: Add libc_hidden_def.
|
||||
* resource/getrlimit.c: Likewise.
|
||||
|
||||
---
|
||||
ChangeLog | 7 +++++++
|
||||
include/sys/resource.h | 1 +
|
||||
resource/getrlimit.c | 1 +
|
||||
sysdeps/mach/hurd/getrlimit.c | 1 +
|
||||
sysdeps/unix/sysv/linux/i386/getrlimit.c | 1 +
|
||||
5 files changed, 11 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/include/sys/resource.h
|
||||
+++ b/include/sys/resource.h
|
||||
@@ -14,5 +14,6 @@ extern int __getrusage (enum __rusage_who __who, struct rusage *__usage)
|
||||
|
||||
extern int __setrlimit (enum __rlimit_resource __resource,
|
||||
const struct rlimit *__rlimits);
|
||||
+libc_hidden_proto (__getrlimit)
|
||||
#endif
|
||||
#endif
|
||||
--- a/resource/getrlimit.c
|
||||
+++ b/resource/getrlimit.c
|
||||
@@ -27,6 +27,7 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
|
||||
__set_errno (ENOSYS);
|
||||
return -1;
|
||||
}
|
||||
+libc_hidden_def (__getrlimit)
|
||||
weak_alias (__getrlimit, getrlimit)
|
||||
|
||||
stub_warning (getrlimit)
|
||||
--- a/sysdeps/mach/hurd/getrlimit.c
|
||||
+++ b/sysdeps/mach/hurd/getrlimit.c
|
||||
@@ -43,4 +43,5 @@ __getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+libc_hidden_def (__getrlimit)
|
||||
weak_alias (__getrlimit, getrlimit)
|
|
@ -1,10 +1,22 @@
|
|||
Short description: Add 4 ISO-8859-15 locales to SUPPORTED for Euro symbol.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #61908
|
||||
Upstream status: not-needed
|
||||
|
||||
Very early RHL 7.3 requirement to add these locales so users can
|
||||
get access to Euro symbol. We should review this bug and decide if
|
||||
the UTF-8 locales are now serving the same purpose and drop the
|
||||
additional locales.
|
||||
|
||||
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
|
||||
- add a couple of .ISO-8859-15 locales (#61908)
|
||||
|
||||
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||
--- a/localedata/SUPPORTED 2012-11-25 12:59:31.000000000 -0700
|
||||
+++ b/localedata/SUPPORTED 2012-11-26 12:58:43.298223018 -0700
|
||||
@@ -89,6 +89,7 @@ cy_GB.UTF-8/UTF-8 \
|
||||
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||
index c8b63cc2fe2b4547..32088fdef06a14a3 100644
|
||||
--- a/localedata/SUPPORTED
|
||||
+++ b/localedata/SUPPORTED
|
||||
@@ -103,6 +103,7 @@ cy_GB.UTF-8/UTF-8 \
|
||||
cy_GB/ISO-8859-14 \
|
||||
da_DK.UTF-8/UTF-8 \
|
||||
da_DK/ISO-8859-1 \
|
||||
|
@ -12,7 +24,7 @@ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
|
|||
de_AT.UTF-8/UTF-8 \
|
||||
de_AT/ISO-8859-1 \
|
||||
de_AT@euro/ISO-8859-15 \
|
||||
@@ -121,6 +122,7 @@ en_DK.UTF-8/UTF-8 \
|
||||
@@ -140,6 +141,7 @@ en_DK.UTF-8/UTF-8 \
|
||||
en_DK/ISO-8859-1 \
|
||||
en_GB.UTF-8/UTF-8 \
|
||||
en_GB/ISO-8859-1 \
|
||||
|
@ -20,7 +32,7 @@ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
|
|||
en_HK.UTF-8/UTF-8 \
|
||||
en_HK/ISO-8859-1 \
|
||||
en_IE.UTF-8/UTF-8 \
|
||||
@@ -136,6 +138,7 @@ en_SG.UTF-8/UTF-8 \
|
||||
@@ -157,6 +159,7 @@ en_SG.UTF-8/UTF-8 \
|
||||
en_SG/ISO-8859-1 \
|
||||
en_US.UTF-8/UTF-8 \
|
||||
en_US/ISO-8859-1 \
|
||||
|
@ -28,11 +40,11 @@ diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
|
|||
en_ZA.UTF-8/UTF-8 \
|
||||
en_ZA/ISO-8859-1 \
|
||||
en_ZM/UTF-8 \
|
||||
@@ -385,6 +388,7 @@ sv_FI/ISO-8859-1 \
|
||||
@@ -425,6 +428,7 @@ sv_FI/ISO-8859-1 \
|
||||
sv_FI@euro/ISO-8859-15 \
|
||||
sv_SE.UTF-8/UTF-8 \
|
||||
sv_SE/ISO-8859-1 \
|
||||
+sv_SE.ISO-8859-15/ISO-8859-15 \
|
||||
sw_KE/UTF-8 \
|
||||
sw_TZ/UTF-8 \
|
||||
szl_PL/UTF-8 \
|
||||
syr/UTF-8 \
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
This is part of commit glibc-2.3.3-1564-gd0b6ac6
|
||||
|
||||
* Fri Mar 14 2008 Jakub Jelinek <jakub@redhat.com> 2.7.90-11
|
||||
- remove <stropts.h>, define _XOPEN_STREAMS -1 (#436349)
|
||||
|
||||
diff -Nrup a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
|
||||
--- a/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-05 07:42:49.000000000 -0600
|
||||
+++ b/sysdeps/unix/sysv/linux/bits/posix_opt.h 2012-06-07 12:15:21.817318674 -0600
|
||||
@@ -188,4 +188,7 @@
|
||||
/* Typed memory objects are not available. */
|
||||
#define _POSIX_TYPED_MEMORY_OBJECTS -1
|
||||
|
||||
+/* Streams are not available. */
|
||||
+#define _XOPEN_STREAMS -1
|
||||
+
|
||||
#endif /* bits/posix_opt.h */
|
||||
diff -Nrup a/streams/Makefile b/streams/Makefile
|
||||
--- a/streams/Makefile 2012-06-05 07:42:49.000000000 -0600
|
||||
+++ b/streams/Makefile 2012-06-07 12:15:21.824318649 -0600
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
-headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
|
||||
+#headers = stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
|
||||
routines = isastream getmsg getpmsg putmsg putpmsg fattach fdetach
|
||||
|
||||
include ../Rules
|
|
@ -1,50 +0,0 @@
|
|||
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Thu, 8 Apr 2010 11:18:26 +0200
|
||||
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
|
||||
|
||||
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
|
||||
GLIBC_PRIVATE.
|
||||
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
|
||||
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
|
||||
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
|
||||
|
||||
---
|
||||
ChangeLog | 8 ++++++++
|
||||
nptl/Versions | 1 +
|
||||
nptl/nptl-init.c | 2 +-
|
||||
sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
|
||||
sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
|
||||
5 files changed, 17 insertions(+), 2 deletions(-)
|
||||
create mode 100644 sysdeps/unix/sysv/linux/i386/Versions
|
||||
|
||||
--- a/nptl/Version
|
||||
+++ b/nptl/Versions
|
||||
@@ -30,6 +30,7 @@ libc {
|
||||
__libc_pthread_init;
|
||||
__libc_current_sigrtmin_private; __libc_current_sigrtmax_private;
|
||||
__libc_allocate_rtsig_private;
|
||||
+ __getrlimit;
|
||||
}
|
||||
}
|
||||
|
||||
--- a/sysdeps/unix/sysv/linux/i386/Versions
|
||||
+++ b/sysdeps/unix/sysv/linux/i386/Versions
|
||||
@@ -53,5 +53,6 @@
|
||||
}
|
||||
GLIBC_PRIVATE {
|
||||
__modify_ldt;
|
||||
+ __uname;
|
||||
}
|
||||
}
|
||||
--- a/sysdeps/unix/sysv/linux/i386/smp.h
|
||||
+++ b/sysdeps/unix/sysv/linux/i386/smp.h
|
||||
@@ -36,7 +36,7 @@ is_smp_system (void)
|
||||
char *cp;
|
||||
|
||||
/* Try reading the number using `sysctl' first. */
|
||||
- if (uname (&u.uts) == 0)
|
||||
+ if (__uname (&u.uts) == 0)
|
||||
cp = u.uts.version;
|
||||
else
|
||||
{
|
File diff suppressed because it is too large
Load diff
|
@ -1,19 +0,0 @@
|
|||
--- glibc-2.18-151-g303e567.orig/elf/ldconfig.c 2013-09-25 14:01:01.522446341 -0400
|
||||
+++ glibc-2.18-151-g303e567/elf/ldconfig.c 2013-09-25 14:06:31.094218857 -0400
|
||||
@@ -959,6 +959,16 @@
|
||||
|| dlib_ptr->flag == FLAG_ELF_LIBC6)
|
||||
&& flag == FLAG_ELF)
|
||||
dlib_ptr->flag = flag;
|
||||
+#ifdef __arm__
|
||||
+ /* In Fedora 20 binutils regressed temporarily and failed to
|
||||
+ mark hard ABI objects with the correct flag. Therefore we
|
||||
+ must accept unmarked objects that were previously marked
|
||||
+ hard ABI. We can remove this check once the entire distribution
|
||||
+ has been rebuilt. */
|
||||
+ else if (dlib_ptr->flag & FLAG_ARM_LIBHF &&
|
||||
+ (flag == FLAG_ELF_LIBC6))
|
||||
+ ;
|
||||
+#endif
|
||||
else
|
||||
error (0, 0, _("libraries %s and %s in directory %s have same soname but different type."),
|
||||
dlib_ptr->name, direntry->d_name,
|
|
@ -1,29 +0,0 @@
|
|||
--- a/nscd/nscd.service
|
||||
+++ b/nscd/nscd.service
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Name Service Cache Daemon
|
||||
+After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
@@ -17,3 +18,4 @@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+Also=nscd.socket
|
||||
diff --git a/nscd/nscd.socket b/nscd/nscd.socket
|
||||
new file mode 100644
|
||||
index 0000000..7e512d5
|
||||
--- /dev/null
|
||||
+++ b/nscd/nscd.socket
|
||||
@@ -0,0 +1,8 @@
|
||||
+[Unit]
|
||||
+Description=Name Service Cache Daemon Socket
|
||||
+
|
||||
+[Socket]
|
||||
+ListenDatagram=/var/run/nscd/socket
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
File diff suppressed because it is too large
Load diff
|
@ -1,113 +0,0 @@
|
|||
This patch creates a crypt-glibc subdirectory which builds the
|
||||
libgcrypt files, but this time against the glibc sources.
|
||||
|
||||
The default subdirs list does not include this subdirectory because
|
||||
the file names conflict with the crypt directory. The spec file does
|
||||
not use the install target to install the built libcrypt.so file,
|
||||
either.
|
||||
|
||||
Index: b/crypt-glibc/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/crypt-glibc/Makefile
|
||||
@@ -0,0 +1,60 @@
|
||||
+# Build libcrypt against internal cryptographic algorithms.
|
||||
+# Copyright (C) 1996-2016 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
|
||||
+# modify it under the terms of the GNU Lesser General Public
|
||||
+# License as published by the Free Software Foundation; either
|
||||
+# version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+# The GNU C Library is distributed in the hope that it will be useful,
|
||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+# Lesser General Public License for more details.
|
||||
+
|
||||
+# You should have received a copy of the GNU Lesser General Public
|
||||
+# License along with the GNU C Library; if not, see
|
||||
+# <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+#
|
||||
+# Sub-makefile for crypt() portion of the library.
|
||||
+#
|
||||
+subdir := crypt-glibc
|
||||
+
|
||||
+include ../Makeconfig
|
||||
+
|
||||
+extra-libs := libcrypt
|
||||
+extra-libs-others := $(extra-libs)
|
||||
+
|
||||
+# Use the sources in the crypt subdirectory.
|
||||
+vpath %.c ../crypt
|
||||
+
|
||||
+libcrypt-routines := \
|
||||
+ crypt-entry md5-crypt sha256-crypt sha512-crypt crypt crypt_util
|
||||
+
|
||||
+tests := cert md5c-test sha256c-test sha512c-test badsalttest
|
||||
+
|
||||
+libcrypt-routines += md5 sha256 sha512
|
||||
+
|
||||
+tests += md5test sha256test sha512test
|
||||
+
|
||||
+# The test md5test-giant uses up to 400 MB of RSS and runs on a fast
|
||||
+# machine over a minute.
|
||||
+xtests = md5test-giant
|
||||
+
|
||||
+include ../Rules
|
||||
+
|
||||
+md5-routines := md5 $(filter md5%,$(libcrypt-sysdep_routines))
|
||||
+sha256-routines := sha256 $(filter sha256%,$(libcrypt-sysdep_routines))
|
||||
+sha512-routines := sha512 $(filter sha512%,$(libcrypt-sysdep_routines))
|
||||
+
|
||||
+$(objpfx)md5test: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
||||
+$(objpfx)md5test-giant: $(patsubst %, $(objpfx)%.o,$(md5-routines))
|
||||
+$(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines))
|
||||
+$(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
|
||||
+
|
||||
+ifeq (yes,$(build-shared))
|
||||
+$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
|
||||
+else
|
||||
+$(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
|
||||
+endif
|
||||
Index: b/crypt/md5.c
|
||||
===================================================================
|
||||
--- a/crypt/md5.c
|
||||
+++ b/crypt/md5.c
|
||||
@@ -270,4 +270,4 @@ md5_process_bytes (const void *buffer, s
|
||||
}
|
||||
}
|
||||
|
||||
-#include <md5-block.c>
|
||||
+#include "md5-block.c"
|
||||
Index: b/crypt/sha256.c
|
||||
===================================================================
|
||||
--- a/crypt/sha256.c
|
||||
+++ b/crypt/sha256.c
|
||||
@@ -212,4 +212,4 @@ __sha256_process_bytes (const void *buff
|
||||
}
|
||||
}
|
||||
|
||||
-#include <sha256-block.c>
|
||||
+#include "sha256-block.c"
|
||||
Index: b/crypt/sha512.c
|
||||
===================================================================
|
||||
--- a/crypt/sha512.c
|
||||
+++ b/crypt/sha512.c
|
||||
@@ -235,4 +235,4 @@ __sha512_process_bytes (const void *buff
|
||||
}
|
||||
}
|
||||
|
||||
-#include <sha512-block.c>
|
||||
+#include "sha512-block.c"
|
||||
Index: b/crypt-glibc/Versions
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/crypt-glibc/Versions
|
||||
@@ -0,0 +1,5 @@
|
||||
+libcrypt {
|
||||
+ GLIBC_2.0 {
|
||||
+ crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r;
|
||||
+ }
|
||||
+}
|
|
@ -1,176 +0,0 @@
|
|||
Revert these two upstream commits, to unbreak ASAN:
|
||||
|
||||
commit e91bd7465816f474617dcb4bbfe72f3594c5783c
|
||||
Author: Adhemerval Zanella <adhemerval.zanella@linaro.com>
|
||||
Date: Thu Mar 31 10:51:51 2016 -0300
|
||||
|
||||
Fix tst-dlsym-error build
|
||||
|
||||
This patch fixes the new test tst-dlsym-error build on aarch64
|
||||
(and possible other architectures as well) due missing strchrnul
|
||||
definition.
|
||||
|
||||
* elf/tst-dlsym-error.c: Include <string.h> for strchrnul.
|
||||
|
||||
commit 7d45c163d00c88d5875a112343c4ea3e61349e6b
|
||||
Author: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Thu Mar 31 11:26:55 2016 +0200
|
||||
|
||||
Report dlsym, dlvsym lookup errors using dlerror [BZ #19509]
|
||||
|
||||
* elf/dl-lookup.c (_dl_lookup_symbol_x): Report error even if
|
||||
skip_map != NULL.
|
||||
* elf/tst-dlsym-error.c: New file.
|
||||
* elf/Makefile (tests): Add tst-dlsym-error.
|
||||
(tst-dlsym-error): Link against libdl.
|
||||
|
||||
Index: b/elf/Makefile
|
||||
===================================================================
|
||||
--- a/elf/Makefile
|
||||
+++ b/elf/Makefile
|
||||
@@ -149,7 +149,7 @@ tests += loadtest restest1 preloadtest l
|
||||
tst-nodelete) \
|
||||
tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
|
||||
tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
|
||||
- tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error
|
||||
+ tst-nodelete2 tst-audit11 tst-audit12
|
||||
# reldep9
|
||||
ifeq ($(build-hardcoded-path-in-tests),yes)
|
||||
tests += tst-dlopen-aout
|
||||
@@ -1258,5 +1258,3 @@ $(objpfx)tst-prelink-cmp.out: tst-prelin
|
||||
$(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig
|
||||
$(SHELL) $< '$(common-objpfx)' '$(test-wrapper)' '$(test-wrapper-env)' > $@; \
|
||||
$(evaluate-test)
|
||||
-
|
||||
-$(objpfx)tst-dlsym-error: $(libdl)
|
||||
Index: b/elf/dl-lookup.c
|
||||
===================================================================
|
||||
--- a/elf/dl-lookup.c
|
||||
+++ b/elf/dl-lookup.c
|
||||
@@ -858,6 +858,7 @@ _dl_lookup_symbol_x (const char *undef_n
|
||||
if (__glibc_unlikely (current_value.s == NULL))
|
||||
{
|
||||
if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
|
||||
+ && skip_map == NULL
|
||||
&& !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
|
||||
{
|
||||
/* We could find no value for a strong reference. */
|
||||
Index: b/elf/tst-dlsym-error.c
|
||||
===================================================================
|
||||
--- a/elf/tst-dlsym-error.c
|
||||
+++ /dev/null
|
||||
@@ -1,114 +0,0 @@
|
||||
-/* Test error reporting for dlsym, dlvsym failures.
|
||||
- Copyright (C) 2016 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
|
||||
- modify it under the terms of the GNU Lesser General Public
|
||||
- License as published by the Free Software Foundation; either
|
||||
- version 2.1 of the License, or (at your option) any later version.
|
||||
-
|
||||
- The GNU C Library is distributed in the hope that it will be useful,
|
||||
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
- Lesser General Public License for more details.
|
||||
-
|
||||
- You should have received a copy of the GNU Lesser General Public
|
||||
- License along with the GNU C Library; if not, see
|
||||
- <http://www.gnu.org/licenses/>. */
|
||||
-
|
||||
-#include <dlfcn.h>
|
||||
-#include <gnu/lib-names.h>
|
||||
-#include <stdio.h>
|
||||
-#include <stdlib.h>
|
||||
-#include <string.h>
|
||||
-
|
||||
-/* Used to disambiguate symbol names. */
|
||||
-static int counter;
|
||||
-
|
||||
-static void
|
||||
-test_one (void *handle, const char *name, void *(func) (void *, const char *),
|
||||
- const char *suffix)
|
||||
-{
|
||||
- ++counter;
|
||||
- char symbol[32];
|
||||
- snprintf (symbol, sizeof (symbol), "no_such_symbol_%d", counter);
|
||||
- char *expected_message;
|
||||
- if (asprintf (&expected_message, ": undefined symbol: %s%s",
|
||||
- symbol, suffix) < 0)
|
||||
- {
|
||||
- printf ("error: asprintf: %m\n");
|
||||
- abort ();
|
||||
- }
|
||||
-
|
||||
- void *addr = func (handle, symbol);
|
||||
- if (addr != NULL)
|
||||
- {
|
||||
- printf ("error: %s: found symbol \"no_such_symbol\"\n", name);
|
||||
- abort ();
|
||||
- }
|
||||
- const char *message = dlerror ();
|
||||
- if (message == NULL)
|
||||
- {
|
||||
- printf ("error: %s: missing error message\n", name);
|
||||
- abort ();
|
||||
- }
|
||||
- const char *message_without_path = strchrnul (message, ':');
|
||||
- if (strcmp (message_without_path, expected_message) != 0)
|
||||
- {
|
||||
- printf ("error: %s: unexpected error message: %s\n", name, message);
|
||||
- abort ();
|
||||
- }
|
||||
- free (expected_message);
|
||||
-
|
||||
- message = dlerror ();
|
||||
- if (message != NULL)
|
||||
- {
|
||||
- printf ("error: %s: unexpected error message: %s\n", name, message);
|
||||
- abort ();
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-test_handles (const char *name, void *(func) (void *, const char *),
|
||||
- const char *suffix)
|
||||
-{
|
||||
- test_one (RTLD_DEFAULT, name, func, suffix);
|
||||
- test_one (RTLD_NEXT, name, func, suffix);
|
||||
-
|
||||
- void *handle = dlopen (LIBC_SO, RTLD_LAZY);
|
||||
- if (handle == NULL)
|
||||
- {
|
||||
- printf ("error: cannot dlopen %s: %s\n", LIBC_SO, dlerror ());
|
||||
- abort ();
|
||||
- }
|
||||
- test_one (handle, name, func, suffix);
|
||||
- dlclose (handle);
|
||||
-}
|
||||
-
|
||||
-static void *
|
||||
-dlvsym_no_such_version (void *handle, const char *name)
|
||||
-{
|
||||
- return dlvsym (handle, name, "NO_SUCH_VERSION");
|
||||
-}
|
||||
-
|
||||
-static void *
|
||||
-dlvsym_glibc_private (void *handle, const char *name)
|
||||
-{
|
||||
- return dlvsym (handle, name, "GLIBC_PRIVATE");
|
||||
-}
|
||||
-
|
||||
-static int
|
||||
-do_test (void)
|
||||
-{
|
||||
- test_handles ("dlsym", dlsym, "");
|
||||
- test_handles ("dlvsym", dlvsym_no_such_version,
|
||||
- ", version NO_SUCH_VERSION");
|
||||
- test_handles ("dlvsym", dlvsym_glibc_private,
|
||||
- ", version GLIBC_PRIVATE");
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-#define TEST_FUNCTION do_test ()
|
||||
-#include "../test-skeleton.c"
|
|
@ -1,10 +0,0 @@
|
|||
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
|
||||
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
|
||||
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
|
||||
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
|
||||
alias OSF10010004// HP-GREEK8//
|
||||
module HP-GREEK8// INTERNAL HP-GREEK8 1
|
||||
module INTERNAL HP-GREEK8// HP-GREEK8 1
|
||||
+
|
||||
+alias ISO-10646-UCS-2// UNICODE//
|
||||
+alias ISO-10646-UCS-2// ISO-10646/UTF8/
|
|
@ -1,93 +0,0 @@
|
|||
Short description: fnmatch() fails with MBCS.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #819430, #826149, #826151
|
||||
Bug-Upstream: #14185
|
||||
Upstream status: not-submitted
|
||||
|
||||
fnmatch() fails when '*' wildcard is applied on the file name
|
||||
containing multi-byte character(s)
|
||||
|
||||
This needs to be reviewed thoroughly and go upstream with a
|
||||
new test case.
|
||||
|
||||
|
||||
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
|
||||
index 5896812c966ac7c6..63df3dae0911030f 100644
|
||||
--- a/posix/fnmatch.c
|
||||
+++ b/posix/fnmatch.c
|
||||
@@ -237,6 +237,7 @@ fnmatch (const char *pattern, const char *string, int flags)
|
||||
{
|
||||
if (__glibc_unlikely (MB_CUR_MAX != 1))
|
||||
{
|
||||
+ const char *orig_pattern = pattern;
|
||||
mbstate_t ps;
|
||||
size_t n;
|
||||
const char *p;
|
||||
@@ -256,10 +257,8 @@ fnmatch (const char *pattern, const char *string, int flags)
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set 'errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- return -1;
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto try_singlebyte;
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -271,10 +270,8 @@ fnmatch (const char *pattern, const char *string, int flags)
|
||||
prepare_wpattern:
|
||||
n = mbsrtowcs (NULL, &pattern, 0, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set 'errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- return -1;
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto try_singlebyte;
|
||||
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
@@ -297,14 +294,8 @@ fnmatch (const char *pattern, const char *string, int flags)
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wstring, &p, n + 1, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- {
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set 'errno' to something which
|
||||
- mbsrtows hasn't already done? */
|
||||
- free_return:
|
||||
- free (wpattern_malloc);
|
||||
- return -1;
|
||||
- }
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto free_and_try_singlebyte;
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -316,10 +307,8 @@ fnmatch (const char *pattern, const char *string, int flags)
|
||||
prepare_wstring:
|
||||
n = mbsrtowcs (NULL, &string, 0, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set 'errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- goto free_return;
|
||||
+ /* Something wrong: Fall back to singlebyte matching. */
|
||||
+ goto free_and_try_singlebyte;
|
||||
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
|
||||
{
|
||||
free (wpattern_malloc);
|
||||
@@ -346,6 +335,10 @@ fnmatch (const char *pattern, const char *string, int flags)
|
||||
free (wpattern_malloc);
|
||||
|
||||
return res;
|
||||
+ free_and_try_singlebyte:
|
||||
+ free(wpattern_malloc);
|
||||
+ try_singlebyte:
|
||||
+ pattern = orig_pattern;
|
||||
}
|
||||
|
||||
return internal_fnmatch (pattern, string, string + strlen (string),
|
|
@ -1,13 +0,0 @@
|
|||
diff -rup a/manual/Makefile b/manual/Makefile
|
||||
--- a/manual/Makefile 2012-05-20 19:47:38.000000000 -0600
|
||||
+++ b/manual/Makefile 2012-05-29 22:23:33.920428631 -0600
|
||||
@@ -129,7 +129,8 @@ $(objpfx)%.c.texi: examples/%.c
|
||||
mv -f $@.new $@
|
||||
|
||||
$(objpfx)%.info: %.texinfo
|
||||
- LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=$@ $<
|
||||
+ LANGUAGE=C LC_ALL=C $(MAKEINFO) -P $(objpfx) --output=`basename $@` $<
|
||||
+ mv `basename $@`* $(objpfx)
|
||||
|
||||
$(objpfx)%.dvi: %.texinfo
|
||||
cd $(objpfx);$(TEXI2DVI) -I $(shell cd $(<D) && pwd) --output=$@ \
|
|
@ -1,5 +1,15 @@
|
|||
2012-06-14 Jeff Law <law@redhat.com>
|
||||
Short description: Fix newlocale error return.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #832516
|
||||
Bug-Fedora: #827510
|
||||
Bug-Upstream: #14247
|
||||
Upstream status: not-submitted
|
||||
|
||||
This needs to go upstream right away to fix the error case for
|
||||
newlocale not correctly returning an error.
|
||||
|
||||
2012-06-14 Jeff Law <law@redhat.com>
|
||||
|
||||
* locale/loadlocale.c (_nl_load_locale): Delay setting
|
||||
file->decided until we have successfully loaded the file's
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
#
|
||||
# Based on the following upstream commit:
|
||||
#
|
||||
# commit 6e6249d0b461b952d0f544792372663feb6d792a
|
||||
# Author: Roland McGrath <roland@hack.frob.com>
|
||||
# Date: Wed Oct 24 14:50:46 2012 -0700
|
||||
#
|
||||
# BZ#14743: Move clock_* symbols from librt to libc.
|
||||
#
|
||||
# We remove the clock* functions from librtkaio.so.1 and
|
||||
# use those provided in libc.so.6, matching librt.so.
|
||||
#
|
||||
--- glibc-2.21-63-gebf27d1.mod/rtkaio/clock-compat.c 1969-12-31 19:00:00.000000000 -0500
|
||||
+++ glibc-2.21-63-gebf27d1/rtkaio/clock-compat.c 2015-02-12 01:28:59.615026597 -0500
|
||||
@@ -0,0 +1,2 @@
|
||||
+#define librt librtkaio
|
||||
+#include <rt/clock-compat.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_getcpuclockid.c glibc-2.21-59-gd35273f/rtkaio/kaio_clock_getcpuclockid.c
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_getcpuclockid.c 2015-02-11 13:00:55.105400863 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/kaio_clock_getcpuclockid.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1 +0,0 @@
|
||||
-#include <clock_getcpuclockid.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_getres.c glibc-2.21-59-gd35273f/rtkaio/kaio_clock_getres.c
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_getres.c 2015-02-11 13:00:55.105400863 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/kaio_clock_getres.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1 +0,0 @@
|
||||
-#include <clock_getres.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_gettime.c glibc-2.21-59-gd35273f/rtkaio/kaio_clock_gettime.c
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_gettime.c 2015-02-11 13:00:55.109400738 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/kaio_clock_gettime.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1 +0,0 @@
|
||||
-#include <clock_gettime.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_nanosleep.c glibc-2.21-59-gd35273f/rtkaio/kaio_clock_nanosleep.c
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_nanosleep.c 2015-02-11 13:00:55.115400552 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/kaio_clock_nanosleep.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1 +0,0 @@
|
||||
-#include <clock_nanosleep.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_settime.c glibc-2.21-59-gd35273f/rtkaio/kaio_clock_settime.c
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/kaio_clock_settime.c 2015-02-11 13:00:55.110400708 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/kaio_clock_settime.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1 +0,0 @@
|
||||
-#include <clock_settime.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/kaio_get_clockfreq.c glibc-2.21-59-gd35273f/rtkaio/kaio_get_clockfreq.c
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/kaio_get_clockfreq.c 2015-02-11 13:00:55.118400459 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/kaio_get_clockfreq.c 1969-12-31 19:00:00.000000000 -0500
|
||||
@@ -1 +0,0 @@
|
||||
-#include <get_clockfreq.c>
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/Makefile glibc-2.21-59-gd35273f/rtkaio/Makefile
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/Makefile 2015-02-11 13:00:55.107400801 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/Makefile 2015-02-11 22:46:46.930374298 -0500
|
||||
@@ -25,9 +25,6 @@
|
||||
aio_read64 aio_return aio_suspend aio_write \
|
||||
aio_write64 lio_listio lio_listio64 aio_sigqueue \
|
||||
aio_notify
|
||||
-clock-routines := get_clockfreq clock_getcpuclockid \
|
||||
- clock_getres clock_gettime clock_settime \
|
||||
- clock_nanosleep
|
||||
timer-routines := timer_create timer_delete timer_getoverr \
|
||||
timer_gettime timer_settime
|
||||
shm-routines := shm_open shm_unlink
|
||||
@@ -36,8 +33,9 @@
|
||||
mq_timedreceive
|
||||
|
||||
librtkaio-routines = $(patsubst %,k%,$(aio-routines)) \
|
||||
- $(patsubst %,kaio_%,$(clock-routines) $(timer-routines) \
|
||||
- $(shm-routines) $(mq-routines))
|
||||
+ $(patsubst %,kaio_%,$(timer-routines) \
|
||||
+ $(shm-routines) $(mq-routines)) \
|
||||
+ clock-compat
|
||||
|
||||
tests := tst-shm tst-clock tst-clock_nanosleep tst-timer tst-timer2 \
|
||||
tst-aio tst-aio64 tst-aio2 tst-aio3 tst-aio4 tst-aio5 tst-aio6 \
|
||||
@@ -64,7 +62,6 @@
|
||||
include $(..)Rules
|
||||
|
||||
CFLAGS-kaio_suspend.c = -fexceptions
|
||||
-CFLAGS-kaio_clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables
|
||||
CFLAGS-kaio_librt-cancellation.c = -fasynchronous-unwind-tables
|
||||
|
||||
LDFLAGS-rtkaio.so = -Wl,-soname=lib$(libprefix)rt.so$(librt.so-version) \
|
||||
@@ -88,9 +85,6 @@
|
||||
else
|
||||
$(addprefix $(objpfx),$(tests)): $(objpfx)librtkaio.a $(static-thread-library)
|
||||
endif
|
||||
-ifeq (yes,$(build-bounded))
|
||||
-$(tests:%=$(objpfx)%-bp): $(objpfx)librtkaio_b.a $(bounded-thread-library)
|
||||
-endif
|
||||
|
||||
tst-mqueue7-ARGS = -- $(built-program-file)
|
||||
|
||||
diff -urN glibc-2.21-59-gd35273f.mod/rtkaio/Versions glibc-2.21-59-gd35273f/rtkaio/Versions
|
||||
--- glibc-2.21-59-gd35273f.mod/rtkaio/Versions 2015-02-11 13:00:55.118400459 -0500
|
||||
+++ glibc-2.21-59-gd35273f/rtkaio/Versions 2015-02-11 22:36:11.974051389 -0500
|
||||
@@ -6,7 +6,7 @@
|
||||
aio_suspend64; aio_write; aio_write64; lio_listio; lio_listio64;
|
||||
}
|
||||
GLIBC_2.2 {
|
||||
- # c*
|
||||
+ # These have moved to libc and are still here only for compatibility.
|
||||
clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
|
||||
clock_nanosleep;
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
diff -pruN glibc-2.21-649-gae5eae7/rtkaio/Makefile glibc-2.21-649-gae5eae7.new/rtkaio/Makefile
|
||||
--- glibc-2.21-649-gae5eae7/rtkaio/Makefile 2015-07-27 22:57:05.742601066 +0530
|
||||
+++ glibc-2.21-649-gae5eae7.new/rtkaio/Makefile 2015-07-27 23:33:09.892874337 +0530
|
||||
@@ -66,7 +66,9 @@ CFLAGS-kaio_librt-cancellation.c = -fasy
|
||||
|
||||
LDFLAGS-rtkaio.so = -Wl,-soname=lib$(libprefix)rt.so$(librt.so-version) \
|
||||
-Wl,--enable-new-dtags,-z,nodelete
|
||||
-CPPFLAGS-librtkaio += -DIS_IN_librt=1 -I$(..)rt
|
||||
+# Resort to this ugliness of undefining and defining MODULE_NAME because
|
||||
+# setting libof-<> to librt has many more side-effects that we want to avoid.
|
||||
+CPPFLAGS-librtkaio += -I$(..)rt -UMODULE_NAME -DMODULE_NAME=librt
|
||||
|
||||
rpath-dirs := $(patsubst rt,rtkaio,$(rpath-dirs))
|
||||
|
||||
diff -pruN glibc-2.21-649-gae5eae7/rtkaio/sysdeps/unix/sysv/linux/syscalls.list glibc-2.21-649-gae5eae7.new/rtkaio/sysdeps/unix/sysv/linux/syscalls.list
|
||||
--- glibc-2.21-649-gae5eae7/rtkaio/sysdeps/unix/sysv/linux/syscalls.list 2015-07-27 22:47:23.073776396 +0530
|
||||
+++ glibc-2.21-649-gae5eae7.new/rtkaio/sysdeps/unix/sysv/linux/syscalls.list 2015-07-27 23:33:09.892874337 +0530
|
||||
@@ -1,5 +1,5 @@
|
||||
# File name Caller Syscall name Args Strong name Weak names
|
||||
|
||||
-kaio_mq_timedsend - mq_timedsend Ci:ipiip __GI_mq_timedsend mq_timedsend
|
||||
-kaio_mq_timedreceive - mq_timedreceive Ci:ipipp __GI_mq_timedreceive mq_timedreceive
|
||||
-kaio_mq_setattr - mq_getsetattr i:ipp __GI_mq_setattr mq_setattr
|
||||
+kaio_mq_timedsend - mq_timedsend Ci:ipiip __mq_timedsend mq_timedsend
|
||||
+kaio_mq_timedreceive - mq_timedreceive Ci:ipipp __mq_timedreceive mq_timedreceive
|
||||
+kaio_mq_setattr - mq_getsetattr i:ipp mq_setattr
|
5015
glibc-rtkaio.patch
5015
glibc-rtkaio.patch
File diff suppressed because it is too large
Load diff
12
glibc-x86_32-workaround-for-gcc-11-bug.patch
Normal file
12
glibc-x86_32-workaround-for-gcc-11-bug.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -up glibc-2.33/misc/Makefile.omv~ glibc-2.33/misc/Makefile
|
||||
--- glibc-2.33/misc/Makefile.omv~ 2021-05-31 23:28:41.341567881 +0200
|
||||
+++ glibc-2.33/misc/Makefile 2021-05-31 23:28:51.604675253 +0200
|
||||
@@ -107,7 +107,7 @@ tests-special += $(objpfx)tst-error1-mem
|
||||
$(objpfx)tst-allocate_once-mem.out
|
||||
endif
|
||||
|
||||
-CFLAGS-select.c += -fexceptions -fasynchronous-unwind-tables
|
||||
+CFLAGS-select.c += -fexceptions -fasynchronous-unwind-tables -mno-stackrealign
|
||||
CFLAGS-tsearch.c += $(uses-callbacks)
|
||||
CFLAGS-lsearch.c += $(uses-callbacks)
|
||||
CFLAGS-pselect.c += -fexceptions
|
776
glibc.spec
776
glibc.spec
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,13 @@
|
|||
--- glibc-2.24/malloc/malloc.c~ 2016-08-02 02:01:36.000000000 +0000
|
||||
+++ glibc-2.24/malloc/malloc.c 2016-08-27 04:16:33.210410956 +0000
|
||||
@@ -2333,6 +2333,8 @@
|
||||
diff -up glibc-2.35/malloc/malloc.c.23~ glibc-2.35/malloc/malloc.c
|
||||
--- glibc-2.35/malloc/malloc.c.23~ 2022-02-03 11:12:21.887241710 +0100
|
||||
+++ glibc-2.35/malloc/malloc.c 2022-02-03 11:13:26.221492043 +0100
|
||||
@@ -2449,6 +2449,9 @@ sysmalloc_mmap (INTERNAL_SIZE_T nb, size
|
||||
madvise_thp (mm, size);
|
||||
#endif
|
||||
|
||||
if (mm != MAP_FAILED)
|
||||
{
|
||||
+ if (size > 8 * 1024 * 1024)
|
||||
+ __madvise (mm, size , MADV_HUGEPAGE);
|
||||
/*
|
||||
The offset to the start of the mmapped region is stored
|
||||
in the prev_size field of the chunk. This allows us to adjust
|
||||
+ if (size > 8 * 1024 * 1024)
|
||||
+ __madvise (mm, size , MADV_HUGEPAGE);
|
||||
+
|
||||
/*
|
||||
The offset to the start of the mmapped region is stored in the prev_size
|
||||
field of the chunk. This allows us to adjust returned start address to
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
--- glibc-2.27/elf/Makefile.0092~ 2018-02-01 17:17:18.000000000 +0100
|
||||
+++ glibc-2.27/elf/Makefile 2018-02-02 20:23:42.959165917 +0100
|
||||
@@ -74,9 +74,9 @@ define elide-stack-protector
|
||||
$(if $(filter $(@F),$(patsubst %,%$(1),$(2))), $(no-stack-protector))
|
||||
endef
|
||||
|
||||
-CFLAGS-.o += $(call elide-stack-protector,.o,$(elide-routines.os))
|
||||
-CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os))
|
||||
-CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines))
|
||||
+CFLAGS-.o += $(call elide-stack-protector,.o,$(elide-routines.os)) -Os
|
||||
+CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os)) -Os
|
||||
+CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines)) -Os
|
||||
|
||||
ifeq ($(unwind-find-fde),yes)
|
||||
routines += unwind-dw2-fde-glibc
|
||||
@@ -561,11 +561,11 @@ $(objpfx)ldconfig: $(ldconfig-modules:%=
|
||||
|
||||
SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
|
||||
CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
|
||||
- -D'SLIBDIR="$(slibdir)"'
|
||||
+ -D'SLIBDIR="$(slibdir)"' -Os
|
||||
libof-ldconfig = ldconfig
|
||||
-CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
|
||||
-CFLAGS-cache.c += $(SYSCONF-FLAGS)
|
||||
-CFLAGS-rtld.c += $(SYSCONF-FLAGS)
|
||||
+CFLAGS-dl-cache.c += $(SYSCONF-FLAGS) -Os
|
||||
+CFLAGS-cache.c += $(SYSCONF-FLAGS) -Os
|
||||
+CFLAGS-rtld.c += $(SYSCONF-FLAGS) -Os
|
||||
|
||||
cpp-srcs-left := $(all-rtld-routines:=.os)
|
||||
lib := rtld
|
|
@ -2,7 +2,7 @@
|
|||
langname="$1"
|
||||
shift
|
||||
locale="$1"
|
||||
shift
|
||||
[ "$#" -gt 1 ] && shift
|
||||
|
||||
cat <<EOF
|
||||
%package -n locales-$locale
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- libc/nptl/nptl-init.c.bero~ 2012-12-01 23:55:26.722754391 +0100
|
||||
+++ libc/nptl/nptl-init.c 2012-12-01 23:55:42.725950817 +0100
|
||||
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (v
|
||||
/* Determine the default allowed stack size. This is the size used
|
||||
in case the user does not specify one. */
|
||||
struct rlimit limit;
|
||||
- if (__getrlimit (RLIMIT_STACK, &limit) != 0
|
||||
+ if (getrlimit (RLIMIT_STACK, &limit) != 0
|
||||
|| limit.rlim_cur == RLIM_INFINITY)
|
||||
/* The system limit is not usable. Use an architecture-specific
|
||||
default. */
|
13
nss-dont-crash-on-NULL.patch
Normal file
13
nss-dont-crash-on-NULL.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff -up glibc-2.35/nss/XXX-lookup.c.185~ glibc-2.35/nss/XXX-lookup.c
|
||||
--- glibc-2.35/nss/XXX-lookup.c.185~ 2022-06-24 23:19:42.023870561 +0200
|
||||
+++ glibc-2.35/nss/XXX-lookup.c 2022-06-24 23:20:35.490963277 +0200
|
||||
@@ -53,6 +53,9 @@ DB_LOOKUP_FCT (nss_action_list *ni, cons
|
||||
if (! __nss_database_get (DATABASE_NAME_ID, &DATABASE_NAME_SYMBOL))
|
||||
return -1;
|
||||
|
||||
+ if (!DATABASE_NAME_SYMBOL)
|
||||
+ return -1;
|
||||
+
|
||||
*ni = DATABASE_NAME_SYMBOL;
|
||||
|
||||
/* We want to know about it if we've somehow got a NULL action list;
|
118
reenable_DT_HASH.patch
Normal file
118
reenable_DT_HASH.patch
Normal file
|
@ -0,0 +1,118 @@
|
|||
diff -up glibc-2.36/config.make.in.60~ glibc-2.36/config.make.in
|
||||
--- glibc-2.36/config.make.in.60~ 2022-08-24 17:40:34.246826821 +0200
|
||||
+++ glibc-2.36/config.make.in 2022-08-24 17:41:45.676352975 +0200
|
||||
@@ -69,6 +69,7 @@ have-libaudit = @have_libaudit@
|
||||
have-libcap = @have_libcap@
|
||||
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
|
||||
bind-now = @bindnow@
|
||||
+have-hash-style = @libc_cv_hashstyle@
|
||||
use-default-link = @use_default_link@
|
||||
have-cxx-thread_local = @libc_cv_cxx_thread_local@
|
||||
have-loop-to-function = @libc_cv_cc_loop_to_function@
|
||||
diff -up glibc-2.36/configure.60~ glibc-2.36/configure
|
||||
--- glibc-2.36/configure.60~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/configure 2022-08-24 17:42:09.997531784 +0200
|
||||
@@ -621,6 +621,7 @@ libc_cv_cc_submachine
|
||||
libc_cv_cc_nofma
|
||||
libc_cv_mtls_dialect_gnu2
|
||||
libc_cv_has_glob_dat
|
||||
+libc_cv_hashstyle
|
||||
libc_cv_fpie
|
||||
libc_cv_z_execstack
|
||||
ASFLAGS_config
|
||||
@@ -6192,6 +6193,33 @@ $as_echo "$libc_cv_fpie" >&6; }
|
||||
|
||||
|
||||
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style option" >&5
|
||||
+$as_echo_n "checking for --hash-style option... " >&6; }
|
||||
+if ${libc_cv_hashstyle+:} false; then :
|
||||
+ $as_echo_n "(cached) " >&6
|
||||
+else
|
||||
+ cat > conftest.c <<EOF
|
||||
+int _start (void) { return 42; }
|
||||
+EOF
|
||||
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
|
||||
+ -fPIC -shared -o conftest.so conftest.c
|
||||
+ -Wl,--hash-style=both -nostdlib 1>&5'
|
||||
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||
+ (eval $ac_try) 2>&5
|
||||
+ ac_status=$?
|
||||
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||
+ test $ac_status = 0; }; }
|
||||
+then
|
||||
+ libc_cv_hashstyle=yes
|
||||
+else
|
||||
+ libc_cv_hashstyle=no
|
||||
+fi
|
||||
+rm -f conftest*
|
||||
+fi
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5
|
||||
+$as_echo "$libc_cv_hashstyle" >&6; }
|
||||
+
|
||||
+
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
|
||||
$as_echo_n "checking for GLOB_DAT reloc... " >&6; }
|
||||
if ${libc_cv_has_glob_dat+:} false; then :
|
||||
diff -up glibc-2.36/configure.ac.60~ glibc-2.36/configure.ac
|
||||
--- glibc-2.36/configure.ac.60~ 2022-07-30 00:03:09.000000000 +0200
|
||||
+++ glibc-2.36/configure.ac 2022-08-24 17:40:34.249826843 +0200
|
||||
@@ -1360,6 +1360,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpi
|
||||
|
||||
AC_SUBST(libc_cv_fpie)
|
||||
|
||||
+AC_CACHE_CHECK(for --hash-style option,
|
||||
+ libc_cv_hashstyle, [dnl
|
||||
+cat > conftest.c <<EOF
|
||||
+int _start (void) { return 42; }
|
||||
+EOF
|
||||
+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
|
||||
+ -fPIC -shared -o conftest.so conftest.c
|
||||
+ -Wl,--hash-style=both -nostdlib 1>&AS_MESSAGE_LOG_FD])
|
||||
+then
|
||||
+ libc_cv_hashstyle=yes
|
||||
+else
|
||||
+ libc_cv_hashstyle=no
|
||||
+fi
|
||||
+rm -f conftest*])
|
||||
+AC_SUBST(libc_cv_hashstyle)
|
||||
+
|
||||
AC_CACHE_CHECK(for GLOB_DAT reloc,
|
||||
libc_cv_has_glob_dat, [dnl
|
||||
cat > conftest.c <<EOF
|
||||
diff -up glibc-2.36/Makeconfig.60~ glibc-2.36/Makeconfig
|
||||
--- glibc-2.36/Makeconfig.60~ 2022-08-24 17:40:34.246826821 +0200
|
||||
+++ glibc-2.36/Makeconfig 2022-08-24 17:41:18.307151554 +0200
|
||||
@@ -365,6 +365,15 @@ relro-LDFLAGS = -Wl,-z,relro
|
||||
LDFLAGS.so += $(relro-LDFLAGS)
|
||||
LDFLAGS-rtld += $(relro-LDFLAGS)
|
||||
|
||||
+ifeq (yes,$(have-hash-style))
|
||||
+# For the time being we unconditionally use 'both'. At some time we
|
||||
+# should declare statically linked code as 'out of luck' and compile
|
||||
+# with --hash-style=gnu only.
|
||||
+hashstyle-LDFLAGS = -Wl,--hash-style=both
|
||||
+LDFLAGS.so += $(hashstyle-LDFLAGS)
|
||||
+LDFLAGS-rtld += $(hashstyle-LDFLAGS)
|
||||
+endif
|
||||
+
|
||||
# Linker options to enable and disable DT_RELR.
|
||||
ifeq ($(have-dt-relr),yes)
|
||||
dt-relr-ldflag = -Wl,-z,pack-relative-relocs
|
||||
diff -up glibc-2.36/Makerules.60~ glibc-2.36/Makerules
|
||||
--- glibc-2.36/Makerules.60~ 2022-08-24 17:40:34.203826503 +0200
|
||||
+++ glibc-2.36/Makerules 2022-08-24 17:40:34.246826821 +0200
|
||||
@@ -558,6 +558,13 @@ $(common-objpfx)shlib.lds: $(common-objp
|
||||
-Wl,--verbose 2>/dev/null | \
|
||||
sed > $@T \
|
||||
-e '/^=========/,/^=========/!d;/^=========/d' \
|
||||
+ $(if $(filter yes,$(have-hash-style)), \
|
||||
+ -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
|
||||
+ -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \
|
||||
+ -e '/DATA_SEGMENT_ALIGN/{H;g}' \
|
||||
+ , \
|
||||
+ -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
|
||||
+ ) \
|
||||
-e 's/^.*\*(\.dynbss).*$$/& \
|
||||
PROVIDE(__start___libc_freeres_ptrs = .); \
|
||||
*(__libc_freeres_ptrs) \
|
|
@ -1,17 +0,0 @@
|
|||
--- glibc-2.27/nptl/pthread_mutex_lock.c~ 2018-02-01 16:17:18.000000000 +0000
|
||||
+++ glibc-2.27/nptl/pthread_mutex_lock.c 2018-05-15 14:19:00.864190585 +0000
|
||||
@@ -133,7 +133,13 @@
|
||||
LLL_MUTEX_LOCK (mutex);
|
||||
break;
|
||||
}
|
||||
- atomic_spin_nop ();
|
||||
+ /* MO read while spinning */
|
||||
+ do
|
||||
+ {
|
||||
+ atomic_spin_nop ();
|
||||
+ }
|
||||
+ while (atomic_load_relaxed (&mutex->__data.__lock) != 0 &&
|
||||
+ ++cnt < max_cnt);
|
||||
}
|
||||
while (LLL_MUTEX_TRYLOCK (mutex) != 0);
|
||||
|
Loading…
Add table
Reference in a new issue