File gdb-14.2-fix-finding-python-when-cross-compi.patch of Package mingw32-gdb

From 1bd2ef9bb1cf54f8f99edc3ef959423455dbd210 Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Sun, 7 Apr 2024 21:08:32 +0200
Subject: [PATCH] gdb/configure.ac: Fix finding python when cross compiling

---
 gdb/configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff -ur gdb-16.3.orig/gdb/configure.ac gdb-16.3/gdb/configure.ac
--- gdb-16.3.orig/gdb/configure.ac	2025-04-20 19:22:05.000000000 +0200
+++ gdb-16.3/gdb/configure.ac	2025-06-04 17:00:45.314633964 +0200
@@ -904,6 +904,10 @@
     AC_TRY_LIBPYTHON(have_libpython,
                      ${python_includes}, ${python_libs})
   fi
+  if test "${have_libpython}" = no; then
+    AC_TRY_LIBPYTHON(have_libpython,
+                     ${python_includes}, "${python_libs} -lpython3.9")
+  fi
 
   if test "${have_libpython}" = no; then
     case "${with_python}" in
-- 
2.35.3
openSUSE Build Service is sponsored by