Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/gdb/files/, sys-devel/gdb/
Date: Thu, 14 Mar 2019 22:49:50
Message-Id: 1552603777.890e99a6aef35c3e8c9a828bdf5ca9eafec6a1bb.slyfox@gentoo
commit:     890e99a6aef35c3e8c9a828bdf5ca9eafec6a1bb
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 14 22:49:20 2019 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Mar 14 22:49:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=890e99a6

sys-devel/gdb: fix build against -std=c++17

Patch is proposed upstream as:
https://sourceware.org/ml/gdb-patches/2019-03/msg00306.html

Reported-by: Helmut Jarausch
Closes: https://bugs.gentoo.org/680232
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch | 19 +++++++++++++++++++
 sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild         |  1 +
 2 files changed, 20 insertions(+)

diff --git a/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch b/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch
new file mode 100644
index 00000000000..c134cbcae8d
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-8.3.50.20190312-c++17.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/680232
+
+--- a/gdb/unittests/string_view-selftests.c
++++ b/gdb/unittests/string_view-selftests.c
+@@ -170,10 +170,12 @@ run_tests ()
+ } /* namespace string_view */
+ } /* namespace selftests */
+ 
++#endif /* __cplusplus < 201703L */
++
+ void
+ _initialize_string_view_selftests ()
+ {
++#if defined(GDB_STRING_VIEW)
+   selftests::register_test ("string_view", selftests::string_view::run_tests);
++#endif
+ }
+-
+-#endif /* __cplusplus < 201703L */

diff --git a/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild
index eda29eb876a..3b02bda0bd9 100644
--- a/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild
+++ b/sys-devel/gdb/gdb-8.3.50.20190312-r1.ebuild
@@ -95,6 +95,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${P}-source-highlight.patch
+	"${FILESDIR}"/${P}-c++17.patch
 )
 
 S=${WORKDIR}/${PN}-${MY_PV}