changeset 2833:bba05558ed41 nestmates tip

Merge
author dholmes
date Wed, 27 Sep 2017 01:20:56 -0400
parents 4eb9ce5055ea 62306e615de1
children
files make/CompileJavaModules.gmk
diffstat 11 files changed, 246 insertions(+), 93 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Sep 20 23:55:35 2017 -0400
+++ b/.hgtags	Wed Sep 27 01:20:56 2017 -0400
@@ -445,3 +445,6 @@
 d2982a786f53814367698e63efe6349c9128e1db jdk-9+180
 b656dea9398ef601f7fc08d1a5157a560e0ccbe0 jdk-9+181
 682e2a6df836f4731f92eb2ddcd467075047f6ea jdk-10+20
+90cdfe56f1543267a8005e638bd1b44551fda189 jdk-10+21
+8625e8491887bfd4310b2cfc2b84bac26312ba20 jdk-10+22
+dbc0484fa2156efbb761708647a38ed75f901ab7 jdk-10+23
--- a/common/autoconf/configure.ac	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/autoconf/configure.ac	Wed Sep 27 01:20:56 2017 -0400
@@ -209,6 +209,7 @@
 # Need toolchain to setup dtrace
 HOTSPOT_SETUP_DTRACE
 HOTSPOT_ENABLE_DISABLE_AOT
+HOTSPOT_ENABLE_DISABLE_CDS
 HOTSPOT_ENABLE_DISABLE_GTEST
 
 ###############################################################################
--- a/common/autoconf/flags.m4	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/autoconf/flags.m4	Wed Sep 27 01:20:56 2017 -0400
@@ -1358,7 +1358,7 @@
       $2SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
     fi
     $2JVM_LIBS="[$]$2JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
-        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
+        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
   elif test "x$OPENJDK_$1_OS" = xmacosx; then
     $2JVM_LIBS="[$]$2JVM_LIBS -lm"
   elif test "x$OPENJDK_$1_OS" = xaix; then
--- a/common/autoconf/generated-configure.sh	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/autoconf/generated-configure.sh	Wed Sep 27 01:20:56 2017 -0400
@@ -702,6 +702,7 @@
 FIXPATH_DETACH_FLAG
 FIXPATH
 BUILD_GTEST
+ENABLE_CDS
 ENABLE_AOT
 GCOV_ENABLED
 ZIP_EXTERNAL_DEBUG_SYMBOLS
@@ -1191,6 +1192,7 @@
 enable_native_coverage
 enable_dtrace
 enable_aot
+enable_cds
 enable_hotspot_gtest
 with_stdc__lib
 with_msvcr_dll
@@ -1999,6 +2001,8 @@
                           enable ahead of time compilation feature. Default is
                           auto, where aot is enabled if all dependencies are
                           present.
+  --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
+                          Default is yes.
   --disable-hotspot-gtest Disables building of the Hotspot unit tests
   --disable-freetype-bundling
                           disable bundling of the freetype library with the
@@ -2016,7 +2020,8 @@
   --disable-generate-classlist
                           forces enabling or disabling of the generation of a
                           CDS classlist at build time. Default is to generate
-                          it when either the server or client JVMs are built.
+                          it when either the server or client JVMs are built
+                          and enable-cds is true.
   --enable-sjavac         use sjavac to do fast incremental compiles
                           [disabled]
   --disable-javac-server  disable javac server [enabled]
@@ -4295,7 +4300,7 @@
 
 # All valid JVM features, regardless of platform
 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
-    graal fprof vm-structs jni-check services management all-gcs nmt cds \
+    graal vm-structs jni-check services management all-gcs nmt cds \
     static-build link-time-opt aot"
 
 # All valid JVM variants
@@ -4345,6 +4350,11 @@
 #
 
 
+################################################################################
+# Allow to disable CDS
+#
+
+
 ###############################################################################
 # Set up all JVM features for each JVM variant.
 #
@@ -5151,7 +5161,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1503331668
+DATE_WHEN_GENERATED=1504441177
 
 ###############################################################################
 #
@@ -16141,6 +16151,12 @@
   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
     # On all platforms except MacOSX replace x86_64 with amd64.
     OPENJDK_TARGET_CPU_LEGACY="amd64"
+  elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
+    # Avoid name collisions with variables named alpha
+    OPENJDK_TARGET_CPU_LEGACY="_alpha_"
+  elif test "x$OPENJDK_TARGET_CPU" = xsh; then
+    # Avoid name collisions with variables named sh
+    OPENJDK_TARGET_CPU_LEGACY="_sh_"
   fi
 
 
