diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-21 17:26:47 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-21 17:27:36 +0100 |
commit | 63d949769e25176de0d879cbef2b7cd80348ad0f (patch) | |
tree | 5a950367a89b4b8af2802f9702b7d3f706bccd9e /sys-devel/gdb/files | |
parent | media-sound/tk707: Drop old (diff) | |
download | gentoo-63d949769e25176de0d879cbef2b7cd80348ad0f.tar.gz gentoo-63d949769e25176de0d879cbef2b7cd80348ad0f.tar.bz2 gentoo-63d949769e25176de0d879cbef2b7cd80348ad0f.zip |
sys-devel/gdb: link against tinfow first, then tinfo. bug #669096
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 when both available.
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
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'sys-devel/gdb/files')
-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 |