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