From bb4c523c2b4df5320b0805afe927dacacd0a47de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Nogueira?= Date: Fri, 12 Mar 2021 15:10:25 -0300 Subject: [PATCH] gdb: fix musl patch. Use patch from Alpine. __SIGRTMIN and SIGRTMIN aren't the same thing: SIGRTMIN is for signals applications can use, for which musl currently returns 35, but __SIGRTMIN is supposed to include the signals that libc uses, where the correct value is 32. --- srcpkgs/gdb/patches/gdb-linux_nat.patch | 21 --------------------- srcpkgs/gdb/patches/gdb-signals.patch | 21 +++++++++++++++++++++ srcpkgs/gdb/template | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 srcpkgs/gdb/patches/gdb-linux_nat.patch create mode 100644 srcpkgs/gdb/patches/gdb-signals.patch diff --git a/srcpkgs/gdb/patches/gdb-linux_nat.patch b/srcpkgs/gdb/patches/gdb-linux_nat.patch deleted file mode 100644 index 53f3132d36cd..000000000000 --- a/srcpkgs/gdb/patches/gdb-linux_nat.patch +++ /dev/null @@ -1,21 +0,0 @@ -the first chunk fixes build errors, -the non_stop part below fixes thread debugging being available -by default without setting any breakpoints or usage of libthread_db. - ---- gdb-7.4.org/gdb/linux-nat.c 2013-08-10 05:24:24.651000003 +0000 -+++ gdb-7.4/gdb/linux-nat.c 2013-08-10 05:25:50.966000003 +0000 -@@ -71,6 +71,14 @@ - # endif - #endif /* HAVE_PERSONALITY */ - -+#ifndef __SIGRTMIN -+#define __SIGRTMIN SIGRTMIN -+#endif -+ -+#ifndef W_STOPCODE -+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) -+#endif -+ - /* This comment documents high-level logic of this file. - - Waiting for events in sync mode diff --git a/srcpkgs/gdb/patches/gdb-signals.patch b/srcpkgs/gdb/patches/gdb-signals.patch new file mode 100644 index 000000000000..f412e1bc6468 --- /dev/null +++ b/srcpkgs/gdb/patches/gdb-signals.patch @@ -0,0 +1,21 @@ +relevant bug: +https://sourceware.org/bugzilla/show_bug.cgi?id=23616 + +diff --git a/gdbsupport/signals.cc b/gdbsupport/signals.cc +index 485e0f0..ab8d454 100644 +--- a/gdbsupport/signals.cc ++++ b/gdbsupport/signals.cc +@@ -31,6 +31,13 @@ struct gdbarch; + _available_ realtime signal, not the lowest supported; glibc takes + several for its own use. */ + ++#ifndef __SIGRTMIN ++# define __SIGRTMIN 32 ++#endif ++#ifndef __SIGRTMAX ++# define __SIGRTMAX _NSIG ++#endif ++ + #ifndef REALTIME_LO + # if defined(__SIGRTMIN) + # define REALTIME_LO __SIGRTMIN diff --git a/srcpkgs/gdb/template b/srcpkgs/gdb/template index e2a39e7d1030..e63224696bd3 100644 --- a/srcpkgs/gdb/template +++ b/srcpkgs/gdb/template @@ -1,7 +1,7 @@ # Template file for 'gdb' pkgname=gdb version=10.1 -revision=2 +revision=3 build_style=gnu-configure pycompile_dirs="/usr/share/gdb/python" configure_args="--disable-werror --disable-nls --with-system-readline