blob: 48f6109664a28989730021883aed1e555aa4912d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
Try to link gdb against tinfow first, then tinfo.
In bug #669096 gdb was directly linked both
to libtinfo.so.6 and libncursesw.so.6:
$ lddtree /usr/bin/gdb
/usr/bin/gdb (interpreter => /lib64/ld-linux-x86-64.so.2)
libtinfo.so.6 => /lib64/libtinfo.so.6
libncursesw.so.6 => /lib64/libncursesw.so.6
libtinfow.so.6 => /lib64/libtinfow.so.6
...
and caused gdb to SIGSEGV at start.
Let's consistently link against *w libraries.
Note: the fix on it's own is not enough:
- we don't pass include paths to ncursesw libraries
- libreadline.so.7 is still linked against libtinfo.so.6 in Gentoo
and needs a separate fix.
But it's enough to make immediate SIGSEGV to go away.
Reported-by: Michał Górny
Bug: https://bugs.gentoo.org/669096
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -616,4 +616,4 @@ esac
-# These are the libraries checked by Readline.
-AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses])
+# These are the libraries checked by Readline. Not really: readline does not know about *w libs.
+AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses])
--- a/gdb/configure
+++ b/gdb/configure
@@ -8984,3 +8984,3 @@ esac
-# These are the libraries checked by Readline.
+# These are the libraries checked by Readline. Not really: readline does not know about *w libs.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
@@ -9009,3 +9009,3 @@ return tgetent ();
_ACEOF
-for ac_lib in '' termcap tinfo curses ncursesw ncurses; do
+for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
if test -z "$ac_lib"; then
|