786 PROPER_COMPILER_CC
787 TOOLCHAIN_PATH_CC
788 POTENTIAL_CC
789 VS_LIB
790 VS_INCLUDE
791 VS_PATH
792 CYGWIN_LINK
793 SYSROOT_LDFLAGS
794 SYSROOT_CFLAGS
795 LEGACY_EXTRA_LDFLAGS
796 LEGACY_EXTRA_CXXFLAGS
797 LEGACY_EXTRA_CFLAGS
798 EXE_SUFFIX
799 OBJ_SUFFIX
800 STATIC_LIBRARY
801 SHARED_LIBRARY
802 STATIC_LIBRARY_SUFFIX
803 SHARED_LIBRARY_SUFFIX
804 LIBRARY_PREFIX
805 TOOLCHAIN_TYPE
806 BUILD_HOTSPOT
807 HOTSPOT_DIST
808 BUILD_OUTPUT
809 OVERRIDE_SRC_ROOT
810 ADD_SRC_ROOT
811 JDK_TOPDIR
812 NASHORN_TOPDIR
813 HOTSPOT_TOPDIR
814 JAXWS_TOPDIR
815 JAXP_TOPDIR
816 CORBA_TOPDIR
817 LANGTOOLS_TOPDIR
818 JAVAC_FLAGS
819 BOOT_JDK_SOURCETARGET
820 JARSIGNER
821 JAR
822 JAVAH
823 JAVAC
824 JAVA
825 BOOT_JDK
1057 enable_hotspot_test_in_build
1058 with_cacerts_file
1059 enable_unlimited_crypto
1060 with_milestone
1061 with_update_version
1062 with_user_release_suffix
1063 with_build_number
1064 with_copyright_year
1065 with_boot_jdk
1066 with_add_source_root
1067 with_override_source_root
1068 with_adds_and_overrides
1069 with_override_langtools
1070 with_override_corba
1071 with_override_jaxp
1072 with_override_jaxws
1073 with_override_hotspot
1074 with_override_nashorn
1075 with_override_jdk
1076 with_import_hotspot
1077 with_toolchain_type
1078 with_extra_cflags
1079 with_extra_cxxflags
1080 with_extra_ldflags
1081 with_toolchain_version
1082 with_jtreg
1083 enable_warnings_as_errors
1084 enable_debug_symbols
1085 enable_zip_debug_info
1086 enable_native_coverage
1087 with_stdc__lib
1088 with_msvcr_dll
1089 with_msvcp_dll
1090 with_x
1091 with_cups
1092 with_cups_include
1093 with_freetype
1094 with_freetype_include
1095 with_freetype_lib
1096 with_freetype_src
1832 if test -n "$ac_init_help"; then
1833 case $ac_init_help in
1834 short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1835 esac
1836 cat <<\_ACEOF
1837
1838 Optional Features:
1839 --disable-option-checking ignore unrecognized --enable/--with options
1840 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1841 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1842 --enable-openjdk-only suppress building custom source even if present
1843 [disabled]
1844 --enable-debug set the debug level to fastdebug (shorthand for
1845 --with-debug-level=fastdebug) [disabled]
1846 --disable-headful disable building headful support (graphical UI
1847 support) [enabled]
1848 --enable-hotspot-test-in-build
1849 run the Queens test after Hotspot build [disabled]
1850 --enable-unlimited-crypto
1851 Enable unlimited crypto policy [disabled]
1852 --disable-warnings-as-errors
1853 do not consider native warnings to be an error
1854 [enabled]
1855 --disable-debug-symbols disable generation of debug symbols [enabled]
1856 --disable-zip-debug-info
1857 disable zipping of debug-info files [enabled]
1858 --enable-native-coverage
1859 enable native compilation with code coverage
1860 data[disabled]
1861 --disable-freetype-bundling
1862 disable bundling of the freetype library with the
1863 build result [enabled on Windows or when using
1864 --with-freetype, disabled otherwise]
1865 --enable-sjavac use sjavac to do fast incremental compiles
1866 [disabled]
1867 --disable-precompiled-headers
1868 disable using precompiled headers when compiling C++
1869 [enabled]
1870 --enable-ccache enable using ccache to speed up recompilations
1871 [disabled]
3960
3961
3962
3963
3964 ###############################################################################
3965 #
3966 # Setup version numbers
3967 #
3968
3969
3970
3971
3972
3973
3974 ################################################################################
3975 #
3976 # Gcov coverage data for hotspot
3977 #
3978
3979
3980 #
3981 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3982 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983 #
3984 # This code is free software; you can redistribute it and/or modify it
3985 # under the terms of the GNU General Public License version 2 only, as
3986 # published by the Free Software Foundation. Oracle designates this
3987 # particular file as subject to the "Classpath" exception as provided
3988 # by Oracle in the LICENSE file that accompanied this code.
3989 #
3990 # This code is distributed in the hope that it will be useful, but WITHOUT
3991 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3993 # version 2 for more details (a copy is included in the LICENSE file that
3994 # accompanied this code).
3995 #
3996 # You should have received a copy of the GNU General Public License version
3997 # 2 along with this work; if not, write to the Free Software Foundation,
3998 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999 #
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584 # This line needs to be here, verbatim, after all includes and the dummy hook
4585 # definitions. It is replaced with custom functionality when building
4586 # custom sources.
4587 #CUSTOM_AUTOCONF_INCLUDE
4588
4589 # Do not change or remove the following line, it is needed for consistency checks:
4590 DATE_WHEN_GENERATED=1444643341
4591
4592 ###############################################################################
4593 #
4594 # Initialization / Boot-strapping
4595 #
4596 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4597 # thus it jumps back and forth, each time gaining something needed later on.
4598 #
4599 ###############################################################################
4600
4601 # If we are requested to print additional help, do that and then exit.
4602 # This must be the very first call.
4603
4604 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4605 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4606 $PRINTF "Which are valid to use depends on the build platform.\n"
4607 for toolchain in $VALID_TOOLCHAINS_all; do
4608 # Use indirect variable referencing
4609 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4610 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27226 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27227 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27228 fi
27229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27230 $as_echo_n "checking if hotspot should be imported... " >&6; }
27231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27232 $as_echo "yes from $HOTSPOT_DIST" >&6; }
27233 BUILD_HOTSPOT=false
27234 fi
27235
27236 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27237
27238
27239 ###############################################################################
27240 #
27241 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
27242 # native code.
27243 #
27244 ###############################################################################
27245
27246 # First determine the toolchain type (compiler family)
27247
27248
27249 # Check whether --with-toolchain-type was given.
27250 if test "${with_toolchain_type+set}" = set; then :
27251 withval=$with_toolchain_type;
27252 fi
27253
27254
27255 # Use indirect variable referencing
27256 toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27257 VALID_TOOLCHAINS=${!toolchain_var_name}
27258
27259 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27260 if test -n "$XCODEBUILD"; then
27261 # On Mac OS X, default toolchain to clang after Xcode 5
27262 XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27263 $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27264 if test $? -ne 0; then
27265 as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27334
27335
27336 # Define filename patterns
27337 if test "x$OPENJDK_TARGET_OS" = xwindows; then
27338 LIBRARY_PREFIX=
27339 SHARED_LIBRARY_SUFFIX='.dll'
27340 STATIC_LIBRARY_SUFFIX='.lib'
27341 SHARED_LIBRARY='$1.dll'
27342 STATIC_LIBRARY='$1.lib'
27343 OBJ_SUFFIX='.obj'
27344 EXE_SUFFIX='.exe'
27345 else
27346 LIBRARY_PREFIX=lib
27347 SHARED_LIBRARY_SUFFIX='.so'
27348 STATIC_LIBRARY_SUFFIX='.a'
27349 SHARED_LIBRARY='lib$1.so'
27350 STATIC_LIBRARY='lib$1.a'
27351 OBJ_SUFFIX='.o'
27352 EXE_SUFFIX=''
27353 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27354 SHARED_LIBRARY='lib$1.dylib'
27355 SHARED_LIBRARY_SUFFIX='.dylib'
27356 fi
27357 fi
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368 if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27369 { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27370 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27371 else
27372 { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27373 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27374 fi
27375
27376
27377 # User supplied flags should be used when configure detects compilers
42734 fi
42735 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42736 as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
42737 fi
42738
42739
42740 # Configure flags for the tools
42741
42742 ###############################################################################
42743 #
42744 # How to compile shared libraries.
42745 #
42746
42747 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42748 PICFLAG="-fPIC"
42749 C_FLAG_REORDER=''
42750 CXX_FLAG_REORDER=''
42751
42752 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42753 # Linking is different on MacOSX
42754 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42755 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42756 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42757 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42758 SET_SHARED_LIBRARY_MAPFILE=''
42759 else
42760 # Default works for linux, might work on other platforms as well.
42761 SHARED_LIBRARY_FLAGS='-shared'
42762 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42763 SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42764 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42765 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42766 fi
42767 elif test "x$TOOLCHAIN_TYPE" = xclang; then
42768 PICFLAG=''
42769 C_FLAG_REORDER=''
42770 CXX_FLAG_REORDER=''
42771
42772 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42773 # Linking is different on MacOSX
42774 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
43238 # Additional macosx handling
43239 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43240 # Setting these parameters makes it an error to link to macosx APIs that are
43241 # newer than the given OS version and makes the linked binaries compatible
43242 # even if built on a newer version of the OS.
43243 # The expected format is X.Y.Z
43244 MACOSX_VERSION_MIN=10.7.0
43245
43246
43247 # The macro takes the version with no dots, ex: 1070
43248 # Let the flags variables get resolved in make for easier override on make
43249 # command line.
43250 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43251 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43252 fi
43253
43254 # Setup some hard coded includes
43255 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43256 -I${JDK_TOPDIR}/src/java.base/share/native/include \
43257 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43258 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
43259
43260 # The shared libraries are compiled using the picflag.
43261 CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43262 CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43263
43264 # Executable flags
43265 CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43266 CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43267
43268
43269
43270
43271
43272
43273 # Flags for compiling test libraries
43274 CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43275 CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43276
43277 # Flags for compiling test executables
43278 CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
|
786 PROPER_COMPILER_CC
787 TOOLCHAIN_PATH_CC
788 POTENTIAL_CC
789 VS_LIB
790 VS_INCLUDE
791 VS_PATH
792 CYGWIN_LINK
793 SYSROOT_LDFLAGS
794 SYSROOT_CFLAGS
795 LEGACY_EXTRA_LDFLAGS
796 LEGACY_EXTRA_CXXFLAGS
797 LEGACY_EXTRA_CFLAGS
798 EXE_SUFFIX
799 OBJ_SUFFIX
800 STATIC_LIBRARY
801 SHARED_LIBRARY
802 STATIC_LIBRARY_SUFFIX
803 SHARED_LIBRARY_SUFFIX
804 LIBRARY_PREFIX
805 TOOLCHAIN_TYPE
806 BUILD_STATIC
807 BUILD_HOTSPOT
808 HOTSPOT_DIST
809 BUILD_OUTPUT
810 OVERRIDE_SRC_ROOT
811 ADD_SRC_ROOT
812 JDK_TOPDIR
813 NASHORN_TOPDIR
814 HOTSPOT_TOPDIR
815 JAXWS_TOPDIR
816 JAXP_TOPDIR
817 CORBA_TOPDIR
818 LANGTOOLS_TOPDIR
819 JAVAC_FLAGS
820 BOOT_JDK_SOURCETARGET
821 JARSIGNER
822 JAR
823 JAVAH
824 JAVAC
825 JAVA
826 BOOT_JDK
1058 enable_hotspot_test_in_build
1059 with_cacerts_file
1060 enable_unlimited_crypto
1061 with_milestone
1062 with_update_version
1063 with_user_release_suffix
1064 with_build_number
1065 with_copyright_year
1066 with_boot_jdk
1067 with_add_source_root
1068 with_override_source_root
1069 with_adds_and_overrides
1070 with_override_langtools
1071 with_override_corba
1072 with_override_jaxp
1073 with_override_jaxws
1074 with_override_hotspot
1075 with_override_nashorn
1076 with_override_jdk
1077 with_import_hotspot
1078 enable_static_build
1079 with_toolchain_type
1080 with_extra_cflags
1081 with_extra_cxxflags
1082 with_extra_ldflags
1083 with_toolchain_version
1084 with_jtreg
1085 enable_warnings_as_errors
1086 enable_debug_symbols
1087 enable_zip_debug_info
1088 enable_native_coverage
1089 with_stdc__lib
1090 with_msvcr_dll
1091 with_msvcp_dll
1092 with_x
1093 with_cups
1094 with_cups_include
1095 with_freetype
1096 with_freetype_include
1097 with_freetype_lib
1098 with_freetype_src
1834 if test -n "$ac_init_help"; then
1835 case $ac_init_help in
1836 short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1837 esac
1838 cat <<\_ACEOF
1839
1840 Optional Features:
1841 --disable-option-checking ignore unrecognized --enable/--with options
1842 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1843 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1844 --enable-openjdk-only suppress building custom source even if present
1845 [disabled]
1846 --enable-debug set the debug level to fastdebug (shorthand for
1847 --with-debug-level=fastdebug) [disabled]
1848 --disable-headful disable building headful support (graphical UI
1849 support) [enabled]
1850 --enable-hotspot-test-in-build
1851 run the Queens test after Hotspot build [disabled]
1852 --enable-unlimited-crypto
1853 Enable unlimited crypto policy [disabled]
1854 --enable-static-build enable static library build [disabled]
1855 --disable-warnings-as-errors
1856 do not consider native warnings to be an error
1857 [enabled]
1858 --disable-debug-symbols disable generation of debug symbols [enabled]
1859 --disable-zip-debug-info
1860 disable zipping of debug-info files [enabled]
1861 --enable-native-coverage
1862 enable native compilation with code coverage
1863 data[disabled]
1864 --disable-freetype-bundling
1865 disable bundling of the freetype library with the
1866 build result [enabled on Windows or when using
1867 --with-freetype, disabled otherwise]
1868 --enable-sjavac use sjavac to do fast incremental compiles
1869 [disabled]
1870 --disable-precompiled-headers
1871 disable using precompiled headers when compiling C++
1872 [enabled]
1873 --enable-ccache enable using ccache to speed up recompilations
1874 [disabled]
3963
3964
3965
3966
3967 ###############################################################################
3968 #
3969 # Setup version numbers
3970 #
3971
3972
3973
3974
3975
3976
3977 ################################################################################
3978 #
3979 # Gcov coverage data for hotspot
3980 #
3981
3982
3983 ################################################################################
3984 #
3985 # Static build support. When enabled will generate static
3986 # libraries instead of shared libraries for all JDK libs.
3987 #
3988
3989
3990
3991
3992 #
3993 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3994 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3995 #
3996 # This code is free software; you can redistribute it and/or modify it
3997 # under the terms of the GNU General Public License version 2 only, as
3998 # published by the Free Software Foundation. Oracle designates this
3999 # particular file as subject to the "Classpath" exception as provided
4000 # by Oracle in the LICENSE file that accompanied this code.
4001 #
4002 # This code is distributed in the hope that it will be useful, but WITHOUT
4003 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4004 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4005 # version 2 for more details (a copy is included in the LICENSE file that
4006 # accompanied this code).
4007 #
4008 # You should have received a copy of the GNU General Public License version
4009 # 2 along with this work; if not, write to the Free Software Foundation,
4010 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4011 #
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596 # This line needs to be here, verbatim, after all includes and the dummy hook
4597 # definitions. It is replaced with custom functionality when building
4598 # custom sources.
4599 #CUSTOM_AUTOCONF_INCLUDE
4600
4601 # Do not change or remove the following line, it is needed for consistency checks:
4602 DATE_WHEN_GENERATED=1444855180
4603
4604 ###############################################################################
4605 #
4606 # Initialization / Boot-strapping
4607 #
4608 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4609 # thus it jumps back and forth, each time gaining something needed later on.
4610 #
4611 ###############################################################################
4612
4613 # If we are requested to print additional help, do that and then exit.
4614 # This must be the very first call.
4615
4616 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4617 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4618 $PRINTF "Which are valid to use depends on the build platform.\n"
4619 for toolchain in $VALID_TOOLCHAINS_all; do
4620 # Use indirect variable referencing
4621 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4622 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
27238 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
27239 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
27240 fi
27241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
27242 $as_echo_n "checking if hotspot should be imported... " >&6; }
27243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
27244 $as_echo "yes from $HOTSPOT_DIST" >&6; }
27245 BUILD_HOTSPOT=false
27246 fi
27247
27248 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
27249
27250
27251 ###############################################################################
27252 #
27253 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
27254 # native code.
27255 #
27256 ###############################################################################
27257
27258 # See if we are doing a complete static build or not
27259
27260 # Check whether --enable-static-build was given.
27261 if test "${enable_static_build+set}" = set; then :
27262 enableval=$enable_static_build;
27263 fi
27264
27265 BUILD_STATIC=false
27266 if test "x$enable_static_build" = "xyes"; then
27267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
27268 $as_echo_n "checking if static build is enabled... " >&6; }
27269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27270 $as_echo "yes" >&6; }
27271 if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
27272 as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
27273 fi
27274 BUILD_STATIC_CFLAGS="-DSTATIC_BUILD=1"
27275 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $BUILD_STATIC_CFLAGS"
27276 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $BUILD_STATIC_CFLAGS"
27277 CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $BUILD_STATIC_CFLAGS"
27278 CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $BUILD_STATIC_CFLAGS"
27279 BUILD_STATIC=true
27280 elif test "x$enable_static_build" = "xno"; then
27281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
27282 $as_echo_n "checking if static build is enabled... " >&6; }
27283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27284 $as_echo "no" >&6; }
27285 elif test "x$enable_static_build" != "x"; then
27286 as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
27287 fi
27288
27289
27290
27291
27292 # First determine the toolchain type (compiler family)
27293
27294
27295 # Check whether --with-toolchain-type was given.
27296 if test "${with_toolchain_type+set}" = set; then :
27297 withval=$with_toolchain_type;
27298 fi
27299
27300
27301 # Use indirect variable referencing
27302 toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
27303 VALID_TOOLCHAINS=${!toolchain_var_name}
27304
27305 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27306 if test -n "$XCODEBUILD"; then
27307 # On Mac OS X, default toolchain to clang after Xcode 5
27308 XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
27309 $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
27310 if test $? -ne 0; then
27311 as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
27380
27381
27382 # Define filename patterns
27383 if test "x$OPENJDK_TARGET_OS" = xwindows; then
27384 LIBRARY_PREFIX=
27385 SHARED_LIBRARY_SUFFIX='.dll'
27386 STATIC_LIBRARY_SUFFIX='.lib'
27387 SHARED_LIBRARY='$1.dll'
27388 STATIC_LIBRARY='$1.lib'
27389 OBJ_SUFFIX='.obj'
27390 EXE_SUFFIX='.exe'
27391 else
27392 LIBRARY_PREFIX=lib
27393 SHARED_LIBRARY_SUFFIX='.so'
27394 STATIC_LIBRARY_SUFFIX='.a'
27395 SHARED_LIBRARY='lib$1.so'
27396 STATIC_LIBRARY='lib$1.a'
27397 OBJ_SUFFIX='.o'
27398 EXE_SUFFIX=''
27399 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27400 # For full static builds, we're overloading the SHARED_LIBRARY
27401 # variables in order to limit the amount of changes required.
27402 # It would be better to remove SHARED and just use LIBRARY and
27403 # LIBRARY_SUFFIX for libraries that can be built either
27404 # shared or static and use STATIC_* for libraries that are
27405 # always built statically.
27406 if test "x$BUILD_STATIC" = xtrue; then
27407 SHARED_LIBRARY='lib$1.a'
27408 SHARED_LIBRARY_SUFFIX='.a'
27409 else
27410 SHARED_LIBRARY='lib$1.dylib'
27411 SHARED_LIBRARY_SUFFIX='.dylib'
27412 fi
27413 fi
27414 fi
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425 if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
27426 { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
27427 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
27428 else
27429 { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
27430 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
27431 fi
27432
27433
27434 # User supplied flags should be used when configure detects compilers
42791 fi
42792 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42793 as_fn_error $? "The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)" "$LINENO" 5
42794 fi
42795
42796
42797 # Configure flags for the tools
42798
42799 ###############################################################################
42800 #
42801 # How to compile shared libraries.
42802 #
42803
42804 if test "x$TOOLCHAIN_TYPE" = xgcc; then
42805 PICFLAG="-fPIC"
42806 C_FLAG_REORDER=''
42807 CXX_FLAG_REORDER=''
42808
42809 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42810 # Linking is different on MacOSX
42811 if test "x$BUILD_STATIC" = xtrue; then
42812 SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
42813 else
42814 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42815 fi
42816 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42817 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42818 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42819 SET_SHARED_LIBRARY_MAPFILE=''
42820 else
42821 # Default works for linux, might work on other platforms as well.
42822 SHARED_LIBRARY_FLAGS='-shared'
42823 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42824 SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42825 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42826 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42827 fi
42828 elif test "x$TOOLCHAIN_TYPE" = xclang; then
42829 PICFLAG=''
42830 C_FLAG_REORDER=''
42831 CXX_FLAG_REORDER=''
42832
42833 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42834 # Linking is different on MacOSX
42835 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
43299 # Additional macosx handling
43300 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43301 # Setting these parameters makes it an error to link to macosx APIs that are
43302 # newer than the given OS version and makes the linked binaries compatible
43303 # even if built on a newer version of the OS.
43304 # The expected format is X.Y.Z
43305 MACOSX_VERSION_MIN=10.7.0
43306
43307
43308 # The macro takes the version with no dots, ex: 1070
43309 # Let the flags variables get resolved in make for easier override on make
43310 # command line.
43311 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43312 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
43313 fi
43314
43315 # Setup some hard coded includes
43316 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
43317 -I${JDK_TOPDIR}/src/java.base/share/native/include \
43318 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
43319 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
43320 -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
43321 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
43322
43323 # The shared libraries are compiled using the picflag.
43324 CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43325 CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43326
43327 # Executable flags
43328 CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
43329 CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
43330
43331
43332
43333
43334
43335
43336 # Flags for compiling test libraries
43337 CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
43338 CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
43339
43340 # Flags for compiling test executables
43341 CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
|