Merge
authorduke
Thu, 24 Aug 2017 16:29:30 +0200
changeset 45895 d875751d58e8
parent 45894 995421c69f66 (current diff)
parent 45880 0286992efe26 (diff)
child 45897 fafda281396f
Merge
--- a/.hgtags-top-repo	Wed Jul 19 14:40:50 2017 +0200
+++ b/.hgtags-top-repo	Thu Aug 24 16:29:30 2017 +0200
@@ -435,3 +435,4 @@
 1fd5901544acc50bb30fde9388c8e53cb7c449e4 jdk-10+14
 84777531d994ef70163d35078ec9c4127f2eadb5 jdk-9+176
 a4371edb589c60db01142e45c317adb9ccbcb083 jdk-9+177
+a6c830ee8a6798b186730475e700027cdf4598aa jdk-10+15
--- a/common/autoconf/flags.m4	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/autoconf/flags.m4	Thu Aug 24 16:29:30 2017 +0200
@@ -996,14 +996,18 @@
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
-        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
         -fno-omit-frame-pointer"
   elif test "x$OPENJDK_$1_OS" = xaix; then
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -DAIX"
-    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
     $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qtune=balanced \
         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      $2JVM_CFLAGS="[$]$2JVM_CFLAGS -qpic=large"
+    fi
   elif test "x$OPENJDK_$1_OS" = xbsd; then
     $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
   elif test "x$OPENJDK_$1_OS" = xwindows; then
@@ -1081,18 +1085,50 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_$1_OS" = xmacosx; then
-    # 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.
-    # The expected format is X.Y.Z
+    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
+    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
+    # JDK can be built and makes the linked binaries compatible even if built on
+    # a newer version of the OS.
     MACOSX_VERSION_MIN=10.7.0
     AC_SUBST(MACOSX_VERSION_MIN)
 
-    # The macro takes the version with no dots, ex: 1070
+    # Setting --with-macosx-version-max=<version> makes it an error to build or
+    # link to macosx APIs that are newer than the given OS version. The expected
+    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+    AC_ARG_WITH([macosx-version-max], [AS_HELP_STRING([--with-macosx-version-max],
+        [error on use of newer functionality. @<:@macosx@:>@])],
+        [
+          if echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]]\.[[0-9]]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif echo "$with_macosx_version_max" | $GREP -q "^[[0-9]][[0-9]]\.[[0-9]][[0-9]]\.[[0-9]][[0-9]]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif test "x$with_macosx_version_max" = "xno"; then
+              # Use build system default
+              MACOSX_VERSION_MAX=
+          else
+              AC_MSG_ERROR([osx version format must be nn.n.n or nn.nn.nn])
+          fi
+        ],
+        [MACOSX_VERSION_MAX=]
+    )
+    AC_SUBST(MACOSX_VERSION_MAX)
+
     # Let the flags variables get resolved in make for easier override on make
-    # command line.
-    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
+    $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     $2LDFLAGS_JDK="[$]$2LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+
+    if test -n "$MACOSX_VERSION_MAX"; then
+        $2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+        $2JVM_CFLAGS="[$]$2JVM_CFLAGS \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+    fi
   fi
 
   # Setup some hard coded includes
@@ -1218,6 +1254,12 @@
     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
     $2LDFLAGS_JDK="${$2LDFLAGS_JDK} $LDFLAGS_XLC"
     $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS $LDFLAGS_XLC"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      $2JVM_LDFLAGS="[$]$2JVM_LDFLAGS -bbigtoc"
+    fi
   fi
 
   # Customize LDFLAGS for executables
--- a/common/autoconf/generated-configure.sh	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Thu Aug 24 16:29:30 2017 +0200
@@ -749,6 +749,7 @@
 CXXFLAGS_JDKLIB
 CFLAGS_JDKEXE
 CFLAGS_JDKLIB
+MACOSX_VERSION_MAX
 MACOSX_VERSION_MIN
 CXXSTD_CXXFLAG
 JDK_ARCH_ABI_PROP_NAME
@@ -1182,6 +1183,7 @@
 with_build_devkit
 with_jtreg
 with_abi_profile
+with_macosx_version_max
 enable_warnings_as_errors
 with_native_debug_symbols
 enable_debug_symbols
@@ -2132,6 +2134,8 @@
                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
                           [toolchain dependent]
+  --with-macosx-version-max
+                          error on use of newer functionality. [macosx]
   --with-native-debug-symbols
                           set the native debug symbol configuration (none,
                           internal, external, zipped) [varying]
@@ -5010,7 +5014,7 @@
 
 # Minimum supported versions, empty means unspecified
 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
-TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
+TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
 TOOLCHAIN_MINIMUM_VERSION_xlc=""
