commit:     77e435c26870b2cd4f6ca8725afc009a491d554b
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 25 09:36:16 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Feb 25 09:38:02 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77e435c2

dev-build/gdb-14.1-r1: fix compilation on Solaris

Python headers interfere, breaking the build, explicitly enable C++11
mode as to clear out the mismatch.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 dev-debug/gdb/gdb-14.1-r1.ebuild | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dev-debug/gdb/gdb-14.1-r1.ebuild b/dev-debug/gdb/gdb-14.1-r1.ebuild
index f9b8b1ba925b..6894ea21be93 100644
--- a/dev-debug/gdb/gdb-14.1-r1.ebuild
+++ b/dev-debug/gdb/gdb-14.1-r1.ebuild
@@ -134,6 +134,14 @@ src_prepare() {
        # Avoid using ancient termcap from host on Prefix systems
        sed -i -e 's/termcap tinfow/tinfow/g' \
                gdb/configure{.ac,} || die
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               # code relies on C++11, so make sure we get that selected
+               # due to Python 3.11 pymacro.h doing stuff to work around
+               # versioning mess based on the C version, while we're compiling
+               # C++ here, so we need to make it clear we're doing C++11/C11
+               # because Solaris system headers act on these
+               sed -i -e 's/-x c++/-std=c++11/' gdb/Makefile.in || die
+       fi
 }
 
 gdb_branding() {

Reply via email to