Skip to content

Commit fdd97fb

Browse files
[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 6839f8c) Co-authored-by: Advit Arora <advitarora2@gmail.com>
1 parent e51d358 commit fdd97fb

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
@@ -4172,8 +4172,8 @@ AS_VAR_IF([ac_sys_system], [Darwin], [
41724172
AC_CHECK_LIB([ffi], [ffi_call], [
41734173
dnl use ffi from SDK root
41744174
have_libffi=yes
4175-
LIBFFI_CFLAGS="-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"
4176-
LIBFFI_LIBS="-lffi"
4175+
LIBFFI_CFLAGS=${LIBFFI_CFLAGS-"-I${SDKROOT}/usr/include/ffi -DUSING_APPLE_OS_LIBFFI=1"}
4176+
LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"}
41774177
])
41784178
])
41794179
])

0 commit comments

Comments
 (0)