mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-04-12 14:33:06 +08:00
gdb: better static python detection in configure machinery
In python 3, itertools is a builtin module, so whether or not the python you link against is a shared or a static one, importing it works. Change the import test to use ctypes which is a dynamic module in both python 2 and 3. gdb/ChangeLog: PR python/26832 * configure: Regenerate. * configure.ac: Check for python modules ctypes instead of itertools.
This commit is contained in:
parent
ac3d406409
commit
3fed4c0b7a
@ -1,3 +1,10 @@
|
||||
2020-11-06 Romain Geissler <romain.geissler@amadeus.com>
|
||||
|
||||
PR python/26832
|
||||
* configure: Regenerate.
|
||||
* configure.ac: Check for python modules ctypes instead of
|
||||
itertools.
|
||||
|
||||
2020-11-06 Pedro Alves <pedro@palves.net>
|
||||
|
||||
* macroexp.c (struct macro_buffer): Split in two classes. Add
|
||||
|
2
gdb/configure
vendored
2
gdb/configure
vendored
@ -16076,7 +16076,7 @@ main ()
|
||||
{
|
||||
int err;
|
||||
Py_Initialize ();
|
||||
err = PyRun_SimpleString ("import itertools\n");
|
||||
err = PyRun_SimpleString ("import ctypes\n");
|
||||
Py_Finalize ();
|
||||
return err == 0 ? 0 : 1;
|
||||
;
|
||||
|
@ -1686,7 +1686,7 @@ if test "${gdb_native}" = yes; then
|
||||
[#include "Python.h"],
|
||||
[int err;
|
||||
Py_Initialize ();
|
||||
err = PyRun_SimpleString ("import itertools\n");
|
||||
err = PyRun_SimpleString ("import ctypes\n");
|
||||
Py_Finalize ();
|
||||
return err == 0 ? 0 : 1;])],
|
||||
[dynamic_list=true], [], [true])
|
||||
|
Loading…
x
Reference in New Issue
Block a user