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.
This commit is contained in:
Érico Nogueira 2021-03-12 15:10:25 -03:00 committed by Érico Nogueira Rolim
parent c6c970e142
commit f4ccb51a0e
3 changed files with 22 additions and 22 deletions

View File

@ -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

View File

@ -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

View File

@ -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