diff options
Diffstat (limited to 'sys-devel/gdb/files/gdb-8.2-tinfow.patch')
-rw-r--r-- | sys-devel/gdb/files/gdb-8.2-tinfow.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sys-devel/gdb/files/gdb-8.2-tinfow.patch b/sys-devel/gdb/files/gdb-8.2-tinfow.patch new file mode 100644 index 000000000000..48f6109664a2 --- /dev/null +++ b/sys-devel/gdb/files/gdb-8.2-tinfow.patch @@ -0,0 +1,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 |