https://github.com/python/cpython/commit/fdd97fb41326bd00d5968dd5f5c4f22e92c5e7c9 commit: fdd97fb41326bd00d5968dd5f5c4f22e92c5e7c9 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: freakboy3742 <[email protected]> date: 2026-10-21T23:01:45Z summary:
[3.14] gh-155813: Stop overwriting LIBFFI_CFLAGS and LIBFFI_LIBS on macOS (GH-156486) (#160130) Ensures that a user-specified LIBFFI_CFLAGS and LIBFFI_LIBS is honored when building on macOS. (cherry picked from commit 6839f8ce22e54cffdaa9d8fe40009b7964450b69) Co-authored-by: Advit Arora <[email protected]> files: A Misc/NEWS.d/next/Build/2026-08-27-23-24-29.gh-issue-155813.LxRQu9.rst M configure M configure.ac diff --git a/Misc/NEWS.d/next/Build/2026-08-27-23-24-29.gh-issue-155813.LxRQu9.rst b/Misc/NEWS.d/next/Build/2026-08-27-23-24-29.gh-issue-155813.LxRQu9.rst new file mode 100644 index 000000000000000..c614826ba4c19ad --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-08-27-23-24-29.gh-issue-155813.LxRQu9.rst @@ -0,0 +1,3 @@ +On macOS, :option:`LIBFFI_CFLAGS` and :option:`LIBFFI_LIBS` are no longer +ignored when the SDK provides ``libffi``, so :mod:`ctypes` can again be built +against a different ``libffi``. Patch by Advit Arora. diff --git a/configure b/configure index 93339120cc454e5..07048c1ec7f96b7 100755 --- a/configure +++ b/configure @@ -15425,8 +15425,8 @@ if test "x$ac_cv_lib_ffi_ffi_call" = xyes then : have_libffi=yes - LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1" - LIBFFI_LIBS="-lffi" + LIBFFI_CFLAGS=${LIBFFI_CFLAGS-"-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"} + LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"} fi diff --git a/configure.ac b/configure.ac index 24089d0839ed6ad..e371f1edb06cff8 100644 --- a/configure.ac +++ b/configure.ac @@ -4172,8 +4172,8 @@ AS_VAR_IF([ac_sys_system], [Darwin], [ AC_CHECK_LIB([ffi], [ffi_call], [ dnl use ffi from SDK root have_libffi=yes - LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1" - LIBFFI_LIBS="-lffi" + LIBFFI_CFLAGS=${LIBFFI_CFLAGS-"-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"} + LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"} ]) ]) ]) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
