diff options
| author | Khem Raj <raj.khem@gmail.com> | 2021-05-03 22:56:27 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-05-03 22:57:42 -0700 |
| commit | 4fe10656553bc4afa293796c57ae99c728937ada (patch) | |
| tree | 7b848a0f778e8d1dbe67dced50dcc946f3d40ebc | |
| parent | 422f18343b7b5f30418dfd35b8d085947124552d (diff) | |
| download | meta-openembedded-4fe10656553bc4afa293796c57ae99c728937ada.tar.gz | |
emacs: Do not use SIGSTKSZ
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/emacs/emacs_27.2.bb | 5 | ||||
| -rw-r--r-- | meta-oe/recipes-support/emacs/files/emacs-glibc-2.34.patch | 40 |
2 files changed, 43 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/emacs/emacs_27.2.bb b/meta-oe/recipes-support/emacs/emacs_27.2.bb index e3157ec421..01629f4166 100644 --- a/meta-oe/recipes-support/emacs/emacs_27.2.bb +++ b/meta-oe/recipes-support/emacs/emacs_27.2.bb | |||
| @@ -4,8 +4,9 @@ HOMEPAGE = "https://www.gnu.org/software/emacs/" | |||
| 4 | LICENSE = "GPLv3" | 4 | LICENSE = "GPLv3" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" |
| 6 | 6 | ||
| 7 | SRC_URI = "https://ftp.gnu.org/pub/gnu/emacs/emacs-${PV}.tar.xz" | 7 | SRC_URI = "https://ftp.gnu.org/pub/gnu/emacs/emacs-${PV}.tar.xz \ |
| 8 | 8 | file://emacs-glibc-2.34.patch \ | |
| 9 | " | ||
| 9 | SRC_URI_append_class-target = " file://usemake-docfile-native.patch" | 10 | SRC_URI_append_class-target = " file://usemake-docfile-native.patch" |
| 10 | 11 | ||
| 11 | SRC_URI[sha256sum] = "b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9" | 12 | SRC_URI[sha256sum] = "b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9" |
diff --git a/meta-oe/recipes-support/emacs/files/emacs-glibc-2.34.patch b/meta-oe/recipes-support/emacs/files/emacs-glibc-2.34.patch new file mode 100644 index 0000000000..6d764aa266 --- /dev/null +++ b/meta-oe/recipes-support/emacs/files/emacs-glibc-2.34.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From f97e07ea807cc6d38774a3888a15091b20645ac6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Eggert <eggert@cs.ucla.edu> | ||
| 3 | Date: Tue, 9 Mar 2021 11:22:59 -0800 | ||
| 4 | Subject: [PATCH] Port alternate signal stack to upcoming glibc 2.34 | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | * src/sysdep.c (sigsegv_stack): Increase size to 64 KiB and align | ||
| 10 | it to max_align_t. This copies from Gnulib’s c-stack.c, and works | ||
| 11 | around a portability bug in draft glibc 2.34, which no longer | ||
| 12 | defines SIGSTKSZ when _GNU_SOURCE is defined. | ||
| 13 | --- | ||
| 14 | src/sysdep.c | 10 +++++++++- | ||
| 15 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
| 16 | |||
| 17 | diff --git a/src/sysdep.c b/src/sysdep.c | ||
| 18 | index 941b4e2fa2..24d8832b2f 100644 | ||
| 19 | --- a/src/sysdep.c | ||
| 20 | +++ b/src/sysdep.c | ||
| 21 | @@ -1785,7 +1785,15 @@ handle_arith_signal (int sig) | ||
| 22 | |||
| 23 | /* Alternate stack used by SIGSEGV handler below. */ | ||
| 24 | |||
| 25 | -static unsigned char sigsegv_stack[SIGSTKSZ]; | ||
| 26 | +/* Storage for the alternate signal stack. | ||
| 27 | + 64 KiB is not too large for Emacs, and is large enough | ||
| 28 | + for all known platforms. Smaller sizes may run into trouble. | ||
| 29 | + For example, libsigsegv 2.6 through 2.8 have a bug where some | ||
| 30 | + architectures use more than the Linux default of an 8 KiB alternate | ||
| 31 | + stack when deciding if a fault was caused by stack overflow. */ | ||
| 32 | +static max_align_t sigsegv_stack[(64 * 1024 | ||
| 33 | + + sizeof (max_align_t) - 1) | ||
| 34 | + / sizeof (max_align_t)]; | ||
| 35 | |||
| 36 | |||
| 37 | /* Return true if SIGINFO indicates a stack overflow. */ | ||
| 38 | -- | ||
| 39 | 2.29.2 | ||
| 40 | |||