@@ -16293,6 +16309,12 @@
   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
     # On all platforms except MacOSX replace x86_64 with amd64.
     OPENJDK_BUILD_CPU_LEGACY="amd64"
+  elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
+    # Avoid name collisions with variables named alpha
+    OPENJDK_BUILD_CPU_LEGACY="_alpha_"
+  elif test "x$OPENJDK_BUILD_CPU" = xsh; then
+    # Avoid name collisions with variables named sh
+    OPENJDK_BUILD_CPU_LEGACY="_sh_"
   fi
 
 
@@ -52064,7 +52086,7 @@
       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
     fi
     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
-        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
+        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
     JVM_LIBS="$JVM_LIBS -lm"
   elif test "x$OPENJDK_TARGET_OS" = xaix; then
@@ -52943,7 +52965,7 @@
       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
     fi
     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
-        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
+        -lthread -ldoor -lc -ldemangle -lnsl -lrt"
   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
   elif test "x$OPENJDK_BUILD_OS" = xaix; then
@@ -54204,6 +54226,23 @@
 
 
 
+  # Check whether --enable-cds was given.
+if test "${enable_cds+set}" = set; then :
+  enableval=$enable_cds;
+fi
+
+
+  if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
+    ENABLE_CDS="true"
+  elif test "x$enable_cds" = "xno"; then
+    ENABLE_CDS="false"
+  else
+    as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
+  fi
+
+
+
+
   # Check whether --enable-hotspot-gtest was given.
 if test "${enable_hotspot_gtest+set}" = set; then :
   enableval=$enable_hotspot_gtest;
@@ -62713,7 +62752,7 @@
             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 
   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
-  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
+  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
   METHOD="well-known location"
 
   # Let's start with an optimistic view of the world :-)
@@ -65798,8 +65837,12 @@
     fi
     INCLUDE_GRAAL="true"
   else
-    # By default enable graal build where AOT is available
-    if test "x$ENABLE_AOT" = "xtrue"; then
+    # By default enable graal build on linux-x64 or where AOT is available.
+    # graal build requires jvmci.
+    if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
+        (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
+         test "x$OPENJDK_TARGET_OS" = "xlinux" || \
+         test "x$ENABLE_AOT" = "xtrue") ; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
       JVM_FEATURES_graal="graal"
@@ -65844,7 +65887,10 @@
   fi
 
   # All variants but minimal (and custom) get these features
-  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
+  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
+  if test "x$ENABLE_CDS" = "xtrue"; then
+    NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
+  fi
 
   # Enable features depending on variant.
   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
@@ -65948,7 +65994,7 @@
 
   # Check if it's likely that it's possible to generate the classlist. Depending
   # on exact jvm configuration it could be possible anyway.
-  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
+  if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
   else
     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
@@ -65961,8 +66007,8 @@
 $as_echo "yes, forced" >&6; }
     ENABLE_GENERATE_CLASSLIST="true"
     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
-$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5
+$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
     fi
   elif test "x$enable_generate_classlist" = "xno"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
--- a/common/autoconf/hotspot.m4	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/autoconf/hotspot.m4	Wed Sep 27 01:20:56 2017 -0400
@@ -25,7 +25,7 @@
 
 # All valid JVM features, regardless of platform
 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
-    graal fprof vm-structs jni-check services management all-gcs nmt cds \
+    graal vm-structs jni-check services management all-gcs nmt cds \
     static-build link-time-opt aot"
 
 # All valid JVM variants
@@ -240,6 +240,25 @@
   AC_SUBST(ENABLE_AOT)
 ])
 
+################################################################################
+# Allow to disable CDS
+#
+AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
+[
+  AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no@:>@],
+      [enable class data sharing feature in non-minimal VM. Default is yes.])])
+
+  if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
+    ENABLE_CDS="true"
+  elif test "x$enable_cds" = "xno"; then
+    ENABLE_CDS="false"
+  else
+    AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds])
+  fi
+
+  AC_SUBST(ENABLE_CDS)
+])
+
 ###############################################################################
 # Set up all JVM features for each JVM variant.
 #
@@ -335,8 +354,12 @@
     fi
     INCLUDE_GRAAL="true"
   else
