]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: make Python conftest compatible with Python limited C API
authorMatthieu Longo <matthieu.longo@arm.com>
Wed, 16 Jul 2025 16:17:36 +0000 (17:17 +0100)
committerMatthieu Longo <matthieu.longo@arm.com>
Wed, 15 Oct 2025 15:23:13 +0000 (16:23 +0100)
commit5643188363374dfa776497b2b42b5c9920b2349c
tree67c66f15f66f3b3ca89f8eb061a12d936f36cb5f
parent3510e35e96d8f4c8526cc21540c6051ad4d73cd5
gdb: make Python conftest compatible with Python limited C API

The current test to check the support of '--dynamic-list' linker flag
uses PyRun_SimpleString (), which is part of the unstable API. As it is
now, the test will systematically fail due to the undefined symbol
rather than testing the import of ctypes.
This patch replaces PyRun_SimpleString () by an equivalent code relying
on the limited C API, and compatible with Python 3.4.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23830
Approved-By: Tom Tromey <tom@tromey.com>
gdb/configure
gdb/configure.ac