diff options
| -rw-r--r-- | meta/recipes-core/glibc/glibc/0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch | 128 | ||||
| -rw-r--r-- | meta/recipes-core/glibc/glibc_2.35.bb | 2 |
2 files changed, 130 insertions, 0 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 @@ | |||
| 1 | From 6b8959add09e425df262bf9178b39ca35bc4003c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Sun, 24 Jul 2022 19:41:41 +0200 | ||
| 4 | Subject: [PATCH] Revert "Linux: Implement a useful version of _startup_fatal" | ||
| 5 | |||
| 6 | This reverts commit 2d05ba7f8ef979947e910a37ae8115a816eb4d08. | ||
| 7 | Upstream-Status: Inappropriate [temporary work around] | ||
| 8 | |||
| 9 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 10 | |||
| 11 | --- | ||
| 12 | sysdeps/unix/sysv/linux/i386/startup.h | 23 ++++++++++++--- | ||
| 13 | sysdeps/unix/sysv/linux/ia64/startup.h | 22 --------------- | ||
| 14 | sysdeps/unix/sysv/linux/startup.h | 39 -------------------------- | ||
| 15 | 3 files changed, 19 insertions(+), 65 deletions(-) | ||
| 16 | delete mode 100644 sysdeps/unix/sysv/linux/ia64/startup.h | ||
| 17 | delete mode 100644 sysdeps/unix/sysv/linux/startup.h | ||
| 18 | |||
| 19 | diff --git a/sysdeps/unix/sysv/linux/i386/startup.h b/sysdeps/unix/sysv/linux/i386/startup.h | ||
| 20 | index 213805d7d2..67c9310f3a 100644 | ||
| 21 | --- a/sysdeps/unix/sysv/linux/i386/startup.h | ||
| 22 | +++ b/sysdeps/unix/sysv/linux/i386/startup.h | ||
| 23 | @@ -1,5 +1,5 @@ | ||
| 24 | /* Linux/i386 definitions of functions used by static libc main startup. | ||
| 25 | - Copyright (C) 2022 Free Software Foundation, Inc. | ||
| 26 | + Copyright (C) 2017-2022 Free Software Foundation, Inc. | ||
| 27 | This file is part of the GNU C Library. | ||
| 28 | |||
| 29 | The GNU C Library is free software; you can redistribute it and/or | ||
| 30 | @@ -16,7 +16,22 @@ | ||
| 31 | License along with the GNU C Library; if not, see | ||
| 32 | <https://www.gnu.org/licenses/>. */ | ||
| 33 | |||
| 34 | -/* Can't use "call *%gs:SYSINFO_OFFSET" during startup. */ | ||
| 35 | -#define I386_USE_SYSENTER 0 | ||
| 36 | +#if BUILD_PIE_DEFAULT | ||
| 37 | +/* Can't use "call *%gs:SYSINFO_OFFSET" during statup in static PIE. */ | ||
| 38 | +# define I386_USE_SYSENTER 0 | ||
| 39 | |||
| 40 | -#include_next <startup.h> | ||
| 41 | +# include <sysdep.h> | ||
| 42 | +# include <abort-instr.h> | ||
| 43 | + | ||
| 44 | +__attribute__ ((__noreturn__)) | ||
| 45 | +static inline void | ||
| 46 | +_startup_fatal (const char *message __attribute__ ((unused))) | ||
| 47 | +{ | ||
| 48 | + /* This is only called very early during startup in static PIE. | ||
| 49 | + FIXME: How can it be improved? */ | ||
| 50 | + ABORT_INSTRUCTION; | ||
| 51 | + __builtin_unreachable (); | ||
| 52 | +} | ||
| 53 | +#else | ||
| 54 | +# include_next <startup.h> | ||
| 55 | +#endif | ||
| 56 | diff --git a/sysdeps/unix/sysv/linux/ia64/startup.h b/sysdeps/unix/sysv/linux/ia64/startup.h | ||
| 57 | deleted file mode 100644 | ||
| 58 | index 77f29f15a2..0000000000 | ||
| 59 | --- a/sysdeps/unix/sysv/linux/ia64/startup.h | ||
| 60 | +++ /dev/null | ||
| 61 | @@ -1,22 +0,0 @@ | ||
| 62 | -/* Linux/ia64 definitions of functions used by static libc main startup. | ||
| 63 | - Copyright (C) 2022 Free Software Foundation, Inc. | ||
| 64 | - This file is part of the GNU C Library. | ||
| 65 | - | ||
| 66 | - The GNU C Library is free software; you can redistribute it and/or | ||
| 67 | - modify it under the terms of the GNU Lesser General Public | ||
| 68 | - License as published by the Free Software Foundation; either | ||
| 69 | - version 2.1 of the License, or (at your option) any later version. | ||
| 70 | - | ||
| 71 | - The GNU C Library is distributed in the hope that it will be useful, | ||
| 72 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 73 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 74 | - Lesser General Public License for more details. | ||
| 75 | - | ||
| 76 | - You should have received a copy of the GNU Lesser General Public | ||
| 77 | - License along with the GNU C Library; if not, see | ||
| 78 | - <https://www.gnu.org/licenses/>. */ | ||
| 79 | - | ||
| 80 | -/* This code is used before the TCB is set up. */ | ||
| 81 | -#define IA64_USE_NEW_STUB 0 | ||
| 82 | - | ||
| 83 | -#include_next <startup.h> | ||
| 84 | diff --git a/sysdeps/unix/sysv/linux/startup.h b/sysdeps/unix/sysv/linux/startup.h | ||
| 85 | deleted file mode 100644 | ||
| 86 | index 39859b404a..0000000000 | ||
| 87 | --- a/sysdeps/unix/sysv/linux/startup.h | ||
| 88 | +++ /dev/null | ||
| 89 | @@ -1,39 +0,0 @@ | ||
| 90 | -/* Linux definitions of functions used by static libc main startup. | ||
| 91 | - Copyright (C) 2017-2022 Free Software Foundation, Inc. | ||
| 92 | - This file is part of the GNU C Library. | ||
| 93 | - | ||
| 94 | - The GNU C Library is free software; you can redistribute it and/or | ||
| 95 | - modify it under the terms of the GNU Lesser General Public | ||
| 96 | - License as published by the Free Software Foundation; either | ||
| 97 | - version 2.1 of the License, or (at your option) any later version. | ||
| 98 | - | ||
| 99 | - The GNU C Library is distributed in the hope that it will be useful, | ||
| 100 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 101 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 102 | - Lesser General Public License for more details. | ||
| 103 | - | ||
| 104 | - You should have received a copy of the GNU Lesser General Public | ||
| 105 | - License along with the GNU C Library; if not, see | ||
| 106 | - <https://www.gnu.org/licenses/>. */ | ||
| 107 | - | ||
| 108 | -#ifdef SHARED | ||
| 109 | -# include_next <startup.h> | ||
| 110 | -#else | ||
| 111 | -# include <sysdep.h> | ||
| 112 | - | ||
| 113 | -/* Avoid a run-time invocation of strlen. */ | ||
| 114 | -#define _startup_fatal(message) \ | ||
| 115 | - do \ | ||
| 116 | - { \ | ||
| 117 | - size_t __message_length = __builtin_strlen (message); \ | ||
| 118 | - if (! __builtin_constant_p (__message_length)) \ | ||
| 119 | - { \ | ||
| 120 | - extern void _startup_fatal_not_constant (void); \ | ||
| 121 | - _startup_fatal_not_constant (); \ | ||
| 122 | - } \ | ||
| 123 | - INTERNAL_SYSCALL_CALL (write, STDERR_FILENO, (message), \ | ||
| 124 | - __message_length); \ | ||
| 125 | - INTERNAL_SYSCALL_CALL (exit_group, 127); \ | ||
| 126 | - } \ | ||
| 127 | - while (0) | ||
| 128 | -#endif /* !SHARED */ | ||
diff --git a/meta/recipes-core/glibc/glibc_2.35.bb b/meta/recipes-core/glibc/glibc_2.35.bb index 96fe39c548..df847e76bf 100644 --- a/meta/recipes-core/glibc/glibc_2.35.bb +++ b/meta/recipes-core/glibc/glibc_2.35.bb | |||
| @@ -48,6 +48,8 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ | |||
| 48 | file://0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \ | 48 | file://0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \ |
| 49 | file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ | 49 | file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \ |
| 50 | file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ | 50 | file://0024-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \ |
| 51 | \ | ||
| 52 | file://0001-Revert-Linux-Implement-a-useful-version-of-_startup_.patch \ | ||
| 51 | " | 53 | " |
| 52 | S = "${WORKDIR}/git" | 54 | S = "${WORKDIR}/git" |
| 53 | B = "${WORKDIR}/build-${TARGET_SYS}" | 55 | B = "${WORKDIR}/build-${TARGET_SYS}" |
