Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/
Date: Thu, 26 May 2022 05:48:20
Message-Id: 1653544086.9c13495c430ca3e64bc09682c8a646fdaed843b0.sam@gentoo
1 commit: 9c13495c430ca3e64bc09682c8a646fdaed843b0
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 26 05:47:46 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 05:48:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c13495c
7
8 sys-devel/gdb: build tests in src_compile when enabled
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 sys-devel/gdb/gdb-12.1.ebuild | 16 +++++++++++-----
13 1 file changed, 11 insertions(+), 5 deletions(-)
14
15 diff --git a/sys-devel/gdb/gdb-12.1.ebuild b/sys-devel/gdb/gdb-12.1.ebuild
16 index b7ca1edd1937..4c59318f5d81 100644
17 --- a/sys-devel/gdb/gdb-12.1.ebuild
18 +++ b/sys-devel/gdb/gdb-12.1.ebuild
19 @@ -53,6 +53,9 @@ fi
20 IUSE="cet guile lzma multitarget nls +python +server source-highlight test vanilla xml xxhash"
21 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
22
23 +# In fact, gdb's test suite needs some work to get passing.
24 +# See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
25 +# As of 11.2, on amd64: "# of unexpected failures 8600"
26 # ia64 kernel crashes when gdb testsuite is running
27 # in fact, gdb's test suite needs some work to get passing.
28 # See e.g. https://sourceware.org/gdb/wiki/TestingGDB.
29 @@ -104,9 +107,8 @@ src_prepare() {
30 default
31
32 strip-linguas -u bfd/po opcodes/po
33 - export CC_FOR_BUILD="$(tc-getBUILD_CC)"
34
35 - # avoid using ancient termcap from host on Prefix systems
36 + # Avoid using ancient termcap from host on Prefix systems
37 sed -i -e 's/termcap tinfow/tinfow/g' \
38 gdb/configure{.ac,} || die
39 }
40 @@ -135,13 +137,15 @@ src_configure() {
41 --with-pkgversion="$(gdb_branding)"
42 --with-bugurl='https://bugs.gentoo.org/'
43 --disable-werror
44 - # Disable modules that are in a combined binutils/gdb tree. #490566
45 + # Disable modules that are in a combined binutils/gdb tree. bug #490566
46 --disable-{binutils,etc,gas,gold,gprof,ld}
47
48 # avoid automagic dependency on (currently prefix) systems
49 # systems with debuginfod library, bug #754753
50 --without-debuginfod
51
52 + $(use_enable test unit-tests)
53 +
54 # Allow user to opt into CET for host libraries.
55 # Ideally we would like automagic-or-disabled here.
56 # But the check does not quite work on i686: bug #760926.
57 @@ -198,6 +202,8 @@ src_configure() {
58 # source-highlight is detected with pkg-config: bug #716558
59 export ac_cv_path_pkg_config_prog_path="$(tc-getPKG_CONFIG)"
60
61 + export CC_FOR_BUILD="$(tc-getBUILD_CC)"
62 +
63 # ensure proper compiler is detected for Clang builds: bug #831202
64 export GCC_FOR_TARGET="${CC_FOR_TARGET:-$(tc-getCC)}"
65
66 @@ -209,7 +215,7 @@ src_install() {
67
68 find "${ED}"/usr -name libiberty.a -delete || die
69
70 - # Delete translations that conflict with binutils-libs. #528088
71 + # Delete translations that conflict with binutils-libs. bug #528088
72 # Note: Should figure out how to store these in an internal gdb dir.
73 if use nls ; then
74 find "${ED}" \
75 @@ -253,7 +259,7 @@ src_install() {
76 # Remove shared info pages
77 rm -f "${ED}"/usr/share/info/{annotate,bfd,configure,ctf-spec,standards}.info*
78
79 - if use python; then
80 + if use python ; then
81 python_optimize "${ED}"/usr/share/gdb/python/gdb
82 fi
83 }