common/autoconf/generated-configure.sh
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
*** old/common/autoconf/generated-configure.sh Fri Oct 28 00:28:17 2016
--- new/common/autoconf/generated-configure.sh Fri Oct 28 00:28:17 2016
*** 652,661 ****
--- 652,664 ----
MEMORY_SIZE
NUM_CORES
ENABLE_GENERATE_CLASSLIST
BUILD_FAILURE_HANDLER
ENABLE_INTREE_EC
+ NEEDS_LIB_JELFSHIM
+ ELF_LIBS
+ ELF_CFLAGS
STLPORT_LIB
LIBZIP_CAN_USE_MMAP
LIBDL
LIBM
USE_EXTERNAL_LCMS
*** 696,705 ****
--- 699,709 ----
JVM_FEATURES_zero
JVM_FEATURES_minimal
JVM_FEATURES_core
JVM_FEATURES_client
JVM_FEATURES_server
+ ENABLE_AOT
INCLUDE_DTRACE
GCOV_ENABLED
STRIP_POLICY
DEBUG_BINARIES
ZIP_EXTERNAL_DEBUG_SYMBOLS
*** 1193,1202 ****
--- 1197,1207 ----
with_native_debug_symbols
enable_debug_symbols
enable_zip_debug_info
enable_native_coverage
enable_dtrace
+ enable_aot
with_jvm_features
with_jvm_interpreter
enable_hotspot_gtest
with_stdc__lib
with_msvcr_dll
*** 1221,1230 ****
--- 1226,1238 ----
with_zlib
with_lcms
with_dxsdk
with_dxsdk_lib
with_dxsdk_include
+ with_libelf
+ with_libelf_include
+ with_libelf_lib
enable_jtreg_failure_handler
enable_generate_classlist
with_num_cores
with_memory_size
with_jobs
*** 1345,1354 ****
--- 1353,1364 ----
LIBFFI_LIBS
PNG_CFLAGS
PNG_LIBS
LCMS_CFLAGS
LCMS_LIBS
+ ELF_CFLAGS
+ ELF_LIBS
ICECC_CMD
ICECC_CREATE_ENV
ICECC_WRAPPER
CCACHE'
*** 1990,1999 ****
--- 2000,2013 ----
enable native compilation with code coverage
data[disabled]
--enable-dtrace[=yes/no/auto]
enable dtrace. Default is auto, where dtrace is
enabled if all dependencies are present.
+ --enable-aot[=yes/no/auto]
+ enable ahead of time compilation feature. Default is
+ auto, where aot is enabled if all dependencies are
+ present.
--disable-hotspot-gtest Disables building of the Hotspot unit tests
--disable-freetype-bundling
disable bundling of the freetype library with the
build result [enabled on Windows or when using
--with-freetype, disabled otherwise]
*** 2165,2174 ****
--- 2179,2193 ----
compatibility and is ignored
--with-dxsdk-lib Deprecated. Option is kept for backwards
compatibility and is ignored
--with-dxsdk-include Deprecated. Option is kept for backwards
compatibility and is ignored
+ --with-libelf specify prefix directory for the libelf package
+ (expecting the libraries under PATH/lib and the
+ headers under PATH/include)
+ --with-libelf-include specify directory for the libelf include files
+ --with-libelf-lib specify directory for the libelf library
--with-num-cores number of cores in the build system, e.g.
--with-num-cores=8 [probed]
--with-memory-size memory (in MB) available in the build system, e.g.
--with-memory-size=1024 [probed]
--with-jobs number of parallel jobs to let make run [calculated
*** 2294,2303 ****
--- 2313,2324 ----
LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
PNG_LIBS linker flags for PNG, overriding pkg-config
LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
LCMS_LIBS linker flags for LCMS, overriding pkg-config
+ ELF_CFLAGS C compiler flags for ELF, overriding pkg-config
+ ELF_LIBS linker flags for ELF, overriding pkg-config
ICECC_CMD Override default value for ICECC_CMD
ICECC_CREATE_ENV
Override default value for ICECC_CREATE_ENV
ICECC_WRAPPER
Override default value for ICECC_WRAPPER
*** 4181,4190 ****
--- 4202,4213 ----
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
dtrace)
PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
+ elf)
+ PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
esac
}
yum_help() {
case $1 in
*** 4200,4209 ****
--- 4223,4234 ----
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
+ elf)
+ PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
esac
}
port_help() {
PKGHANDLER_COMMAND=""
*** 4252,4262 ****
--- 4277,4287 ----
# questions.
#
# All valid JVM features, regardless of platform
VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
! fprof vm-structs jni-check services management all-gcs nmt cds static-build aot"
# All valid JVM variants
VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
###############################################################################
*** 4296,4305 ****
--- 4321,4335 ----
###############################################################################
# Check if dtrace should be enabled and has all prerequisites present.
#
+ ################################################################################
+ # Check if AOT should be enabled
+ #
+
+
###############################################################################
# Set up all JVM features for each JVM variant.
#
*** 4719,4728 ****
--- 4749,4788 ----
################################################################################
# Setup X11 Windows system
################################################################################
+ #
+ # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ #
+ # This code is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License version 2 only, as
+ # published by the Free Software Foundation. Oracle designates this
+ # particular file as subject to the "Classpath" exception as provided
+ # by Oracle in the LICENSE file that accompanied this code.
+ #
+ # This code is distributed in the hope that it will be useful, but WITHOUT
+ # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ # version 2 for more details (a copy is included in the LICENSE file that
+ # accompanied this code).
+ #
+ # You should have received a copy of the GNU General Public License version
+ # 2 along with this work; if not, write to the Free Software Foundation,
+ # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ #
+ # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ # or visit www.oracle.com if you need additional information or have any
+ # questions.
+ #
+
+ ################################################################################
+ # Setup libelf (ELF library)
+ ################################################################################
+
+
################################################################################
# Determine which libraries are needed for this configuration
################################################################################
*** 5091,5101 ****
--- 5151,5161 ----
# definitions. It is replaced with custom functionality when building
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
! DATE_WHEN_GENERATED=1476374246
! DATE_WHEN_GENERATED=1477629130
###############################################################################
#
# Initialization / Boot-strapping
#
*** 52808,52817 ****
--- 52868,52928 ----
as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
fi
+ # Check whether --enable-aot was given.
+ if test "${enable_aot+set}" = set; then :
+ enableval=$enable_aot;
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot src is present" >&5
+ $as_echo_n "checking if aot src is present... " >&6; }
+ if test -d "$HOTSPOT_TOPDIR/src/jdk.aot"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+
+ ENABLE_AOT_DEFAULT="false"
+ # Only enable AOT on linux-X64.
+ if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
+ ENABLE_AOT_DEFAULT="true"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
+ $as_echo_n "checking if aot should be enabled... " >&6; }
+ if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
+ if test "x$ENABLE_AOT_DEFAULT" = "xtrue"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ ENABLE_AOT="true"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ ENABLE_AOT="false"
+ fi
+ elif test "x$enable_aot" = "xyes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
+ $as_echo "yes, forced" >&6; }
+ ENABLE_AOT="true"
+ elif test "x$enable_aot" = "xno"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
+ $as_echo "no, forced" >&6; }
+ ENABLE_AOT="false"
+ else
+ as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
+ fi
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ ENABLE_AOT="false"
+ fi
+
+
+
+
# The user can in some cases supply additional jvm features. For the custom
# variant, this defines the entire variant.
# Check whether --with-jvm-features was given.
if test "${with_jvm_features+set}" = set; then :
*** 52883,52897 ****
--- 52994,53014 ----
JVM_FEATURES_jvmci="jvmci"
else
JVM_FEATURES_jvmci=""
fi
+ if test "x$ENABLE_AOT" = "xtrue"; then
+ JVM_FEATURES_aot="aot"
+ else
+ JVM_FEATURES_aot=""
+ fi
+
# All variants but minimal (and custom) get these features
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
# Enable features depending on variant.
! JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot"
JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
*** 53087,53096 ****
--- 53204,53220 ----
NEEDS_LIB_FFI=true
else
NEEDS_LIB_FFI=false
fi
+ # Check if elf is needed (only for AOT build)
+ if test "x$ENABLE_AOT" = "xtrue"; then
+ NEEDS_LIB_JELFSHIM=true
+ else
+ NEEDS_LIB_JELFSHIM=false
+ fi
+
# statically link libstdc++ before C++ ABI is stablized on Linux unless
# dynamic build is configured on command line.
# Check whether --with-stdc++lib was given.
*** 63812,63821 ****
--- 63936,64212 ----
fi
+ # Check whether --with-libelf was given.
+ if test "${with_libelf+set}" = set; then :
+ withval=$with_libelf;
+ fi
+
+
+ # Check whether --with-libelf-include was given.
+ if test "${with_libelf_include+set}" = set; then :
+ withval=$with_libelf_include;
+ fi
+
+
+ # Check whether --with-libelf-lib was given.
+ if test "${with_libelf_lib+set}" = set; then :
+ withval=$with_libelf_lib;
+ fi
+
+
+ if test "x$NEEDS_LIB_JELFSHIM" = xfalse; then
+ if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
+ (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
+ (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not used, so --with-libelf[-*] is ignored" >&5
+ $as_echo "$as_me: WARNING: libelf not used, so --with-libelf[-*] is ignored" >&2;}
+ fi
+ LIBELF_CFLAGS=
+ LIBELF_LIBS=
+ else
+ LIBELF_FOUND=no
+
+ if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libelf" >&5
+ $as_echo_n "checking for libelf... " >&6; }
+ as_fn_error $? "Explicitly disabled build with libelf, cannot build AOT. Enable libelf build or disable AOT build: --enable-aot=no." "$LINENO" 5
+ NEEDS_LIB_JELFSHIM="false"
+ else
+
+ if test "x${with_libelf}" != x; then
+ ELF_LIBS="-L${with_libelf}/lib -lelf"
+ ELF_CFLAGS="-I${with_libelf}/include"
+ LIBELF_FOUND=yes
+ fi
+ if test "x${with_libelf_include}" != x; then
+ ELF_CFLAGS="-I${with_libelf_include}"
+ LIBELF_FOUND=yes
+ fi
+ if test "x${with_libelf_lib}" != x; then
+ ELF_LIBS="-L${with_libelf_lib} -lelf"
+ LIBELF_FOUND=yes
+ fi
+ # Do not try pkg-config if we have a sysroot set.
+ if test "x$SYSROOT" = x; then
+ if test "x$LIBELF_FOUND" = xno; then
+ # Figure out ELF_CFLAGS and ELF_LIBS
+
+ pkg_failed=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
+ $as_echo_n "checking for ELF... " >&6; }
+
+ if test -n "$ELF_CFLAGS"; then
+ pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
+ else
+ pkg_failed=yes
+ fi
+ else
+ pkg_failed=untried
+ fi
+ if test -n "$ELF_LIBS"; then
+ pkg_cv_ELF_LIBS="$ELF_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
+ else
+ pkg_failed=yes
+ fi
+ else
+ pkg_failed=untried
+ fi
+
+
+
+ if test $pkg_failed = yes; then
+
+ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+ else
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+ ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
+ else
+ ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$ELF_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+ LIBELF_FOUND=no
+ elif test $pkg_failed = untried; then
+ LIBELF_FOUND=no
+ else
+ ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
+ ELF_LIBS=$pkg_cv_ELF_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
+ LIBELF_FOUND=yes
+ fi
+ fi
+ fi
+ if test "x$LIBELF_FOUND" = xno; then
+ for ac_header in libelf.h
+ do :
+ ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
+ if test "x$ac_cv_header_libelf_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBELF_H 1
+ _ACEOF
+
+ LIBELF_FOUND=yes
+ ELF_CFLAGS=
+ ELF_LIBS=-lelf
+
+ else
+ LIBELF_FOUND=no
+
+ fi
+
+ done
+
+ fi
+ if test "x$LIBELF_FOUND" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # elf is the help tag: freetype, cups, alsa etc
+ MISSING_DEPENDENCY=elf
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ as_fn_error $? "libelf not found, cannot build AOT. Disable AOT build: --enable-aot=no. $HELP_MSG" "$LINENO" 5
+ NEEDS_LIB_JELFSHIM="false"
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
+ $as_echo_n "checking if libelf works... " >&6; }
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $ELF_CFLAGS"
+ OLD_LIBS="$LIBS"
+ LIBS="$LIBS $ELF_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+ #include <libelf.h>
+ int
+ main ()
+ {
+
+ elf_version(0);
+ return 0;
+
+ ;
+ return 0;
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ LIBELF_WORKS=yes
+ else
+ LIBELF_WORKS=no
+
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$OLD_CFLAGS"
+ LIBS="$OLD_LIBS"
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
+ $as_echo "$LIBELF_WORKS" >&6; }
+
+ if test "x$LIBELF_WORKS" = xno; then
+
+ # Print a helpful message on how to acquire the necessary build dependency.
+ # elf is the help tag: freetype, cups, alsa etc
+ MISSING_DEPENDENCY=elf
+
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ cygwin_help $MISSING_DEPENDENCY
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+ msys_help $MISSING_DEPENDENCY
+ else
+ PKGHANDLER_COMMAND=
+
+ case $PKGHANDLER in
+ apt-get)
+ apt_help $MISSING_DEPENDENCY ;;
+ yum)
+ yum_help $MISSING_DEPENDENCY ;;
+ port)
+ port_help $MISSING_DEPENDENCY ;;
+ pkgutil)
+ pkgutil_help $MISSING_DEPENDENCY ;;
+ pkgadd)
+ pkgadd_help $MISSING_DEPENDENCY ;;
+ esac
+
+ if test "x$PKGHANDLER_COMMAND" != x; then
+ HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
+ fi
+ fi
+
+ as_fn_error $? "Found libelf but could not link and compile with it. Disable AOT build: --enable-aot=no. $HELP_MSG" "$LINENO" 5
+ fi
+ fi
+ fi
+ fi
+
+
+
+
+
+
+
+
common/autoconf/generated-configure.sh
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File