From dfda51ee292676a107eca11b9f2ff0f72f5382f0 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 8 Jan 2021 19:24:09 +0100 Subject: [PATCH] Auto-sync with upstream branch master Upstream commit: 3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5 - Drop glibc-fedora-__libc_multiple_libcs.patch. Replaced by upstream's __libc_initial flag. - Adjust glibc-rh819430.patch to upstream's gnulib merge of fnmatch. - Disable -Werror again due to GCC PR98512. - x86-64: Avoid rep movsb with short distance [BZ #27130] - aarch64: fix stack missing after sp is updated - nptl: Remove set*id, set*gid files which are not built - Drop nan-pseudo-number.h usage from tests - posix: Sync fnmatch with gnulib - Sync flexmember.h with gnulib - Sync intprops.h with gnulib - posix: Sync glob code with gnulib - posix: Sync regex code with gnulib - Move generic nan-pseudo-number.h to ldbl-96 - Sync FDL from https://www.gnu.org/licenses/fdl-1.3.texi - Sync move-if-change from Gnulib - Update automatically-generated copyright dates - Update copyright dates not handled by scripts/update-copyrights. - Update copyright dates with scripts/update-copyrights - aarch64: use PTR_ARG and SIZE_ARG instead of DELOUSE - nonstring: Enable __FORTIFY_LEVEL=3 - string: Enable __FORTIFY_LEVEL=3 - Introduce _FORTIFY_SOURCE=3 - Warn on unsupported fortification levels - powerpc: Use scv instruction on clone when available - powerpc: Runtime selection between sc and scv for syscalls - malloc: preserve errno on mcheck hooks [BZ #17924] - x86 long double: Add tests for pseudo normal numbers - x86 long double: Consider pseudo numbers as signaling - io: Remove xmknod{at} implementations - io: Remove xstat implementations - free: preserve errno [BZ#17924] - hurd: Accept including hurd/version.h - hurd: Add WSTOPPED/WCONTINUED/WEXITED/WNOWAIT support [BZ #23091] - support: Make support_process_state_wait wait less - hurd: set sigaction for signal preemptors in arch-independent file - hurd: Fix spawni SPAWN_XFLAGS_TRY_SHELL with empty argv - hurd: Try shell in posix_spawn* only in compat mode - Remove _ISOMAC check from - x86: Remove the duplicated CPU_FEATURE_CPU_P - Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61 - x86 long double: Support pseudo numbers in isnanl - x86 long double: Support pseudo numbers in fpclassifyl - MTE: Do not pad size in realloc_check - tests-mcheck: New variable to run tests with MALLOC_CHECK_=3 - elf: Account for glibc-hwcaps/ prefix in _dl_important_hwcaps - misc: Use __ferror_unlocked instead of ferror - s390x: Regenerate ulps - powerpc: Regenerate ulps - addmntent: Remove unbounded alloca usage from getmntent [BZ#27083] - : Add Intel LAM support - i386: Regenerate ulps - aarch64: update ulps. - aarch64: Add aarch64-specific files for memory tagging support - aarch64: Add sysv specific enabling code for memory tagging - linux: Add compatibility definitions to sys/prctl.h for MTE - malloc: Basic support for memory tagging in the malloc() family - elf: Add a tunable to control use of tagged memory - config: Allow memory tagging to be enabled when configuring glibc - alpha: Remove anonymous union in struct stat [BZ #27042] - add inputs to auto-libm-test-in yielding larger errors (binary64, x86_64) - m68k: fix clobbering a5 in setjmp() [BZ #24202] - iconv add iconv_close before the function returned with bad value. - iconv: use iconv_close after iconv_open - Fix buffer overrun in EUC-KR conversion module (bz #24973) - hurd: Make trampoline fill siginfo ss_sp from sc_uesp - Hurd: make sigstates hold a reference on thread ports - profil-counter: Add missing SIGINFO case - hurd: implement SA_SIGINFO signal handlers. - hurd: Fix ELF_MACHINE_USER_ADDRESS_MASK value - hurd: Note when the vm_map kernel bug was fixed - hurd: Also turn KERN_INVALID_ADDRESS to EINVAL - ieee754: Remove unused __sin32 and __cos32 - ieee754: Remove slow paths from asin and acos - getenv: Move call to strlen to the branch it's used in. - Update kernel version to 5.10 in tst-mman-consts.py. - s390x: Require GCC 7.1 or later to build glibc. - malloc: Use __libc_initial to detect an inner libc - Replace __libc_multiple_libcs with __libc_initial flag - {nptl,htl}/semaphoreP.h: clean up - htl: Get sem_open/sem_close/sem_unlink support [BZ #25524] - pthread: Move semaphore initialization for open to semaphoreP.h - Mark __libc_freeres_fn as used [BZ #27002] - Update syscall lists for Linux 5.10. - htl: Add pshared semaphore support - hurd: Add LLL_PRIVATE and LLL_SHARED - hurd: Add __libc_open and __libc_close - htl: Add futex-internal.h - hurd: Add __lll_abstimed_wait_intr - hurd: make lll_* take a variable instead of a ptr - hurd: Rename LLL_INITIALIZER to LLL_LOCK_INITIALIZER - Use Linux 5.10 in build-many-glibcs.py. --- glibc-fedora-__libc_multiple_libcs.patch | 91 ----------------- glibc-python3.patch | 8 +- glibc-rh819430.patch | 120 ++++++++++++----------- glibc.spec | 105 +++++++++++++++++++- sources | 2 +- 5 files changed, 166 insertions(+), 160 deletions(-) delete mode 100644 glibc-fedora-__libc_multiple_libcs.patch diff --git a/glibc-fedora-__libc_multiple_libcs.patch b/glibc-fedora-__libc_multiple_libcs.patch deleted file mode 100644 index 70b7d9d..0000000 --- a/glibc-fedora-__libc_multiple_libcs.patch +++ /dev/null @@ -1,91 +0,0 @@ -Short description: Cleanup use of _dl_starting_up. -Author(s): Fedora glibc team -Origin: PATCH -Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html - -Upstream discussions: -https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html - -Based on the following commit: -~~~ -From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Fri, 11 Jun 2010 11:04:11 +0200 -Subject: [PATCH] Properly set __libc_multiple_libcs - - * elf/rtld.c (_dl_starting_up): Always define. - (dl_main): Always set _dl_starting_up. - * elf/dl-support.c (_dl_starting_up): Always define. - * elf/dl-init.c (_dl_init): Always clear _dl_starting_up. - ---- -ChangeLog | 7 +++++++ -elf/dl-init.c | 4 ---- -elf/dl-support.c | 2 -- -elf/rtld.c | 4 ---- -4 files changed, 7 insertions(+), 10 deletions(-) -~~~ - -This patch needs to go upstream to get cleaned up, but has always involed -analysis of the GNU/Hurd parts of the change and that stalled out, but -perhaps with build-many-glibcs we can now test these changes more easily. - -diff --git a/elf/dl-init.c b/elf/dl-init.c -index 518824e8a5826314..66c395474a57c1fd 100644 ---- a/elf/dl-init.c -+++ b/elf/dl-init.c -@@ -120,8 +120,6 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env) - while (i-- > 0) - call_init (main_map->l_initfini[i], argc, argv, env); - --#ifndef HAVE_INLINED_SYSCALLS - /* Finished starting up. */ - _dl_starting_up = 0; --#endif - } -diff --git a/elf/dl-support.c b/elf/dl-support.c -index afbc94df5435a7d7..e894f98e97641cef 100644 ---- a/elf/dl-support.c -+++ b/elf/dl-support.c -@@ -120,10 +120,8 @@ struct r_scope_elem _dl_initial_searchlist = - .r_nlist = 1, - }; - --#ifndef HAVE_INLINED_SYSCALLS - /* Nonzero during startup. */ - int _dl_starting_up = 1; --#endif - - /* Random data provided by the kernel. */ - void *_dl_random; -diff --git a/elf/rtld.c b/elf/rtld.c -index 5d117d0d2c5902c1..3c4bb5605234409d 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -294,7 +294,6 @@ dl_main_state_init (struct dl_main_state *state) - state->version_info = false; - } - --#ifndef HAVE_INLINED_SYSCALLS - /* Set nonzero during loading and initialization of executable and - libraries, cleared before the executable's entry point runs. This - must not be initialized to nonzero, because the unused dynamic -@@ -304,7 +303,6 @@ dl_main_state_init (struct dl_main_state *state) - never be called. */ - int _dl_starting_up = 0; - rtld_hidden_def (_dl_starting_up) --#endif - - /* This is the structure which defines all variables global to ld.so - (except those which cannot be added for some reason). */ -@@ -1146,10 +1144,8 @@ dl_main (const ElfW(Phdr) *phdr, - /* Process the environment variable which control the behaviour. */ - process_envvars (&state); - --#ifndef HAVE_INLINED_SYSCALLS - /* Set up a flag which tells we are just starting. */ - _dl_starting_up = 1; --#endif - - const char *ld_so_name = _dl_argv[0]; - if (*user_entry == (ElfW(Addr)) ENTRY_POINT) diff --git a/glibc-python3.patch b/glibc-python3.patch index 32be6a3..aaf45cc 100644 --- a/glibc-python3.patch +++ b/glibc-python3.patch @@ -9,22 +9,22 @@ python3 during a transitional phase. Author: Carlos O'Donell diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py -index a215ebc9bd92ba73..f174161ed3147e03 100755 +index 6fcbd0803808e5ca..d43db393d63433bc 100755 --- a/benchtests/scripts/compare_bench.py +++ b/benchtests/scripts/compare_bench.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 - # Copyright (C) 2015-2020 Free Software Foundation, Inc. + # Copyright (C) 2015-2021 Free Software Foundation, Inc. # This file is part of the GNU C Library. # diff --git a/benchtests/scripts/import_bench.py b/benchtests/scripts/import_bench.py -index 08681aafdc200f64..2264da00370f9f02 100644 +index a799b4e1b7dc6f30..3286e267168e83bf 100644 --- a/benchtests/scripts/import_bench.py +++ b/benchtests/scripts/import_bench.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 - # Copyright (C) 2015-2020 Free Software Foundation, Inc. + # Copyright (C) 2015-2021 Free Software Foundation, Inc. # This file is part of the GNU C Library. # diff --git a/glibc-rh819430.patch b/glibc-rh819430.patch index 8b766f1..6152926 100644 --- a/glibc-rh819430.patch +++ b/glibc-rh819430.patch @@ -11,74 +11,76 @@ containing multi-byte character(s) This needs to be reviewed thoroughly and go upstream with a new test case. -diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c ---- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500 -+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400 -@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags) - # if HANDLE_MULTIBYTE - if (__builtin_expect (MB_CUR_MAX, 1) != 1) + +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; -@@ -356,10 +357,8 @@ fnmatch (pattern, string, 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. */ +@@ -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)); -@@ -371,10 +370,8 @@ fnmatch (pattern, string, 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. */ + 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); -@@ -401,14 +398,8 @@ fnmatch (pattern, string, 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. */ + 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)); -@@ -420,10 +411,8 @@ fnmatch (pattern, string, 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; + 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); -@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags) + 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; @@ -87,5 +89,5 @@ diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c + try_singlebyte: + pattern = orig_pattern; } - # endif /* mbstate_t and mbsrtowcs or _LIBC. */ + return internal_fnmatch (pattern, string, string + strlen (string), diff --git a/glibc.spec b/glibc.spec index 6d6b89f..4b63c90 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.32.9000-409-g4d0985543f +%define glibcsrcdir glibc-2.32.9000-497-g3ec5d83d2a %define glibcversion 2.32.9000 # Pre-release tarballs are pulled in from git using a command that is # effectively: @@ -27,8 +27,8 @@ %bcond_without benchtests # Default: Not bootstrapping. %bcond_with bootstrap -# Default: Enable using -Werror -%bcond_without werror +# Default: Disable -Werror due to GCC PR98512. +%bcond_with werror # Default: Always build documentation. %bcond_without docs @@ -96,7 +96,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 23%{?dist} +Release: 24%{?dist} # In general, GPLv2+ is used by programs, LGPLv2+ is used for # libraries. @@ -147,7 +147,6 @@ Patch8: glibc-fedora-manual-dircategory.patch Patch9: glibc-rh827510.patch Patch12: glibc-rh819430.patch Patch13: glibc-fedora-localedata-rh61908.patch -Patch14: glibc-fedora-__libc_multiple_libcs.patch Patch15: glibc-rh1070416.patch Patch16: glibc-nscd-sysconfig.patch Patch17: glibc-cs-path.patch @@ -2255,6 +2254,102 @@ fi %files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared %changelog +* Mon Jan 04 2021 Florian Weimer - 2.32.9000-24 +- Drop glibc-fedora-__libc_multiple_libcs.patch. Replaced by upstream's + __libc_initial flag. +- Adjust glibc-rh819430.patch to upstream's gnulib merge of fnmatch. +- Disable -Werror again due to GCC PR98512. +- Auto-sync with upstream branch master, + commit 3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5: +- x86-64: Avoid rep movsb with short distance [BZ #27130] +- aarch64: fix stack missing after sp is updated +- nptl: Remove set*id, set*gid files which are not built +- Drop nan-pseudo-number.h usage from tests +- posix: Sync fnmatch with gnulib +- Sync flexmember.h with gnulib +- Sync intprops.h with gnulib +- posix: Sync glob code with gnulib +- posix: Sync regex code with gnulib +- Move generic nan-pseudo-number.h to ldbl-96 +- Sync FDL from https://www.gnu.org/licenses/fdl-1.3.texi +- Sync move-if-change from Gnulib +- Update automatically-generated copyright dates +- Update copyright dates not handled by scripts/update-copyrights. +- Update copyright dates with scripts/update-copyrights +- aarch64: use PTR_ARG and SIZE_ARG instead of DELOUSE +- nonstring: Enable __FORTIFY_LEVEL=3 +- string: Enable __FORTIFY_LEVEL=3 +- Introduce _FORTIFY_SOURCE=3 +- Warn on unsupported fortification levels +- powerpc: Use scv instruction on clone when available +- powerpc: Runtime selection between sc and scv for syscalls +- malloc: preserve errno on mcheck hooks [BZ #17924] +- x86 long double: Add tests for pseudo normal numbers +- x86 long double: Consider pseudo numbers as signaling +- io: Remove xmknod{at} implementations +- io: Remove xstat implementations +- free: preserve errno [BZ#17924] +- hurd: Accept including hurd/version.h +- hurd: Add WSTOPPED/WCONTINUED/WEXITED/WNOWAIT support [BZ #23091] +- support: Make support_process_state_wait wait less +- hurd: set sigaction for signal preemptors in arch-independent file +- hurd: Fix spawni SPAWN_XFLAGS_TRY_SHELL with empty argv +- hurd: Try shell in posix_spawn* only in compat mode +- Remove _ISOMAC check from +- x86: Remove the duplicated CPU_FEATURE_CPU_P +- Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61 +- x86 long double: Support pseudo numbers in isnanl +- x86 long double: Support pseudo numbers in fpclassifyl +- MTE: Do not pad size in realloc_check +- tests-mcheck: New variable to run tests with MALLOC_CHECK_=3 +- elf: Account for glibc-hwcaps/ prefix in _dl_important_hwcaps +- misc: Use __ferror_unlocked instead of ferror +- s390x: Regenerate ulps +- powerpc: Regenerate ulps +- addmntent: Remove unbounded alloca usage from getmntent [BZ#27083] +- : Add Intel LAM support +- i386: Regenerate ulps +- aarch64: update ulps. +- aarch64: Add aarch64-specific files for memory tagging support +- aarch64: Add sysv specific enabling code for memory tagging +- linux: Add compatibility definitions to sys/prctl.h for MTE +- malloc: Basic support for memory tagging in the malloc() family +- elf: Add a tunable to control use of tagged memory +- config: Allow memory tagging to be enabled when configuring glibc +- alpha: Remove anonymous union in struct stat [BZ #27042] +- add inputs to auto-libm-test-in yielding larger errors (binary64, x86_64) +- m68k: fix clobbering a5 in setjmp() [BZ #24202] +- iconv add iconv_close before the function returned with bad value. +- iconv: use iconv_close after iconv_open +- Fix buffer overrun in EUC-KR conversion module (bz #24973) +- hurd: Make trampoline fill siginfo ss_sp from sc_uesp +- Hurd: make sigstates hold a reference on thread ports +- profil-counter: Add missing SIGINFO case +- hurd: implement SA_SIGINFO signal handlers. +- hurd: Fix ELF_MACHINE_USER_ADDRESS_MASK value +- hurd: Note when the vm_map kernel bug was fixed +- hurd: Also turn KERN_INVALID_ADDRESS to EINVAL +- ieee754: Remove unused __sin32 and __cos32 +- ieee754: Remove slow paths from asin and acos +- getenv: Move call to strlen to the branch it's used in. +- Update kernel version to 5.10 in tst-mman-consts.py. +- s390x: Require GCC 7.1 or later to build glibc. +- malloc: Use __libc_initial to detect an inner libc +- Replace __libc_multiple_libcs with __libc_initial flag +- {nptl,htl}/semaphoreP.h: clean up +- htl: Get sem_open/sem_close/sem_unlink support [BZ #25524] +- pthread: Move semaphore initialization for open to semaphoreP.h +- Mark __libc_freeres_fn as used [BZ #27002] +- Update syscall lists for Linux 5.10. +- htl: Add pshared semaphore support +- hurd: Add LLL_PRIVATE and LLL_SHARED +- hurd: Add __libc_open and __libc_close +- htl: Add futex-internal.h +- hurd: Add __lll_abstimed_wait_intr +- hurd: make lll_* take a variable instead of a ptr +- hurd: Rename LLL_INITIALIZER to LLL_LOCK_INITIALIZER +- Use Linux 5.10 in build-many-glibcs.py. + * Wed Dec 16 2020 DJ Delorie - 2.32.9000-23 - Fix conditionals for _enable_debug_packages and benchtests [BZ #1902514] diff --git a/sources b/sources index c99ca59..2881485 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (glibc-2.32.9000-409-g4d0985543f.tar.xz) = 5665bba5c9105a9799ba815ddcbce9bbd6c9b7789f4069821b4db0537456ac6754ff5d728e70ec8f94a51514fbfb77889f27ecfe72f5b0854230d5a03f883950 +SHA512 (glibc-2.32.9000-497-g3ec5d83d2a.tar.xz) = 9964a017a654c7cc9d72f43d739a6f08c1cb84fe8cdd96f8e2a630c511983c1495946776561fd403b9d6c40cac465a3deb08388bbaafa525b457aca95059c778