summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Callear2018-04-25 08:52:38 -0600
committerZach Callear2018-04-25 09:16:48 -0600
commit0cbd8d53e02b0d8e788aed42a7cfbf83ca0ed55d (patch)
tree2c7e224e5e4e2d4e8085d044bfb2ee024ec4e0f8
parent4ad9e5add3e4b929280e5aa01a8aba3c0059d343 (diff)
downloadaur-0cbd8d53e02b0d8e788aed42a7cfbf83ca0ed55d.tar.gz
Update to 8u172 b11
Update to OpenJDK 1.8 8u171 b11, and more closely match Arch official PKGBUILD.
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD48
-rw-r--r--build_with_gcc6.patch1098
3 files changed, 41 insertions, 1147 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 70efa0cd991..59e173a0b46 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,12 @@
pkgbase = java8-openjdk
- pkgver = 8.u152
+ pkgver = 8.u172
pkgrel = 1
url = http://openjdk.java.net/
- arch = i686
arch = x86_64
+ arch = i686
license = custom
makedepends = java-environment>=7
+ makedepends = ccache
makedepends = cpio
makedepends = unzip
makedepends = zip
@@ -14,25 +15,24 @@ pkgbase = java8-openjdk
makedepends = fontconfig
makedepends = libcups
makedepends = alsa-lib
- makedepends = fontconfig
- source = jdk8u-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/archive/jdk8u152-b03.tar.gz
- source = corba-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/jdk8u152-b03.tar.gz
- source = hotspot-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/jdk8u152-b03.tar.gz
- source = jdk-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/archive/jdk8u152-b03.tar.gz
- source = jaxws-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/archive/jdk8u152-b03.tar.gz
- source = jaxp-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/archive/jdk8u152-b03.tar.gz
- source = langtools-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/archive/jdk8u152-b03.tar.gz
- source = nashorn-jdk8u152-b03.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/nashorn/archive/jdk8u152-b03.tar.gz
+ source = jdk8u-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/archive/jdk8u172-b11.tar.gz
+ source = corba-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/jdk8u172-b11.tar.gz
+ source = hotspot-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/jdk8u172-b11.tar.gz
+ source = jdk-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/archive/jdk8u172-b11.tar.gz
+ source = jaxws-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/archive/jdk8u172-b11.tar.gz
+ source = jaxp-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/archive/jdk8u172-b11.tar.gz
+ source = langtools-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/archive/jdk8u172-b11.tar.gz
+ source = nashorn-jdk8u172-b11.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/nashorn/archive/jdk8u172-b11.tar.gz
source = add-fontconfig.patch
source = enable-infinality.patch
- sha256sums = e5719264ea5370815c233bb8f055eacef4e4aaaef971fb84f731926ce9bc20f6
- sha256sums = 6968085c367e832a4b166daab89eaf61bb58acbe8d930a3d944ff2327bd846a2
- sha256sums = 183f958982b2a1c4f10fc834ae8e8d4ac254bf1a65373fd001ab4e58a99b0983
- sha256sums = ea44540bf90913ba5d122b093005d6e2ebfb0a07535187dc71f1cda639b8d185
- sha256sums = f3d8c2342970c229985d32bb49e84d007f50df5a6b27991b8e1473ff45832bfc
- sha256sums = 843a397b1d610db27b378d006ade2d98ce53d5e1f7952bf64fa865f0119e6fd0
- sha256sums = 4d336740d2e94d2406eb310acc64b95332e5f276143e38efe663f42f67601e7b
- sha256sums = 7f94034dd260c5f14a8cf3ef66b05452ca991e3d0e7a22a5513385124a8c8fc4
+ sha256sums = f1ca31605360594cb57b21aa5888f253e9775125957f96afb1a9dbb71676af22
+ sha256sums = a89b558a4bb1d0368486a58d248a16b1760f8536fdc94ff70bf09e5c1bfcea24
+ sha256sums = f7a2652021b50d43c076df8f94cec13b82e2704c0d1535289074cb5e0eec31a0
+ sha256sums = 756b6855c9bdb7ae1ac4b7a4d2bafcbdad4ab6dd33ccc64efb94f9d4f21273d3
+ sha256sums = 8ad3b70c468cce6104f023ca5f4354462a47a38d9dc25994a6d04b2c18598432
+ sha256sums = 0193ff13167f6ff7d667cd32dd2d05e4591975a4404b433c9ff59d2d4ce54603
+ sha256sums = ef0f2042143cf6ddc508d81978fdb7cd900d38e5b166f40112d1967ceb09f036
+ sha256sums = 2a3bff4dfca022cb603cd46a6766fd1b7212adb473af5809b48504576bce6029
sha256sums = 3e67013b249fe702b0176e5d39f7ddef85ef0df121ef0b3a898ea82772712f55
sha256sums = efeee8db0710bc217b5e886224450f6cf50938004e8c140eb9aee0a699d2d5ac
@@ -52,7 +52,7 @@ pkgname = jre8-openjdk-headless-infinality
pkgname = jre8-openjdk-infinality
pkgdesc = OpenJDK Java 8 full runtime environment with infinality patch applied
install = install_jre8-openjdk.sh
- depends = jre8-openjdk-headless-infinality=8.u152-1
+ depends = jre8-openjdk-headless-infinality=8.u172-1
depends = xdg-utils
depends = hicolor-icon-theme
optdepends = icedtea-web: web browser plugin + Java Web Start
@@ -68,7 +68,7 @@ pkgname = jdk8-openjdk-infinality
pkgdesc = OpenJDK Java 8 development kit with infinality patch applied
install = install_jdk8-openjdk.sh
depends = java-environment-common
- depends = jre8-openjdk-infinality=8.u152-1
+ depends = jre8-openjdk-infinality=8.u172-1
provides = java-environment=8
provides = java-environment-openjdk=8
conflicts = jdk8-openjdk
diff --git a/PKGBUILD b/PKGBUILD
index 80e34390d45..3d0aced6e85 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: Andrejs Mivre┼ćiks <gim at fastmail dot fm>
+# Maintainer: Zach Callear <zach@callear.org>
+# Contributor: Andrejs Mivre┼ćiks <gim at fastmail dot fm>
# Contributor: Christoph Bayer <chrbayer@criby.de>
# Contributor: Guillaume ALAUX <guillaume@archlinux.org>
# Contributor: Boyan Ding <stu_dby@126.com>
@@ -13,16 +14,16 @@ pkgname=('jre8-openjdk-headless-infinality' 'jre8-openjdk-infinality' 'jdk8-open
pkgbase=java8-openjdk
_java_ver=8
# Found @ http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
-_jdk_update=152
-_jdk_build=03
+_jdk_update=172
+_jdk_build=11
pkgver=${_java_ver}.u${_jdk_update}
_repo_ver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
pkgrel=1
-arch=('i686' 'x86_64')
+arch=('x86_64' 'i686')
url='http://openjdk.java.net/'
license=('custom')
-makedepends=('java-environment>=7' 'cpio' 'unzip' 'zip' 'libxrender' 'libxtst'
- 'fontconfig' 'libcups' 'alsa-lib' 'fontconfig')
+makedepends=('java-environment>=7' 'ccache' 'cpio' 'unzip' 'zip'
+ 'libxrender' 'libxtst' 'fontconfig' 'libcups' 'alsa-lib')
_url_src=http://hg.openjdk.java.net/jdk8u/jdk8u
source=(jdk8u-${_repo_ver}.tar.gz::${_url_src}/archive/${_repo_ver}.tar.gz
corba-${_repo_ver}.tar.gz::${_url_src}/corba/archive/${_repo_ver}.tar.gz
@@ -34,22 +35,21 @@ source=(jdk8u-${_repo_ver}.tar.gz::${_url_src}/archive/${_repo_ver}.tar.gz
nashorn-${_repo_ver}.tar.gz::${_url_src}/nashorn/archive/${_repo_ver}.tar.gz
add-fontconfig.patch
enable-infinality.patch)
-sha256sums=('e5719264ea5370815c233bb8f055eacef4e4aaaef971fb84f731926ce9bc20f6'
- '6968085c367e832a4b166daab89eaf61bb58acbe8d930a3d944ff2327bd846a2'
- '183f958982b2a1c4f10fc834ae8e8d4ac254bf1a65373fd001ab4e58a99b0983'
- 'ea44540bf90913ba5d122b093005d6e2ebfb0a07535187dc71f1cda639b8d185'
- 'f3d8c2342970c229985d32bb49e84d007f50df5a6b27991b8e1473ff45832bfc'
- '843a397b1d610db27b378d006ade2d98ce53d5e1f7952bf64fa865f0119e6fd0'
- '4d336740d2e94d2406eb310acc64b95332e5f276143e38efe663f42f67601e7b'
- '7f94034dd260c5f14a8cf3ef66b05452ca991e3d0e7a22a5513385124a8c8fc4'
+
+sha256sums=('f1ca31605360594cb57b21aa5888f253e9775125957f96afb1a9dbb71676af22'
+ 'a89b558a4bb1d0368486a58d248a16b1760f8536fdc94ff70bf09e5c1bfcea24'
+ 'f7a2652021b50d43c076df8f94cec13b82e2704c0d1535289074cb5e0eec31a0'
+ '756b6855c9bdb7ae1ac4b7a4d2bafcbdad4ab6dd33ccc64efb94f9d4f21273d3'
+ '8ad3b70c468cce6104f023ca5f4354462a47a38d9dc25994a6d04b2c18598432'
+ '0193ff13167f6ff7d667cd32dd2d05e4591975a4404b433c9ff59d2d4ce54603'
+ 'ef0f2042143cf6ddc508d81978fdb7cd900d38e5b166f40112d1967ceb09f036'
+ '2a3bff4dfca022cb603cd46a6766fd1b7212adb473af5809b48504576bce6029'
'3e67013b249fe702b0176e5d39f7ddef85ef0df121ef0b3a898ea82772712f55'
'efeee8db0710bc217b5e886224450f6cf50938004e8c140eb9aee0a699d2d5ac')
-
-
case "${CARCH}" in
- 'x86_64') _JARCH=amd64 ;;
- 'i686' ) _JARCH=i386 ;;
+ 'x86_64') _JARCH=amd64 ; _DOC_ARCH=x86_64 ;;
+ 'i686' ) _JARCH=i386 ; _DOC_ARCH=x86 ;;
esac
_jdkname=openjdk8
@@ -69,8 +69,6 @@ prepare() {
ln -s ../${subrepo}-${_repo_ver} ${subrepo}
done
- #patch -p1 < ../build_with_gcc6.patch
-
# Apply infinality patches
cd "${srcdir}/jdk8u-${_repo_ver}/jdk"
patch -p1 < "${srcdir}/add-fontconfig.patch"
@@ -81,16 +79,10 @@ build() {
cd "${srcdir}/jdk8u-${_repo_ver}"
unset JAVA_HOME
- # _JAVA_OPTIONS breaks installed Java version check
- unset _JAVA_OPTIONS
- # https://bugs.archlinux.org/task/44164
- unset CLASSPATH
# http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1346
export MAKEFLAGS=${MAKEFLAGS/-j*}
- # Fixes build issues for some people
- export CFLAGS="$CFLAGS -Wno-deprecated-declarations"
- export CXXFLAGS="$CXXFLAGS -Wno-deprecated-declarations"
-
+ # https://hydra.nixos.org/build/41230444/log
+ export CFLAGS="-Wno-error=deprecated-declarations -fno-lifetime-dse -fno-delete-null-pointer-checks"
install -d -m 755 "${srcdir}/${_prefix}/"
sh configure \
diff --git a/build_with_gcc6.patch b/build_with_gcc6.patch
deleted file mode 100644
index 3579641ffb5..00000000000
--- a/build_with_gcc6.patch
+++ /dev/null
@@ -1,1098 +0,0 @@
-# HG changeset patch
-# User andrew
-# Date 1468209748 -3600
-# Mon Jul 11 05:02:28 2016 +0100
-# Node ID 7eb66a95dbd58d26ed271477076e0ab72e8c9ebf
-# Parent 817d9fb584baecae7c989dfd7009a7f0ac7c6360
-8151841: Build needs additional flags to compile with GCC 6 [plus parts of 8149647 & 8032045]
-Summary: C++ standard needs to be explicitly set and some optimisations turned off to build on GCC 6
-Reviewed-by: erikj, dholmes, kbarrett
-
-diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
---- a/common/autoconf/generated-configure.sh
-+++ b/common/autoconf/generated-configure.sh
-@@ -679,6 +679,9 @@
- CFLAGS_JDKLIB
- MACOSX_VERSION_MIN
- PACKAGE_PATH
-+NO_LIFETIME_DSE_CFLAG
-+NO_DELETE_NULL_POINTER_CHECKS_CFLAG
-+CXXSTD_CXXFLAG
- LEGACY_EXTRA_LDFLAGS
- LEGACY_EXTRA_CXXFLAGS
- LEGACY_EXTRA_CFLAGS
-@@ -743,6 +746,8 @@
- ac_ct_OBJC
- OBJCFLAGS
- OBJC
-+CXX_VERSION
-+CC_VERSION
- ac_ct_CXX
- CXXFLAGS
- CXX
-@@ -3672,7 +3677,7 @@
-
-
- #
--# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -3795,6 +3800,19 @@
- # questions.
- #
-
-+# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
-+# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
-+
-+
-+# Check if the configured compiler (C and C++) is of a specific version or
-+# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
-+#
-+# Arguments:
-+# $1: The version string to check against the found version
-+# $2: block to run if the compiler is at least this version (>=)
-+# $3: block to run if the compiler is older than this version (<)
-+
-+
- # $1 = compiler to test (CC or CXX)
- # $2 = human readable name of compiler (C or C++)
-
-@@ -3818,10 +3836,22 @@
-
-
-
-+# TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-+# [RUN-IF-FALSE])
-+# ------------------------------------------------------------
-+# Check that the C compiler supports an argument
-+
-+
-+# TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-+# [RUN-IF-FALSE])
-+# ------------------------------------------------------------
-+# Check that the C++ compiler supports an argument
-+
-+
- # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
--# [RUN-IF-FALSE])
-+# [RUN-IF-FALSE])
- # ------------------------------------------------------------
--# Check that the c and c++ compilers support an argument
-+# Check that the C and C++ compilers support an argument
-
-
-
-@@ -3829,6 +3859,8 @@
- # Setup the JTREG paths
-
-
-+
-+
- #
- # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-@@ -3880,7 +3912,7 @@
- #CUSTOM_AUTOCONF_INCLUDE
-
- # Do not change or remove the following line, it is needed for consistency checks:
--DATE_WHEN_GENERATED=1449096260
-+DATE_WHEN_GENERATED=1468207795
-
- ###############################################################################
- #
-@@ -20368,7 +20400,8 @@
-
- # First line typically looks something like:
- # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
-- COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
-+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
-+ $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
- COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
- fi
- # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
-@@ -21969,7 +22002,8 @@
-
- # First line typically looks something like:
- # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
-- COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
-+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
-+ $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
- COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
- fi
- # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
-@@ -22240,6 +22274,32 @@
- ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-+ # This is the compiler version number on the form X.Y[.Z]
-+
-+
-+
-+
-+ if test "x$CC_VERSION" != "x$CXX_VERSION"; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&5
-+$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION." >&2;}
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
-+$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
-+ fi
-+
-+ # We only check CC_VERSION since we assume CXX_VERSION is equal.
-+ if [[ "$CC_VERSION" =~ (.*\.){3} ]] ; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&5
-+$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong." >&2;}
-+ fi
-+
-+ if [[ "$CC_VERSION" =~ [0-9]{6} ]] ; then
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&5
-+$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong." >&2;}
-+ fi
-+
-+ COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION"`
-+
-+
- ### Locate other tools
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-@@ -24831,7 +24891,8 @@
-
-
- COMPILER_TYPE=CL
-- CCXXFLAGS="$CCXXFLAGS -nologo"
-+ # silence copyright notice and other headers.
-+ COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
-
- fi
-
-@@ -29664,12 +29725,57 @@
- #
- # Now setup the CFLAGS and LDFLAGS for the JDK build.
- # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-+ # CFLAGS_JDK - C Compiler flags
-+ # CXXFLAGS_JDK - C++ Compiler flags
-+ # COMMON_CCXXFLAGS_JDK - common to C and C++
- #
- case $COMPILER_NAME in
- gcc )
-- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
- -pipe \
- -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
-+ CXXSTD_CXXFLAG="-std=gnu++98"
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"" >&5
-+$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"... " >&6; }
-+ supports=yes
-+
-+ saved_cxxflags="$CXXFLAGS"
-+ CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS"
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+int i;
-+_ACEOF
-+if ac_fn_cxx_try_compile "$LINENO"; then :
-+
-+else
-+ supports=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ CXXFLAGS="$saved_cxxflags"
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ :
-+ else
-+ CXXSTD_CXXFLAG=""
-+ fi
-+
-+ CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
-+
- case $OPENJDK_TARGET_CPU_ARCH in
- arm )
- # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
-@@ -29679,16 +29785,234 @@
- # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
- ;;
- * )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
- CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- esac
-+
-+ REFERENCE_VERSION=6
-+
-+ if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
-+ as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
-+ fi
-+
-+ if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
-+ as_fn_error $? "Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported" "$LINENO" 5
-+ fi
-+
-+ # Version comparison method inspired by http://stackoverflow.com/a/24067243
-+ COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
-+
-+ if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
-+
-+ # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
-+ # runs afoul of the more aggressive versions of these optimisations.
-+ # Notably, value range propagation now assumes that the this pointer of C++
-+ # member functions is non-null.
-+ NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
-+$as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
-+ supports=yes
-+
-+ saved_cflags="$CFLAGS"
-+ CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
-+ ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
-+
-+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+int i;
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+else
-+ supports=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ CFLAGS="$saved_cflags"
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ C_COMP_SUPPORTS="yes"
-+ else
-+ C_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
-+$as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
-+ supports=yes
-+
-+ saved_cxxflags="$CXXFLAGS"
-+ CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror"
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+int i;
-+_ACEOF
-+if ac_fn_cxx_try_compile "$LINENO"; then :
-+
-+else
-+ supports=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ CXXFLAGS="$saved_cxxflags"
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ CXX_COMP_SUPPORTS="yes"
-+ else
-+ CXX_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5
-+$as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; }
-+ supports=no
-+ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ :
-+ else
-+ NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""
-+ fi
-+
-+
-+ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
-+$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
-+ supports=yes
-+
-+ saved_cflags="$CFLAGS"
-+ CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
-+ ac_ext=c
-+ac_cpp='$CPP $CPPFLAGS'
-+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-+
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+int i;
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+
-+else
-+ supports=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ CFLAGS="$saved_cflags"
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ C_COMP_SUPPORTS="yes"
-+ else
-+ C_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
-+$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
-+ supports=yes
-+
-+ saved_cxxflags="$CXXFLAGS"
-+ CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+int i;
-+_ACEOF
-+if ac_fn_cxx_try_compile "$LINENO"; then :
-+
-+else
-+ supports=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+ ac_ext=cpp
-+ac_cpp='$CXXCPP $CPPFLAGS'
-+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-+
-+ CXXFLAGS="$saved_cxxflags"
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ CXX_COMP_SUPPORTS="yes"
-+ else
-+ CXX_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
-+$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
-+ supports=no
-+ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ :
-+ else
-+ NO_LIFETIME_DSE_CFLAG=""
-+ fi
-+
-+ CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
-+
-+
-+
-+ else
-+ :
-+ fi
-+
- ;;
- ossc )
-- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
- case $OPENJDK_TARGET_CPU_ARCH in
- x86 )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
- CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
- ;;
- esac
-@@ -29707,16 +30031,16 @@
- LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
- ;;
- cl )
-- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_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 \
- -DWIN32 -DIAL"
- case $OPENJDK_TARGET_CPU in
- x86 )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
- ;;
- x86_64 )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
- ;;
- esac
- ;;
-@@ -29746,7 +30070,7 @@
- ;;
- esac
-
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
-
- # The package path is used only on macosx?
- PACKAGE_PATH=/opt/local
-@@ -29759,27 +30083,27 @@
- # Note: -Dmacro is the same as #define macro 1
- # -Dmacro= is the same as #define macro
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
-- else
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-- fi
-- else
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
-+ else
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-+ fi
-+ else
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
- fi
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
- fi
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DWINDOWS"
- fi
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DSOLARIS"
- fi
- if test "x$OPENJDK_TARGET_OS" = xaix; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DAIX -DPPC64"
- fi
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
- # Setting these parameters makes it an error to link to macosx APIs that are
- # newer than the given OS version and makes the linked binaries compatible even
- # if built on a newer version of the OS.
-@@ -29789,25 +30113,25 @@
- # The macro takes the version with no dots, ex: 1070
- # Let the flags variables get resolved in make for easier override on make
- # command line.
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- fi
- if test "x$OPENJDK_TARGET_OS" = xbsd; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
- fi
- if test "x$DEBUG_LEVEL" = xrelease; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
-- fi
-- else
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-- fi
--
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
--
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
-+ fi
-+ else
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
-+ fi
-+
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-+
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
- -I${JDK_OUTPUTDIR}/include \
- -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
- -I${JDK_TOPDIR}/src/share/javavm/export \
-@@ -29816,12 +30140,12 @@
- -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
-
- # The shared libraries are compiled using the picflag.
-- CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-- CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
-+ CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-+ CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
-
- # Executable flags
-- CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-- CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
-+ CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
-+ CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
- # Now this is odd. The JDK native libraries have to link against libjvm.so
- # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-@@ -29905,7 +30229,6 @@
-
-
-
--
- # Some Zero and Shark settings.
- # ZERO_ARCHFLAG tells the compiler which mode to build for
- case "${OPENJDK_TARGET_CPU}" in
-@@ -29916,8 +30239,9 @@
- ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- esac
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
--$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
-+$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
- supports=yes
-
- saved_cflags="$CFLAGS"
-@@ -29946,6 +30270,19 @@
-
- CFLAGS="$saved_cflags"
-
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ C_COMP_SUPPORTS="yes"
-+ else
-+ C_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
-+$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
-+ supports=yes
-+
- saved_cxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
- ac_ext=cpp
-@@ -29975,6 +30312,20 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
- $as_echo "$supports" >&6; }
- if test "x$supports" = "xyes" ; then
-+ CXX_COMP_SUPPORTS="yes"
-+ else
-+ CXX_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
-+$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
-+ supports=no
-+ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
- :
- else
- ZERO_ARCHFLAG=""
-@@ -29985,8 +30336,9 @@
- # Check that the compiler supports -mX (or -qX on AIX) flags
- # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
--$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
-+$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
- supports=yes
-
- saved_cflags="$CFLAGS"
-@@ -30015,6 +30367,19 @@
-
- CFLAGS="$saved_cflags"
-
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
-+ C_COMP_SUPPORTS="yes"
-+ else
-+ C_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
-+$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
-+ supports=yes
-+
- saved_cxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
- ac_ext=cpp
-@@ -30044,6 +30409,20 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
- $as_echo "$supports" >&6; }
- if test "x$supports" = "xyes" ; then
-+ CXX_COMP_SUPPORTS="yes"
-+ else
-+ CXX_COMP_SUPPORTS="no"
-+ fi
-+
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
-+$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
-+ supports=no
-+ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
-+
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
-+$as_echo "$supports" >&6; }
-+ if test "x$supports" = "xyes" ; then
- COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
- else
- COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
-diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in
---- a/common/autoconf/hotspot-spec.gmk.in
-+++ b/common/autoconf/hotspot-spec.gmk.in
-@@ -1,5 +1,5 @@
- #
--# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
-+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
- # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- #
- # This code is free software; you can redistribute it and/or modify it
-@@ -109,7 +109,8 @@
- MT:=@HOTSPOT_MT@
- RC:=@HOTSPOT_RC@
-
--EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@
-+EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(NO_DELETE_NULL_POINTER_CHECKS_CFLAG) \
-+ $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG)
- EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@
- EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
-
-diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in
---- a/common/autoconf/spec.gmk.in
-+++ b/common/autoconf/spec.gmk.in
-@@ -331,6 +331,10 @@
- CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
- CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
-
-+NO_DELETE_NULL_POINTER_CHECKS_CFLAG=@NO_DELETE_NULL_POINTER_CHECKS_CFLAG@
-+NO_LIFETIME_DSE_CFLAG=@NO_LIFETIME_DSE_CFLAG@
-+CXXSTD_CXXFLAG=@CXXSTD_CXXFLAG@
-+
- CXX:=@FIXPATH@ @CCACHE@ @CXX@
- #CXXFLAGS:=@CXXFLAGS@
-
-diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
---- a/common/autoconf/toolchain.m4
-+++ b/common/autoconf/toolchain.m4
-@@ -23,9 +23,59 @@
- # questions.
- #
-
-+# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
-+# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
-+AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
-+[
-+ if test "x$CC_VERSION" != "x$CXX_VERSION"; then
-+ AC_MSG_WARN([C and C++ compiler has different version numbers, $CC_VERSION vs $CXX_VERSION.])
-+ AC_MSG_WARN([This typically indicates a broken setup, and is not supported])
-+ fi
-+
-+ # We only check CC_VERSION since we assume CXX_VERSION is equal.
-+ if [ [[ "$CC_VERSION" =~ (.*\.){3} ]] ]; then
-+ AC_MSG_WARN([C compiler version number has more than three parts (X.Y.Z): $CC_VERSION. Comparisons might be wrong.])
-+ fi
-+
-+ if [ [[ "$CC_VERSION" =~ [0-9]{6} ]] ]; then
-+ AC_MSG_WARN([C compiler version number has a part larger than 99999: $CC_VERSION. Comparisons might be wrong.])
-+ fi
-+
-+ COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$CC_VERSION"`
-+])
-+
-+# Check if the configured compiler (C and C++) is of a specific version or
-+# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
-+#
-+# Arguments:
-+# $1: The version string to check against the found version
-+# $2: block to run if the compiler is at least this version (>=)
-+# $3: block to run if the compiler is older than this version (<)
-+AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
-+[
-+ REFERENCE_VERSION=$1
-+
-+ if [ [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ]; then
-+ AC_MSG_ERROR([Internal error: Cannot compare to $REFERENCE_VERSION, only three parts (X.Y.Z) is supported])
-+ fi
-+
-+ if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then
-+ AC_MSG_ERROR([Internal error: Cannot compare to $REFERENCE_VERSION, only parts < 99999 is supported])
-+ fi
-+
-+ # Version comparison method inspired by http://stackoverflow.com/a/24067243
-+ COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$REFERENCE_VERSION"`
-+
-+ if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
-+ m4_ifval([$2], [$2], [:])
-+ else
-+ m4_ifval([$3], [$3], [:])
-+ fi
-+])
-+
- # $1 = compiler to test (CC or CXX)
- # $2 = human readable name of compiler (C or C++)
--AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
-+AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
- [
- COMPILER=[$]$1
- COMPILER_NAME=$2
-@@ -81,7 +131,8 @@
-
- # First line typically looks something like:
- # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
-- COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/p"`
-+ COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | \
-+ $SED -e 's/^.* \(@<:@1-9@:>@\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'`
- COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) @<:@1-9@:>@@<:@0-9.@:>@*/\1/p"`
- fi
- # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
-@@ -181,7 +232,7 @@
- AC_MSG_RESULT([no, keeping $1])
- $1="$TEST_COMPILER"
- fi
-- TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME])
-+ TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
- ])
-
-
-@@ -385,6 +436,12 @@
- # Now that we have resolved CXX ourself, let autoconf have its go at it
- AC_PROG_CXX([$CXX])
-
-+ # This is the compiler version number on the form X.Y[.Z]
-+ AC_SUBST(CC_VERSION)
-+ AC_SUBST(CXX_VERSION)
-+
-+ TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS
-+
- ### Locate other tools
-
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-@@ -507,7 +564,8 @@
- BASIC_FIXUP_EXECUTABLE(DUMPBIN)
-
- COMPILER_TYPE=CL
-- CCXXFLAGS="$CCXXFLAGS -nologo"
-+ # silence copyright notice and other headers.
-+ COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
- ])
- AC_SUBST(RC_FLAGS)
- AC_SUBST(COMPILER_TYPE)
-@@ -954,12 +1012,20 @@
- #
- # Now setup the CFLAGS and LDFLAGS for the JDK build.
- # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
-+ # CFLAGS_JDK - C Compiler flags
-+ # CXXFLAGS_JDK - C++ Compiler flags
-+ # COMMON_CCXXFLAGS_JDK - common to C and C++
- #
- case $COMPILER_NAME in
- gcc )
-- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
- -pipe \
- -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
-+ CXXSTD_CXXFLAG="-std=gnu++98"
-+ TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS],
-+ [], [CXXSTD_CXXFLAG=""])
-+ CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
-+ AC_SUBST([CXXSTD_CXXFLAG])
- case $OPENJDK_TARGET_CPU_ARCH in
- arm )
- # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
-@@ -969,16 +1035,17 @@
- # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
- ;;
- * )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
- CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
- ;;
- esac
-+ TOOLCHAIN_CHECK_COMPILER_VERSION(6, TOOLCHAIN_SETUP_GCC6_COMPILER_FLAGS)
- ;;
- ossc )
-- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
- case $OPENJDK_TARGET_CPU_ARCH in
- x86 )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
- CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
- ;;
- esac
-@@ -997,16 +1064,16 @@
- LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
- ;;
- cl )
-- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_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 \
- -DWIN32 -DIAL"
- case $OPENJDK_TARGET_CPU in
- x86 )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
- ;;
- x86_64 )
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
- ;;
- esac
- ;;
-@@ -1036,7 +1103,7 @@
- ;;
- esac
-
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
-
- # The package path is used only on macosx?
- PACKAGE_PATH=/opt/local
-@@ -1049,27 +1116,27 @@
- # Note: -Dmacro is the same as #define macro 1
- # -Dmacro= is the same as #define macro
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
- else
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
- fi
- else
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
- fi
- if test "x$OPENJDK_TARGET_OS" = xlinux; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
- fi
- if test "x$OPENJDK_TARGET_OS" = xwindows; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DWINDOWS"
- fi
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DSOLARIS"
- fi
- if test "x$OPENJDK_TARGET_OS" = xaix; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DAIX -DPPC64"
- fi
- if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
- # Setting these parameters makes it an error to link to macosx APIs that are
- # newer than the given OS version and makes the linked binaries compatible even
- # if built on a newer version of the OS.
-@@ -1079,25 +1146,25 @@
- # The macro takes the version with no dots, ex: 1070
- # Let the flags variables get resolved in make for easier override on make
- # command line.
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
- fi
- if test "x$OPENJDK_TARGET_OS" = xbsd; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
- fi
- if test "x$DEBUG_LEVEL" = xrelease; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
- if test "x$OPENJDK_TARGET_OS" = xsolaris; then
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
- fi
- else
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
- fi
-
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
-
-- CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
- -I${JDK_OUTPUTDIR}/include \
- -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
- -I${JDK_TOPDIR}/src/share/javavm/export \
-@@ -1106,12 +1173,12 @@
- -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
-
- # The shared libraries are compiled using the picflag.
-- CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-- CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
-+ CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-+ CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
-
- # Executable flags
-- CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
-- CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
-+ CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
-+ CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
-
- # Now this is odd. The JDK native libraries have to link against libjvm.so
- # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
-@@ -1196,13 +1263,13 @@
- ])
-
-
--# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
--# [RUN-IF-FALSE])
-+# TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-+# [RUN-IF-FALSE])
- # ------------------------------------------------------------
--# Check that the c and c++ compilers support an argument
--AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
-+# Check that the C compiler supports an argument
-+AC_DEFUN([TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS],
- [
-- AC_MSG_CHECKING([if compiler supports "$1"])
-+ AC_MSG_CHECKING([if the C compiler supports "$1"])
- supports=yes
-
- saved_cflags="$CFLAGS"
-@@ -1213,6 +1280,23 @@
- AC_LANG_POP([C])
- CFLAGS="$saved_cflags"
-
-+ AC_MSG_RESULT([$supports])
-+ if test "x$supports" = "xyes" ; then
-+ m4_ifval([$2], [$2], [:])
-+ else
-+ m4_ifval([$3], [$3], [:])
-+ fi
-+])
-+
-+# TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-+# [RUN-IF-FALSE])
-+# ------------------------------------------------------------
-+# Check that the C++ compiler supports an argument
-+AC_DEFUN([TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS],
-+[
-+ AC_MSG_CHECKING([if the C++ compiler supports "$1"])
-+ supports=yes
-+
- saved_cxxflags="$CXXFLAGS"
- CXXFLAGS="$CXXFLAG $1"
- AC_LANG_PUSH([C++])
-@@ -1220,7 +1304,32 @@
- [supports=no])
- AC_LANG_POP([C++])
- CXXFLAGS="$saved_cxxflags"
-+
-+ AC_MSG_RESULT([$supports])
-+ if test "x$supports" = "xyes" ; then
-+ m4_ifval([$2], [$2], [:])
-+ else
-+ m4_ifval([$3], [$3], [:])
-+ fi
-+])
-
-+# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
-+# [RUN-IF-FALSE])
-+# ------------------------------------------------------------
-+# Check that the C and C++ compilers support an argument
-+AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
-+[
-+ TOOLCHAIN_C_COMPILER_CHECK_ARGUMENTS([$1],
-+ [C_COMP_SUPPORTS="yes"],
-+ [C_COMP_SUPPORTS="no"])
-+ TOOLCHAIN_CXX_COMPILER_CHECK_ARGUMENTS([$1],
-+ [CXX_COMP_SUPPORTS="yes"],
-+ [CXX_COMP_SUPPORTS="no"])
-+
-+ AC_MSG_CHECKING([if both compilers support "$1"])
-+ supports=no
-+ if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
-+
- AC_MSG_RESULT([$supports])
- if test "x$supports" = "xyes" ; then
- m4_ifval([$2], [$2], [:])
-@@ -1311,3 +1420,20 @@
- AC_SUBST(JT_HOME)
- AC_SUBST(JTREGEXE)
- ])
-+
-+AC_DEFUN_ONCE([TOOLCHAIN_SETUP_GCC6_COMPILER_FLAGS],
-+[
-+ # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
-+ # runs afoul of the more aggressive versions of these optimisations.
-+ # Notably, value range propagation now assumes that the this pointer of C++
-+ # member functions is non-null.
-+ NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
-+ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror],
-+ [], [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
-+ AC_SUBST([NO_DELETE_NULL_POINTER_CHECKS_CFLAG])
-+ NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
-+ TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$NO_LIFETIME_DSE_CFLAG -Werror],
-+ [], [NO_LIFETIME_DSE_CFLAG=""])
-+ CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
-+ AC_SUBST([NO_LIFETIME_DSE_CFLAG])
-+])