mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 18:44:38 +02:00
8141590: Cannot build Zero with devkit
Reviewed-by: ihse
This commit is contained in:
parent
3592cbe262
commit
eaf6a90a9b
7 changed files with 203 additions and 11 deletions
|
@ -671,6 +671,8 @@ LLVM_LIBS
|
|||
LLVM_LDFLAGS
|
||||
LLVM_CFLAGS
|
||||
LLVM_CONFIG
|
||||
LIBFFI_LIB_FILE
|
||||
ENABLE_LIBFFI_BUNDLING
|
||||
LIBFFI_LIBS
|
||||
LIBFFI_CFLAGS
|
||||
ALSA_LIBS
|
||||
|
@ -1208,6 +1210,7 @@ with_alsa_lib
|
|||
with_libffi
|
||||
with_libffi_include
|
||||
with_libffi_lib
|
||||
enable_libffi_bundling
|
||||
with_libjpeg
|
||||
with_giflib
|
||||
with_libpng
|
||||
|
@ -1990,6 +1993,9 @@ Optional Features:
|
|||
disable bundling of the freetype library with the
|
||||
build result [enabled on Windows or when using
|
||||
--with-freetype, disabled otherwise]
|
||||
--enable-libffi-bundling
|
||||
enable bundling of libffi.so to make the built JDK
|
||||
runnable on more systems
|
||||
--enable-jtreg-failure-handler
|
||||
forces build of the jtreg failure handler to be
|
||||
enabled, missing dependencies become fatal errors.
|
||||
|
@ -5082,7 +5088,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
|||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1481100369
|
||||
DATE_WHEN_GENERATED=1481104795
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -62633,6 +62639,11 @@ if test "${with_libffi_lib+set}" = set; then :
|
|||
withval=$with_libffi_lib;
|
||||
fi
|
||||
|
||||
# Check whether --enable-libffi-bundling was given.
|
||||
if test "${enable_libffi_bundling+set}" = set; then :
|
||||
enableval=$enable_libffi_bundling;
|
||||
fi
|
||||
|
||||
|
||||
if test "x$NEEDS_LIB_FFI" = xfalse; then
|
||||
if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
|
||||
|
@ -62651,6 +62662,7 @@ $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2
|
|||
fi
|
||||
|
||||
if test "x${with_libffi}" != x; then
|
||||
LIBFFI_LIB_PATH="${with_libffi}/lib"
|
||||
LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
|
||||
LIBFFI_CFLAGS="-I${with_libffi}/include"
|
||||
LIBFFI_FOUND=yes
|
||||
|
@ -62660,6 +62672,7 @@ $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2
|
|||
LIBFFI_FOUND=yes
|
||||
fi
|
||||
if test "x${with_libffi_lib}" != x; then
|
||||
LIBFFI_LIB_PATH="${with_libffi_lib}"
|
||||
LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
|
||||
LIBFFI_FOUND=yes
|
||||
fi
|
||||
|
@ -62869,12 +62882,75 @@ $as_echo "$LIBFFI_WORKS" >&6; }
|
|||
|
||||
as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
|
||||
$as_echo_n "checking if libffi should be bundled... " >&6; }
|
||||
if test "x$enable_libffi_bundling" = "x"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
ENABLE_LIBFFI_BUNDLING=false
|
||||
elif test "x$enable_libffi_bundling" = "xno"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
|
||||
$as_echo "no, forced" >&6; }
|
||||
ENABLE_LIBFFI_BUNDLING=false
|
||||
elif test "x$enable_libffi_bundling" = "xyes"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
|
||||
$as_echo "yes, forced" >&6; }
|
||||
ENABLE_LIBFFI_BUNDLING=true
|
||||
else
|
||||
as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
|
||||
fi
|
||||
|
||||
# Find the libffi.so.X to bundle
|
||||
if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
|
||||
$as_echo_n "checking for libffi lib file location... " >&6; }
|
||||
if test "x${LIBFFI_LIB_PATH}" != x; then
|
||||
if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
|
||||
LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
|
||||
else
|
||||
as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
# If we don't have an explicit path, look in a few obvious places
|
||||
if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
|
||||
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
|
||||
else
|
||||
as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
fi
|
||||
elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
|
||||
if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
|
||||
else
|
||||
as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
fi
|
||||
else
|
||||
# Fallback on the default /usr/lib dir
|
||||
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
else
|
||||
as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Make sure the wildcard is evaluated
|
||||
LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
|
||||
$as_echo "${LIBFFI_LIB_FILE}" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
|
||||
# Extract the first word of "llvm-config", so it can be a program name with args.
|
||||
set dummy llvm-config; ac_word=$2
|
||||
|
|
|
@ -35,6 +35,8 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
|||
[specify directory for the libffi include files])])
|
||||
AC_ARG_WITH(libffi-lib, [AS_HELP_STRING([--with-libffi-lib],
|
||||
[specify directory for the libffi library])])
|
||||
AC_ARG_ENABLE(libffi-bundling, [AS_HELP_STRING([--enable-libffi-bundling],
|
||||
[enable bundling of libffi.so to make the built JDK runnable on more systems])])
|
||||
|
||||
if test "x$NEEDS_LIB_FFI" = xfalse; then
|
||||
if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
|
||||
|
@ -52,6 +54,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
|||
fi
|
||||
|
||||
if test "x${with_libffi}" != x; then
|
||||
LIBFFI_LIB_PATH="${with_libffi}/lib"
|
||||
LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
|
||||
LIBFFI_CFLAGS="-I${with_libffi}/include"
|
||||
LIBFFI_FOUND=yes
|
||||
|
@ -61,6 +64,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
|||
LIBFFI_FOUND=yes
|
||||
fi
|
||||
if test "x${with_libffi_lib}" != x; then
|
||||
LIBFFI_LIB_PATH="${with_libffi_lib}"
|
||||
LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
|
||||
LIBFFI_FOUND=yes
|
||||
fi
|
||||
|
@ -109,8 +113,65 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
|||
HELP_MSG_MISSING_DEPENDENCY([ffi])
|
||||
AC_MSG_ERROR([Found libffi but could not link and compile with it. $HELP_MSG])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if libffi should be bundled])
|
||||
if test "x$enable_libffi_bundling" = "x"; then
|
||||
AC_MSG_RESULT([no])
|
||||
ENABLE_LIBFFI_BUNDLING=false
|
||||
elif test "x$enable_libffi_bundling" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
ENABLE_LIBFFI_BUNDLING=false
|
||||
elif test "x$enable_libffi_bundling" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
ENABLE_LIBFFI_BUNDLING=true
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-libffi-bundling])
|
||||
fi
|
||||
|
||||
# Find the libffi.so.X to bundle
|
||||
if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
|
||||
AC_MSG_CHECKING([for libffi lib file location])
|
||||
if test "x${LIBFFI_LIB_PATH}" != x; then
|
||||
if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
|
||||
LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
|
||||
else
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}])
|
||||
fi
|
||||
else
|
||||
# If we don't have an explicit path, look in a few obvious places
|
||||
if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
|
||||
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
|
||||
else
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
fi
|
||||
elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
|
||||
if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
|
||||
else
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
fi
|
||||
else
|
||||
# Fallback on the default /usr/lib dir
|
||||
if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
|
||||
else
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Make sure the wildcard is evaluated
|
||||
LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
|
||||
AC_MSG_RESULT([${LIBFFI_LIB_FILE}])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBFFI_CFLAGS)
|
||||
AC_SUBST(LIBFFI_LIBS)
|
||||
AC_SUBST(ENABLE_LIBFFI_BUNDLING)
|
||||
AC_SUBST(LIBFFI_LIB_FILE)
|
||||
])
|
||||
|
|
|
@ -319,6 +319,8 @@ ALSA_LIBS:=@ALSA_LIBS@
|
|||
ALSA_CFLAGS:=@ALSA_CFLAGS@
|
||||
LIBFFI_LIBS:=@LIBFFI_LIBS@
|
||||
LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
|
||||
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
|
||||
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
|
||||
|
||||
PACKAGE_PATH=@PACKAGE_PATH@
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue