Fix FTBFS with glibc 2.34
Source: https://src.fedoraproject.org/rpms/emacs.git#181aafcdb7ee2fded9fce4cfc448f27edccc927f Resolves: #1975151
This commit is contained in:
		
							parent
							
								
									c8bc151531
								
							
						
					
					
						commit
						a4aa07122a
					
				
							
								
								
									
										40
									
								
								emacs-glibc-2.34.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								emacs-glibc-2.34.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,40 @@ | |||||||
|  | From f97e07ea807cc6d38774a3888a15091b20645ac6 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Paul Eggert <eggert@cs.ucla.edu> | ||||||
|  | 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 | ||||||
|  | 
 | ||||||
| @ -5,7 +5,7 @@ Summary:       GNU Emacs text editor | |||||||
| Name:          emacs | Name:          emacs | ||||||
| Epoch:         1 | Epoch:         1 | ||||||
| Version:       27.2 | Version:       27.2 | ||||||
| Release:       3%{?dist} | Release:       4%{?dist} | ||||||
| License:       GPLv3+ and CC0-1.0 | License:       GPLv3+ and CC0-1.0 | ||||||
| URL:           http://www.gnu.org/software/emacs/ | URL:           http://www.gnu.org/software/emacs/ | ||||||
| Source0:       https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz | Source0:       https://ftp.gnu.org/gnu/emacs/emacs-%{version}.tar.xz | ||||||
| @ -26,6 +26,7 @@ Source10:      %{name}.appdata.xml | |||||||
| # rhbz#713600 | # rhbz#713600 | ||||||
| Patch1:        emacs-spellchecker.patch | Patch1:        emacs-spellchecker.patch | ||||||
| Patch2:        emacs-system-crypto-policies.patch | Patch2:        emacs-system-crypto-policies.patch | ||||||
|  | Patch3:        emacs-glibc-2.34.patch | ||||||
| 
 | 
 | ||||||
| BuildRequires: gcc | BuildRequires: gcc | ||||||
| BuildRequires: atk-devel | BuildRequires: atk-devel | ||||||
| @ -188,6 +189,7 @@ Development header files for Emacs. | |||||||
| 
 | 
 | ||||||
| %patch1 -p1 -b .spellchecker | %patch1 -p1 -b .spellchecker | ||||||
| %patch2 -p1 -b .system-crypto-policies | %patch2 -p1 -b .system-crypto-policies | ||||||
|  | %patch3 -p1 -b .glibc2.34 | ||||||
| autoconf | autoconf | ||||||
| 
 | 
 | ||||||
| # We prefer our emacs.desktop file | # We prefer our emacs.desktop file | ||||||
| @ -482,6 +484,9 @@ rm %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/emacs-document23.svg | |||||||
| %{_includedir}/emacs-module.h | %{_includedir}/emacs-module.h | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Aug 10 2021 Jacek Migacz <jmigacz@redhat.com> - 1:27.2-4 | ||||||
|  | - Fix FTBFS with glibc 2.34 (#1975151) | ||||||
|  | 
 | ||||||
| * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:27.2-3 | * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1:27.2-3 | ||||||
| - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags | - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags | ||||||
|   Related: rhbz#1991688 |   Related: rhbz#1991688 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user