commit:     ba8a496736af62fa55d84a1ed4ad06d0c9635a5b
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 17 19:35:01 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Apr 17 19:35:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba8a4967

dev-debug/gdb: fix/cleanup Solaris fixes

Don't run kernel-is on Solaris/macOS for it dies.  Cleanup Solaris c++
compiler hack, it's fixed upstream.

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

 dev-debug/gdb/gdb-16.2-r2.ebuild | 26 ++++++++++----------------
 dev-debug/gdb/gdb-9999.ebuild    | 26 ++++++++++----------------
 2 files changed, 20 insertions(+), 32 deletions(-)

diff --git a/dev-debug/gdb/gdb-16.2-r2.ebuild b/dev-debug/gdb/gdb-16.2-r2.ebuild
index 94a55473c3a3..6c32d99c1524 100644
--- a/dev-debug/gdb/gdb-16.2-r2.ebuild
+++ b/dev-debug/gdb/gdb-16.2-r2.ebuild
@@ -134,14 +134,16 @@ PATCHES=(
 pkg_setup() {
        local CONFIG_CHECK
 
-       if kernel_is -ge 6.11.3 ; then
-               # https://forums.gentoo.org/viewtopic-p-8846891.html
-               #
-               # Either CONFIG_PROC_MEM_ALWAYS_FORCE or 
CONFIG_PROC_MEM_FORCE_PTRACE
-               # should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
-               CONFIG_CHECK+="
-                       ~!PROC_MEM_NO_FORCE
-               "
+       if [[ ${CHOST} == *-linux-* ]] ; then
+               if kernel_is -ge 6.11.3 ; then
+                       # https://forums.gentoo.org/viewtopic-p-8846891.html
+                       #
+                       # Either CONFIG_PROC_MEM_ALWAYS_FORCE or 
CONFIG_PROC_MEM_FORCE_PTRACE
+                       # should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
+                       CONFIG_CHECK+="
+                               ~!PROC_MEM_NO_FORCE
+                       "
+               fi
        fi
 
        linux-info_pkg_setup
@@ -160,14 +162,6 @@ 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() {

diff --git a/dev-debug/gdb/gdb-9999.ebuild b/dev-debug/gdb/gdb-9999.ebuild
index 94a55473c3a3..6c32d99c1524 100644
--- a/dev-debug/gdb/gdb-9999.ebuild
+++ b/dev-debug/gdb/gdb-9999.ebuild
@@ -134,14 +134,16 @@ PATCHES=(
 pkg_setup() {
        local CONFIG_CHECK
 
-       if kernel_is -ge 6.11.3 ; then
-               # https://forums.gentoo.org/viewtopic-p-8846891.html
-               #
-               # Either CONFIG_PROC_MEM_ALWAYS_FORCE or 
CONFIG_PROC_MEM_FORCE_PTRACE
-               # should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
-               CONFIG_CHECK+="
-                       ~!PROC_MEM_NO_FORCE
-               "
+       if [[ ${CHOST} == *-linux-* ]] ; then
+               if kernel_is -ge 6.11.3 ; then
+                       # https://forums.gentoo.org/viewtopic-p-8846891.html
+                       #
+                       # Either CONFIG_PROC_MEM_ALWAYS_FORCE or 
CONFIG_PROC_MEM_FORCE_PTRACE
+                       # should be okay, but not CONFIG_PROC_MEM_NO_FORCE.
+                       CONFIG_CHECK+="
+                               ~!PROC_MEM_NO_FORCE
+                       "
+               fi
        fi
 
        linux-info_pkg_setup
@@ -160,14 +162,6 @@ 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