-    # By default enable graal build where AOT is available
-    if test "x$ENABLE_AOT" = "xtrue"; then
+    # By default enable graal build on linux-x64 or where AOT is available.
+    # graal build requires jvmci.
+    if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
+        (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
+         test "x$OPENJDK_TARGET_OS" = "xlinux" || \
+         test "x$ENABLE_AOT" = "xtrue") ; then
       AC_MSG_RESULT([yes])
       JVM_FEATURES_graal="graal"
       INCLUDE_GRAAL="true"
@@ -374,7 +397,10 @@
   fi
 
   # All variants but minimal (and custom) get these features
-  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
+  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
+  if test "x$ENABLE_CDS" = "xtrue"; then
+    NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
+  fi                                            
 
   # Enable features depending on variant.
   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
--- a/common/autoconf/jdk-options.m4	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/autoconf/jdk-options.m4	Wed Sep 27 01:20:56 2017 -0400
@@ -496,11 +496,12 @@
 [
   AC_ARG_ENABLE([generate-classlist], [AS_HELP_STRING([--disable-generate-classlist],
       [forces enabling or disabling of the generation of a CDS classlist at build time.
-      Default is to generate it when either the server or client JVMs are built.])])
+      Default is to generate it when either the server or client JVMs are built and
+      enable-cds is true.])])
 
   # Check if it's likely that it's possible to generate the classlist. Depending
   # on exact jvm configuration it could be possible anyway.
-  if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client); then
+  if test "x$ENABLE_CDS" = "xtrue" && (HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client)); then
     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
   else
     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
@@ -511,7 +512,7 @@
     AC_MSG_RESULT([yes, forced])
     ENABLE_GENERATE_CLASSLIST="true"
     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
-      AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS])
+      AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS])
     fi
   elif test "x$enable_generate_classlist" = "xno"; then
     AC_MSG_RESULT([no, forced])
--- a/common/autoconf/platform.m4	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/autoconf/platform.m4	Wed Sep 27 01:20:56 2017 -0400
@@ -337,6 +337,12 @@
   elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
     # On all platforms except MacOSX replace x86_64 with amd64.
     OPENJDK_$1_CPU_LEGACY="amd64"
+  elif test "x$OPENJDK_$1_CPU" = xalpha; then
+    # Avoid name collisions with variables named alpha
+    OPENJDK_$1_CPU_LEGACY="_alpha_"
+  elif test "x$OPENJDK_$1_CPU" = xsh; then
+    # Avoid name collisions with variables named sh
+    OPENJDK_$1_CPU_LEGACY="_sh_"
   fi
   AC_SUBST(OPENJDK_$1_CPU_LEGACY)
 
--- a/common/conf/jib-profiles.js	Wed Sep 20 23:55:35 2017 -0400
+++ b/common/conf/jib-profiles.js	Wed Sep 27 01:20:56 2017 -0400
@@ -200,7 +200,7 @@
     data.configuration_make_arg = "CONF_NAME=";
 
     // Exclude list to use when Jib creates a source bundle
-    data.src_bundle_excludes = "./build webrev .hg */.hg */*/.hg */*/*/.hg";
+    data.src_bundle_excludes = "./build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
     // Include list to use when creating a minimal jib source bundle which
     // contains just the jib configuration files.
     data.conf_bundle_includes = "*/conf/jib-profiles.* common/autoconf/version-numbers"
@@ -818,6 +818,49 @@
             }
         },
 
