[arch-commits] Commit in emacs/trunk (PKGBUILD glibc-2.34.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Fri Mar 11 19:56:31 UTC 2022
Date: Friday, March 11, 2022 @ 19:56:30
Author: arojas
Revision: 439441
Fix build with glibc 2.34
Added:
emacs/trunk/glibc-2.34.patch
Modified:
emacs/trunk/PKGBUILD
------------------+
PKGBUILD | 13 ++++++++++---
glibc-2.34.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-03-11 19:34:27 UTC (rev 439440)
+++ PKGBUILD 2022-03-11 19:56:30 UTC (rev 439441)
@@ -3,7 +3,7 @@
pkgname=emacs
pkgver=27.2
-pkgrel=1
+pkgrel=2
pkgdesc="The extensible, customizable, self-documenting real-time display editor"
arch=('x86_64')
url="https://www.gnu.org/software/emacs/emacs.html"
@@ -10,10 +10,17 @@
license=('GPL3')
depends=('librsvg' 'gpm' 'giflib' 'libxpm' 'libotf' 'm17n-lib' 'gtk3' 'hicolor-icon-theme' 'desktop-file-utils' 'alsa-lib' 'gnutls' 'jansson' 'cairo' 'harfbuzz')
validpgpkeys=('E6C9029C363AD41D787A8EBB91C1262F01EB8D39' '28D3BED851FDF3AB57FEF93C233587A47C207910')
-source=(https://ftp.gnu.org/gnu/emacs/$pkgname-$pkgver.tar.xz{,.sig})
+source=(https://ftp.gnu.org/gnu/emacs/$pkgname-$pkgver.tar.xz{,.sig}
+ glibc-2.34.patch)
sha1sums=('8d18e2bfb6e28cf060ce7587290954e9c582aa25'
- 'SKIP')
+ 'SKIP'
+ '2546c57b7778d370a69b9ed8ba9a17dafb602506')
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 -i ../glibc-2.34.patch # Fix build with glibc 2.34
+}
+
build() {
cd "$srcdir"/$pkgname-$pkgver
ac_cv_lib_gif_EGifPutExtensionLast=yes ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
Added: glibc-2.34.patch
===================================================================
--- glibc-2.34.patch (rev 0)
+++ glibc-2.34.patch 2022-03-11 19:56:30 UTC (rev 439441)
@@ -0,0 +1,39 @@
+From f97e07ea807cc6d38774a3888a15091b20645ac6 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert at 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
More information about the arch-commits
mailing list