sys-devel/gdb: link against tinfow first, then tinfo. bug #669096
authorSergei Trofimovich <slyfox@gentoo.org>
Sun, 21 Oct 2018 16:26:47 +0000 (17:26 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 21 Oct 2018 16:27:36 +0000 (17:27 +0100)
commit63d949769e25176de0d879cbef2b7cd80348ad0f
tree5a950367a89b4b8af2802f9702b7d3f706bccd9e
parent6369154027f20b5137b7a59d6b1d89a2bac0f7c7
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
sys-devel/gdb/files/gdb-8.2-tinfow.patch [new file with mode: 0644]
sys-devel/gdb/gdb-8.2-r1.ebuild [new file with mode: 0644]