639 ICECC_CMD
640 ENABLE_JAVAC_SERVER
641 ENABLE_SJAVAC
642 SJAVAC_SERVER_JAVA_FLAGS
643 SJAVAC_SERVER_JAVA
644 JAVA_TOOL_FLAGS_SMALL
645 JAVA_FLAGS_SMALL
646 JAVA_FLAGS_JAVAC
647 BOOTCYCLE_JVM_ARGS_BIG
648 JAVA_FLAGS_BIG
649 JAVA_FLAGS
650 TEST_JOBS
651 JOBS
652 MEMORY_SIZE
653 NUM_CORES
654 ENABLE_GENERATE_CLASSLIST
655 BUILD_FAILURE_HANDLER
656 ENABLE_INTREE_EC
657 VALID_JVM_FEATURES
658 JVM_FEATURES_custom
659 JVM_FEATURES_zeroshark
660 JVM_FEATURES_zero
661 JVM_FEATURES_minimal
662 JVM_FEATURES_core
663 JVM_FEATURES_client
664 JVM_FEATURES_server
665 INCLUDE_GRAAL
666 STLPORT_LIB
667 LIBZIP_CAN_USE_MMAP
668 LIBDL
669 LIBM
670 USE_EXTERNAL_LCMS
671 LCMS_LIBS
672 LCMS_CFLAGS
673 USE_EXTERNAL_LIBZ
674 USE_EXTERNAL_LIBPNG
675 PNG_LIBS
676 PNG_CFLAGS
677 USE_EXTERNAL_LIBGIF
678 USE_EXTERNAL_LIBJPEG
679 LLVM_LIBS
680 LLVM_LDFLAGS
681 LLVM_CFLAGS
682 LLVM_CONFIG
683 LIBFFI_LIB_FILE
684 ENABLE_LIBFFI_BUNDLING
685 LIBFFI_LIBS
686 LIBFFI_CFLAGS
687 ALSA_LIBS
688 ALSA_CFLAGS
689 FREETYPE_LICENSE
690 FREETYPE_BUNDLE_LIB_PATH
691 FREETYPE_LIBS
692 FREETYPE_CFLAGS
693 CUPS_CFLAGS
694 X_EXTRA_LIBS
695 X_LIBS
696 X_PRE_LIBS
697 X_CFLAGS
698 XMKMF
699 MSVCP_DLL
700 MSVCR_DLL
701 LIBCXX
702 FIXPATH_DETACH_FLAG
2011 --disable-javac-server disable javac server [enabled]
2012 --enable-icecc enable distribted compilation of native code using
2013 icecc/icecream [disabled]
2014 --disable-precompiled-headers
2015 disable using precompiled headers when compiling C++
2016 [enabled]
2017 --enable-ccache enable using ccache to speed up recompilations
2018 [disabled]
2019
2020 Optional Packages:
2021 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2022 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2023 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
2024 support it), e.g. --with-target-bits=32 [guessed]
2025 --with-custom-make-dir Deprecated. Option is kept for backwards
2026 compatibility and is ignored
2027 --with-jdk-variant JDK variant to build (normal) [normal]
2028 --with-debug-level set the debug level (release, fastdebug, slowdebug,
2029 optimized) [release]
2030 --with-jvm-variants JVM variants (separated by commas) to build
2031 (server,client,minimal,core,zero,zeroshark,custom)
2032 [server]
2033 --with-cpu-port specify sources to use for Hotspot 64-bit ARM port
2034 (arm64,aarch64) [aarch64]
2035 --with-devkit use this devkit for compilers, tools and resources
2036 --with-sys-root alias for --with-sysroot for backwards compatability
2037 --with-sysroot use this directory as sysroot
2038 --with-tools-dir alias for --with-toolchain-path for backwards
2039 compatibility
2040 --with-toolchain-path prepend these directories when searching for
2041 toolchain binaries (compilers etc)
2042 --with-extra-path prepend these directories to the default path
2043 --with-sdk-name use the platform SDK of the given name. [macosx]
2044 --with-conf-name use this as the name of the configuration [generated
2045 from important configuration options]
2046 --with-output-base-dir override the default output base directory [./build]
2047 --with-output-sync set make output sync type if supported by make.
2048 [recurse]
2049 --with-default-make-target
2050 set the default make target [exploded-image]
2051 --with-cacerts-file specify alternative cacerts file
2052 --with-copyright-year Set copyright year value for build [current year]
4242 # published by the Free Software Foundation. Oracle designates this
4243 # particular file as subject to the "Classpath" exception as provided
4244 # by Oracle in the LICENSE file that accompanied this code.
4245 #
4246 # This code is distributed in the hope that it will be useful, but WITHOUT
4247 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4248 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4249 # version 2 for more details (a copy is included in the LICENSE file that
4250 # accompanied this code).
4251 #
4252 # You should have received a copy of the GNU General Public License version
4253 # 2 along with this work; if not, write to the Free Software Foundation,
4254 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4255 #
4256 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4257 # or visit www.oracle.com if you need additional information or have any
4258 # questions.
4259 #
4260
4261 # All valid JVM features, regardless of platform
4262 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4263 graal vm-structs jni-check services management all-gcs nmt cds \
4264 static-build link-time-opt aot"
4265
4266 # All valid JVM variants
4267 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4268
4269 ###############################################################################
4270 # Check if the specified JVM variant should be built. To be used in shell if
4271 # constructs, like this:
4272 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4273 #
4274 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4275
4276 # Definition kept in one line to allow inlining in if statements.
4277 # Additional [] needed to keep m4 from mangling shell constructs.
4278
4279
4280 ###############################################################################
4281 # Check if the specified JVM features are explicitly enabled. To be used in
4282 # shell if constructs, like this:
4283 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4284 #
4285 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4286
4287 # Definition kept in one line to allow inlining in if statements.
4288 # Additional [] needed to keep m4 from mangling shell constructs.
4289
4290
4291 ###############################################################################
4292 # Check which variants of the JVM that we want to build. Available variants are:
4293 # server: normal interpreter, and a tiered C1/C2 compiler
4294 # client: normal interpreter, and C1 (no C2 compiler)
4295 # minimal: reduced form of client with optional features stripped out
4296 # core: normal interpreter only, no compiler
4297 # zero: C++ based interpreter only, no compiler
4298 # zeroshark: C++ based interpreter, and a llvm-based compiler
4299 # custom: baseline JVM with no default features
4300 #
4301
4302
4303 ###############################################################################
4304 # Check if dtrace should be enabled and has all prerequisites present.
4305 #
4306
4307
4308 ################################################################################
4309 # Check if AOT should be enabled
4310 #
4311
4312
4313 ################################################################################
4314 # Allow to disable CDS
4315 #
4316
4317
4318 ###############################################################################
4743 # questions.
4744 #
4745
4746 ################################################################################
4747 # Setup X11 Windows system
4748 ################################################################################
4749
4750
4751
4752 ################################################################################
4753 # Determine which libraries are needed for this configuration
4754 ################################################################################
4755
4756
4757 ################################################################################
4758 # Parse library options, and setup needed libraries
4759 ################################################################################
4760
4761
4762 ################################################################################
4763 # Setup llvm (Low-Level VM)
4764 ################################################################################
4765
4766
4767 ################################################################################
4768 # Setup various libraries, typically small system libraries
4769 ################################################################################
4770
4771
4772 ################################################################################
4773 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4774 # redistribute it in the test image.
4775 ################################################################################
4776
4777
4778
4779 #
4780 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4781 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4782 #
4783 # This code is free software; you can redistribute it and/or modify it
4784 # under the terms of the GNU General Public License version 2 only, as
4785 # published by the Free Software Foundation. Oracle designates this
4786 # particular file as subject to the "Classpath" exception as provided
4787 # by Oracle in the LICENSE file that accompanied this code.
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114 # This line needs to be here, verbatim, after all includes and the dummy hook
5115 # definitions. It is replaced with custom functionality when building
5116 # custom sources.
5117 #CUSTOM_AUTOCONF_INCLUDE
5118
5119 # Do not change or remove the following line, it is needed for consistency checks:
5120 DATE_WHEN_GENERATED=1507635096
5121
5122 ###############################################################################
5123 #
5124 # Initialization / Boot-strapping
5125 #
5126 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5127 # thus it jumps back and forth, each time gaining something needed later on.
5128 #
5129 ###############################################################################
5130
5131 # If we are requested to print additional help, do that and then exit.
5132 # This must be the very first call.
5133
5134 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5135
5136 # Print available toolchains
5137 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5138 $PRINTF "Which are valid to use depends on the build platform.\n"
5139 for toolchain in $VALID_TOOLCHAINS_all; do
5140 # Use indirect variable referencing
17059 fi
17060
17061 # The "main" variant is the one used by other libs to link against during the
17062 # build.
17063 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17064 MAIN_VARIANT_PRIO_ORDER="server client minimal"
17065 for variant in $MAIN_VARIANT_PRIO_ORDER; do
17066 if [[ " $JVM_VARIANTS " =~ " $variant " ]] ; then
17067 JVM_VARIANT_MAIN="$variant"
17068 break
17069 fi
17070 done
17071 else
17072 JVM_VARIANT_MAIN="$JVM_VARIANTS"
17073 fi
17074
17075
17076
17077
17078
17079 if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
17080 # zero behaves as a platform and rewrites these values. This is really weird. :(
17081 # We are guaranteed that we do not build any other variants when building zero.
17082 HOTSPOT_TARGET_CPU=zero
17083 HOTSPOT_TARGET_CPU_ARCH=zero
17084 fi
17085
17086
17087 # With basic setup done, call the custom early hook.
17088
17089
17090 # Check if we have devkits, extra paths or sysroot set.
17091
17092
17093 # Check whether --with-devkit was given.
17094 if test "${with_devkit+set}" = set; then :
17095 withval=$with_devkit;
17096
17097 # Only process if variable expands to non-empty
17098
17099 if test "x$with_devkit" != x; then
25099 fi
25100
25101
25102 # Enable or disable unlimited crypto
25103 # Check whether --enable-unlimited-crypto was given.
25104 if test "${enable_unlimited_crypto+set}" = set; then :
25105 enableval=$enable_unlimited_crypto;
25106 else
25107 enable_unlimited_crypto=yes
25108 fi
25109
25110 if test "x$enable_unlimited_crypto" = "xyes"; then
25111 UNLIMITED_CRYPTO=true
25112 else
25113 UNLIMITED_CRYPTO=false
25114 fi
25115
25116
25117 # Should we build the serviceability agent (SA)?
25118 INCLUDE_SA=true
25119 if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
25120 INCLUDE_SA=false
25121 fi
25122 if test "x$OPENJDK_TARGET_OS" = xaix ; then
25123 INCLUDE_SA=false
25124 fi
25125
25126
25127 # Compress jars
25128 COMPRESS_JARS=false
25129
25130
25131
25132 # Setup default copyright year. Mostly overridden when building close to a new year.
25133
25134 # Check whether --with-copyright-year was given.
25135 if test "${with_copyright_year+set}" = set; then :
25136 withval=$with_copyright_year;
25137 fi
25138
25139 if test "x$with_copyright_year" = xyes; then
51830
51831 else
51832 :
51833
51834 fi
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849 fi
51850 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
51851 # Non-zero builds have stricter warnings
51852 JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51853 else
51854 if test "x$TOOLCHAIN_TYPE" = xclang; then
51855 # Some versions of llvm do not like -Wundef
51856 JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51857 fi
51858 fi
51859 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51860 JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51861 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51862 fi
51863
51864 # Additional macosx handling
51865 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51866 # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51867 # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51868 # JDK can be built and makes the linked binaries compatible even if built on
51869 # a newer version of the OS.
51870 MACOSX_VERSION_MIN=10.7.0
52711
52712 else
52713 :
52714
52715 fi
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730 fi
52731 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
52732 # Non-zero builds have stricter warnings
52733 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52734 else
52735 if test "x$TOOLCHAIN_TYPE" = xclang; then
52736 # Some versions of llvm do not like -Wundef
52737 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52738 fi
52739 fi
52740 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52741 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52742 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52743 fi
52744
52745 # Additional macosx handling
52746 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52747 # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52748 # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52749 # JDK can be built and makes the linked binaries compatible even if built on
52750 # a newer version of the OS.
52751 MACOSX_VERSION_MIN=10.7.0
54419 if test "x$OPENJDK_TARGET_OS" = xwindows; then
54420 # Windows have a separate print system
54421 NEEDS_LIB_CUPS=false
54422 else
54423 NEEDS_LIB_CUPS=true
54424 fi
54425
54426 # A custom hook may have set this already
54427 if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54428 NEEDS_LIB_FREETYPE=true
54429 fi
54430
54431 # Check if alsa is needed
54432 if test "x$OPENJDK_TARGET_OS" = xlinux; then
54433 NEEDS_LIB_ALSA=true
54434 else
54435 NEEDS_LIB_ALSA=false
54436 fi
54437
54438 # Check if ffi is needed
54439 if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
54440 NEEDS_LIB_FFI=true
54441 else
54442 NEEDS_LIB_FFI=false
54443 fi
54444
54445
54446 # statically link libstdc++ before C++ ABI is stablized on Linux unless
54447 # dynamic build is configured on command line.
54448
54449 # Check whether --with-stdc++lib was given.
54450 if test "${with_stdc__lib+set}" = set; then :
54451 withval=$with_stdc__lib;
54452 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54453 && test "x$with_stdc__lib" != xdefault; then
54454 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54455 fi
54456
54457 else
54458 with_stdc__lib=default
54459
54492 rm -f core conftest.err conftest.$ac_objext \
54493 conftest$ac_exeext conftest.$ac_ext
54494 LIBS="$OLD_LIBS"
54495 ac_ext=cpp
54496 ac_cpp='$CXXCPP $CPPFLAGS'
54497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54498 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54500
54501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54502 $as_echo "$has_static_libstdcxx" >&6; }
54503
54504 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54505 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54506 fi
54507
54508 # If dynamic was requested, it's available since it would fail above otherwise.
54509 # If dynamic wasn't requested, go with static unless it isn't available.
54510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54511 $as_echo_n "checking how to link with libstdc++... " >&6; }
54512 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54513 || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
54514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54515 $as_echo "dynamic" >&6; }
54516 else
54517 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54518 JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54519 # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54520 # just use the same setting as for the TARGET toolchain.
54521 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54523 $as_echo "static" >&6; }
54524 fi
54525 fi
54526
54527 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54528 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54529 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54530 fi
54531
54532
54533
64865 if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64866 LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64867 else
64868 as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64869 fi
64870 fi
64871 fi
64872 # Make sure the wildcard is evaluated
64873 LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64875 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
64876 fi
64877 fi
64878
64879
64880
64881
64882
64883
64884
64885 if [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
64886 # Extract the first word of "llvm-config", so it can be a program name with args.
64887 set dummy llvm-config; ac_word=$2
64888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64889 $as_echo_n "checking for $ac_word... " >&6; }
64890 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64891 $as_echo_n "(cached) " >&6
64892 else
64893 if test -n "$LLVM_CONFIG"; then
64894 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64895 else
64896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64897 for as_dir in $PATH
64898 do
64899 IFS=$as_save_IFS
64900 test -z "$as_dir" && as_dir=.
64901 for ac_exec_ext in '' $ac_executable_extensions; do
64902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64903 ac_cv_prog_LLVM_CONFIG="llvm-config"
64904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64905 break 2
64906 fi
64907 done
64908 done
64909 IFS=$as_save_IFS
64910
64911 fi
64912 fi
64913 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64914 if test -n "$LLVM_CONFIG"; then
64915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64916 $as_echo "$LLVM_CONFIG" >&6; }
64917 else
64918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64919 $as_echo "no" >&6; }
64920 fi
64921
64922
64923
64924 if test "x$LLVM_CONFIG" != xllvm-config; then
64925 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64926 fi
64927
64928 llvm_components="jit mcjit engine nativecodegen native"
64929 unset LLVM_CFLAGS
64930 for flag in $("$LLVM_CONFIG" --cxxflags); do
64931 if echo "${flag}" | grep -q '^-[ID]'; then
64932 if test "${flag}" != "-D_DEBUG" ; then
64933 if test "${LLVM_CFLAGS}" != "" ; then
64934 LLVM_CFLAGS="${LLVM_CFLAGS} "
64935 fi
64936 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64937 fi
64938 fi
64939 done
64940 llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64941 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64942
64943 unset LLVM_LDFLAGS
64944 for flag in $("${LLVM_CONFIG}" --ldflags); do
64945 if echo "${flag}" | grep -q '^-L'; then
64946 if test "${LLVM_LDFLAGS}" != ""; then
64947 LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64948 fi
64949 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64950 fi
64951 done
64952
64953 unset LLVM_LIBS
64954 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64955 if echo "${flag}" | grep -q '^-l'; then
64956 if test "${LLVM_LIBS}" != ""; then
64957 LLVM_LIBS="${LLVM_LIBS} "
64958 fi
64959 LLVM_LIBS="${LLVM_LIBS}${flag}"
64960 fi
64961 done
64962
64963 # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64964 # always properly detect -ltinfo
64965 LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64966
64967
64968
64969
64970 fi
64971
64972
64973
64974 # Check whether --with-libjpeg was given.
64975 if test "${with_libjpeg+set}" = set; then :
64976 withval=$with_libjpeg;
64977 fi
64978
64979
64980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64981 $as_echo_n "checking for which libjpeg to use... " >&6; }
64982 # default is bundled
64983 DEFAULT_LIBJPEG=bundled
64984 # if user didn't specify, use DEFAULT_LIBJPEG
64985 if test "x${with_libjpeg}" = "x"; then
64986 with_libjpeg=${DEFAULT_LIBJPEG}
64987 fi
64988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64989 $as_echo "${with_libjpeg}" >&6; }
64990
64991 if test "x${with_libjpeg}" = "xbundled"; then
64992 USE_EXTERNAL_LIBJPEG=false
65748 else
65749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65750 $as_echo "no, not found at $STLPORT_LIB" >&6; }
65751 as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65752 fi
65753
65754 fi
65755
65756
65757
65758
65759
65760
65761
65762
65763
65764
65765
65766
65767
65768
65769 # Hotspot setup depends on lib checks.
65770
65771
65772 # The user can in some cases supply additional jvm features. For the custom
65773 # variant, this defines the entire variant.
65774
65775 # Check whether --with-jvm-features was given.
65776 if test "${with_jvm_features+set}" = set; then :
65777 withval=$with_jvm_features;
65778 fi
65779
65780 if test "x$with_jvm_features" != x; then
65781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65782 $as_echo_n "checking additional JVM features... " >&6; }
65783 JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65785 $as_echo "$JVM_FEATURES" >&6; }
65786 fi
65787
65788 # Override hotspot cpu definitions for ARM platforms
65819 as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65820 fi
65821
65822 # Turn on additional features based on other parts of configure
65823 if test "x$INCLUDE_DTRACE" = "xtrue"; then
65824 JVM_FEATURES="$JVM_FEATURES dtrace"
65825 else
65826 if [[ " $JVM_FEATURES " =~ " dtrace " ]] ; then
65827 as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65828 fi
65829 fi
65830
65831 if test "x$STATIC_BUILD" = "xtrue"; then
65832 JVM_FEATURES="$JVM_FEATURES static-build"
65833 else
65834 if [[ " $JVM_FEATURES " =~ " static-build " ]] ; then
65835 as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65836 fi
65837 fi
65838
65839 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
65840 if [[ " $JVM_FEATURES " =~ " zero " ]] ; then
65841 as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65842 fi
65843 fi
65844
65845 if ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
65846 if [[ " $JVM_FEATURES " =~ " shark " ]] ; then
65847 as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65848 fi
65849 fi
65850
65851 # Only enable jvmci on x86_64, sparcv9 and aarch64.
65852 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65853 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65854 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65855 JVM_FEATURES_jvmci="jvmci"
65856 else
65857 JVM_FEATURES_jvmci=""
65858 fi
65859
65860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65861 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65862 if [[ " $JVM_FEATURES " =~ " graal " ]] ; then
65863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65864 $as_echo "yes, forced" >&6; }
65865 if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65866 as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65867 fi
65868 INCLUDE_GRAAL="true"
65869 else
65870 # By default enable graal build on linux-x64 or where AOT is available.
65911
65912 if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65913 # Default to use link time optimizations on minimal on arm
65914 JVM_FEATURES_link_time_opt="link-time-opt"
65915 else
65916 JVM_FEATURES_link_time_opt=""
65917 fi
65918
65919 # All variants but minimal (and custom) get these features
65920 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
65921 if test "x$ENABLE_CDS" = "xtrue"; then
65922 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65923 fi
65924
65925 # Enable features depending on variant.
65926 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65927 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65928 JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65929 JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65930 JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65931 JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65932 JVM_FEATURES_custom="$JVM_FEATURES"
65933
65934
65935
65936
65937
65938
65939
65940
65941
65942 # Used for verification of Makefiles by check-jvm-feature
65943
65944
65945 # We don't support --with-jvm-interpreter anymore, use zero instead.
65946
65947
65948 # Check whether --with-jvm-interpreter was given.
65949 if test "${with_jvm_interpreter+set}" = set; then :
65950 withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65951 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65952 fi
65953
65954
65955
65956
65957 ###############################################################################
65958 #
65959 # We need to do some final tweaking, when everything else is done.
65960 #
65961 ###############################################################################
67791 # Before generating output files, test if they exist. If they do, this is a reconfigure.
67792 # Since we can't properly handle the dependencies for this, warn the user about the situation
67793 if test -e $OUTPUTDIR/spec.gmk; then
67794 IS_RECONFIGURE=yes
67795 else
67796 IS_RECONFIGURE=no
67797 fi
67798
67799
67800 # At the end, call the custom hook. (Dummy macro if no custom sources available)
67801
67802
67803 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67804
67805 # Keep feature lists sorted and free of duplicates
67806 JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67807 JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67808 JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67809 JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67810 JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67811 JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67812 JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67813
67814 # Validate features
67815 for variant in $JVM_VARIANTS; do
67816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67817 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67818 features_var_name=JVM_FEATURES_$variant
67819 JVM_FEATURES_TO_TEST=${!features_var_name}
67820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67821 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67822 NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67823 STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67824 INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67825 if test "x$INVALID_FEATURES" != x; then
67826 as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67827 fi
67828 done
67829
67830
67831 # We're messing a bit with internal autoconf variables to put the config.status
|
639 ICECC_CMD
640 ENABLE_JAVAC_SERVER
641 ENABLE_SJAVAC
642 SJAVAC_SERVER_JAVA_FLAGS
643 SJAVAC_SERVER_JAVA
644 JAVA_TOOL_FLAGS_SMALL
645 JAVA_FLAGS_SMALL
646 JAVA_FLAGS_JAVAC
647 BOOTCYCLE_JVM_ARGS_BIG
648 JAVA_FLAGS_BIG
649 JAVA_FLAGS
650 TEST_JOBS
651 JOBS
652 MEMORY_SIZE
653 NUM_CORES
654 ENABLE_GENERATE_CLASSLIST
655 BUILD_FAILURE_HANDLER
656 ENABLE_INTREE_EC
657 VALID_JVM_FEATURES
658 JVM_FEATURES_custom
659 JVM_FEATURES_zero
660 JVM_FEATURES_minimal
661 JVM_FEATURES_core
662 JVM_FEATURES_client
663 JVM_FEATURES_server
664 INCLUDE_GRAAL
665 STLPORT_LIB
666 LIBZIP_CAN_USE_MMAP
667 LIBDL
668 LIBM
669 USE_EXTERNAL_LCMS
670 LCMS_LIBS
671 LCMS_CFLAGS
672 USE_EXTERNAL_LIBZ
673 USE_EXTERNAL_LIBPNG
674 PNG_LIBS
675 PNG_CFLAGS
676 USE_EXTERNAL_LIBGIF
677 USE_EXTERNAL_LIBJPEG
678 LIBFFI_LIB_FILE
679 ENABLE_LIBFFI_BUNDLING
680 LIBFFI_LIBS
681 LIBFFI_CFLAGS
682 ALSA_LIBS
683 ALSA_CFLAGS
684 FREETYPE_LICENSE
685 FREETYPE_BUNDLE_LIB_PATH
686 FREETYPE_LIBS
687 FREETYPE_CFLAGS
688 CUPS_CFLAGS
689 X_EXTRA_LIBS
690 X_LIBS
691 X_PRE_LIBS
692 X_CFLAGS
693 XMKMF
694 MSVCP_DLL
695 MSVCR_DLL
696 LIBCXX
697 FIXPATH_DETACH_FLAG
2006 --disable-javac-server disable javac server [enabled]
2007 --enable-icecc enable distribted compilation of native code using
2008 icecc/icecream [disabled]
2009 --disable-precompiled-headers
2010 disable using precompiled headers when compiling C++
2011 [enabled]
2012 --enable-ccache enable using ccache to speed up recompilations
2013 [disabled]
2014
2015 Optional Packages:
2016 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2017 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2018 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
2019 support it), e.g. --with-target-bits=32 [guessed]
2020 --with-custom-make-dir Deprecated. Option is kept for backwards
2021 compatibility and is ignored
2022 --with-jdk-variant JDK variant to build (normal) [normal]
2023 --with-debug-level set the debug level (release, fastdebug, slowdebug,
2024 optimized) [release]
2025 --with-jvm-variants JVM variants (separated by commas) to build
2026 (server,client,minimal,core,zero,custom) [server]
2027 --with-cpu-port specify sources to use for Hotspot 64-bit ARM port
2028 (arm64,aarch64) [aarch64]
2029 --with-devkit use this devkit for compilers, tools and resources
2030 --with-sys-root alias for --with-sysroot for backwards compatability
2031 --with-sysroot use this directory as sysroot
2032 --with-tools-dir alias for --with-toolchain-path for backwards
2033 compatibility
2034 --with-toolchain-path prepend these directories when searching for
2035 toolchain binaries (compilers etc)
2036 --with-extra-path prepend these directories to the default path
2037 --with-sdk-name use the platform SDK of the given name. [macosx]
2038 --with-conf-name use this as the name of the configuration [generated
2039 from important configuration options]
2040 --with-output-base-dir override the default output base directory [./build]
2041 --with-output-sync set make output sync type if supported by make.
2042 [recurse]
2043 --with-default-make-target
2044 set the default make target [exploded-image]
2045 --with-cacerts-file specify alternative cacerts file
2046 --with-copyright-year Set copyright year value for build [current year]
4236 # published by the Free Software Foundation. Oracle designates this
4237 # particular file as subject to the "Classpath" exception as provided
4238 # by Oracle in the LICENSE file that accompanied this code.
4239 #
4240 # This code is distributed in the hope that it will be useful, but WITHOUT
4241 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4243 # version 2 for more details (a copy is included in the LICENSE file that
4244 # accompanied this code).
4245 #
4246 # You should have received a copy of the GNU General Public License version
4247 # 2 along with this work; if not, write to the Free Software Foundation,
4248 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249 #
4250 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251 # or visit www.oracle.com if you need additional information or have any
4252 # questions.
4253 #
4254
4255 # All valid JVM features, regardless of platform
4256 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
4257 graal vm-structs jni-check services management all-gcs nmt cds \
4258 static-build link-time-opt aot"
4259
4260 # All valid JVM variants
4261 VALID_JVM_VARIANTS="server client minimal core zero custom"
4262
4263 ###############################################################################
4264 # Check if the specified JVM variant should be built. To be used in shell if
4265 # constructs, like this:
4266 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4267 #
4268 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4269
4270 # Definition kept in one line to allow inlining in if statements.
4271 # Additional [] needed to keep m4 from mangling shell constructs.
4272
4273
4274 ###############################################################################
4275 # Check if the specified JVM features are explicitly enabled. To be used in
4276 # shell if constructs, like this:
4277 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4278 #
4279 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4280
4281 # Definition kept in one line to allow inlining in if statements.
4282 # Additional [] needed to keep m4 from mangling shell constructs.
4283
4284
4285 ###############################################################################
4286 # Check which variants of the JVM that we want to build. Available variants are:
4287 # server: normal interpreter, and a tiered C1/C2 compiler
4288 # client: normal interpreter, and C1 (no C2 compiler)
4289 # minimal: reduced form of client with optional features stripped out
4290 # core: normal interpreter only, no compiler
4291 # zero: C++ based interpreter only, no compiler
4292 # custom: baseline JVM with no default features
4293 #
4294
4295
4296 ###############################################################################
4297 # Check if dtrace should be enabled and has all prerequisites present.
4298 #
4299
4300
4301 ################################################################################
4302 # Check if AOT should be enabled
4303 #
4304
4305
4306 ################################################################################
4307 # Allow to disable CDS
4308 #
4309
4310
4311 ###############################################################################
4736 # questions.
4737 #
4738
4739 ################################################################################
4740 # Setup X11 Windows system
4741 ################################################################################
4742
4743
4744
4745 ################################################################################
4746 # Determine which libraries are needed for this configuration
4747 ################################################################################
4748
4749
4750 ################################################################################
4751 # Parse library options, and setup needed libraries
4752 ################################################################################
4753
4754
4755 ################################################################################
4756 # Setup various libraries, typically small system libraries
4757 ################################################################################
4758
4759
4760 ################################################################################
4761 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4762 # redistribute it in the test image.
4763 ################################################################################
4764
4765
4766
4767 #
4768 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4769 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4770 #
4771 # This code is free software; you can redistribute it and/or modify it
4772 # under the terms of the GNU General Public License version 2 only, as
4773 # published by the Free Software Foundation. Oracle designates this
4774 # particular file as subject to the "Classpath" exception as provided
4775 # by Oracle in the LICENSE file that accompanied this code.
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102 # This line needs to be here, verbatim, after all includes and the dummy hook
5103 # definitions. It is replaced with custom functionality when building
5104 # custom sources.
5105 #CUSTOM_AUTOCONF_INCLUDE
5106
5107 # Do not change or remove the following line, it is needed for consistency checks:
5108 DATE_WHEN_GENERATED=1507993389
5109
5110 ###############################################################################
5111 #
5112 # Initialization / Boot-strapping
5113 #
5114 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5115 # thus it jumps back and forth, each time gaining something needed later on.
5116 #
5117 ###############################################################################
5118
5119 # If we are requested to print additional help, do that and then exit.
5120 # This must be the very first call.
5121
5122 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5123
5124 # Print available toolchains
5125 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5126 $PRINTF "Which are valid to use depends on the build platform.\n"
5127 for toolchain in $VALID_TOOLCHAINS_all; do
5128 # Use indirect variable referencing
17047 fi
17048
17049 # The "main" variant is the one used by other libs to link against during the
17050 # build.
17051 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17052 MAIN_VARIANT_PRIO_ORDER="server client minimal"
17053 for variant in $MAIN_VARIANT_PRIO_ORDER; do
17054 if [[ " $JVM_VARIANTS " =~ " $variant " ]] ; then
17055 JVM_VARIANT_MAIN="$variant"
17056 break
17057 fi
17058 done
17059 else
17060 JVM_VARIANT_MAIN="$JVM_VARIANTS"
17061 fi
17062
17063
17064
17065
17066
17067 if [[ " $JVM_VARIANTS " =~ " zero " ]] ; then
17068 # zero behaves as a platform and rewrites these values. This is really weird. :(
17069 # We are guaranteed that we do not build any other variants when building zero.
17070 HOTSPOT_TARGET_CPU=zero
17071 HOTSPOT_TARGET_CPU_ARCH=zero
17072 fi
17073
17074
17075 # With basic setup done, call the custom early hook.
17076
17077
17078 # Check if we have devkits, extra paths or sysroot set.
17079
17080
17081 # Check whether --with-devkit was given.
17082 if test "${with_devkit+set}" = set; then :
17083 withval=$with_devkit;
17084
17085 # Only process if variable expands to non-empty
17086
17087 if test "x$with_devkit" != x; then
25087 fi
25088
25089
25090 # Enable or disable unlimited crypto
25091 # Check whether --enable-unlimited-crypto was given.
25092 if test "${enable_unlimited_crypto+set}" = set; then :
25093 enableval=$enable_unlimited_crypto;
25094 else
25095 enable_unlimited_crypto=yes
25096 fi
25097
25098 if test "x$enable_unlimited_crypto" = "xyes"; then
25099 UNLIMITED_CRYPTO=true
25100 else
25101 UNLIMITED_CRYPTO=false
25102 fi
25103
25104
25105 # Should we build the serviceability agent (SA)?
25106 INCLUDE_SA=true
25107 if [[ " $JVM_VARIANTS " =~ " zero " ]] ; then
25108 INCLUDE_SA=false
25109 fi
25110 if test "x$OPENJDK_TARGET_OS" = xaix ; then
25111 INCLUDE_SA=false
25112 fi
25113
25114
25115 # Compress jars
25116 COMPRESS_JARS=false
25117
25118
25119
25120 # Setup default copyright year. Mostly overridden when building close to a new year.
25121
25122 # Check whether --with-copyright-year was given.
25123 if test "${with_copyright_year+set}" = set; then :
25124 withval=$with_copyright_year;
25125 fi
25126
25127 if test "x$with_copyright_year" = xyes; then
51818
51819 else
51820 :
51821
51822 fi
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837 fi
51838 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] ; then
51839 # Non-zero builds have stricter warnings
51840 JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51841 else
51842 if test "x$TOOLCHAIN_TYPE" = xclang; then
51843 # Some versions of llvm do not like -Wundef
51844 JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51845 fi
51846 fi
51847 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51848 JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51849 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51850 fi
51851
51852 # Additional macosx handling
51853 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51854 # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51855 # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51856 # JDK can be built and makes the linked binaries compatible even if built on
51857 # a newer version of the OS.
51858 MACOSX_VERSION_MIN=10.7.0
52699
52700 else
52701 :
52702
52703 fi
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718 fi
52719 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] ; then
52720 # Non-zero builds have stricter warnings
52721 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52722 else
52723 if test "x$TOOLCHAIN_TYPE" = xclang; then
52724 # Some versions of llvm do not like -Wundef
52725 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52726 fi
52727 fi
52728 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52729 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52730 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52731 fi
52732
52733 # Additional macosx handling
52734 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52735 # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52736 # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52737 # JDK can be built and makes the linked binaries compatible even if built on
52738 # a newer version of the OS.
52739 MACOSX_VERSION_MIN=10.7.0
54407 if test "x$OPENJDK_TARGET_OS" = xwindows; then
54408 # Windows have a separate print system
54409 NEEDS_LIB_CUPS=false
54410 else
54411 NEEDS_LIB_CUPS=true
54412 fi
54413
54414 # A custom hook may have set this already
54415 if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54416 NEEDS_LIB_FREETYPE=true
54417 fi
54418
54419 # Check if alsa is needed
54420 if test "x$OPENJDK_TARGET_OS" = xlinux; then
54421 NEEDS_LIB_ALSA=true
54422 else
54423 NEEDS_LIB_ALSA=false
54424 fi
54425
54426 # Check if ffi is needed
54427 if [[ " $JVM_VARIANTS " =~ " zero " ]] ; then
54428 NEEDS_LIB_FFI=true
54429 else
54430 NEEDS_LIB_FFI=false
54431 fi
54432
54433
54434 # statically link libstdc++ before C++ ABI is stablized on Linux unless
54435 # dynamic build is configured on command line.
54436
54437 # Check whether --with-stdc++lib was given.
54438 if test "${with_stdc__lib+set}" = set; then :
54439 withval=$with_stdc__lib;
54440 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54441 && test "x$with_stdc__lib" != xdefault; then
54442 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54443 fi
54444
54445 else
54446 with_stdc__lib=default
54447
54480 rm -f core conftest.err conftest.$ac_objext \
54481 conftest$ac_exeext conftest.$ac_ext
54482 LIBS="$OLD_LIBS"
54483 ac_ext=cpp
54484 ac_cpp='$CXXCPP $CPPFLAGS'
54485 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54486 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54487 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54488
54489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54490 $as_echo "$has_static_libstdcxx" >&6; }
54491
54492 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54493 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54494 fi
54495
54496 # If dynamic was requested, it's available since it would fail above otherwise.
54497 # If dynamic wasn't requested, go with static unless it isn't available.
54498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54499 $as_echo_n "checking how to link with libstdc++... " >&6; }
54500 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ; then
54501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54502 $as_echo "dynamic" >&6; }
54503 else
54504 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54505 JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54506 # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54507 # just use the same setting as for the TARGET toolchain.
54508 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54510 $as_echo "static" >&6; }
54511 fi
54512 fi
54513
54514 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54515 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54516 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54517 fi
54518
54519
54520
64852 if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64853 LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64854 else
64855 as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64856 fi
64857 fi
64858 fi
64859 # Make sure the wildcard is evaluated
64860 LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64862 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
64863 fi
64864 fi
64865
64866
64867
64868
64869
64870
64871
64872
64873 # Check whether --with-libjpeg was given.
64874 if test "${with_libjpeg+set}" = set; then :
64875 withval=$with_libjpeg;
64876 fi
64877
64878
64879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64880 $as_echo_n "checking for which libjpeg to use... " >&6; }
64881 # default is bundled
64882 DEFAULT_LIBJPEG=bundled
64883 # if user didn't specify, use DEFAULT_LIBJPEG
64884 if test "x${with_libjpeg}" = "x"; then
64885 with_libjpeg=${DEFAULT_LIBJPEG}
64886 fi
64887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64888 $as_echo "${with_libjpeg}" >&6; }
64889
64890 if test "x${with_libjpeg}" = "xbundled"; then
64891 USE_EXTERNAL_LIBJPEG=false
65647 else
65648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65649 $as_echo "no, not found at $STLPORT_LIB" >&6; }
65650 as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65651 fi
65652
65653 fi
65654
65655
65656
65657
65658
65659
65660
65661
65662
65663
65664
65665
65666
65667 # Hotspot setup depends on lib checks.
65668
65669
65670 # The user can in some cases supply additional jvm features. For the custom
65671 # variant, this defines the entire variant.
65672
65673 # Check whether --with-jvm-features was given.
65674 if test "${with_jvm_features+set}" = set; then :
65675 withval=$with_jvm_features;
65676 fi
65677
65678 if test "x$with_jvm_features" != x; then
65679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65680 $as_echo_n "checking additional JVM features... " >&6; }
65681 JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65683 $as_echo "$JVM_FEATURES" >&6; }
65684 fi
65685
65686 # Override hotspot cpu definitions for ARM platforms
65717 as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65718 fi
65719
65720 # Turn on additional features based on other parts of configure
65721 if test "x$INCLUDE_DTRACE" = "xtrue"; then
65722 JVM_FEATURES="$JVM_FEATURES dtrace"
65723 else
65724 if [[ " $JVM_FEATURES " =~ " dtrace " ]] ; then
65725 as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65726 fi
65727 fi
65728
65729 if test "x$STATIC_BUILD" = "xtrue"; then
65730 JVM_FEATURES="$JVM_FEATURES static-build"
65731 else
65732 if [[ " $JVM_FEATURES " =~ " static-build " ]] ; then
65733 as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65734 fi
65735 fi
65736
65737 # Only enable jvmci on x86_64, sparcv9 and aarch64.
65738 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65739 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65740 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65741 JVM_FEATURES_jvmci="jvmci"
65742 else
65743 JVM_FEATURES_jvmci=""
65744 fi
65745
65746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65747 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65748 if [[ " $JVM_FEATURES " =~ " graal " ]] ; then
65749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65750 $as_echo "yes, forced" >&6; }
65751 if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65752 as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65753 fi
65754 INCLUDE_GRAAL="true"
65755 else
65756 # By default enable graal build on linux-x64 or where AOT is available.
65797
65798 if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65799 # Default to use link time optimizations on minimal on arm
65800 JVM_FEATURES_link_time_opt="link-time-opt"
65801 else
65802 JVM_FEATURES_link_time_opt=""
65803 fi
65804
65805 # All variants but minimal (and custom) get these features
65806 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
65807 if test "x$ENABLE_CDS" = "xtrue"; then
65808 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
65809 fi
65810
65811 # Enable features depending on variant.
65812 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65813 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65814 JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65815 JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65816 JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65817 JVM_FEATURES_custom="$JVM_FEATURES"
65818
65819
65820
65821
65822
65823
65824
65825
65826 # Used for verification of Makefiles by check-jvm-feature
65827
65828
65829 # We don't support --with-jvm-interpreter anymore, use zero instead.
65830
65831
65832 # Check whether --with-jvm-interpreter was given.
65833 if test "${with_jvm_interpreter+set}" = set; then :
65834 withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65835 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65836 fi
65837
65838
65839
65840
65841 ###############################################################################
65842 #
65843 # We need to do some final tweaking, when everything else is done.
65844 #
65845 ###############################################################################
67675 # Before generating output files, test if they exist. If they do, this is a reconfigure.
67676 # Since we can't properly handle the dependencies for this, warn the user about the situation
67677 if test -e $OUTPUTDIR/spec.gmk; then
67678 IS_RECONFIGURE=yes
67679 else
67680 IS_RECONFIGURE=no
67681 fi
67682
67683
67684 # At the end, call the custom hook. (Dummy macro if no custom sources available)
67685
67686
67687 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67688
67689 # Keep feature lists sorted and free of duplicates
67690 JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67691 JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67692 JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67693 JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67694 JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67695 JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67696
67697 # Validate features
67698 for variant in $JVM_VARIANTS; do
67699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67700 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67701 features_var_name=JVM_FEATURES_$variant
67702 JVM_FEATURES_TO_TEST=${!features_var_name}
67703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67704 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67705 NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67706 STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67707 INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67708 if test "x$INVALID_FEATURES" != x; then
67709 as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67710 fi
67711 done
67712
67713
67714 # We're messing a bit with internal autoconf variables to put the config.status
|