Skip to content

Commit 6839f8c

Browse files
authored
gh-155813: Stop overwriting LIBFFI_CFLAGS and LIBFFI_LIBS on macOS (#156486)
Ensures that a user-specified LIBFFI_CFLAGS and LIBFFI_LIBS is honored when building on macOS.
1 parent 08500b0 commit 6839f8c

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
On macOS, :option:`LIBFFI_CFLAGS` and :option:`LIBFFI_LIBS` are no longer
2+
ignored when the SDK provides ``libffi``, so :mod:`ctypes` can again be built
3+
against a different ``libffi``. Patch by Advit Arora.

‎configure‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4418,8 +4418,8 @@ AS_VAR_IF([ac_sys_system], [Darwin], [
44184418
AC_CHECK_LIB([ffi], [ffi_call], [
44194419
dnl use ffi from SDK root
44204420
have_libffi=yes
4421-
LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"
4422-
LIBFFI_LIBS="-lffi"
4421+
LIBFFI_CFLAGS=${LIBFFI_CFLAGS-"-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"}
4422+
LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"}
44234423
])
44244424
])
44254425
])

0 commit comments

Comments
 (0)