]> git.99rst.org Git - openwrt-packages.git/commit
python-cffi: fix cross-compilation on macOS hosts
authorJosef Schlehofer <redacted>
Fri, 7 Aug 2026 11:19:31 +0000 (13:19 +0200)
committerAlexandru Ardelean <redacted>
Sun, 9 Aug 2026 08:42:40 +0000 (11:42 +0300)
commita8c37e36c1e3a9b9db00a14d3e1fc98a79952f90
treeb00514e1484cfc8a6d378bb4d4fec4a87b6b977d
parent762e3affdd456781b50e73e4ee9bed778cd8fe92
python-cffi: fix cross-compilation on macOS hosts

setup.py picks the macOS-only -iwithsysroot/usr/include/ffi flag from
sys.platform, which describes the interpreter running the build rather than
the target, so cross-compiling from a macOS host hands an Apple clang flag to
the GNU cross compiler and the build fails. Use sysconfig.get_platform(),
which honours the _PYTHON_HOST_PLATFORM that python3-package.mk exports.

Signed-off-by: Josef Schlehofer <redacted>
lang/python/python-cffi/Makefile
lang/python/python-cffi/patches/001-fix-cross-compilation-on-macos-hosts.patch [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT