Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8248495: [macos] zerovm is broken due to libffi headers location
Browse files Browse the repository at this point in the history
Reviewed-by: ihse, erikj
  • Loading branch information
Vladimir Kempik committed Jul 2, 2020
1 parent 1eaa411 commit 78b9de8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions make/autoconf/lib-ffi.m4
Expand Up @@ -87,6 +87,20 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
[LIBFFI_FOUND=no]
)
fi
# on macos we need a special case for system's libffi as
# headers are located only in sdk in $SYSROOT and in ffi subfolder
if test "x$LIBFFI_FOUND" = xno; then
if test "x$SYSROOT" != "x"; then
AC_CHECK_HEADER([$SYSROOT/usr/include/ffi/ffi.h],
[
LIBFFI_FOUND=yes
LIBFFI_CFLAGS="-I${SYSROOT}/usr/include/ffi"
LIBFFI_LIBS=-lffi
],
[LIBFFI_FOUND=no]
)
fi
fi
if test "x$LIBFFI_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([ffi])
AC_MSG_ERROR([Could not find libffi! $HELP_MSG])
Expand Down

0 comments on commit 78b9de8

Please sign in to comment.