diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc')
6 files changed, 229 insertions, 30 deletions
diff --git a/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch b/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch new file mode 100644 index 0000000000..2421a63605 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch @@ -0,0 +1,128 @@ +From 6b8959add09e425df262bf9178b39ca35bc4003c Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Sun, 24 Jul 2022 19:41:41 +0200 +Subject: [PATCH] Revert "Linux: Implement a useful version of _startup_fatal" + +This reverts commit 2d05ba7f8ef979947e910a37ae8115a816eb4d08. +Upstream-Status: Inappropriate [temporary work around] + +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> + +--- + sysdeps/unix/sysv/linux/i386/startup.h | 23 ++++++++++++--- + sysdeps/unix/sysv/linux/ia64/startup.h | 22 --------------- + sysdeps/unix/sysv/linux/startup.h | 39 -------------------------- + 3 files changed, 19 insertions(+), 65 deletions(-) + delete mode 100644 sysdeps/unix/sysv/linux/ia64/startup.h + delete mode 100644 sysdeps/unix/sysv/linux/startup.h + +diff --git a/sysdeps/unix/sysv/linux/i386/startup.h b/sysdeps/unix/sysv/linux/i386/startup.h +index 213805d7d2..67c9310f3a 100644 +--- a/sysdeps/unix/sysv/linux/i386/startup.h ++++ b/sysdeps/unix/sysv/linux/i386/startup.h +@@ -1,5 +1,5 @@ + /* Linux/i386 definitions of functions used by static libc main startup. +- Copyright (C) 2022 Free Software Foundation, Inc. ++ Copyright (C) 2017-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 +@@ -16,7 +16,22 @@ + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +-/* Can't use "call *%gs:SYSINFO_OFFSET" during startup. */ +-#define I386_USE_SYSENTER 0 ++#if BUILD_PIE_DEFAULT ++/* Can't use "call *%gs:SYSINFO_OFFSET" during statup in static PIE. */ ++# define I386_USE_SYSENTER 0 + +-#include_next <startup.h> ++# include <sysdep.h> ++# include <abort-instr.h> ++ ++__attribute__ ((__noreturn__)) ++static inline void ++_startup_fatal (const char *message __attribute__ ((unused))) ++{ ++ /* This is only called very early during startup in static PIE. ++ FIXME: How can it be improved? */ ++ ABORT_INSTRUCTION; ++ __builtin_unreachable (); ++} ++#else ++# include_next <startup.h> ++#endif +diff --git a/sysdeps/unix/sysv/linux/ia64/startup.h b/sysdeps/unix/sysv/linux/ia64/startup.h +deleted file mode 100644 +index 77f29f15a2..0000000000 +--- a/sysdeps/unix/sysv/linux/ia64/startup.h ++++ /dev/null +@@ -1,22 +0,0 @@ +-/* Linux/ia64 definitions of functions used by static libc main startup. +- 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/>. */ +- +-/* This code is used before the TCB is set up. */ +-#define IA64_USE_NEW_STUB 0 +- +-#include_next <startup.h> +diff --git a/sysdeps/unix/sysv/linux/startup.h b/sysdeps/unix/sysv/linux/startup.h +deleted file mode 100644 +index 39859b404a..0000000000 +--- a/sysdeps/unix/sysv/linux/startup.h ++++ /dev/null +@@ -1,39 +0,0 @@ +-/* Linux definitions of functions used by static libc main startup. +- Copyright (C) 2017-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/>. */ +- +-#ifdef SHARED +-# include_next <startup.h> +-#else +-# include <sysdep.h> +- +-/* Avoid a run-time invocation of strlen. */ +-#define _startup_fatal(message) \ +- do \ +- { \ +- size_t __message_length = __builtin_strlen (message); \ +- if (! __builtin_constant_p (__message_length)) \ +- { \ +- extern void _startup_fatal_not_constant (void); \ +- _startup_fatal_not_constant (); \ +- } \ +- INTERNAL_SYSCALL_CALL (write, STDERR_FILENO, (message), \ +- __message_length); \ +- INTERNAL_SYSCALL_CALL (exit_group, 127); \ +- } \ +- while (0) +-#endif /* !SHARED */ diff --git a/meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch b/meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch new file mode 100644 index 0000000000..629298c23e --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0002-get_nscd_addresses-Fix-subscript-typos-BZ-29605.patch @@ -0,0 +1,40 @@ +From 707a878b655395f41b954bbed78008d1d9252f1a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Sonnenberger?= <joerg@bec.de> +Date: Mon, 26 Sep 2022 13:59:16 -0400 +Subject: [PATCH] get_nscd_addresses: Fix subscript typos [BZ #29605] + +Fix the subscript on air->family, which was accidentally set to COUNT +when it should have remained as I. + +Resolves: BZ #29605 + +Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=c9226c03da0276593a0918eaa9a14835183343e8] + +Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> +Signed-off-by: Haitao Liu <haitao.liu@windriver.com> +--- + sysdeps/posix/getaddrinfo.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index f4c08d6e3b..fa333ad6ec 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -549,11 +549,11 @@ get_nscd_addresses (const char *name, const struct addrinfo *req, + at[count].addr[2] = htonl (0xffff); + } + else if (req->ai_family == AF_UNSPEC +- || air->family[count] == req->ai_family) ++ || air->family[i] == req->ai_family) + { +- at[count].family = air->family[count]; ++ at[count].family = air->family[i]; + memcpy (at[count].addr, addrs, size); +- if (air->family[count] == AF_INET6) ++ if (air->family[i] == AF_INET6) + res->got_ipv6 = true; + } + at[count].next = at + count + 1; +-- +2.35.5 + diff --git a/meta/recipes-core/glibc/glibc/0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch b/meta/recipes-core/glibc/glibc/0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch index 3b2d638b5f..789d2edf23 100644 --- a/meta/recipes-core/glibc/glibc/0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch +++ b/meta/recipes-core/glibc/glibc/0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch @@ -11,16 +11,15 @@ Upstream-Status: Inappropriate [ OE-Specific ] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - sysdeps/aarch64/bits/wordsize.h | 8 ++++++-- - sysdeps/{aarch64 => arm}/bits/wordsize.h | 10 +++++++--- - 2 files changed, 13 insertions(+), 5 deletions(-) - copy sysdeps/{aarch64 => arm}/bits/wordsize.h (80%) + sysdeps/aarch64/bits/wordsize.h | 11 +++++++++-- + sysdeps/arm/bits/wordsize.h | 16 +++++++++++++++- + 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h -index 4635431f0e..5ef0ed21f3 100644 +index 4635431f0e..1639bcb063 100644 --- a/sysdeps/aarch64/bits/wordsize.h +++ b/sysdeps/aarch64/bits/wordsize.h -@@ -17,12 +17,16 @@ +@@ -17,12 +17,19 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ @@ -33,38 +32,47 @@ index 4635431f0e..5ef0ed21f3 100644 # define __WORDSIZE32_SIZE_ULONG 1 # define __WORDSIZE32_PTRDIFF_LONG 1 +#else -+# define __WORDSIZE 32 -+# define __WORDSIZE32_SIZE_ULONG 0 -+# define __WORDSIZE32_PTRDIFF_LONG 0 ++#define __WORDSIZE 32 ++#define __WORDSIZE_TIME64_COMPAT32 1 ++#define __WORDSIZE32_SIZE_ULONG 0 ++#define __WORDSIZE32_PTRDIFF_LONG 0 #endif ++#ifdef __aarch64__ #define __WORDSIZE_TIME64_COMPAT32 0 -diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h -similarity index 80% -copy from sysdeps/aarch64/bits/wordsize.h -copy to sysdeps/arm/bits/wordsize.h -index 4635431f0e..34fcdef1f1 100644 ---- a/sysdeps/aarch64/bits/wordsize.h ++#endif +diff --git a/sysdeps/arm/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h +index 6ecbfe7c86..1639bcb063 100644 +--- a/sysdeps/arm/bits/wordsize.h +++ b/sysdeps/arm/bits/wordsize.h -@@ -17,12 +17,16 @@ +@@ -1,4 +1,6 @@ +-/* Copyright (C) 1999-2024 Free Software Foundation, Inc. ++/* Determine the wordsize from the preprocessor defines. ++ ++ Copyright (C) 2016-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 +@@ -15,7 +17,19 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ --#ifdef __LP64__ +#if defined (__aarch64__) && defined (__LP64__) - # define __WORDSIZE 64 --#else ++# define __WORDSIZE 64 +#elif defined (__aarch64__) - # define __WORDSIZE 32 - # define __WORDSIZE32_SIZE_ULONG 1 - # define __WORDSIZE32_PTRDIFF_LONG 1 -+#else +# define __WORDSIZE 32 -+# define __WORDSIZE32_SIZE_ULONG 0 -+# define __WORDSIZE32_PTRDIFF_LONG 0 - #endif - - #define __WORDSIZE_TIME64_COMPAT32 0 ++# define __WORDSIZE32_SIZE_ULONG 1 ++# define __WORDSIZE32_PTRDIFF_LONG 1 ++#else + #define __WORDSIZE 32 + #define __WORDSIZE_TIME64_COMPAT32 1 + #define __WORDSIZE32_SIZE_ULONG 0 + #define __WORDSIZE32_PTRDIFF_LONG 0 ++#endif ++ ++#ifdef __aarch64__ ++#define __WORDSIZE_TIME64_COMPAT32 0 ++#endif -- 2.34.1 diff --git a/meta/recipes-core/glibc/glibc/check-test-wrapper b/meta/recipes-core/glibc/glibc/check-test-wrapper index 6ec9b9b29e..5cc993f718 100644 --- a/meta/recipes-core/glibc/glibc/check-test-wrapper +++ b/meta/recipes-core/glibc/glibc/check-test-wrapper @@ -58,7 +58,7 @@ elif targettype == "ssh": user = os.environ.get("SSH_HOST_USER", None) port = os.environ.get("SSH_HOST_PORT", None) - command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no"] + command = ["ssh", "-o", "UserKnownHostsFile=/dev/null", "-o", "StrictHostKeyChecking=no", "-o", "LogLevel=quiet"] if port: command += ["-p", str(port)] if not host: diff --git a/meta/recipes-core/glibc/glibc/reproducible-paths.patch b/meta/recipes-core/glibc/glibc/reproducible-paths.patch new file mode 100644 index 0000000000..0754dca62b --- /dev/null +++ b/meta/recipes-core/glibc/glibc/reproducible-paths.patch @@ -0,0 +1,23 @@ +Avoid hardcoded build time paths in the output binaries by replacing the compile +definitions with the output locations. + +Upstream-Status: Inappropriate [would need reworking somehow to be acceptable upstream] +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> + +Index: git/support/Makefile +=================================================================== +--- git.orig/support/Makefile ++++ git/support/Makefile +@@ -216,9 +216,9 @@ libsupport-inhibit-o += .o + endif + + CFLAGS-support_paths.c = \ +- -DSRCDIR_PATH=\"`cd .. ; pwd`\" \ +- -DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \ +- -DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \ ++ -DSRCDIR_PATH=\"$(oe_srcdir)\" \ ++ -DOBJDIR_PATH=\"$(libdir)/glibc-tests/ptest/tests/glibc-ptest\" \ ++ -DOBJDIR_ELF_LDSO_PATH=\"$(slibdir)/$(rtld-installed-name)\" \ + -DINSTDIR_PATH=\"$(prefix)\" \ + -DLIBDIR_PATH=\"$(libdir)\" \ + -DBINDIR_PATH=\"$(bindir)\" \ diff --git a/meta/recipes-core/glibc/glibc/run-ptest b/meta/recipes-core/glibc/glibc/run-ptest index f637986105..c394b49866 100755 --- a/meta/recipes-core/glibc/glibc/run-ptest +++ b/meta/recipes-core/glibc/glibc/run-ptest @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # ptest script for glibc - to run time related tests to # facilitate Y2038 validation # Run with 'ptest-runner glibc-tests' |