Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

zephyrproject-rtos/crosskit-mingw-w64-libpython

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crosskit-mingw-w64-libpython

This repository contains the pre-generated libpython*.dll import libraries and headers for the MinGW-w64, in order to facilitate Linux-to-Windows cross compilation of the programs that depend on the libpython*.dll (e.g. GDB).

Note that the import libraries in this repository do not target the MSYS2 Python DLLs; instead, they target the native Windows Python distribution from the official Python website.

SUPERHACK WARNING! This repository also contains a special shell script (${LIBPYTHON_KIT_ROOT}/bin/python) that emulates the GDB build system python-config.py to allow the Linux GDB build system to resolve the include and lib paths for the Windows Python.

Generate a new kit

Follow the steps below to generate a new cross libpython kit:

  1. Download and install x86-64 Python distribution from the Python website.

  2. Create a kit root directory (referred to as ${LIBPYTHON_KIT_ROOT} in this document).

  3. Copy Python include directory to the kit root directory, such that the contents of the include directory resides in ${LIBPYTHON_KIT_ROOT}/include.

  4. Copy Python python[maj][min].dll (e.g. python38.dll for Python 3.8) to ${LIBPYTHON_KIT_ROOT}/lib.

  5. Run the following commands in ${LIBPYTHON_KIT_ROOT}/lib directory to generate an import library (using Python 3.8 as example):

    gendef python38.dll
    x86_64-w64-mingw32-dlltool -D python38.dll -d python38.def -l libpython38.a
    

Build GDB

/usr/local/src/gdb-9.1/configure \
    --build=x86_64-build_pc-linux-gnu \
    --host=x86_64-w64-mingw32 \
    --target=arm-none-eabi \
    --prefix=<OUTDIR> \
    --with-python=${LIBPYTHON_KIT_ROOT}/bin/python

About

Pre-generated "libpython*.dll" Import Libraries for MinGW-w64

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.