diff --git a/backport-emacs-glibc-2.34.patch b/backport-emacs-glibc-2.34.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6ad28633a4ec29d6020df01d71bc6802a17a888 --- /dev/null +++ b/backport-emacs-glibc-2.34.patch @@ -0,0 +1,39 @@ +From f97e07ea807cc6d38774a3888a15091b20645ac6 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Tue, 9 Mar 2021 11:22:59 -0800 +Subject: [PATCH] Port alternate signal stack to upcoming glibc 2.34 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* src/sysdep.c (sigsegv_stack): Increase size to 64 KiB and align +it to max_align_t. This copies from Gnulib’s c-stack.c, and works +around a portability bug in draft glibc 2.34, which no longer +defines SIGSTKSZ when _GNU_SOURCE is defined. +--- + src/sysdep.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/sysdep.c b/src/sysdep.c +index 941b4e2fa2..24d8832b2f 100644 +--- a/src/sysdep.c ++++ b/src/sysdep.c +@@ -1785,7 +1785,15 @@ handle_arith_signal (int sig) + + /* Alternate stack used by SIGSEGV handler below. */ + +-static unsigned char sigsegv_stack[SIGSTKSZ]; ++/* Storage for the alternate signal stack. ++ 64 KiB is not too large for Emacs, and is large enough ++ for all known platforms. Smaller sizes may run into trouble. ++ For example, libsigsegv 2.6 through 2.8 have a bug where some ++ architectures use more than the Linux default of an 8 KiB alternate ++ stack when deciding if a fault was caused by stack overflow. */ ++static max_align_t sigsegv_stack[(64 * 1024 ++ + sizeof (max_align_t) - 1) ++ / sizeof (max_align_t)]; + + + /* Return true if SIGINFO indicates a stack overflow. */ +-- +2.29.2 \ No newline at end of file diff --git a/emacs.spec b/emacs.spec index 7c013b1a0f6d078902dbe523a5e7e59a1a3af30a..9f266def1ca6dfaf752217b3f712596d4360ac3b 100644 --- a/emacs.spec +++ b/emacs.spec @@ -4,7 +4,7 @@ Name: emacs Epoch: 1 Version: 27.2 -Release: 1 +Release: 2 Summary: An extensible GNU text editor License: GPLv3+ and CC0-1.0 URL: http://www.gnu.org/software/emacs @@ -18,8 +18,9 @@ Source6: emacs.desktop Source7: emacs-terminal.desktop Source8: %{name}.appdata.xml -Patch1: emacs-spellchecker.patch -Patch2: emacs-system-crypto-policies.patch +Patch6001: emacs-spellchecker.patch +Patch6002: emacs-system-crypto-policies.patch +Patch6003: backport-emacs-glibc-2.34.patch BuildRequires: gcc atk-devel cairo-devel freetype-devel fontconfig-devel dbus-devel giflib-devel BuildRequires: glibc-devel zlib-devel gnutls-devel libselinux-devel GConf2-devel alsa-lib-devel @@ -398,8 +399,11 @@ fi %{_infodir}/* %changelog +* Tue Aug 10 2021 yanan - 1:27.2-2 +- DESC: Fix FTBFS with glibc 2.34 + * Mon Jul 19 2021 wangkerong - 1:27.2-1 -- DESC:upgrade to 1:27.2 +- DESC: upgrade to 1:27.2 * Wed Dec 09 2020 chenyanpan - 1:27.1-5 - Type: improvement