Thanks, Christian On 22/07/2020 18:47, Christian Biesinger wrote: > On Wed, Jul 22, 2020 at 11:51 AM Eli Zaretskii wrote: >> Does anyone build their MinGW GDB by cross-compiling it on GNU/Linux? > > I haven't done this myself but I am aware of two things: > - https://sourceware.org/gdb/wiki/CrossCompilingWithPythonSupport Basically, that mirrors the procedure which I have adopted; the principle difference is that I have the Windows build of Python-2.7.18 installed in my default Wine prefix, so am able to run python.exe when required by the gdb build system. It yields python_includes='-IC:/Python27/include -IC:/Python27/include\r' python_libs='-LC:/Python27/libs -lpython27\r' python_prefix='C:/Python27\r' That's almost usable, but the terminating '\r' characters, and the 'C:' drive prefixes, are troublesome. I've written a simple wrapper script, which unconditionally strips the '\r' terminators, but I'm not sure if I should unconditionally transform the 'C:' prefixes: certainly, it would seem to be appropriate for python_includes, and for python_libs, but perhaps not for python_prefix? > - The patch discussed at > https://sourceware.org/legacy-ml/gdb-patches/2012-12/msg00754.html > claims to improve cross-compiling with python (Debian used to carry > that patch, though they've since dropped it) Sorry, but I really don't see how that would help in my situation. It looks for a $host specific python-config command (mingw32-python-config) which I would need to write anyway, and it would perform no better than running gdb's existing python-config.py via python.exe, with appropriate transformations applied to the output. -- Regards, Keith. Public key available from keys.gnupg.net Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F