@@ -5189,7 +5193,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1496926402
+DATE_WHEN_GENERATED=1500423205
 
 ###############################################################################
 #
@@ -51461,14 +51465,18 @@
     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
-        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
         -fno-omit-frame-pointer"
   elif test "x$OPENJDK_TARGET_OS" = xaix; then
     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
-    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
+    fi
   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
@@ -51635,18 +51643,54 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
-    # 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.
-    # The expected format is X.Y.Z
+    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
+    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
+    # JDK can be built and makes the linked binaries compatible even if built on
+    # a newer version of the OS.
     MACOSX_VERSION_MIN=10.7.0
 
 
-    # The macro takes the version with no dots, ex: 1070
+    # Setting --with-macosx-version-max=<version> makes it an error to build or
+    # link to macosx APIs that are newer than the given OS version. The expected
+    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+
+# Check whether --with-macosx-version-max was given.
+if test "${with_macosx_version_max+set}" = set; then :
+  withval=$with_macosx_version_max;
+          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif test "x$with_macosx_version_max" = "xno"; then
+              # Use build system default
+              MACOSX_VERSION_MAX=
+          else
+              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
+          fi
+
+else
+  MACOSX_VERSION_MAX=
+
+fi
+
+
+
     # Let the flags variables get resolved in make for easier override on make
-    # command line.
-    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
+    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    JVM_CFLAGS="$JVM_CFLAGS \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+
+    if test -n "$MACOSX_VERSION_MAX"; then
+        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+        JVM_CFLAGS="$JVM_CFLAGS \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+    fi
   fi
 
   # Setup some hard coded includes
@@ -51772,6 +51816,12 @@
     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
+    fi
   fi
 
   # Customize LDFLAGS for executables
@@ -52279,14 +52329,18 @@
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
-        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
         -fno-omit-frame-pointer"
   elif test "x$OPENJDK_BUILD_OS" = xaix; then
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
-    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
+    fi
   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
@@ -52453,18 +52507,54 @@
 
   # Additional macosx handling
   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
-    # 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.
-    # The expected format is X.Y.Z
+    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
+    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
+    # JDK can be built and makes the linked binaries compatible even if built on
+    # a newer version of the OS.
     MACOSX_VERSION_MIN=10.7.0
 
 
-    # The macro takes the version with no dots, ex: 1070
+    # Setting --with-macosx-version-max=<version> makes it an error to build or
+    # link to macosx APIs that are newer than the given OS version. The expected
+    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
+
+# Check whether --with-macosx-version-max was given.
+if test "${with_macosx_version_max+set}" = set; then :
+  withval=$with_macosx_version_max;
+          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
+              MACOSX_VERSION_MAX=$with_macosx_version_max
+          elif test "x$with_macosx_version_max" = "xno"; then
+              # Use build system default
+              MACOSX_VERSION_MAX=
+          else
+              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
+          fi
+
+else
+  MACOSX_VERSION_MAX=
+
+fi
+
+
+
     # Let the flags variables get resolved in make for easier override on make
-    # command line.
-    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
+    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
+        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
+        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
+
+    if test -n "$MACOSX_VERSION_MAX"; then
+        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
+            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
+    fi
   fi
 
   # Setup some hard coded includes
@@ -52590,6 +52680,12 @@
     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
+    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
+    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
+    # so for slowdebug we build with '-qpic=large -bbigtoc'.
+    if test "x$DEBUG_LEVEL" = xslowdebug; then
+      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
+    fi
   fi
 
   # Customize LDFLAGS for executables
--- a/common/autoconf/spec.gmk.in	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Thu Aug 24 16:29:30 2017 +0200
@@ -335,8 +335,10 @@
 X_CFLAGS:=@X_CFLAGS@
 X_LIBS:=@X_LIBS@
 
-# The lowest required version of macosx to enforce compatiblity for
+# The lowest required version of macosx
 MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
+# The highest allowed version of macosx
+MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
 
 # Toolchain type: gcc, clang, solstudio, lxc, microsoft...
 TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
--- a/common/autoconf/toolchain.m4	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/autoconf/toolchain.m4	Thu Aug 24 16:29:30 2017 +0200
@@ -52,7 +52,7 @@
 
 # Minimum supported versions, empty means unspecified
 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
-TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
+TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
 TOOLCHAIN_MINIMUM_VERSION_xlc=""
--- a/common/conf/jib-profiles.js	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/conf/jib-profiles.js	Thu Aug 24 16:29:30 2017 +0200
@@ -436,7 +436,8 @@
             target_os: "macosx",
             target_cpu: "x64",
             dependencies: ["devkit"],