+        "macosx-x64-open": {
+            artifacts: {
+                jdk: {
+                    local: "bundles/\\(jdk.*bin.tar.gz\\)",
+                    remote: [
+                        "bundles/openjdk/GPL/osx-x64/jdk-" + data.version
+                            + "_osx-x64_bin.tar.gz",
+                        "bundles/openjdk/GPL/osx-x64/\\1"
+                    ],
+                    subdir: "jdk-" + data.version
+                },
+                jre: {
+                    local: "bundles/\\(jre.*bin.tar.gz\\)",
+                    remote: "bundles/openjdk/GPL/osx-x64/\\1",
+                },
+                test: {
+                    local: "bundles/\\(jdk.*bin-tests.tar.gz\\)",
+                    remote: [
+                        "bundles/openjdk/GPL/osx-x64/jdk-" + data.version
+                            + "_osx-x64_bin-tests.tar.gz",
+                        "bundles/openjdk/GPL/osx-x64/\\1"
+                    ]
+                },
+                jdk_symbols: {
+                    local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
+                    remote: [
+                        "bundles/openjdk/GPL/osx-x64/jdk-" + data.version
+                            + "_osx-x64_bin-symbols.tar.gz",
+                        "bundles/openjdk/GPL/osx-x64/\\1"
+                    ],
+                    subdir: "jdk-" + data.version
+                },
+                jre_symbols: {
+                    local: "bundles/\\(jre.*bin-symbols.tar.gz\\)",
+                    remote: "bundles/openjdk/GPL/osx-x64/\\1",
+                },
+                doc_api_spec: {
+                    local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
+                    remote: "bundles/openjdk/GPL/osx-x64/\\1",
+                },
+            }
+        },
+
         "windows-x86-open": {
             artifacts: {
                 jdk: {
@@ -884,10 +927,11 @@
     profiles["linux-x64-ri"] = clone(profiles["linux-x64-open"]);
     profiles["linux-x86-ri"] = clone(profiles["linux-x86-open"]);
     profiles["linux-x86-ri-debug"] = clone(profiles["linux-x86-open-debug"]);
+    profiles["macosx-x64-ri"] = clone(profiles["macosx-x64-open"]);
     profiles["windows-x86-ri"] = clone(profiles["windows-x86-open"]);
 
     // Generate artifacts for ri profiles
-    [ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "windows-x86-ri" ]
+    [ "linux-x64-ri", "linux-x86-ri", "linux-x86-ri-debug", "macosx-x64-ri", "windows-x86-ri" ]
         .forEach(function (name) {
             // Rewrite all remote dirs to "bundles/openjdk/BCL/..."
             for (artifactName in profiles[name].artifacts) {
--- a/make/CompileJavaModules.gmk	Wed Sep 20 23:55:35 2017 -0400
+++ b/make/CompileJavaModules.gmk	Wed Sep 27 01:20:56 2017 -0400
@@ -42,9 +42,9 @@
 
 ################################################################################
 
-java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
-java.base_COPY := .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
-java.base_CLEAN := intrinsic.properties
+java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
+java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
+java.base_CLEAN += intrinsic.properties
 
 java.base_EXCLUDE_FILES += \
   $(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java
@@ -85,20 +85,20 @@
 
 ################################################################################
 
-java.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.datatransfer_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
-java.datatransfer_COPY := flavormap.properties
+java.datatransfer_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+java.datatransfer_COPY += flavormap.properties
 
 ################################################################################
 
-java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference \
+java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
     '-Xdoclint/package:java.*,javax.*' -Xlint:exports \
     --doclint-format html4
-java.desktop_COPY := .gif .png .wav .txt .xml .css .pf
-java.desktop_CLEAN := iio-plugin.properties cursors.properties
+java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
+java.desktop_CLEAN += iio-plugin.properties cursors.properties
 
 java.desktop_EXCLUDES += \
     java/awt/doc-files \
@@ -230,50 +230,50 @@
 
 ################################################################################
 
-java.scripting_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
-java.scripting_COPY := .js
-java.scripting_CLEAN := .properties
+java.scripting_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.scripting_COPY += .js
+java.scripting_CLEAN += .properties
 
 ################################################################################
 
-java.instrument_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.instrument_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.logging_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+java.logging_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.management_ADD_JAVAC_FLAGS := -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+java.management_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.management.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:javax.*'
+java.management.rmi_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:javax.*'
 
 ################################################################################
 
-java.prefs_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.prefs_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.transaction_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.transaction_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.sql_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
 
 ################################################################################
 
-java.sql.rowset_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
-java.sql.rowset_CLEAN_FILES := $(wildcard \
+java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.sql.rowset_CLEAN_FILES += $(wildcard \
     $(JDK_TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
     $(JDK_TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
 
 ################################################################################
 
-java.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
-java.rmi_CLEAN_FILES := $(wildcard \
+java.rmi_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.rmi_CLEAN_FILES += $(wildcard \
     $(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/registry/resources/*.properties \
     $(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties)
 
@@ -281,8 +281,8 @@
 
 java.corba_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
 
-java.corba_COPY := .prp
-java.corba_CLEAN := .properties
+java.corba_COPY += .prp
+java.corba_CLEAN += .properties
 
 java.corba_EXCLUDES += \
     com/sun/corba/se/PortableActivationIDL \
@@ -301,99 +301,99 @@
 ################################################################################
 
 java.xml_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-java.xml_CLEAN := .properties
+java.xml_CLEAN += .properties
 
 ################################################################################
 
 java.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-java.xml.bind_CLEAN := .properties
+java.xml.bind_CLEAN += .properties
 
 ################################################################################
 
 java.xml.soap_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-java.xml.soap_CLEAN := .properties
+java.xml.soap_CLEAN += .properties
 
 ################################################################################
 
 java.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-java.xml.ws_COPY := .xml
-java.xml.ws_CLEAN := .properties
+java.xml.ws_COPY += .xml
+java.xml.ws_CLEAN += .properties
 
 ################################################################################
 
-java.naming_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
-java.naming_CLEAN := jndiprovider.properties
+java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
+java.naming_CLEAN += jndiprovider.properties
 
 ################################################################################
 
-java.security.saaj_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
-java.security.saaj_CLEAN := .properties
+java.security.saaj_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.security.saaj_CLEAN += .properties
 
 ################################################################################
 
-java.security.jgss_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.security.jgss_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.smartcardio_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.smartcardio_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.xml.crypto_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
-java.xml.crypto_COPY := .dtd .xml
-java.xml.crypto_CLEAN := .properties
+java.xml.crypto_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.xml.crypto_COPY += .dtd .xml
+java.xml.crypto_CLEAN += .properties
 
 ################################################################################
 
-jdk.charsets_COPY := .dat
+jdk.charsets_COPY += .dat
 
 ################################################################################
 
 ################################################################################
 
-jdk.compiler_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*' \
+jdk.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*' \
     -XDstringConcat=inline
-jdk.compiler_CLEAN_FILES := $(wildcard \
+jdk.compiler_CLEAN_FILES += $(wildcard \
     $(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
         sun/tools/serialver/resources))
 
 ################################################################################
 
-jdk.hotspot.agent_ADD_JAVAC_FLAGS := $(DISABLE_WARNINGS),-overrides
-jdk.hotspot.agent_COPY := .gif .png sa.js .properties
+jdk.hotspot.agent_ADD_JAVAC_FLAGS += $(DISABLE_WARNINGS),-overrides
+jdk.hotspot.agent_COPY += .gif .png sa.js .properties
 
 ################################################################################
 
-jdk.editpad_COPY := .properties
+jdk.editpad_COPY += .properties
 
 ################################################################################
 
-jdk.jshell_COPY := .jsh .properties
+jdk.jshell_COPY += .jsh .properties
 
 ################################################################################
 
-jdk.internal.le_COPY := .properties
+jdk.internal.le_COPY += .properties
 
 ################################################################################
 
-jdk.jcmd_COPY := _options
+jdk.jcmd_COPY += _options
 
 ################################################################################
 
-jdk.dynalink_CLEAN := .properties
+jdk.dynalink_CLEAN += .properties
 
 ################################################################################
 
-jdk.javadoc_COPY := .xml .css .js .png
+jdk.javadoc_COPY += .xml .css .js .png
 
 ################################################################################
 
-jdk.jartool_ADD_JAVAC_FLAGS := -XDstringConcat=inline
+jdk.jartool_ADD_JAVAC_FLAGS += -XDstringConcat=inline
 
 ################################################################################
 
 jdk.rmic_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-jdk.rmic_CLEAN := .properties
+jdk.rmic_CLEAN += .properties
 
 ################################################################################
 
@@ -421,16 +421,16 @@
 
 ################################################################################
 
-jdk.jconsole_COPY := .gif .png
+jdk.jconsole_COPY += .gif .png
 
-jdk.jconsole_CLEAN_FILES := $(wildcard \
+jdk.jconsole_CLEAN_FILES += $(wildcard \
     $(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties)
 
 ################################################################################
 
-jdk.jdeps_COPY := .txt
+jdk.jdeps_COPY += .txt
 
-jdk.jdeps_CLEAN_FILES := $(wildcard \
+jdk.jdeps_CLEAN_FILES += $(wildcard \
     $(JDK_TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \
     $(JDK_TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties)
 
@@ -447,15 +447,15 @@
 
 ################################################################################
 
-jdk.dev_CLEAN_FILES := $(wildcard \
+jdk.dev_CLEAN_FILES += $(wildcard \
     $(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
         com/sun/tools/script/shell))
 
-jdk.dev_COPY := .js oqlhelp.html .txt
+jdk.dev_COPY += .js oqlhelp.html .txt
 
 ################################################################################
 
-jdk.internal.jvmstat_COPY := aliasmap
+jdk.internal.jvmstat_COPY += aliasmap
 
 ################################################################################
 
@@ -465,11 +465,11 @@
 # The exports are needed since JVMCI is dynamically exported (see
 # jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
 
-jdk.internal.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline
+jdk.internal.vm.ci_ADD_JAVAC_FLAGS += -parameters -Xlint:-exports -XDstringConcat=inline
 
 ################################################################################
 
-jdk.internal.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \
+jdk.internal.vm.compiler_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
     --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
     --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
     --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
@@ -528,7 +528,7 @@
 # The exports are needed since JVMCI is dynamically exported (see
 # jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
 
-jdk.aot_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \
+jdk.aot_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
     --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \
     --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \
     --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \
@@ -547,21 +547,21 @@
 ################################################################################
 
 jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-jdk.xml.bind_CLEAN := .properties
-jdk.xml.bind_COPY := .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
+jdk.xml.bind_CLEAN += .properties
+jdk.xml.bind_COPY += .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
 
 ################################################################################
 
 jdk.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
-jdk.xml.ws_CLEAN := .properties
+jdk.xml.ws_CLEAN += .properties
 
 ################################################################################
 
-sun.charsets_COPY := .dat
+sun.charsets_COPY += .dat
 
 ################################################################################
 
-jdk.localedata_COPY := _dict _th
+jdk.localedata_COPY += _dict _th
 # Exclude BreakIterator classes that are just used in compile process to generate
 # data files and shouldn't go in the product
 jdk.localedata_EXCLUDE_FILES += sun/text/resources/ext/BreakIteratorRules_th.java
--- a/make/RunTests.gmk	Wed Sep 20 23:55:35 2017 -0400
+++ b/make/RunTests.gmk	Wed Sep 27 01:20:56 2017 -0400
@@ -328,9 +328,9 @@
     $1_JTREG_JOBS := 50
   endif
 
-  # Make sure MaxRAMFraction is high enough to not cause OOM or swapping since
+  # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since
   # we may end up with a lot of JVM's
-  $1_JTREG_MAX_RAM_FRACTION := $$(shell $$(EXPR) $$($1_JTREG_JOBS) \* 4)
+  $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS))
 
   JTREG_TIMEOUT ?= 4
   JTREG_VERBOSE ?= fail,error,summary
@@ -344,7 +344,7 @@
   $1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
       -verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
       -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT) \
-      -vmoption:-XX:MaxRAMFraction=$$($1_JTREG_MAX_RAM_FRACTION)
+      -vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
 
   $1_JTREG_BASIC_OPTIONS += -automatic -keywords:\!ignore -ignore:quiet
 
--- a/make/common/NativeCompilation.gmk	Wed Sep 20 23:55:35 2017 -0400
+++ b/make/common/NativeCompilation.gmk	Wed Sep 27 01:20:56 2017 -0400
@@ -932,10 +932,35 @@
       endif
     endif
 
+    # Unfortunately the @-file trick does not work reliably when using clang.
+    # Clang does not propagate the @-file parameter to the ld sub process, but
+    # instead puts the full content on the command line. At least the llvm ld
+    # does not even support an @-file.
+    #
+    # When linking a large amount of object files, we risk hitting the limit
+    # of the command line length even on posix systems if the path length of
+    # the output dir is very long due to our use of absolute paths. To
+    # mitigate this, use paths relative to the output dir when linking over
+    # 500 files with clang and the output dir path is deep.
+    ifneq ($$(word 500, $$($1_ALL_OBJS)), )
+      ifeq ($$(TOOLCHAIN_TYPE), clang)
+        # There is no strlen function in make, but checking path depth is a
+        # reasonable approximation.
+        ifneq ($$(word 10, $$(subst /, ,$$(OUTPUT_ROOT))), )
+          $1_LINK_OBJS_RELATIVE := true
+          $1_ALL_OBJS_RELATIVE := $$(patsubst $$(OUTPUT_ROOT)/%, %, $$($1_ALL_OBJS))
+        endif
+      endif
+    endif
+
     $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
         $$($1_VARDEPS_FILE)
                 ifneq ($$($1_OBJ_FILE_LIST), )
-		  $$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
+                  ifeq ($$($1_LINK_OBJS_RELATIVE), true)
+		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS_RELATIVE, $$($1_OBJ_FILE_LIST)))
+                  else
+		    $$(eval $$(call ListPathsSafely, $1_ALL_OBJS, $$($1_OBJ_FILE_LIST)))
+                  endif
                 endif
                 # Keep as much as possible on one execution line for best performance
                 # on Windows
@@ -951,6 +976,7 @@
 		  $$($1_STRIP_CMD)
                 else
 		  $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \
+		      $$(if $$($1_LINK_OBJS_RELATIVE), $$(CD) $$(OUTPUT_ROOT) ; ) \
 		      $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
 		      $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \
 		      $$($1_EXTRA_LIBS)) ; \