Mercurial > hg > release > icedtea8-forest-3.0
changeset 1723:19d738ae2def icedtea-3.0.0pre10
Merge jdk8u77-b03
author | andrew |
---|---|
date | Tue, 29 Mar 2016 04:19:40 +0100 |
parents | fcb11901d889 (diff) 3fbef9f4cddf (current diff) |
children | 4d2a86dad43c |
files | .hgtags |
diffstat | 11 files changed, 938 insertions(+), 1007 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Fri Mar 18 22:29:32 2016 -0700 +++ b/.hgtags Tue Mar 29 04:19:40 2016 +0100 @@ -50,6 +50,7 @@ 3ac6dcf7823205546fbbc3d4ea59f37358d0b0d4 jdk7-b73 2c88089b6e1c053597418099a14232182c387edc jdk7-b74 d1516b9f23954b29b8e76e6f4efc467c08c78133 jdk7-b75 +f0bfd9bd1a0e674288a8a4d17dcbb9e632b42e6d icedtea7-1.12 c8b63075403d53a208104a8a6ea5072c1cb66aab jdk7-b76 1f17ca8353babb13f4908c1f87d11508232518c8 jdk7-b77 ab4ae8f4514693a9fe17ca2fec0239d8f8450d2c jdk7-b78 @@ -63,6 +64,7 @@ 433a60a9c0bf1b26ee7e65cebaa89c541f497aed jdk7-b86 6b1069f53fbc30663ccef49d78c31bb7d6967bde jdk7-b87 82135c848d5fcddb065e98ae77b81077c858f593 jdk7-b88 +195fcceefddce1963bb26ba32920de67806ed2db icedtea7-1.13 7f1ba4459972bf84b8201dc1cc4f62b1fe1c74f4 jdk7-b89 425ba3efabbfe0b188105c10aaf7c3c8fa8d1a38 jdk7-b90 97d8b6c659c29c8493a8b2b72c2796a021a8cf79 jdk7-b91 @@ -111,6 +113,7 @@ ddc2fcb3682ffd27f44354db666128827be7e3c3 jdk7-b134 783bd02b4ab4596059c74b10a1793d7bd2f1c157 jdk7-b135 2fe76e73adaa5133ac559f0b3c2c0707eca04580 jdk7-b136 +d4aea1a51d625f5601c840714c7c94f1de5bc1af icedtea-1.14 7654afc6a29e43cb0a1343ce7f1287bf690d5e5f jdk7-b137 fc47c97bbbd91b1f774d855c48a7e285eb1a351a jdk7-b138 7ed6d0b9aaa12320832a7ddadb88d6d8d0dda4c1 jdk7-b139 @@ -297,6 +300,7 @@ 6403ef94cb0db32d9221a5e8f09f3664cd7744dc jdk8u20-b07 b7750b6ee1578fd5b2b1f6758f905b332503d8ed jdk8u20-b08 d420eae635c42be98b166e1ce9c64fc0a8825529 jdk8u20-b09 +e0a10e6be00ab726d23118d4617812ca8c92146d icedtea-3.0.0pre01 cc4ca2ff0afcfb932da6fa4fffdd01f08e4ff71b jdk8u20-b10 61291eee163ab5bbe0b38b37b77673bac9bf5310 jdk8u20-b11 2feecdcd7b677f3baf9df6e8ea46f7e08c7e4411 jdk8u20-b12 @@ -310,6 +314,7 @@ 5b76ecd0cdcf899261da2c9965862771f6da4e26 jdk8u20-b20 0dccc4aca1859b1ff7dca9db214f7f38c4ddbbce jdk8u20-b21 6c1fb59fa5d7095d93a023553a949f873f324c6b jdk8u20-b22 +a81a301b0f8940a61f7d7bb0eefdea54035442cb icedtea-3.0.0pre02 b14daf2459c5430dfe5d435483d6f424cff09584 jdk8u20-b23 1710841b0229403f4af85eac8b68ea5065a26c81 jdk8u20-b24 1710841b0229403f4af85eac8b68ea5065a26c81 jdk8u20-b25 @@ -377,6 +382,9 @@ 83d1d42c3df409c87ef7cb0126343a009857ca71 jdk8u40-b18 ae4980d195b64eec58884b233d7efd312205bac8 jdk8u40-b19 b31a07adaef50dacba20e376cff6f1096e745092 jdk8u40-b20 +44a10ae251cadce9bcde2b31c85368d13fff618d icedtea-3.0.0pre03 +0503e9c58a1332f794c741dfa311a614cc3bd484 icedtea-3.0.0pre04 +44d6e4ff3770e0d272cc5d5e5cf88762e108e2c5 icedtea-3.0.0pre05 765a17e75fd622f7b892381e23c9b2c531d416f0 jdk8u40-b21 b6d03a810a61116268fea08517a9632bd66a7363 jdk8u40-b22 5dd2ad6c7911a1e21f15a28f13ffad662378a3be jdk8u40-b23 @@ -453,6 +461,9 @@ 99d323d5830fad8551038da15113639d8518a8e6 jdk8u60-b21 01bb22b4ebb6348efa14726ba139858d6defefcd jdk8u60-b22 91e6153db0df9245c4b60197c78f72e510026b2c jdk8u60-b23 +ff58c7164b8dfd7f66104ddedb36fd017982fe06 icedtea-3.0.0pre06 +4b05cb9c5a4c517e0dabe38b7a7e1c080785feff icedtea-3.0.0pre07 +f0635543beb309c4da1bb88c906a76ee4b75e16d icedtea-3.0.0pre08 280834e00e6267fae1ae2a86a8bd7d1fdd160cba jdk8u60-b24 be2ddf520d263ea27a075f895d93adada6702027 jdk8u60-b25 d3bdbc19827e1a97e046b65e39cb9c7255d4603b jdk8u60-b26 @@ -526,6 +537,7 @@ e831ce671fb072501670ee593e1080659cbc9804 jdk8u72-b12 8f5ca46a90af013525cbdf3b023727450cdb8119 jdk8u72-b13 6cbd347daa9367b78e385f2e8eba222a30b3bea1 jdk8u72-b14 +a358b13af298aa88d7a106c93a5416eeacfccb08 icedtea-3.0.0pre09 fff0c11d2811deb70bef213d6d8478b3e3796658 jdk8u72-b15 443abbc4e048b13e075486a86ddafca520257fdf jdk8u73-b00 fc0ed68cbc5cbdb2efdb75f3309b5de2a64f5a57 jdk8u73-b01
--- a/.jcheck/conf Fri Mar 18 22:29:32 2016 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -project=jdk8 -bugids=dup
--- a/common/autoconf/boot-jdk.m4 Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/boot-jdk.m4 Tue Mar 29 04:19:40 2016 +0100 @@ -1,5 +1,6 @@ # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright 2014 Red Hat, Inc. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -283,6 +284,25 @@ BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii) + # Allow JAR command to be overridden + # Doing so allows a faster native jar program to be used + # when building Zero + AC_MSG_CHECKING([for an alternate jar command]) + AC_ARG_WITH([alt-jar], + [AS_HELP_STRING(--with-alt-jar=PATH, specify the location of an alternate jar binary to use for building)], + [ + if test "x${withval}" != xyes -a "x${withval}" != xno; then + ALT_JAR_CMD=${withval} + else + ALT_JAR_CMD="false" + fi + ], + [ + ALT_JAR_CMD="false" + ]) + AC_MSG_RESULT(${ALT_JAR_CMD}) + AC_SUBST(ALT_JAR_CMD) + # Finally, set some other options... # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. @@ -303,6 +323,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], [ + # Ensure OPENJDK_TARGET_CPU_ARCH has been setup + AC_REQUIRE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET]) + ############################################################################## # # Specify options for anything that is run with the Boot JDK. @@ -325,16 +348,23 @@ JAVA_FLAGS=$boot_jdk_jvmargs AC_SUBST(JAVA_FLAGS) - AC_MSG_CHECKING([flags for boot jdk java command for big workloads]) # Starting amount of heap memory. - ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) + if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then + ADD_JVM_ARG_IF_OK([-Xms256M],boot_jdk_jvmargs_big,[$JAVA]) + else + ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA]) + fi # Maximum amount of heap memory. # Maximum stack size. if test "x$BOOT_JDK_BITS" = x32; then - JVM_MAX_HEAP=1100M + if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then + JVM_MAX_HEAP=768M + else + JVM_MAX_HEAP=1100M + fi STACK_SIZE=768 else # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
--- a/common/autoconf/generated-configure.sh Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/generated-configure.sh Tue Mar 29 04:19:40 2016 +0100 @@ -642,10 +642,19 @@ LIBFFI_LIBS LIBFFI_CFLAGS STATIC_CXX_SETTING +USE_EXTERNAL_NSS +NSS_LIBS +NSS_CFLAGS LIBDL LIBM LIBZIP_CAN_USE_MMAP USE_EXTERNAL_LIBZ +USE_EXTERNAL_LIBPNG +PNG_LIBS +PNG_CFLAGS +USE_EXTERNAL_LCMS +LCMS_LIBS +LCMS_CFLAGS USE_EXTERNAL_LIBGIF USE_EXTERNAL_LIBJPEG ALSA_LIBS @@ -666,6 +675,7 @@ ZIP_DEBUGINFO_FILES ENABLE_DEBUG_SYMBOLS USING_BROKEN_SUSE_LD +WARNINGS_AS_ERRORS COMPILER_SUPPORTS_TARGET_BITS_FLAG ZERO_ARCHFLAG LDFLAGS_CXX_JDK @@ -679,6 +689,7 @@ CFLAGS_JDKLIB MACOSX_VERSION_MIN PACKAGE_PATH +CFLAGS_WARNINGS_ARE_ERRORS LEGACY_EXTRA_LDFLAGS LEGACY_EXTRA_CXXFLAGS LEGACY_EXTRA_CFLAGS @@ -746,8 +757,6 @@ ac_ct_CXX CXXFLAGS CXX -ac_ct_PROPER_COMPILER_CXX -PROPER_COMPILER_CXX POTENTIAL_CXX TOOLS_DIR_CXX COMPILER_TARGET_BITS_FLAG @@ -758,8 +767,6 @@ LDFLAGS CFLAGS CC -ac_ct_PROPER_COMPILER_CC -PROPER_COMPILER_CC POTENTIAL_CC TOOLS_DIR_CC SDKPATH @@ -795,6 +802,7 @@ BOOT_JDK_BITS JAVAC_FLAGS BOOT_JDK_SOURCETARGET +ALT_JAR_CMD BOOT_JDK BOOT_TOOLSJAR BOOT_RTJAR @@ -1033,6 +1041,7 @@ with_build_number with_copyright_year with_boot_jdk +with_alt_jar with_boot_jdk_jvmargs with_add_source_root with_override_source_root @@ -1053,6 +1062,7 @@ with_extra_cflags with_extra_cxxflags with_extra_ldflags +enable_warnings_as_errors enable_debug_symbols enable_zip_debug_info enable_macosx_runtime_support @@ -1066,8 +1076,12 @@ with_alsa with_alsa_include with_alsa_lib +with_libjpeg with_giflib +with_lcms +with_libpng with_zlib +enable_system_nss with_stdc__lib with_num_cores with_memory_size @@ -1099,6 +1113,12 @@ FREETYPE_LIBS ALSA_CFLAGS ALSA_LIBS +LCMS_CFLAGS +LCMS_LIBS +PNG_CFLAGS +PNG_LIBS +NSS_CFLAGS +NSS_LIBS LIBFFI_CFLAGS LIBFFI_LIBS' @@ -1729,6 +1749,8 @@ run the Queens test after Hotspot build [disabled] --enable-unlimited-crypto Enable unlimited crypto policy [disabled] + --enable-warnings-as-errors + consider warnings to be an error [disabled] --disable-debug-symbols disable generation of debug symbols [enabled] --disable-zip-debug-info disable zipping of debug-info files [enabled] @@ -1739,6 +1761,8 @@ disable bundling of the freetype library with the build result [enabled on Windows or when using --with-freetype, disabled otherwise] + --enable-system-nss build the SunEC provider using the system NSS + libraries [disabled] --enable-sjavac use sjavac to do fast incremental compiles [disabled] --disable-precompiled-headers @@ -1786,6 +1810,8 @@ --with-build-number Set build number value for build [b00] --with-copyright-year Set copyright year value for build [current year] --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed] + --with-alt-jar=PATH specify the location of an alternate jar binary to + use for building --with-boot-jdk-jvmargs specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values, e.g --with-boot-jdk-jvmargs="-Xmx8G @@ -1839,8 +1865,14 @@ headers under PATH/include) --with-alsa-include specify directory for the alsa include files --with-alsa-lib specify directory for the alsa library + --with-libjpeg use libjpeg from build system or OpenJDK source + (system, bundled) [bundled] --with-giflib use giflib from build system or OpenJDK source (system, bundled) [bundled] + --with-lcms use lcms2 from build system or OpenJDK source + (system, bundled) [bundled] + --with-libpng use libpng from build system or OpenJDK source + (system, bundled) [bundled] --with-zlib use zlib from build system or OpenJDK source (system, bundled) [bundled] --with-stdc++lib=<static>,<dynamic>,<default> @@ -1880,6 +1912,12 @@ linker flags for FREETYPE, overriding pkg-config ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config ALSA_LIBS linker flags for ALSA, overriding pkg-config + LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config + LCMS_LIBS linker flags for LCMS, overriding pkg-config + PNG_CFLAGS C compiler flags for PNG, overriding pkg-config + PNG_LIBS linker flags for PNG, overriding pkg-config + NSS_CFLAGS C compiler flags for NSS, overriding pkg-config + NSS_LIBS linker flags for NSS, overriding pkg-config LIBFFI_CFLAGS C compiler flags for LIBFFI, overriding pkg-config LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config @@ -3329,6 +3367,7 @@ # ... then the rest # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright 2014 Red Hat, Inc. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -3880,7 +3919,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1445418840 +DATE_WHEN_GENERATED=1454687955 ############################################################################### # @@ -6849,7 +6888,7 @@ VAR_CPU_ENDIAN=big ;; powerpc64le) - VAR_CPU=ppc64 + VAR_CPU=ppc64le VAR_CPU_ARCH=ppc VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little @@ -6902,6 +6941,14 @@ $as_echo_n "checking openjdk-build os-cpu... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build bit-size" >&5 +$as_echo_n "checking openjdk-build bit-size... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_CPU_BITS" >&5 +$as_echo "$OPENJDK_BUILD_CPU_BITS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build endianness" >&5 +$as_echo_n "checking openjdk-build endianness... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_CPU_ENDIAN" >&5 +$as_echo "$OPENJDK_BUILD_CPU_ENDIAN" >&6; } # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. @@ -6986,7 +7033,7 @@ VAR_CPU_ENDIAN=big ;; powerpc64le) - VAR_CPU=ppc64 + VAR_CPU=ppc64le VAR_CPU_ARCH=ppc VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little @@ -7039,6 +7086,14 @@ $as_echo_n "checking openjdk-target os-cpu... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target bit-size" >&5 +$as_echo_n "checking openjdk-target bit-size... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS" >&5 +$as_echo "$OPENJDK_TARGET_CPU_BITS" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target endianness" >&5 +$as_echo_n "checking openjdk-target endianness... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_ENDIAN" >&5 +$as_echo "$OPENJDK_TARGET_CPU_ENDIAN" >&6; } @@ -7984,7 +8039,7 @@ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then INCLUDE_SA=false fi - if test "x$VAR_CPU" = xppc64 ; then + if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then INCLUDE_SA=false fi if test "x$OPENJDK_TARGET_CPU" = xaarch64; then @@ -16065,6 +16120,31 @@ $as_echo "ok" >&6; } + # Allow JAR command to be overridden + # Doing so allows a faster native jar program to be used + # when building Zero + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an alternate jar command" >&5 +$as_echo_n "checking for an alternate jar command... " >&6; } + +# Check whether --with-alt-jar was given. +if test "${with_alt_jar+set}" = set; then : + withval=$with_alt_jar; + if test "x${withval}" != xyes -a "x${withval}" != xno; then + ALT_JAR_CMD=${withval} + else + ALT_JAR_CMD="false" + fi + +else + + ALT_JAR_CMD="false" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ALT_JAR_CMD}" >&5 +$as_echo "${ALT_JAR_CMD}" >&6; } + + # Finally, set some other options... # When compiling code to be executed by the Boot JDK, force jdk7 compatibility. @@ -16085,6 +16165,9 @@ + # Ensure OPENJDK_TARGET_CPU_ARCH has been setup + + ############################################################################## # # Specify options for anything that is run with the Boot JDK. @@ -16140,11 +16223,27 @@ JAVA_FLAGS=$boot_jdk_jvmargs - { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; } # Starting amount of heap memory. + if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then + + $ECHO "Check if jvm arg is ok: -Xms256M" >&5 + $ECHO "Command: $JAVA -Xms256M -version" >&5 + OUTPUT=`$JAVA -Xms256M -version 2>&1` + FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` + FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` + if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then + boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms256M" + JVM_ARG_OK=true + else + $ECHO "Arg failed:" >&5 + $ECHO "$OUTPUT" >&5 + JVM_ARG_OK=false + fi + + else $ECHO "Check if jvm arg is ok: -Xms64M" >&5 $ECHO "Command: $JAVA -Xms64M -version" >&5 @@ -16160,11 +16259,16 @@ JVM_ARG_OK=false fi + fi # Maximum amount of heap memory. # Maximum stack size. if test "x$BOOT_JDK_BITS" = x32; then - JVM_MAX_HEAP=1100M + if test "x$OPENJDK_BUILD_CPU_ARCH" = "xs390"; then + JVM_MAX_HEAP=768M + else + JVM_MAX_HEAP=1100M + fi STACK_SIZE=768 else # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit @@ -19810,11 +19914,10 @@ fi TEST_COMPILER="$CC" - # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links - # to 'xlc' but it is crucial that we invoke the compiler with the right name! - if test "x$OPENJDK_BUILD_OS" != xaix; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5 $as_echo_n "checking resolved symbolic links for CC... " >&6; } + SYMLINK_ORIGINAL="$TEST_COMPILER" if test "x$OPENJDK_BUILD_OS" != xwindows; then # Follow a chain of symbolic links. Use readlink @@ -19833,13 +19936,13 @@ fi if test "x$READLINK" != x; then - TEST_COMPILER=`$READLINK -f $TEST_COMPILER` + SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL` else # Save the current directory for restoring afterwards STARTDIR=$PWD COUNTER=0 - sym_link_dir=`$DIRNAME $TEST_COMPILER` - sym_link_file=`$BASENAME $TEST_COMPILER` + sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL` + sym_link_file=`$BASENAME $SYMLINK_ORIGINAL` cd $sym_link_dir # Use -P flag to resolve symlinks in directories. cd `$THEPWDCMD -P` @@ -19859,456 +19962,27 @@ let COUNTER=COUNTER+1 done cd $STARTDIR - TEST_COMPILER=$sym_link_dir/$sym_link_file - fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 -$as_echo "$TEST_COMPILER" >&6; } - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5 -$as_echo_n "checking if CC is disguised ccache... " >&6; } - - COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` - if test "x$COMPILER_BASENAME" = "xccache"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 -$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } - # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. - # We want to control ccache invocation ourselves, so ignore this cc and try - # searching again. - - # Remove the path to the fake ccache cc from the PATH - RETRY_COMPILER_SAVED_PATH="$PATH" - COMPILER_DIRNAME=`$DIRNAME $CC` - PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" - - # Try again looking for our compiler - if test -n "$ac_tool_prefix"; then - for ac_prog in $COMPILER_CHECK_LIST - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PROPER_COMPILER_CC"; then - ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC -if test -n "$PROPER_COMPILER_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 -$as_echo "$PROPER_COMPILER_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PROPER_COMPILER_CC" && break - done -fi -if test -z "$PROPER_COMPILER_CC"; then - ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC - for ac_prog in $COMPILER_CHECK_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_PROPER_COMPILER_CC"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC -if test -n "$ac_ct_PROPER_COMPILER_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5 -$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_PROPER_COMPILER_CC" && break -done - - if test "x$ac_ct_PROPER_COMPILER_CC" = x; then - PROPER_COMPILER_CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC - fi -fi - - - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$PROPER_COMPILER_CC" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path=`$CYGPATH -u "$path"` - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path=`$CYGPATH -u "$path"` - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 - fi - fi - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file presence. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - # Short path failed, file does not exist as specified. - # Try adding .exe or .cmd - if test -f "${new_path}.exe"; then - input_to_shortpath="${new_path}.exe" - elif test -f "${new_path}.cmd"; then - input_to_shortpath="${new_path}.cmd" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 -$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 - fi - else - input_to_shortpath="$new_path" - fi - - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. - new_path="$input_to_shortpath" - - input_path="$input_to_shortpath" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-stile (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" - fi - fi - - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" - fi - fi - - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$PROPER_COMPILER_CC" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - - new_path=`$WHICH "$new_path" 2> /dev/null` - - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 - fi - fi - - # Now new_path has a complete unix path to the binary - if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then - # Keep paths in /bin as-is, but remove trailing .exe if any - new_path="${new_path/%.exe/}" - # Do not save /bin paths to all_fixpath_prefixes! - else - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $new_path` - - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - fi - - # Output is in $new_path - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") - fi - - else - # We're on a posix platform. Hooray! :) - # First separate the path from the arguments. This will split at the first - # space. - complete="$PROPER_COMPILER_CC" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Cannot rely on the command "which" here since it doesn't always work. - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test -z "$is_absolute_path"; then - # Path to executable is not absolute. Find it. - IFS_save="$IFS" - IFS=: - for p in $PATH; do - if test -f "$p/$path" && test -x "$p/$path"; then - new_path="$p/$path" - break - fi - done - IFS="$IFS_save" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;} - new_path="$path" - fi - - if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 -$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5 - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi - - if test "x$complete" != "x$new_complete"; then - PROPER_COMPILER_CC="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;} - fi - - PATH="$RETRY_COMPILER_SAVED_PATH" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5 -$as_echo_n "checking for resolved symbolic links for CC... " >&6; } - - if test "x$OPENJDK_BUILD_OS" != xwindows; then - # Follow a chain of symbolic links. Use readlink - # where it exists, else fall back to horribly - # complicated shell code. - if test "x$READLINK_TESTED" != yes; then - # On MacOSX there is a readlink tool with a different - # purpose than the GNU readlink tool. Check the found readlink. - ISGNU=`$READLINK --version 2>&1 | $GREP GNU` - if test "x$ISGNU" = x; then - # A readlink that we do not know how to use. - # Are there other non-GNU readlinks out there? - READLINK_TESTED=yes - READLINK= - fi - fi - - if test "x$READLINK" != x; then - PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC` - else - # Save the current directory for restoring afterwards - STARTDIR=$PWD - COUNTER=0 - sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` - sym_link_file=`$BASENAME $PROPER_COMPILER_CC` - cd $sym_link_dir - # Use -P flag to resolve symlinks in directories. - cd `$THEPWDCMD -P` - sym_link_dir=`$THEPWDCMD -P` - # Resolve file symlinks - while test $COUNTER -lt 20; do - ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` - if test "x$ISLINK" == x; then - # This is not a symbolic link! We are done! - break - fi - # Again resolve directory symlinks since the target of the just found - # link could be in a different directory - cd `$DIRNAME $ISLINK` - sym_link_dir=`$THEPWDCMD -P` - sym_link_file=`$BASENAME $ISLINK` - let COUNTER=COUNTER+1 - done - cd $STARTDIR - PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file - fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5 -$as_echo "$PROPER_COMPILER_CC" >&6; } - CC="$PROPER_COMPILER_CC" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5 -$as_echo "no, keeping CC" >&6; } - CC="$TEST_COMPILER" - fi + SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file + fi + fi + + if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5 +$as_echo "no symlink" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5 +$as_echo "$SYMLINK_ORIGINAL" >&6; } + + # We can't handle ccache by gcc wrappers, since we need to know if we're + # using ccache. Instead ccache usage must be controlled by a configure option. + COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"` + if test "x$COMPILER_BASENAME" = "xccache"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5 +$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;} + as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5 + fi + fi + COMPILER=$CC COMPILER_NAME=$COMPILER_NAME @@ -20356,14 +20030,24 @@ fi else COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - # Check that this is likely to be GCC. - $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null + # Check that this is GCC or the compatible distcc. + $COMPILER --version 2>&1 | $GREP -E "^(gcc|g\+\+|distcc)" >&5 2>&1 if test $? -ne 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 -$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} - as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + $COMPILER --version 2>&1 | $GREP "clang" >&5 2>&1 + if test $? -ne 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} + as_fn_error $? "GCC or Clang compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Clang compiler detected. The GCC compiler is recommended." >&5 +$as_echo "$as_me: WARNING: Clang compiler detected. The GCC compiler is recommended." >&2;} + fi fi # First line typically looks something like: @@ -21411,11 +21095,10 @@ fi TEST_COMPILER="$CXX" - # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links - # to 'xlc' but it is crucial that we invoke the compiler with the right name! - if test "x$OPENJDK_BUILD_OS" != xaix; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5 $as_echo_n "checking resolved symbolic links for CXX... " >&6; } + SYMLINK_ORIGINAL="$TEST_COMPILER" if test "x$OPENJDK_BUILD_OS" != xwindows; then # Follow a chain of symbolic links. Use readlink @@ -21434,13 +21117,13 @@ fi if test "x$READLINK" != x; then - TEST_COMPILER=`$READLINK -f $TEST_COMPILER` + SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL` else # Save the current directory for restoring afterwards STARTDIR=$PWD COUNTER=0 - sym_link_dir=`$DIRNAME $TEST_COMPILER` - sym_link_file=`$BASENAME $TEST_COMPILER` + sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL` + sym_link_file=`$BASENAME $SYMLINK_ORIGINAL` cd $sym_link_dir # Use -P flag to resolve symlinks in directories. cd `$THEPWDCMD -P` @@ -21460,456 +21143,27 @@ let COUNTER=COUNTER+1 done cd $STARTDIR - TEST_COMPILER=$sym_link_dir/$sym_link_file - fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5 -$as_echo "$TEST_COMPILER" >&6; } - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5 -$as_echo_n "checking if CXX is disguised ccache... " >&6; } - - COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` - if test "x$COMPILER_BASENAME" = "xccache"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5 -$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; } - # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. - # We want to control ccache invocation ourselves, so ignore this cc and try - # searching again. - - # Remove the path to the fake ccache cc from the PATH - RETRY_COMPILER_SAVED_PATH="$PATH" - COMPILER_DIRNAME=`$DIRNAME $CXX` - PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" - - # Try again looking for our compiler - if test -n "$ac_tool_prefix"; then - for ac_prog in $COMPILER_CHECK_LIST - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$PROPER_COMPILER_CXX"; then - ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX -if test -n "$PROPER_COMPILER_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 -$as_echo "$PROPER_COMPILER_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$PROPER_COMPILER_CXX" && break - done -fi -if test -z "$PROPER_COMPILER_CXX"; then - ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX - for ac_prog in $COMPILER_CHECK_LIST -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_PROPER_COMPILER_CXX"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX -if test -n "$ac_ct_PROPER_COMPILER_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5 -$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_PROPER_COMPILER_CXX" && break -done - - if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then - PROPER_COMPILER_CXX="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX - fi -fi - - - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$PROPER_COMPILER_CXX" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path=`$CYGPATH -u "$path"` - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path=`$CYGPATH -u "$path"` - new_path=`$WHICH "$new_path" 2> /dev/null` - # bat and cmd files are not always considered executable in cygwin causing which - # to not find them - if test "x$new_path" = x \ - && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ - && test "x`$LS \"$path\" 2>/dev/null`" != x; then - new_path=`$CYGPATH -u "$path"` - fi - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 - fi - fi - - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then - # "foo.exe" is OK but "foo" is an error. - # - # This test is therefore slightly more accurate than "test -f" to check for file presence. - # It is also a way to make sure we got the proper file name for the real test later on. - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` - if test "x$test_shortpath" = x; then - # Short path failed, file does not exist as specified. - # Try adding .exe or .cmd - if test -f "${new_path}.exe"; then - input_to_shortpath="${new_path}.exe" - elif test -f "${new_path}.cmd"; then - input_to_shortpath="${new_path}.cmd" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5 -$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;} - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 - fi - else - input_to_shortpath="$new_path" - fi - - # Call helper function which possibly converts this using DOS-style short mode. - # If so, the updated path is stored in $new_path. - new_path="$input_to_shortpath" - - input_path="$input_to_shortpath" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - shortmode_path=`$CYGPATH -s -m -a "$input_path"` - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then - # Going to short mode and back again did indeed matter. Since short mode is - # case insensitive, let's make it lowercase to improve readability. - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - # Now convert it back to Unix-stile (cygpath) - input_path=`$CYGPATH -u "$shortmode_path"` - new_path="$input_path" - fi - fi - - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` - if test "x$test_cygdrive_prefix" = x; then - # As a simple fix, exclude /usr/bin since it's not a real path. - if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then - # The path is in a Cygwin special directory (e.g. /home). We need this converted to - # a path prefixed by /cygdrive for fixpath to work. - new_path="$CYGWIN_ROOT_PATH$input_path" - fi - fi - - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - - # First separate the path from the arguments. This will split at the first - # space. - complete="$PROPER_COMPILER_CXX" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Input might be given as Windows format, start by converting to - # unix format. - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - - # Now try to locate executable using which - new_path=`$WHICH "$new_path" 2> /dev/null` - - if test "x$new_path" = x; then - # Oops. Which didn't find the executable. - # The splitting of arguments from the executable at a space might have been incorrect, - # since paths with space are more likely in Windows. Give it another try with the whole - # argument. - path="$complete" - arguments="EOL" - new_path="$path" - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - - new_path=`$WHICH "$new_path" 2> /dev/null` - - if test "x$new_path" = x; then - # It's still not found. Now this is an unrecoverable error. - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5 -$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 - fi - fi - - # Now new_path has a complete unix path to the binary - if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then - # Keep paths in /bin as-is, but remove trailing .exe if any - new_path="${new_path/%.exe/}" - # Do not save /bin paths to all_fixpath_prefixes! - else - # Not in mixed or Windows style, start by that. - new_path=`cmd //c echo $new_path` - - input_path="$new_path" - # Check if we need to convert this using DOS-style short mode. If the path - # contains just simple characters, use it. Otherwise (spaces, weird characters), - # take no chances and rewrite it. - # Note: m4 eats our [], so we need to use [ and ] instead. - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` - if test "x$has_forbidden_chars" != x; then - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - fi - - # Output is in $new_path - - windows_path="$new_path" - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then - unix_path=`$CYGPATH -u "$windows_path"` - new_path="$unix_path" - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` - new_path="$unix_path" - fi - - # remove trailing .exe if any - new_path="${new_path/%.exe/}" - - # Save the first 10 bytes of this path to the storage, so fixpath can work. - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") - fi - - else - # We're on a posix platform. Hooray! :) - # First separate the path from the arguments. This will split at the first - # space. - complete="$PROPER_COMPILER_CXX" - path="${complete%% *}" - tmp="$complete EOL" - arguments="${tmp#* }" - - # Cannot rely on the command "which" here since it doesn't always work. - is_absolute_path=`$ECHO "$path" | $GREP ^/` - if test -z "$is_absolute_path"; then - # Path to executable is not absolute. Find it. - IFS_save="$IFS" - IFS=: - for p in $PATH; do - if test -f "$p/$path" && test -x "$p/$path"; then - new_path="$p/$path" - break - fi - done - IFS="$IFS_save" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5 -$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;} - new_path="$path" - fi - - if test "x$new_path" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5 -$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;} - has_space=`$ECHO "$complete" | $GREP " "` - if test "x$has_space" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5 -$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;} - fi - as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5 - fi - fi - - # Now join together the path and the arguments once again - if test "x$arguments" != xEOL; then - new_complete="$new_path ${arguments% *}" - else - new_complete="$new_path" - fi - - if test "x$complete" != "x$new_complete"; then - PROPER_COMPILER_CXX="$new_complete" - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5 -$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;} - fi - - PATH="$RETRY_COMPILER_SAVED_PATH" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5 -$as_echo_n "checking for resolved symbolic links for CXX... " >&6; } - - if test "x$OPENJDK_BUILD_OS" != xwindows; then - # Follow a chain of symbolic links. Use readlink - # where it exists, else fall back to horribly - # complicated shell code. - if test "x$READLINK_TESTED" != yes; then - # On MacOSX there is a readlink tool with a different - # purpose than the GNU readlink tool. Check the found readlink. - ISGNU=`$READLINK --version 2>&1 | $GREP GNU` - if test "x$ISGNU" = x; then - # A readlink that we do not know how to use. - # Are there other non-GNU readlinks out there? - READLINK_TESTED=yes - READLINK= - fi - fi - - if test "x$READLINK" != x; then - PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX` - else - # Save the current directory for restoring afterwards - STARTDIR=$PWD - COUNTER=0 - sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` - sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` - cd $sym_link_dir - # Use -P flag to resolve symlinks in directories. - cd `$THEPWDCMD -P` - sym_link_dir=`$THEPWDCMD -P` - # Resolve file symlinks - while test $COUNTER -lt 20; do - ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` - if test "x$ISLINK" == x; then - # This is not a symbolic link! We are done! - break - fi - # Again resolve directory symlinks since the target of the just found - # link could be in a different directory - cd `$DIRNAME $ISLINK` - sym_link_dir=`$THEPWDCMD -P` - sym_link_file=`$BASENAME $ISLINK` - let COUNTER=COUNTER+1 - done - cd $STARTDIR - PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file - fi - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5 -$as_echo "$PROPER_COMPILER_CXX" >&6; } - CXX="$PROPER_COMPILER_CXX" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5 -$as_echo "no, keeping CXX" >&6; } - CXX="$TEST_COMPILER" - fi + SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file + fi + fi + + if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5 +$as_echo "no symlink" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5 +$as_echo "$SYMLINK_ORIGINAL" >&6; } + + # We can't handle ccache by gcc wrappers, since we need to know if we're + # using ccache. Instead ccache usage must be controlled by a configure option. + COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"` + if test "x$COMPILER_BASENAME" = "xccache"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5 +$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;} + as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5 + fi + fi + COMPILER=$CXX COMPILER_NAME=$COMPILER_NAME @@ -21957,14 +21211,24 @@ fi else COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - # Check that this is likely to be GCC. - $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null + # Check that this is GCC or the compatible distcc. + $COMPILER --version 2>&1 | $GREP -E "^(gcc|g\+\+|distcc)" >&5 2>&1 if test $? -ne 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5 -$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler." >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} - as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + $COMPILER --version 2>&1 | $GREP "clang" >&5 2>&1 + if test $? -ne 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&5 +$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either." >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5 +$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;} + as_fn_error $? "GCC or Clang compiler is required. Try setting --with-tools-dir." "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Clang compiler detected. The GCC compiler is recommended." >&5 +$as_echo "$as_me: WARNING: Clang compiler detected. The GCC compiler is recommended." >&2;} + fi fi # First line typically looks something like: @@ -29667,6 +28931,7 @@ # case $COMPILER_NAME in gcc ) + CFLAGS_WARNINGS_ARE_ERRORS="-Werror" CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ -pipe \ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" @@ -29685,6 +28950,7 @@ esac ;; ossc ) + CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all" CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" case $OPENJDK_TARGET_CPU_ARCH in x86 ) @@ -29707,6 +28973,7 @@ LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK" ;; cl ) + CFLAGS_WARNINGS_ARE_ERRORS="-WX" CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ @@ -29722,6 +28989,7 @@ ;; esac + ############################################################################### # Adjust flags according to debug level. @@ -29766,6 +29034,9 @@ else CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" fi + if test "x$OPENJDK_TARGET_CPU" = xppc64le; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2" + fi if test "x$OPENJDK_TARGET_OS" = xlinux; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" fi @@ -30051,6 +29322,30 @@ + # Check whether --enable-warnings-as-errors was given. +if test "${enable_warnings_as_errors+set}" = set; then : + enableval=$enable_warnings_as_errors; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if warnings are errors" >&5 +$as_echo_n "checking if warnings are errors... " >&6; } + if test "x$enable_warnings_as_errors" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5 +$as_echo "yes (explicitly set)" >&6; } + WARNINGS_AS_ERRORS=true + elif test "x$enable_warnings_as_errors" = "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + WARNINGS_AS_ERRORS=false + elif test "x$enable_warnings_as_errors" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 +$as_echo "no (default)" >&6; } + WARNINGS_AS_ERRORS=false + else + as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5 + fi + # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.' USING_BROKEN_SUSE_LD=no @@ -34850,10 +34145,43 @@ # Check for the jpeg library # - USE_EXTERNAL_LIBJPEG=true - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 -$as_echo_n "checking for main in -ljpeg... " >&6; } -if ${ac_cv_lib_jpeg_main+:} false; then : + +# Check whether --with-libjpeg was given. +if test "${with_libjpeg+set}" = set; then : + withval=$with_libjpeg; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5 +$as_echo_n "checking for which libjpeg to use... " >&6; } + + # default is bundled + DEFAULT_LIBJPEG=bundled + + # + # if user didn't specify, use DEFAULT_LIBJPEG + # + if test "x${with_libjpeg}" = "x"; then + with_libjpeg=${DEFAULT_LIBJPEG} + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5 +$as_echo "${with_libjpeg}" >&6; } + + if test "x${with_libjpeg}" = "xbundled"; then + USE_EXTERNAL_LIBJPEG=false + elif test "x${with_libjpeg}" = "xsystem"; then + ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" +if test "x$ac_cv_header_jpeglib_h" = xyes; then : + +else + as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5 +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5 +$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; } +if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -34861,27 +34189,33 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -int -main () -{ -return main (); +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char jpeg_CreateDecompress (); +int +main () +{ +return jpeg_CreateDecompress (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_jpeg_main=yes -else - ac_cv_lib_jpeg_main=no + ac_cv_lib_jpeg_jpeg_CreateDecompress=yes +else + ac_cv_lib_jpeg_jpeg_CreateDecompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 -$as_echo "$ac_cv_lib_jpeg_main" >&6; } -if test "x$ac_cv_lib_jpeg_main" = xyes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5 +$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; } +if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBJPEG 1 _ACEOF @@ -34889,11 +34223,14 @@ LIBS="-ljpeg $LIBS" else - USE_EXTERNAL_LIBJPEG=false - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 -$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} - -fi + as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5 +fi + + + USE_EXTERNAL_LIBJPEG=true + else + as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5 + fi @@ -34993,6 +34330,227 @@ ############################################################################### # + # Check for the lcms2 library + # + + +# Check whether --with-lcms was given. +if test "${with_lcms+set}" = set; then : + withval=$with_lcms; +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5 +$as_echo_n "checking for which lcms to use... " >&6; } + + DEFAULT_LCMS=bundled + + # + # If user didn't specify, use DEFAULT_LCMS + # + if test "x${with_lcms}" = "x"; then + with_lcms=${DEFAULT_LCMS} + fi + + if test "x${with_lcms}" = "xbundled"; then + USE_EXTERNAL_LCMS=false + { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 +$as_echo "bundled" >&6; } + elif test "x${with_lcms}" = "xsystem"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 +$as_echo_n "checking for LCMS... " >&6; } + +if test -n "$LCMS_CFLAGS"; then + pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LCMS_LIBS"; then + pkg_cv_LCMS_LIBS="$LCMS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 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 + LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1` + else + LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LCMS_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LCMS_FOUND=no +elif test $pkg_failed = untried; then + LCMS_FOUND=no +else + LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS + LCMS_LIBS=$pkg_cv_LCMS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LCMS_FOUND=yes +fi + if test "x${LCMS_FOUND}" = "xyes"; then + USE_EXTERNAL_LCMS=true + else + as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5 + fi + else + as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5 + fi + + + + ############################################################################### + # + # Check for the png library + # + + +# Check whether --with-libpng was given. +if test "${with_libpng+set}" = set; then : + withval=$with_libpng; +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5 +$as_echo_n "checking for which libpng to use... " >&6; } + + # default is bundled + DEFAULT_LIBPNG=bundled + + # + # if user didn't specify, use DEFAULT_LIBPNG + # + if test "x${with_libpng}" = "x"; then + with_libpng=${DEFAULT_LIBPNG} + fi + + if test "x${with_libpng}" = "xbundled"; then + USE_EXTERNAL_LIBPNG=false + { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 +$as_echo "bundled" >&6; } + elif test "x${with_libpng}" = "xsystem"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 +$as_echo_n "checking for PNG... " >&6; } + +if test -n "$PNG_CFLAGS"; then + pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$PNG_LIBS"; then + pkg_cv_PNG_LIBS="$PNG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 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 + PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1` + else + PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PNG_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBPNG_FOUND=no +elif test $pkg_failed = untried; then + LIBPNG_FOUND=no +else + PNG_CFLAGS=$pkg_cv_PNG_CFLAGS + PNG_LIBS=$pkg_cv_PNG_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBPNG_FOUND=yes +fi + if test "x${LIBPNG_FOUND}" = "xyes"; then + USE_EXTERNAL_LIBPNG=true + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 +$as_echo "system" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 +$as_echo "system not found" >&6; } + as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5 + fi + else + as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5 + fi + + + ############################################################################### + # # Check for the zlib library # @@ -35238,6 +34796,118 @@ LIBS="$save_LIBS" + ############################################################################### + # + # Check for the NSS libraries + # + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build the Sun EC provider against the system NSS libraries" >&5 +$as_echo_n "checking whether to build the Sun EC provider against the system NSS libraries... " >&6; } + + # default is bundled + DEFAULT_SYSTEM_NSS=no + + # Check whether --enable-system-nss was given. +if test "${enable_system_nss+set}" = set; then : + enableval=$enable_system_nss; + case "${enableval}" in + yes) + system_nss=yes + ;; + *) + system_nss=no + ;; + esac + +else + + system_nss=${DEFAULT_SYSTEM_NSS} + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $system_nss" >&5 +$as_echo "$system_nss" >&6; } + + if test "x${system_nss}" = "xyes"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS" >&5 +$as_echo_n "checking for NSS... " >&6; } + +if test -n "$NSS_CFLAGS"; then + pkg_cv_NSS_CFLAGS="$NSS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss-softokn >= 3.16.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "nss-softokn >= 3.16.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NSS_CFLAGS=`$PKG_CONFIG --cflags "nss-softokn >= 3.16.1" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$NSS_LIBS"; then + pkg_cv_NSS_LIBS="$NSS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nss-softokn >= 3.16.1\""; } >&5 + ($PKG_CONFIG --exists --print-errors "nss-softokn >= 3.16.1") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_NSS_LIBS=`$PKG_CONFIG --libs "nss-softokn >= 3.16.1" 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 + NSS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nss-softokn >= 3.16.1" 2>&1` + else + NSS_PKG_ERRORS=`$PKG_CONFIG --print-errors "nss-softokn >= 3.16.1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$NSS_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + NSS_SOFTOKN_FOUND=no +elif test $pkg_failed = untried; then + NSS_SOFTOKN_FOUND=no +else + NSS_CFLAGS=$pkg_cv_NSS_CFLAGS + NSS_LIBS=$pkg_cv_NSS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + NSS_SOFTOKN_FOUND=yes +fi + if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then + NSS_LIBS="$NSS_LIBS -lfreebl"; + USE_EXTERNAL_NSS=true + else + as_fn_error $? "--enable-system-nss specified, but NSS not found." "$LINENO" 5 + fi + else + USE_EXTERNAL_NSS=false + fi + + + ############################################################################### # @@ -35580,10 +35250,11 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5 -$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; } - - if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the elliptic curve crypto implementation is present" >&5 +$as_echo_n "checking if the elliptic curve crypto implementation is present... " >&6; } + + if test "x${system_nss}" = "xyes" -o -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then ENABLE_INTREE_EC=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; }
--- a/common/autoconf/hotspot-spec.gmk.in Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/hotspot-spec.gmk.in Tue Mar 29 04:19:40 2016 +0100 @@ -71,6 +71,10 @@ LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) # Old name for OPENJDK_TARGET_CPU, uses i586 and amd64, instead of x86 and x86_64. ARCH=$(OPENJDK_TARGET_CPU_LEGACY) +# ppc64le uses the HotSpot ppc64 build +ifeq ($(OPENJDK_TARGET_CPU), ppc64le) + ARCH=ppc64 +endif # Legacy setting for building for a 64 bit machine. # If yes then this expands to _LP64:=1 @LP64@ @@ -135,6 +139,8 @@ ZIP_DEBUGINFO_FILES:=0 endif +COMPILER_WARNINGS_FATAL:=@WARNINGS_AS_ERRORS@ + # Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. # This is needed to get the LOG setting to work properly. include $(SRC_ROOT)/make/common/MakeBase.gmk
--- a/common/autoconf/jdk-options.m4 Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/jdk-options.m4 Tue Mar 29 04:19:40 2016 +0100 @@ -158,7 +158,7 @@ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then INCLUDE_SA=false fi - if test "x$VAR_CPU" = xppc64 ; then + if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then INCLUDE_SA=false fi if test "x$OPENJDK_TARGET_CPU" = xaarch64; then @@ -414,9 +414,10 @@ # AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], [ - AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) + AC_REQUIRE([LIB_SETUP_MISC_LIBS]) + AC_MSG_CHECKING([if the elliptic curve crypto implementation is present]) - if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then + if test "x${system_nss}" = "xyes" -o -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then ENABLE_INTREE_EC=yes AC_MSG_RESULT([yes]) else
--- a/common/autoconf/libraries.m4 Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/libraries.m4 Tue Mar 29 04:19:40 2016 +0100 @@ -595,11 +595,36 @@ # Check for the jpeg library # - USE_EXTERNAL_LIBJPEG=true - AC_CHECK_LIB(jpeg, main, [], - [ USE_EXTERNAL_LIBJPEG=false - AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source]) - ]) + AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg], + [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) + + AC_MSG_CHECKING([for which libjpeg to use]) + + # default is bundled + DEFAULT_LIBJPEG=bundled + + # + # if user didn't specify, use DEFAULT_LIBJPEG + # + if test "x${with_libjpeg}" = "x"; then + with_libjpeg=${DEFAULT_LIBJPEG} + fi + + AC_MSG_RESULT(${with_libjpeg}) + + if test "x${with_libjpeg}" = "xbundled"; then + USE_EXTERNAL_LIBJPEG=false + elif test "x${with_libjpeg}" = "xsystem"; then + AC_CHECK_HEADER(jpeglib.h, [], + [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])]) + AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [], + [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])]) + + USE_EXTERNAL_LIBJPEG=true + else + AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled']) + fi + AC_SUBST(USE_EXTERNAL_LIBJPEG) ############################################################################### @@ -641,6 +666,82 @@ ############################################################################### # + # Check for the lcms2 library + # + + AC_ARG_WITH(lcms, [AS_HELP_STRING([--with-lcms], + [use lcms2 from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) + + AC_MSG_CHECKING([for which lcms to use]) + + DEFAULT_LCMS=bundled + + # + # If user didn't specify, use DEFAULT_LCMS + # + if test "x${with_lcms}" = "x"; then + with_lcms=${DEFAULT_LCMS} + fi + + if test "x${with_lcms}" = "xbundled"; then + USE_EXTERNAL_LCMS=false + AC_MSG_RESULT([bundled]) + elif test "x${with_lcms}" = "xsystem"; then + AC_MSG_RESULT([system]) + PKG_CHECK_MODULES([LCMS], [lcms2], [LCMS_FOUND=yes], [LCMS_FOUND=no]) + if test "x${LCMS_FOUND}" = "xyes"; then + USE_EXTERNAL_LCMS=true + else + AC_MSG_ERROR([--with-lcms=system specified, but no lcms found!]) + fi + else + AC_MSG_ERROR([Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled']) + fi + + AC_SUBST(USE_EXTERNAL_LCMS) + + ############################################################################### + # + # Check for the png library + # + + AC_ARG_WITH(libpng, [AS_HELP_STRING([--with-libpng], + [use libpng from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) + + + AC_MSG_CHECKING([for which libpng to use]) + + # default is bundled + DEFAULT_LIBPNG=bundled + + # + # if user didn't specify, use DEFAULT_LIBPNG + # + if test "x${with_libpng}" = "x"; then + with_libpng=${DEFAULT_LIBPNG} + fi + + if test "x${with_libpng}" = "xbundled"; then + USE_EXTERNAL_LIBPNG=false + AC_MSG_RESULT([bundled]) + elif test "x${with_libpng}" = "xsystem"; then + PKG_CHECK_MODULES(PNG, libpng, + [ LIBPNG_FOUND=yes ], + [ LIBPNG_FOUND=no ]) + if test "x${LIBPNG_FOUND}" = "xyes"; then + USE_EXTERNAL_LIBPNG=true + AC_MSG_RESULT([system]) + else + AC_MSG_RESULT([system not found]) + AC_MSG_ERROR([--with-libpng=system specified, but no libpng found!]) + fi + else + AC_MSG_ERROR([Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled']) + fi + AC_SUBST(USE_EXTERNAL_LIBPNG) + + ############################################################################### + # # Check for the zlib library # @@ -731,6 +832,47 @@ LIBDL="$LIBS" AC_SUBST(LIBDL) LIBS="$save_LIBS" + + ############################################################################### + # + # Check for the NSS libraries + # + + AC_MSG_CHECKING([whether to build the Sun EC provider against the system NSS libraries]) + + # default is bundled + DEFAULT_SYSTEM_NSS=no + + AC_ARG_ENABLE([system-nss], [AS_HELP_STRING([--enable-system-nss], + [build the SunEC provider using the system NSS libraries @<:@disabled@:>@])], + [ + case "${enableval}" in + yes) + system_nss=yes + ;; + *) + system_nss=no + ;; + esac + ], + [ + system_nss=${DEFAULT_SYSTEM_NSS} + ]) + AC_MSG_RESULT([$system_nss]) + + if test "x${system_nss}" = "xyes"; then + PKG_CHECK_MODULES(NSS, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no]) + if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then + NSS_LIBS="$NSS_LIBS -lfreebl"; + USE_EXTERNAL_NSS=true + else + AC_MSG_ERROR([--enable-system-nss specified, but NSS not found.]) + fi + else + USE_EXTERNAL_NSS=false + fi + AC_SUBST(USE_EXTERNAL_NSS) + ]) AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
--- a/common/autoconf/platform.m4 Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/platform.m4 Tue Mar 29 04:19:40 2016 +0100 @@ -67,7 +67,7 @@ VAR_CPU_ENDIAN=big ;; powerpc64le) - VAR_CPU=ppc64 + VAR_CPU=ppc64le VAR_CPU_ARCH=ppc VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little @@ -186,6 +186,10 @@ AC_MSG_CHECKING([openjdk-build os-cpu]) AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU]) + AC_MSG_CHECKING([openjdk-build bit-size]) + AC_MSG_RESULT([$OPENJDK_BUILD_CPU_BITS]) + AC_MSG_CHECKING([openjdk-build endianness]) + AC_MSG_RESULT([$OPENJDK_BUILD_CPU_ENDIAN]) # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables. PLATFORM_EXTRACT_VARS_FROM_OS($host_os) @@ -207,6 +211,10 @@ AC_MSG_CHECKING([openjdk-target os-cpu]) AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) + AC_MSG_CHECKING([openjdk-target bit-size]) + AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS]) + AC_MSG_CHECKING([openjdk-target endianness]) + AC_MSG_RESULT([$OPENJDK_TARGET_CPU_ENDIAN]) ]) # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
--- a/common/autoconf/spec.gmk.in Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/spec.gmk.in Tue Mar 29 04:19:40 2016 +0100 @@ -331,6 +331,9 @@ CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@ +# A global flag (true or false) determining if native warnings are considered errors. +WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@ + CXX:=@FIXPATH@ @CCACHE@ @CXX@ #CXXFLAGS:=@CXXFLAGS@ @@ -452,9 +455,17 @@ # overriding that value by using ?=. JAVAC_FLAGS?=@JAVAC_FLAGS@ +ifneq (@WARNINGS_AS_ERRORS@,false) + JAVAC_WERROR:=-Werror +endif + JAVAH=@FIXPATH@ $(BOOT_JDK)/bin/javah +ifeq (@ALT_JAR_CMD@,false) JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar +else +JAR=@FIXPATH@ @ALT_JAR_CMD@ +endif RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic @@ -647,6 +658,22 @@ # Read-only single-machine data INSTALL_SYSCONFDIR=@sysconfdir@ +#################################################### +# +# Libraries +# + +USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@ +LCMS_CFLAGS:=@LCMS_CFLAGS@ +LCMS_LIBS:=@LCMS_LIBS@ + +USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@ +PNG_LIBS:=@PNG_LIBS@ +PNG_CFLAGS:=@PNG_CFLAGS@ + +USE_EXTERNAL_NSS:=@USE_EXTERNAL_NSS@ +NSS_LIBS:=@NSS_LIBS@ +NSS_CFLAGS:=@NSS_CFLAGS@ #################################################### #
--- a/common/autoconf/toolchain.m4 Fri Mar 18 22:29:32 2016 -0700 +++ b/common/autoconf/toolchain.m4 Tue Mar 29 04:19:40 2016 +0100 @@ -71,12 +71,19 @@ fi else COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - # Check that this is likely to be GCC. - $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null + # Check that this is GCC or the compatible distcc. + $COMPILER --version 2>&1 | $GREP -E "^(gcc|g\+\+|distcc)" >&AS_MESSAGE_LOG_FD 2>&1 if test $? -ne 0; then - AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler.]) + AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the recommended GCC compiler.]) AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"]) - AC_MSG_ERROR([GCC compiler is required. Try setting --with-tools-dir.]) + $COMPILER --version 2>&1 | $GREP "clang" >&AS_MESSAGE_LOG_FD 2>&1 + if test $? -ne 0 ; then + AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the Clang compiler either.]) + AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"]) + AC_MSG_ERROR([GCC or Clang compiler is required. Try setting --with-tools-dir.]) + else + AC_MSG_WARN([Clang compiler detected. The GCC compiler is recommended.]) + fi fi # First line typically looks something like: @@ -147,40 +154,24 @@ fi BASIC_FIXUP_EXECUTABLE($1) TEST_COMPILER="[$]$1" - # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links - # to 'xlc' but it is crucial that we invoke the compiler with the right name! - if test "x$OPENJDK_BUILD_OS" != xaix; then - AC_MSG_CHECKING([resolved symbolic links for $1]) - BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) - AC_MSG_RESULT([$TEST_COMPILER]) - fi - AC_MSG_CHECKING([if $1 is disguised ccache]) - COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` - if test "x$COMPILER_BASENAME" = "xccache"; then - AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) - # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. - # We want to control ccache invocation ourselves, so ignore this cc and try - # searching again. + AC_MSG_CHECKING([resolved symbolic links for $1]) + SYMLINK_ORIGINAL="$TEST_COMPILER" + BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL) + if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then + AC_MSG_RESULT([no symlink]) + else + AC_MSG_RESULT([$SYMLINK_ORIGINAL]) - # Remove the path to the fake ccache cc from the PATH - RETRY_COMPILER_SAVED_PATH="$PATH" - COMPILER_DIRNAME=`$DIRNAME [$]$1` - PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" + # We can't handle ccache by gcc wrappers, since we need to know if we're + # using ccache. Instead ccache usage must be controlled by a configure option. + COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"` + if test "x$COMPILER_BASENAME" = "xccache"; then + AC_MSG_NOTICE([Please use --enable-ccache instead of providing a wrapped compiler.]) + AC_MSG_ERROR([$TEST_COMPILER is a symbolic link to ccache. This is not supported.]) + fi + fi - # Try again looking for our compiler - AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) - BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) - PATH="$RETRY_COMPILER_SAVED_PATH" - - AC_MSG_CHECKING([for resolved symbolic links for $1]) - BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1) - AC_MSG_RESULT([$PROPER_COMPILER_$1]) - $1="$PROPER_COMPILER_$1" - else - AC_MSG_RESULT([no, keeping $1]) - $1="$TEST_COMPILER" - fi TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) ]) @@ -957,6 +948,7 @@ # case $COMPILER_NAME in gcc ) + CFLAGS_WARNINGS_ARE_ERRORS="-Werror" CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ -pipe \ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" @@ -975,6 +967,7 @@ esac ;; ossc ) + CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all" CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" case $OPENJDK_TARGET_CPU_ARCH in x86 ) @@ -997,6 +990,7 @@ LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK" ;; cl ) + CFLAGS_WARNINGS_ARE_ERRORS="-WX" CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ @@ -1011,6 +1005,7 @@ esac ;; esac + AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS) ############################################################################### @@ -1056,6 +1051,9 @@ else CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" fi + if test "x$OPENJDK_TARGET_CPU" = xppc64le; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2" + fi if test "x$OPENJDK_TARGET_OS" = xlinux; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" fi @@ -1250,6 +1248,23 @@ [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false]) AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG) + AC_ARG_ENABLE([warnings-as-errors], [AS_HELP_STRING([--enable-warnings-as-errors], + [consider warnings to be an error @<:@disabled@:>@])]) + + AC_MSG_CHECKING([if warnings are errors]) + if test "x$enable_warnings_as_errors" = "xyes"; then + AC_MSG_RESULT([yes (explicitly set)]) + WARNINGS_AS_ERRORS=true + elif test "x$enable_warnings_as_errors" = "xno"; then + AC_MSG_RESULT([no]) + WARNINGS_AS_ERRORS=false + elif test "x$enable_warnings_as_errors" = "x"; then + AC_MSG_RESULT([no (default)]) + WARNINGS_AS_ERRORS=false + else + AC_MSG_ERROR([--enable-warnings-as-errors accepts no argument]) + fi + AC_SUBST(WARNINGS_AS_ERRORS) # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.' USING_BROKEN_SUSE_LD=no
--- a/make/common/NativeCompilation.gmk Fri Mar 18 22:29:32 2016 -0700 +++ b/make/common/NativeCompilation.gmk Tue Mar 29 04:19:40 2016 +0100 @@ -352,6 +352,19 @@ $1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER) endif + # Check if warnings should be considered errors. + # Pick first binary specific, then general setting. + ifeq ($$($1_WARNINGS_AS_ERRORS),) + $1_WARNINGS_AS_ERRORS := $$(WARNINGS_AS_ERRORS) + else + $1_WARNINGS_AS_ERRORS := $$($1_WARNINGS_AS_ERRORS) + endif + + ifeq ($$($1_WARNINGS_AS_ERRORS), true) + $1_EXTRA_CFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) + $1_EXTRA_CXXFLAGS += $(CFLAGS_WARNINGS_ARE_ERRORS) + endif + ifeq (NONE, $$($1_OPTIMIZATION)) $1_EXTRA_CFLAGS += $(C_O_FLAG_NONE) $1_EXTRA_CXXFLAGS += $(CXX_O_FLAG_NONE) @@ -435,6 +448,8 @@ $(CP) $$< $$@ endif + ifneq ($(STRIP_POLICY), no_strip) + ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows ifeq ($(OPENJDK_TARGET_OS), solaris) @@ -486,6 +501,8 @@ $1 += $$($1_OUTPUT_DIR)/$$(LIBRARY_PREFIX)$$($1_LIBRARY).debuginfo endif endif + + endif # no_strip endif endif @@ -519,6 +536,8 @@ $(CP) $$< $$@ endif + ifneq ($(STRIP_POLICY), no_strip) + ifneq ($(OPENJDK_TARGET_OS), macosx) # OBJCOPY is not used on MacOS X ifneq ($(OPENJDK_TARGET_OS), windows) # nor on Windows ifeq ($(OPENJDK_TARGET_OS), solaris) @@ -570,6 +589,8 @@ $1 += $$($1_OUTPUT_DIR)/$$($1_PROGRAM).debuginfo endif endif + + endif # no_strip endif endif