Skip to content

Commit 56c0185

Browse files
[3.15] gh-155813: Stop overwriting LIBFFI_CFLAGS and LIBFFI_LIBS on macOS (GH-156486) (#160129)
Ensures that a user-specified LIBFFI_CFLAGS and LIBFFI_LIBS is honored when building on macOS. (cherry picked from commit 6839f8c) Co-authored-by: Advit Arora <advitarora2@gmail.com>
1 parent b3e7902 commit 56c0185

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
@@ -4286,8 +4286,8 @@ AS_VAR_IF([ac_sys_system], [Darwin], [
42864286
AC_CHECK_LIB([ffi], [ffi_call], [
42874287
dnl use ffi from SDK root
42884288
have_libffi=yes
4289-
LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"
4290-
LIBFFI_LIBS="-lffi"
4289+
LIBFFI_CFLAGS=${LIBFFI_CFLAGS-"-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"}
4290+
LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"}
42914291
])
42924292
])
42934293
])

0 commit comments

Comments
 (0)