-            configure_args: concat(common.configure_args_64bit, "--with-zlib=system"),
+            configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
+                "--with-macosx-version-max=10.7.0"),
         },
 
         "solaris-x64": {
--- a/common/doc/building.md	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/doc/building.md	Thu Aug 24 16:29:30 2017 +0200
@@ -392,11 +392,8 @@
 
 ### gcc
 
-The minimum accepted version of gcc is 4.3. Older versions will not be accepted
-by `configure`.
-
-However, gcc 4.3 is quite old and OpenJDK is not regularly tested on this
-version, so it is recommended to use a more modern gcc.
+The minimum accepted version of gcc is 4.7. Older versions will generate a warning 
+by `configure` and are unlikely to work.
 
 OpenJDK 9 includes patches that should allow gcc 6 to compile, but this should
 be considered experimental.
--- a/common/nb_native/nbproject/configurations.xml	Wed Jul 19 14:40:50 2017 +0200
+++ b/common/nb_native/nbproject/configurations.xml	Thu Aug 24 16:29:30 2017 +0200
@@ -3517,7 +3517,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -10570,7 +10569,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -18227,7 +18225,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -20787,7 +20784,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -21531,7 +21527,6 @@
             <Elem>ARCHPROPNAME="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="java_props_macosx.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -23025,7 +23020,6 @@
             <Elem>ARCHPROPNAME="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="java_props_md.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -23104,7 +23098,6 @@
             <Elem>ARCH="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="ExtendedOptionsImpl.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -23481,7 +23474,6 @@
             <Elem>ARCH="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="SocketDispatcher.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -29987,7 +29979,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30069,7 +30060,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30104,7 +30094,6 @@
             <Elem>ARCH="x86_64"</Elem>
             <Elem>DEBUG</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
             <Elem>_GNU_SOURCE</Elem>
@@ -30147,7 +30136,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30211,7 +30199,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30274,7 +30261,6 @@
             <Elem>COMPILER2</Elem>
             <Elem>DTRACE_ENABLED</Elem>
             <Elem>HOTSPOT_LIB_ARCH="amd64"</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>TARGET_ARCH_MODEL_x86_64</Elem>
             <Elem>TARGET_ARCH_x86</Elem>
             <Elem>TARGET_COMPILER_gcc</Elem>
@@ -30341,7 +30327,6 @@
           <preprocessorList>
             <Elem>ARCH="x86_64"</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="agent_util.c"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
@@ -30354,7 +30339,6 @@
           <preprocessorList>
             <Elem>ARCH="x86_64"</Elem>
             <Elem>MACOSX</Elem>
-            <Elem>MAC_OS_X_VERSION_MAX_ALLOWED=1070</Elem>
             <Elem>THIS_FILE="Agent.cpp"</Elem>
             <Elem>_ALLBSD_SOURCE</Elem>
             <Elem>_DARWIN_UNLIMITED_SELECT</Elem>
--- a/hotspot/.hgtags	Wed Jul 19 14:40:50 2017 +0200
+++ b/hotspot/.hgtags	Thu Aug 24 16:29:30 2017 +0200
@@ -595,3 +595,4 @@
 e920b4d008d914f3414bd4630b58837cf0b7f08d jdk-10+14
 2ab74e5dbdc2b6a962c865500cafd23cf387dc60 jdk-9+176
 1ca8f038fceb88c640badf9bd18905205bc63b43 jdk-9+177
+c1f3649a3a42f124b418a5a916dbad13d059b757 jdk-10+15
--- a/make/Main.gmk	Wed Jul 19 14:40:50 2017 +0200
+++ b/make/Main.gmk	Thu Aug 24 16:29:30 2017 +0200
@@ -699,6 +699,9 @@
 
   jdk.jdeps-gendata: java rmic
 
+  # The ct.sym generation uses all the moduleinfos as input
+  jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS)
+
   # Declare dependencies between jmod targets.
   # java.base jmod needs jrt-fs.jar and access to the other jmods to be built.
   # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
--- a/test/lib/jdk/test/lib/Utils.java	Wed Jul 19 14:40:50 2017 +0200
+++ b/test/lib/jdk/test/lib/Utils.java	Thu Aug 24 16:29:30 2017 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2017, 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
@@ -680,5 +680,26 @@
                 String.format("A mandatory property '%s' isn't set", propName));
         return prop;
     }
+
+    /*
+     * Run uname with specified arguments.
+     */
+    public static OutputAnalyzer uname(String... args) throws Throwable {
+        String[] cmds = new String[args.length + 1];
+        cmds[0] = "uname";
+        System.arraycopy(args, 0, cmds, 1, args.length);
+        return ProcessTools.executeCommand(cmds);
+    }
+
+    /*
+     * Returns the system distro.
+     */
+    public static String distro() {
+        try {
+            return uname("-v").asLines().get(0);
+        } catch (Throwable t) {
+            throw new RuntimeException("Failed to determine distro.", t);
+        }
+    }
 }