changeset 1826:90f455b5ff5e

Merge
author lana
date Wed, 02 Dec 2015 09:34:13 -0800
parents 12a6fb4f070f c68e1abd0df9
children 668ba5feb9a8
files common/autoconf/boot-jdk.m4 common/autoconf/configure.ac common/autoconf/flags.m4 common/autoconf/generated-configure.sh common/autoconf/spec.gmk.in make/Images.gmk
diffstat 25 files changed, 2812 insertions(+), 186 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/basics_windows.m4	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/basics_windows.m4	Wed Dec 02 09:34:13 2015 -0800
@@ -423,7 +423,10 @@
       AC_MSG_ERROR([fixpath did not work!])
     fi
     AC_MSG_RESULT([yes])
+
+    FIXPATH_DETACH_FLAG="--detach"
   fi
 
   AC_SUBST(FIXPATH)
+  AC_SUBST(FIXPATH_DETACH_FLAG)
 ])
--- a/common/autoconf/boot-jdk.m4	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/boot-jdk.m4	Wed Dec 02 09:34:13 2015 -0800
@@ -375,6 +375,9 @@
   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
   AC_SUBST(JAVA_FLAGS_BIG)
 
+  # By default, the main javac compilations use big
+  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
+  AC_SUBST(JAVA_FLAGS_JAVAC)
 
   AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
 
--- a/common/autoconf/bootcycle-spec.gmk.in	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/bootcycle-spec.gmk.in	Wed Dec 02 09:34:13 2015 -0800
@@ -59,3 +59,8 @@
 JAR_CMD:=$(BOOT_JDK)/bin/jar
 JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
 SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
+# When building a 32bit target, make sure the sjavac server flags are compatible
+# with a 32bit JVM.
+ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
+  SJAVAC_SERVER_JAVA_FLAGS:= -Xms256M -Xmx1500M
+endif
--- a/common/autoconf/build-performance.m4	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/build-performance.m4	Wed Dec 02 09:34:13 2015 -0800
@@ -138,14 +138,6 @@
       JOBS="$memory_gb"
     else
       JOBS="$NUM_CORES"
-      # On bigger machines, leave some room for other processes to run
-      if test "$JOBS" -gt "4"; then
-        JOBS=`expr $JOBS '*' 90 / 100`
-      fi
-    fi
-    # Cap number of jobs to 16
-    if test "$JOBS" -gt "16"; then
-      JOBS=16
     fi
     if test "$JOBS" -eq "0"; then
       JOBS=1
@@ -246,6 +238,73 @@
   fi
 ])
 
+################################################################################
+#
+# Optionally enable distributed compilation of native code using icecc/icecream
+#
+AC_DEFUN([BPERF_SETUP_ICECC],
+[
+  AC_ARG_ENABLE([icecc], [AS_HELP_STRING([--enable-icecc],
+      [enable distribted compilation of native code using icecc/icecream @<:@disabled@:>@])])
+
+  if test "x${enable_icecc}" = "xyes"; then
+    BASIC_REQUIRE_PROGS(ICECC_CMD, icecc)
+    old_path="$PATH"
+
+    # Look for icecc-create-env in some known places
+    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
+    BASIC_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
+    # Use icecc-create-env to create a minimal compilation environment that can
+    # be sent to the other hosts in the icecream cluster.
+    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
+    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
+    AC_MSG_CHECKING([for icecc build environment for target compiler])
+    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
+      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
+    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
+      # For clang, the icecc compilerwrapper is needed. It usually resides next
+      # to icecc-create-env.
+      BASIC_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
+      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
+    else
+      AC_MSG_ERROR([Can only create icecc compiler packages for toolchain types gcc and clang])
+    fi
+    PATH="$old_path"
+    # The bundle with the compiler gets a name based on checksums. Parse log file
+    # to find it.
+    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
+    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
+    AC_MSG_RESULT([${ICECC_ENV_BUNDLE}])
+    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
+
+    if test "x${COMPILE_TYPE}" = "xcross"; then
+      # If cross compiling, create a separate env package for the build compiler
+      AC_MSG_CHECKING([for icecc build environment for build compiler])
+      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
+      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
+        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
+      elif test "x${BUILD_CC##*/}" = "xclang"; then
+        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
+      else
+        AC_MSG_ERROR([Cannot create icecc compiler package for ${BUILD_CC}])
+      fi
+      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
+      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
+      AC_MSG_RESULT([${ICECC_ENV_BUNDLE}])
+      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
+          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
+    else
+      BUILD_ICECC="${ICECC}"
+    fi
+    AC_SUBST(ICECC)
+    AC_SUBST(BUILD_ICECC)
+  fi
+])
+
 AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
 [
 
@@ -258,8 +317,15 @@
       [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
 
   USE_PRECOMPILED_HEADER=1
+  AC_MSG_CHECKING([If precompiled header is enabled])
   if test "x$ENABLE_PRECOMPH" = xno; then
+    AC_MSG_RESULT([no, forced])
     USE_PRECOMPILED_HEADER=0
+  elif test "x$ICECC" != "x"; then
+    AC_MSG_RESULT([no, does not work effectively with icecc])
+    USE_PRECOMPILED_HEADER=0
+  else
+    AC_MSG_RESULT([yes])
   fi
 
   if test "x$ENABLE_PRECOMPH" = xyes; then
@@ -337,9 +403,9 @@
   AC_MSG_RESULT([$ENABLE_SJAVAC])
   AC_SUBST(ENABLE_SJAVAC)
 
-  AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server],
-      [use only the server part of sjavac for faster javac compiles @<:@disabled@:>@])],
-      [ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER="no"])
+  AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--disable-javac-server],
+      [disable javac server @<:@enabled@:>@])],
+      [ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER="yes"])
   if test "x$JVM_ARG_OK" = "xfalse"; then
     AC_MSG_WARN([Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server])
     ENABLE_JAVAC_SERVER="no"
@@ -347,4 +413,10 @@
   AC_MSG_CHECKING([whether to use javac server])
   AC_MSG_RESULT([$ENABLE_JAVAC_SERVER])
   AC_SUBST(ENABLE_JAVAC_SERVER)
+
+  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
+    # When using a server javac, the small client instances do not need much
+    # resources.
+    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
+  fi
 ])
--- a/common/autoconf/configure.ac	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/configure.ac	Wed Dec 02 09:34:13 2015 -0800
@@ -237,6 +237,9 @@
 # Setup smart javac (after cores and memory have been setup)
 BPERF_SETUP_SMART_JAVAC
 
+# Setup use of icecc if requested
+BPERF_SETUP_ICECC
+
 # Can the C/C++ compiler use precompiled headers?
 BPERF_SETUP_PRECOMPILED_HEADERS
 
--- a/common/autoconf/flags.m4	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/flags.m4	Wed Dec 02 09:34:13 2015 -0800
@@ -976,6 +976,19 @@
         DISABLE_WARNING_PREFIX=
       fi
       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+      # Repeate the check for the BUILD_CC
+      CC_OLD="$CC"
+      CC="$BUILD_CC"
+      FLAGS_COMPILER_CHECK_ARGUMENTS([-Wno-this-is-a-warning-that-do-not-exist],
+          [BUILD_CC_CAN_DISABLE_WARNINGS=true],
+          [BUILD_CC_CAN_DISABLE_WARNINGS=false]
+      )
+      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
+        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
+      else
+        BUILD_CC_DISABLE_WARNING_PREFIX=
+      fi
+      CC="$CC_OLD"
       ;;
     clang)
       DISABLE_WARNING_PREFIX="-Wno-"
--- a/common/autoconf/generated-configure.sh	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/generated-configure.sh	Wed Dec 02 09:34:13 2015 -0800
@@ -632,12 +632,18 @@
 CFLAGS_CCACHE
 CCACHE
 USE_PRECOMPILED_HEADER
+BUILD_ICECC
+ICECC
+ICECC_WRAPPER
+ICECC_CREATE_ENV
+ICECC_CMD
 ENABLE_JAVAC_SERVER
 ENABLE_SJAVAC
 SJAVAC_SERVER_JAVA_FLAGS
 SJAVAC_SERVER_JAVA
 JAVA_TOOL_FLAGS_SMALL
 JAVA_FLAGS_SMALL
+JAVA_FLAGS_JAVAC
 JAVA_FLAGS_BIG
 JAVA_FLAGS
 JOBS
@@ -679,6 +685,7 @@
 MSVCR_DLL
 LIBCXX
 STATIC_CXX_SETTING
+FIXPATH_DETACH_FLAG
 FIXPATH
 GCOV_ENABLED
 ZIP_DEBUGINFO_FILES
@@ -742,7 +749,10 @@
 HOTSPOT_CXX
 HOTSPOT_RC
 HOTSPOT_MT
+BUILD_AS
 BUILD_LD
+BUILD_AR
+BUILD_NM
 BUILD_CXX
 BUILD_CC
 BUILD_SYSROOT_LDFLAGS
@@ -1130,6 +1140,7 @@
 with_sjavac_server_java
 enable_sjavac
 enable_javac_server
+enable_icecc
 enable_precompiled_headers
 enable_ccache
 with_ccache_dir
@@ -1224,6 +1235,8 @@
 OBJDUMP
 BUILD_CC
 BUILD_CXX
+BUILD_NM
+BUILD_AR
 JTREGEXE
 XMKMF
 FREETYPE_CFLAGS
@@ -1236,6 +1249,9 @@
 PNG_LIBS
 LCMS_CFLAGS
 LCMS_LIBS
+ICECC_CMD
+ICECC_CREATE_ENV
+ICECC_WRAPPER
 CCACHE'
 
 
@@ -1881,8 +1897,9 @@
                           --with-freetype, disabled otherwise]
   --enable-sjavac         use sjavac to do fast incremental compiles
                           [disabled]
-  --enable-javac-server   use only the server part of sjavac for faster javac
-                          compiles [disabled]
+  --disable-javac-server  disable javac server [enabled]
+  --enable-icecc          enable distribted compilation of native code using
+                          icecc/icecream [disabled]
   --disable-precompiled-headers
                           disable using precompiled headers when compiling C++
                           [enabled]
@@ -2130,6 +2147,8 @@
   OBJDUMP     Override default value for OBJDUMP
   BUILD_CC    Override default value for BUILD_CC
   BUILD_CXX   Override default value for BUILD_CXX
+  BUILD_NM    Override default value for BUILD_NM
+  BUILD_AR    Override default value for BUILD_AR
   JTREGEXE    Override default value for JTREGEXE
   XMKMF       Path to xmkmf, Makefile generator for X Window System
   FREETYPE_CFLAGS
@@ -2145,6 +2164,11 @@
   PNG_LIBS    linker flags for PNG, overriding pkg-config
   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
+  ICECC_CMD   Override default value for ICECC_CMD
+  ICECC_CREATE_ENV
+              Override default value for ICECC_CREATE_ENV
+  ICECC_WRAPPER
+              Override default value for ICECC_WRAPPER
   CCACHE      Override default value for CCACHE
 
 Use these variables to override the choices made by `configure' or to help
@@ -3742,6 +3766,12 @@
 
 
 
+################################################################################
+#
+# Optionally enable distributed compilation of native code using icecc/icecream
+#
+
+
 
 
 
@@ -4679,7 +4709,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1447737510
+DATE_WHEN_GENERATED=1449049746
 
 ###############################################################################
 #
@@ -36098,6 +36128,314 @@
 fi
 
 
+  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${AR+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar gcc-ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar gcc-ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !AR! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xAR" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar gcc-ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar gcc-ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$AR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
+$as_echo_n "checking for AR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$AR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $AR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_AR="$AR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+AR=$ac_cv_path_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$AR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
+$as_echo_n "checking for AR... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
   else
 
 
@@ -40277,6 +40615,315 @@
     fi
   fi
 
+    if test "x$TOOLCHAIN_TYPE" = xgcc; then
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${NM+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in nm gcc-nm
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  ac_cv_prog_NM="$NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NM=$ac_cv_prog_NM
+if test -n "$NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$NM" && break
+  done
+fi
+if test -z "$NM"; then
+  ac_ct_NM=$NM
+  for ac_prog in nm gcc-nm
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NM"; then
+  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_NM="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NM=$ac_cv_prog_ac_ct_NM
+if test -n "$ac_ct_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
+$as_echo "$ac_ct_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_NM" && break
+done
+
+  if test "x$ac_ct_NM" = x; then
+    NM=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NM=$ac_ct_NM
+  fi
+fi
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !NM! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xNM" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      if test -n "$ac_tool_prefix"; then
+  for ac_prog in nm gcc-nm
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NM"; then
+  ac_cv_prog_NM="$NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+NM=$ac_cv_prog_NM
+if test -n "$NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$NM" && break
+  done
+fi
+if test -z "$NM"; then
+  ac_ct_NM=$NM
+  for ac_prog in nm gcc-nm
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NM"; then
+  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_NM="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NM=$ac_cv_prog_ac_ct_NM
+if test -n "$ac_ct_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
+$as_echo "$ac_ct_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_NM" && break
+done
+
+  if test "x$ac_ct_NM" = x; then
+    NM=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    NM=$ac_ct_NM
+  fi
+fi
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$NM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+$as_echo_n "checking for NM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$NM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $NM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_NM="$NM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+NM=$ac_cv_path_NM
+if test -n "$NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
+$as_echo "$NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$NM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
+$as_echo_n "checking for NM... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
+    else
 
 
   # Publish this variable in the help.
@@ -40584,6 +41231,7 @@
   fi
 
 
+    fi
 
   # Only process if variable expands to non-empty
 
@@ -43359,6 +44007,975 @@
     fi
   fi
 
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${BUILD_NM+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in nm gcc-nm
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BUILD_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BUILD_NM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BUILD_NM=$ac_cv_path_BUILD_NM
+if test -n "$BUILD_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
+$as_echo "$BUILD_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$BUILD_NM" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !BUILD_NM! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xBUILD_NM" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in nm gcc-nm
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BUILD_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BUILD_NM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BUILD_NM=$ac_cv_path_BUILD_NM
+if test -n "$BUILD_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
+$as_echo "$BUILD_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$BUILD_NM" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$BUILD_NM" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
+$as_echo_n "checking for BUILD_NM... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BUILD_NM"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BUILD_NM+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BUILD_NM in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BUILD_NM=$ac_cv_path_BUILD_NM
+if test -n "$BUILD_NM"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
+$as_echo "$BUILD_NM" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$BUILD_NM" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
+$as_echo_n "checking for BUILD_NM... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
+
+  # Only process if variable expands to non-empty
+
+  if test "x$BUILD_NM" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # First separate the path from the arguments. This will split at the first
+  # space.
+  complete="$BUILD_NM"
+  path="${complete%% *}"
+  tmp="$complete EOL"
+  arguments="${tmp#* }"
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  new_path=`$CYGPATH -u "$path"`
+
+  # Now try to locate executable using which
+  new_path=`$WHICH "$new_path" 2> /dev/null`
+  # bat and cmd files are not always considered executable in cygwin causing which
+  # to not find them
+  if test "x$new_path" = x \
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+    new_path=`$CYGPATH -u "$path"`
+  fi
+  if test "x$new_path" = x; then
+    # Oops. Which didn't find the executable.
+    # The splitting of arguments from the executable at a space might have been incorrect,
+    # since paths with space are more likely in Windows. Give it another try with the whole
+    # argument.
+    path="$complete"
+    arguments="EOL"
+    new_path=`$CYGPATH -u "$path"`
+    new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in cygwin causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path=`$CYGPATH -u "$path"`
+    fi
+    if test "x$new_path" = x; then
+      # It's still not found. Now this is an unrecoverable error.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+      fi
+      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
+    fi
+  fi
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file presence.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    # Short path failed, file does not exist as specified.
+    # Try adding .exe or .cmd
+    if test -f "${new_path}.exe"; then
+      input_to_shortpath="${new_path}.exe"
+    elif test -f "${new_path}.cmd"; then
+      input_to_shortpath="${new_path}.cmd"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
+    fi
+  else
+    input_to_shortpath="$new_path"
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+  new_path="$input_to_shortpath"
+
+  input_path="$input_to_shortpath"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+  # remove trailing .exe if any
+  new_path="${new_path/%.exe/}"
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  # First separate the path from the arguments. This will split at the first
+  # space.
+  complete="$BUILD_NM"
+  path="${complete%% *}"
+  tmp="$complete EOL"
+  arguments="${tmp#* }"
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+
+  # Now try to locate executable using which
+  new_path=`$WHICH "$new_path" 2> /dev/null`
+
+  if test "x$new_path" = x; then
+    # Oops. Which didn't find the executable.
+    # The splitting of arguments from the executable at a space might have been incorrect,
+    # since paths with space are more likely in Windows. Give it another try with the whole
+    # argument.
+    path="$complete"
+    arguments="EOL"
+    new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+
+    new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
+
+    if test "x$new_path" = x; then
+      # It's still not found. Now this is an unrecoverable error.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+      fi
+      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
+    fi
+  fi
+
+  # Now new_path has a complete unix path to the binary
+  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+    # Keep paths in /bin as-is, but remove trailing .exe if any
+    new_path="${new_path/%.exe/}"
+    # Do not save /bin paths to all_fixpath_prefixes!
+  else
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $new_path`
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+    # Output is in $new_path
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    # remove trailing .exe if any
+    new_path="${new_path/%.exe/}"
+
+    # Save the first 10 bytes of this path to the storage, so fixpath can work.
+    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+  fi
+
+    else
+      # We're on a unix platform. Hooray! :)
+      # First separate the path from the arguments. This will split at the first
+      # space.
+      complete="$BUILD_NM"
+      path="${complete%% *}"
+      tmp="$complete EOL"
+      arguments="${tmp#* }"
+
+      # Cannot rely on the command "which" here since it doesn't always work.
+      is_absolute_path=`$ECHO "$path" | $GREP ^/`
+      if test -z "$is_absolute_path"; then
+        # Path to executable is not absolute. Find it.
+        IFS_save="$IFS"
+        IFS=:
+        for p in $PATH; do
+          if test -f "$p/$path" && test -x "$p/$path"; then
+            new_path="$p/$path"
+            break
+          fi
+        done
+        IFS="$IFS_save"
+      else
+        # This is an absolute path, we can use it without further modifications.
+        new_path="$path"
+      fi
+
+      if test "x$new_path" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
+        has_space=`$ECHO "$complete" | $GREP " "`
+        if test "x$has_space" != x; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+        fi
+        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
+      fi
+    fi
+
+    # Now join together the path and the arguments once again
+    if test "x$arguments" != xEOL; then
+      new_complete="$new_path ${arguments% *}"
+    else
+      new_complete="$new_path"
+    fi
+
+    if test "x$complete" != "x$new_complete"; then
+      BUILD_NM="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
+    fi
+  fi
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${BUILD_AR+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in ar gcc-ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BUILD_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BUILD_AR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BUILD_AR=$ac_cv_path_BUILD_AR
+if test -n "$BUILD_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
+$as_echo "$BUILD_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$BUILD_AR" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !BUILD_AR! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xBUILD_AR" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in ar gcc-ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BUILD_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BUILD_AR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BUILD_AR=$ac_cv_path_BUILD_AR
+if test -n "$BUILD_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
+$as_echo "$BUILD_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$BUILD_AR" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$BUILD_AR" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
+$as_echo_n "checking for BUILD_AR... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$BUILD_AR"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BUILD_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BUILD_AR in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BUILD_AR=$ac_cv_path_BUILD_AR
+if test -n "$BUILD_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
+$as_echo "$BUILD_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$BUILD_AR" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
+$as_echo_n "checking for BUILD_AR... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
+
+  # Only process if variable expands to non-empty
+
+  if test "x$BUILD_AR" != x; then
+    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+
+  # First separate the path from the arguments. This will split at the first
+  # space.
+  complete="$BUILD_AR"
+  path="${complete%% *}"
+  tmp="$complete EOL"
+  arguments="${tmp#* }"
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  new_path=`$CYGPATH -u "$path"`
+
+  # Now try to locate executable using which
+  new_path=`$WHICH "$new_path" 2> /dev/null`
+  # bat and cmd files are not always considered executable in cygwin causing which
+  # to not find them
+  if test "x$new_path" = x \
+      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+    new_path=`$CYGPATH -u "$path"`
+  fi
+  if test "x$new_path" = x; then
+    # Oops. Which didn't find the executable.
+    # The splitting of arguments from the executable at a space might have been incorrect,
+    # since paths with space are more likely in Windows. Give it another try with the whole
+    # argument.
+    path="$complete"
+    arguments="EOL"
+    new_path=`$CYGPATH -u "$path"`
+    new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in cygwin causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path=`$CYGPATH -u "$path"`
+    fi
+    if test "x$new_path" = x; then
+      # It's still not found. Now this is an unrecoverable error.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+      fi
+      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
+    fi
+  fi
+
+  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
+  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
+  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
+  # "foo.exe" is OK but "foo" is an error.
+  #
+  # This test is therefore slightly more accurate than "test -f" to check for file presence.
+  # It is also a way to make sure we got the proper file name for the real test later on.
+  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
+  if test "x$test_shortpath" = x; then
+    # Short path failed, file does not exist as specified.
+    # Try adding .exe or .cmd
+    if test -f "${new_path}.exe"; then
+      input_to_shortpath="${new_path}.exe"
+    elif test -f "${new_path}.cmd"; then
+      input_to_shortpath="${new_path}.cmd"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
+$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
+$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
+      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
+    fi
+  else
+    input_to_shortpath="$new_path"
+  fi
+
+  # Call helper function which possibly converts this using DOS-style short mode.
+  # If so, the updated path is stored in $new_path.
+  new_path="$input_to_shortpath"
+
+  input_path="$input_to_shortpath"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
+    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
+    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
+      # Going to short mode and back again did indeed matter. Since short mode is
+      # case insensitive, let's make it lowercase to improve readability.
+      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+      # Now convert it back to Unix-style (cygpath)
+      input_path=`$CYGPATH -u "$shortmode_path"`
+      new_path="$input_path"
+    fi
+  fi
+
+  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
+  if test "x$test_cygdrive_prefix" = x; then
+    # As a simple fix, exclude /usr/bin since it's not a real path.
+    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
+      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
+      # a path prefixed by /cygdrive for fixpath to work.
+      new_path="$CYGWIN_ROOT_PATH$input_path"
+    fi
+  fi
+
+  # remove trailing .exe if any
+  new_path="${new_path/%.exe/}"
+
+    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+
+  # First separate the path from the arguments. This will split at the first
+  # space.
+  complete="$BUILD_AR"
+  path="${complete%% *}"
+  tmp="$complete EOL"
+  arguments="${tmp#* }"
+
+  # Input might be given as Windows format, start by converting to
+  # unix format.
+  new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+
+  # Now try to locate executable using which
+  new_path=`$WHICH "$new_path" 2> /dev/null`
+
+  if test "x$new_path" = x; then
+    # Oops. Which didn't find the executable.
+    # The splitting of arguments from the executable at a space might have been incorrect,
+    # since paths with space are more likely in Windows. Give it another try with the whole
+    # argument.
+    path="$complete"
+    arguments="EOL"
+    new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+
+    new_path=`$WHICH "$new_path" 2> /dev/null`
+    # bat and cmd files are not always considered executable in MSYS causing which
+    # to not find them
+    if test "x$new_path" = x \
+        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
+        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
+      new_path="$path"
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    fi
+
+    if test "x$new_path" = x; then
+      # It's still not found. Now this is an unrecoverable error.
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
+      has_space=`$ECHO "$complete" | $GREP " "`
+      if test "x$has_space" != x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
+$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
+      fi
+      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
+    fi
+  fi
+
+  # Now new_path has a complete unix path to the binary
+  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
+    # Keep paths in /bin as-is, but remove trailing .exe if any
+    new_path="${new_path/%.exe/}"
+    # Do not save /bin paths to all_fixpath_prefixes!
+  else
+    # Not in mixed or Windows style, start by that.
+    new_path=`cmd //c echo $new_path`
+
+  input_path="$new_path"
+  # Check if we need to convert this using DOS-style short mode. If the path
+  # contains just simple characters, use it. Otherwise (spaces, weird characters),
+  # take no chances and rewrite it.
+  # Note: m4 eats our [], so we need to use [ and ] instead.
+  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
+  if test "x$has_forbidden_chars" != x; then
+    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
+    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+  fi
+
+    # Output is in $new_path
+
+  windows_path="$new_path"
+  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+    unix_path=`$CYGPATH -u "$windows_path"`
+    new_path="$unix_path"
+  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
+    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
+    new_path="$unix_path"
+  fi
+
+    # remove trailing .exe if any
+    new_path="${new_path/%.exe/}"
+
+    # Save the first 10 bytes of this path to the storage, so fixpath can work.
+    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
+  fi
+
+    else
+      # We're on a unix platform. Hooray! :)
+      # First separate the path from the arguments. This will split at the first
+      # space.
+      complete="$BUILD_AR"
+      path="${complete%% *}"
+      tmp="$complete EOL"
+      arguments="${tmp#* }"
+
+      # Cannot rely on the command "which" here since it doesn't always work.
+      is_absolute_path=`$ECHO "$path" | $GREP ^/`
+      if test -z "$is_absolute_path"; then
+        # Path to executable is not absolute. Find it.
+        IFS_save="$IFS"
+        IFS=:
+        for p in $PATH; do
+          if test -f "$p/$path" && test -x "$p/$path"; then
+            new_path="$p/$path"
+            break
+          fi
+        done
+        IFS="$IFS_save"
+      else
+        # This is an absolute path, we can use it without further modifications.
+        new_path="$path"
+      fi
+
+      if test "x$new_path" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
+$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
+        has_space=`$ECHO "$complete" | $GREP " "`
+        if test "x$has_space" != x; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
+$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
+        fi
+        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
+      fi
+    fi
+
+    # Now join together the path and the arguments once again
+    if test "x$arguments" != xEOL; then
+      new_complete="$new_path ${arguments% *}"
+    else
+      new_complete="$new_path"
+    fi
+
+    if test "x$complete" != "x$new_complete"; then
+      BUILD_AR="$new_complete"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
+$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
+    fi
+  fi
+
+    # Assume the C compiler is the assembler
+    BUILD_AS="$BUILD_CC -c"
+    # Just like for the target compiler, use the compiler as linker
     BUILD_LD="$BUILD_CC"
 
     PATH="$OLDPATH"
@@ -43368,9 +44985,15 @@
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
+    BUILD_NM="$NM"
+    BUILD_AS="$AS"
     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
-  fi
+    BUILD_AR="$AR"
+  fi
+
+
+
 
 
 
@@ -45694,6 +47317,81 @@
         DISABLE_WARNING_PREFIX=
       fi
       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
+      # Repeate the check for the BUILD_CC
+      CC_OLD="$CC"
+      CC="$BUILD_CC"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
+$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
+  supports=yes
+
+  saved_cflags="$CFLAGS"
+  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
+  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"
+
+  saved_cxxflags="$CXXFLAGS"
+  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
+  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
+    BUILD_CC_CAN_DISABLE_WARNINGS=true
+  else
+    BUILD_CC_CAN_DISABLE_WARNINGS=false
+
+  fi
+
+      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
+        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
+      else
+        BUILD_CC_DISABLE_WARNING_PREFIX=
+      fi
+      CC="$CC_OLD"
       ;;
     clang)
       DISABLE_WARNING_PREFIX="-Wno-"
@@ -45888,7 +47586,10 @@
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  fi
+
+    FIXPATH_DETACH_FLAG="--detach"
+  fi
+
 
 
 
@@ -55036,14 +56737,6 @@
       JOBS="$memory_gb"
     else
       JOBS="$NUM_CORES"
-      # On bigger machines, leave some room for other processes to run
-      if test "$JOBS" -gt "4"; then
-        JOBS=`expr $JOBS '*' 90 / 100`
-      fi
-    fi
-    # Cap number of jobs to 16
-    if test "$JOBS" -gt "16"; then
-      JOBS=16
     fi
     if test "$JOBS" -eq "0"; then
       JOBS=1
@@ -55191,6 +56884,9 @@
   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
 
 
+  # By default, the main javac compilations use big
+  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
+
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
@@ -55353,7 +57049,7 @@
 if test "${enable_javac_server+set}" = set; then :
   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
 else
-  ENABLE_JAVAC_SERVER="no"
+  ENABLE_JAVAC_SERVER="yes"
 fi
 
   if test "x$JVM_ARG_OK" = "xfalse"; then
@@ -55367,6 +57063,691 @@
 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
 
 
+  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
+    # When using a server javac, the small client instances do not need much
+    # resources.
+    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
+  fi
+
+
+# Setup use of icecc if requested
+
+  # Check whether --enable-icecc was given.
+if test "${enable_icecc+set}" = set; then :
+  enableval=$enable_icecc;
+fi
+
+
+  if test "x${enable_icecc}" = "xyes"; then
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${ICECC_CMD+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in icecc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_CMD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_CMD=$ac_cv_path_ICECC_CMD
+if test -n "$ICECC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
+$as_echo "$ICECC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ICECC_CMD" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !ICECC_CMD! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xICECC_CMD" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in icecc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_CMD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_CMD=$ac_cv_path_ICECC_CMD
+if test -n "$ICECC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
+$as_echo "$ICECC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ICECC_CMD" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$ICECC_CMD" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
+$as_echo_n "checking for ICECC_CMD... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$ICECC_CMD"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_CMD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_CMD in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_CMD=$ac_cv_path_ICECC_CMD
+if test -n "$ICECC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
+$as_echo "$ICECC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$ICECC_CMD" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
+$as_echo_n "checking for ICECC_CMD... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
+
+  if test "x$ICECC_CMD" = x; then
+    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
+  fi
+
+
+    old_path="$PATH"
+
+    # Look for icecc-create-env in some known places
+    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in icecc-create-env
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_CREATE_ENV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
+if test -n "$ICECC_CREATE_ENV"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
+$as_echo "$ICECC_CREATE_ENV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ICECC_CREATE_ENV" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !ICECC_CREATE_ENV! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xICECC_CREATE_ENV" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in icecc-create-env
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_CREATE_ENV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
+if test -n "$ICECC_CREATE_ENV"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
+$as_echo "$ICECC_CREATE_ENV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ICECC_CREATE_ENV" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$ICECC_CREATE_ENV" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
+$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$ICECC_CREATE_ENV"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_CREATE_ENV in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
+if test -n "$ICECC_CREATE_ENV"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
+$as_echo "$ICECC_CREATE_ENV" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$ICECC_CREATE_ENV" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
+$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
+
+  if test "x$ICECC_CREATE_ENV" = x; then
+    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
+  fi
+
+
+    # Use icecc-create-env to create a minimal compilation environment that can
+    # be sent to the other hosts in the icecream cluster.
+    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
+    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
+$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
+    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
+      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
+    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
+      # For clang, the icecc compilerwrapper is needed. It usually resides next
+      # to icecc-create-env.
+
+
+
+  # Publish this variable in the help.
+
+
+  if [ -z "${ICECC_WRAPPER+x}" ]; then
+    # The variable is not set by user, try to locate tool using the code snippet
+    for ac_prog in compilerwrapper
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_WRAPPER in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
+if test -n "$ICECC_WRAPPER"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
+$as_echo "$ICECC_WRAPPER" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ICECC_WRAPPER" && break
+done
+
+  else
+    # The variable is set, but is it from the command line or the environment?
+
+    # Try to remove the string !ICECC_WRAPPER! from our list.
+    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
+    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
+      # If it failed, the variable was not from the command line. Ignore it,
+      # but warn the user (except for BASH, which is always set by the calling BASH).
+      if test "xICECC_WRAPPER" != xBASH; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
+$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
+      fi
+      # Try to locate tool using the code snippet
+      for ac_prog in compilerwrapper
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_WRAPPER in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
+if test -n "$ICECC_WRAPPER"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
+$as_echo "$ICECC_WRAPPER" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ICECC_WRAPPER" && break
+done
+
+    else
+      # If it succeeded, then it was overridden by the user. We will use it
+      # for the tool.
+
+      # First remove it from the list of overridden variables, so we can test
+      # for unknown variables in the end.
+      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
+
+      # Check if we try to supply an empty value
+      if test "x$ICECC_WRAPPER" = x; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
+$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
+$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+      else
+        # Check if the provided tool contains a complete path.
+        tool_specified="$ICECC_WRAPPER"
+        tool_basename="${tool_specified##*/}"
+        if test "x$tool_basename" = "x$tool_specified"; then
+          # A command without a complete path is provided, search $PATH.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
+$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
+          # Extract the first word of "$tool_basename", so it can be a program name with args.
+set dummy $tool_basename; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ICECC_WRAPPER in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
+if test -n "$ICECC_WRAPPER"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
+$as_echo "$ICECC_WRAPPER" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+          if test "x$ICECC_WRAPPER" = x; then
+            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
+          fi
+        else
+          # Otherwise we believe it is a complete path. Use it as it is.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
+$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
+$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
+          if test ! -x "$tool_specified"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
+          fi
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
+$as_echo "$tool_specified" >&6; }
+        fi
+      fi
+    fi
+
+  fi
+
+
+
+  if test "x$ICECC_WRAPPER" = x; then
+    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
+  fi
+
+
+      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
+    else
+      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
+    fi
+    PATH="$old_path"
+    # The bundle with the compiler gets a name based on checksums. Parse log file
+    # to find it.
+    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
+    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
+$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
+    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
+
+    if test "x${COMPILE_TYPE}" = "xcross"; then
+      # If cross compiling, create a separate env package for the build compiler
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
+$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
+      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
+      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
+        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
+      elif test "x${BUILD_CC##*/}" = "xclang"; then
+        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
+            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
+      else
+        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
+      fi
+      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
+      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
+$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
+      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
+          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
+    else
+      BUILD_ICECC="${ICECC}"
+    fi
+
+
+  fi
+
 
 # Can the C/C++ compiler use precompiled headers?
 
@@ -55384,8 +57765,19 @@
 
 
   USE_PRECOMPILED_HEADER=1
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
+$as_echo_n "checking If precompiled header is enabled... " >&6; }
   if test "x$ENABLE_PRECOMPH" = xno; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
+$as_echo "no, forced" >&6; }
     USE_PRECOMPILED_HEADER=0
+  elif test "x$ICECC" != "x"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
+$as_echo "no, does not work effectively with icecc" >&6; }
+    USE_PRECOMPILED_HEADER=0
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
   fi
 
   if test "x$ENABLE_PRECOMPH" = xyes; then
--- a/common/autoconf/hotspot-spec.gmk.in	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/hotspot-spec.gmk.in	Wed Dec 02 09:34:13 2015 -0800
@@ -49,8 +49,8 @@
 
 # The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
 # compiler that produces code that can be run on the build platform.
-HOSTCC:=@FIXPATH@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
-HOSTCXX:=@FIXPATH@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
+HOSTCC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
+HOSTCXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
 
 ####################################################
 #
@@ -105,7 +105,7 @@
 
 # For hotspot, override compiler/tools definition to not include FIXPATH prefix.
 # Hotspot has its own handling on the Windows path situation.
-CXX:=@CCACHE@ @HOTSPOT_CXX@
+CXX:=@CCACHE@ @ICECC@ @HOTSPOT_CXX@
 LD:=@HOTSPOT_LD@
 MT:=@HOTSPOT_MT@
 RC:=@HOTSPOT_RC@
--- a/common/autoconf/spec.gmk.in	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/spec.gmk.in	Wed Dec 02 09:34:13 2015 -0800
@@ -329,7 +329,7 @@
 CFLAGS_CCACHE:=@CFLAGS_CCACHE@
 
 # Tools that potentially need to be cross compilation aware.
-CC:=@FIXPATH@ @CCACHE@ @CC@
+CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
 
 # CFLAGS used to compile the jdk native libraries (C-code)
 CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
@@ -339,7 +339,7 @@
 CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
 CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
 
-CXX:=@FIXPATH@ @CCACHE@ @CXX@
+CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
 #CXXFLAGS:=@CXXFLAGS@
 
 CPP:=@FIXPATH@ @CPP@
@@ -382,8 +382,12 @@
 
 # BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
 # build platform.
-BUILD_CC:=@FIXPATH@ @BUILD_CC@
+BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
+BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
 BUILD_LD:=@FIXPATH@ @BUILD_LD@
+BUILD_AS:=@FIXPATH@ @BUILD_AS@
+BUILD_AR:=@FIXPATH@ @BUILD_AR@
+BUILD_NM:=@FIXPATH@ @BUILD_NM@
 BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
 BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
 
@@ -446,6 +450,7 @@
 JAVA_FLAGS:=@JAVA_FLAGS@
 JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
 JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
+JAVA_FLAGS_JAVAC:=@JAVA_FLAGS_JAVAC@
 JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
 SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
 
@@ -462,13 +467,15 @@
 # it possible to override only the *_CMD variables.
 JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
 JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
+JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
 JAVAC=@FIXPATH@ $(JAVAC_CMD)
 JAVAH=@FIXPATH@ $(JAVAH_CMD)
 JAR=@FIXPATH@ $(JAR_CMD)
 JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
 # A specific java binary with specific options can be used to run
 # the long running background sjavac servers and other long running tasks.
-SJAVAC_SERVER_JAVA=@FIXPATH@ $(SJAVAC_SERVER_JAVA_CMD) $(SJAVAC_SERVER_JAVA_FLAGS)
+SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
+    $(SJAVAC_SERVER_JAVA_FLAGS)
 
 # Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
 # overriding that value by using ?=.
--- a/common/autoconf/toolchain.m4	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/autoconf/toolchain.m4	Wed Dec 02 09:34:13 2015 -0800
@@ -539,6 +539,8 @@
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
     # The corresponding ar tool is lib.exe (used to create static libraries)
     AC_CHECK_PROG([AR], [lib],[lib],,,)
+  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
+    BASIC_CHECK_TOOLS(AR, ar gcc-ar)
   else
     BASIC_CHECK_TOOLS(AR, ar)
   fi
@@ -584,7 +586,11 @@
     # FIXME: we should unify this with the solaris case above.
     BASIC_CHECK_TOOLS(STRIP, strip)
     BASIC_FIXUP_EXECUTABLE(STRIP)
-    BASIC_CHECK_TOOLS(NM, nm)
+    if test "x$TOOLCHAIN_TYPE" = xgcc; then
+      BASIC_CHECK_TOOLS(NM, nm gcc-nm)
+    else
+      BASIC_CHECK_TOOLS(NM, nm)
+    fi
     BASIC_FIXUP_EXECUTABLE(NM)
     GNM="$NM"
     AC_SUBST(GNM)
@@ -717,6 +723,13 @@
     BASIC_FIXUP_EXECUTABLE(BUILD_CC)
     BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
     BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
+    BASIC_PATH_PROGS(BUILD_NM, nm gcc-nm)
+    BASIC_FIXUP_EXECUTABLE(BUILD_NM)
+    BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
+    BASIC_FIXUP_EXECUTABLE(BUILD_AR)
+    # Assume the C compiler is the assembler
+    BUILD_AS="$BUILD_CC -c"
+    # Just like for the target compiler, use the compiler as linker
     BUILD_LD="$BUILD_CC"
 
     PATH="$OLDPATH"
@@ -726,15 +739,21 @@
     BUILD_CC="$CC"
     BUILD_CXX="$CXX"
     BUILD_LD="$LD"
+    BUILD_NM="$NM"
+    BUILD_AS="$AS"
     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
+    BUILD_AR="$AR"
   fi
 
   AC_SUBST(BUILD_CC)
   AC_SUBST(BUILD_CXX)
   AC_SUBST(BUILD_LD)
+  AC_SUBST(BUILD_NM)
+  AC_SUBST(BUILD_AS)
   AC_SUBST(BUILD_SYSROOT_CFLAGS)
   AC_SUBST(BUILD_SYSROOT_LDFLAGS)
+  AC_SUBST(BUILD_AR)
 ])
 
 # Setup legacy variables that are still needed as alternative ways to refer to
--- a/common/src/fixpath.c	Sun Nov 29 20:28:47 2015 -0800
+++ b/common/src/fixpath.c	Wed Dec 02 09:34:13 2015 -0800
@@ -358,10 +358,13 @@
     char *line;
     char *current;
     int i, cmd;
-    DWORD exitCode;
+    DWORD exitCode = 0;
+    DWORD processFlags = 0;
+    BOOL processInheritHandles = TRUE;
+    BOOL waitForChild = TRUE;
 
     if (argc<2 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
-        fprintf(stderr, "Usage: fixpath -c|m<path@path@...> /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
+        fprintf(stderr, "Usage: fixpath -c|m<path@path@...> [--detach] /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
         exit(0);
     }
 
@@ -386,7 +389,22 @@
       exit(-1);
     }
 
-    i = 2;
+    if (argv[2][0] == '-') {
+      if (strcmp(argv[2], "--detach") == 0) {
+        if (getenv("DEBUG_FIXPATH") != NULL) {
+          fprintf(stderr, "fixpath in detached mode\n");
+        }
+        processFlags |= DETACHED_PROCESS;
+        processInheritHandles = FALSE;
+        waitForChild = FALSE;
+      } else {
+        fprintf(stderr, "fixpath Unknown argument: %s\n", argv[2]);
+        exit(-1);
+      }
+      i = 3;
+    } else {
+      i = 2;
+    }
 
     // handle assignments
     while (i < argc) {
@@ -428,6 +446,10 @@
     while (i < argc) {
       char const *replaced = replace_cygdrive(argv[i]);
       if (replaced[0] == '@') {
+        if (waitForChild == FALSE) {
+          fprintf(stderr, "fixpath Cannot use @-files in detached mode: %s\n", replaced);
+          exit(1);
+        }
         // Found at-file! Fix it!
         replaced = fix_at_file(replaced);
       }
@@ -480,8 +502,8 @@
                        line,
                        0,
                        0,
-                       TRUE,
-                       0,
+                       processInheritHandles,
+                       processFlags,
                        NULL,
                        NULL,
                        &si,
@@ -492,24 +514,30 @@
       exit(126);
     }
 
-    WaitForSingleObject(pi.hProcess, INFINITE);
-    GetExitCodeProcess(pi.hProcess, &exitCode);
+    if (waitForChild == TRUE) {
+      WaitForSingleObject(pi.hProcess, INFINITE);
+      GetExitCodeProcess(pi.hProcess, &exitCode);
 
-    if (getenv("DEBUG_FIXPATH") != NULL) {
-      for (i=0; i<num_files_to_delete; ++i) {
-        fprintf(stderr, "fixpath Not deleting temporary file %s\n",
-                files_to_delete[i]);
+      if (getenv("DEBUG_FIXPATH") != NULL) {
+        for (i=0; i<num_files_to_delete; ++i) {
+          fprintf(stderr, "fixpath Not deleting temporary file %s\n",
+                  files_to_delete[i]);
+        }
+      } else {
+        for (i=0; i<num_files_to_delete; ++i) {
+          remove(files_to_delete[i]);
+        }
+      }
+
+      if (exitCode != 0) {
+        if (getenv("DEBUG_FIXPATH") != NULL) {
+          fprintf(stderr, "fixpath exit code %d\n",
+                  exitCode);
+        }
       }
     } else {
-      for (i=0; i<num_files_to_delete; ++i) {
-        remove(files_to_delete[i]);
-      }
-    }
-
-    if (exitCode != 0) {
       if (getenv("DEBUG_FIXPATH") != NULL) {
-        fprintf(stderr, "fixpath exit code %d\n",
-                exitCode);
+        fprintf(stderr, "fixpath Not waiting for child process");
       }
     }
 
--- a/make/CompileJavaModules.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/CompileJavaModules.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -56,6 +56,14 @@
   java.base_EXCLUDE_FILES += sun/nio/fs/GnomeFileTypeDetector.java
 endif
 
+ifneq ($(filter solaris macosx linux windows,$(OPENJDK_TARGET_OS)), )
+  java.base_EXCLUDE_FILES += \
+      sun/nio/ch/AbstractPollSelectorImpl.java \
+      sun/nio/ch/PollSelectorImpl.java \
+      sun/nio/ch/PollSelectorProvider.java \
+      #
+endif
+
 ifneq ($(OPENJDK_TARGET_OS), solaris)
   java.base_EXCLUDE_FILES += \
       SolarisLoginModule.java \
@@ -72,8 +80,6 @@
 
 ifeq ($(OPENJDK_TARGET_OS), windows)
   java.base_EXCLUDE_FILES += \
-      sun/nio/ch/AbstractPollSelectorImpl.java \
-      sun/nio/ch/PollSelectorProvider.java \
       sun/nio/ch/SimpleAsynchronousFileChannelImpl.java \
       #
 endif
@@ -361,6 +367,29 @@
 
 ################################################################################
 
+jdk.hotspot.agent_SRC += \
+    $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent \
+    $(HOTSPOT_TOPDIR)/agent/src/share/classes \
+    #
+jdk.hotspot.agent_ADD_JAVAC_FLAGS := $(DISABLE_WARNINGS),-overrides
+jdk.hotspot.agent_COPY := .png sa.js .properties
+
+ifeq ($(MODULE), jdk.hotspot.agent)
+  ### Copy gif files
+  # Special handling to copy gif files in images/toolbarButtonGraphics \
+  #   -> classes/toolbarButtonGraphics.
+  # These can't be handled by COPY to SetupJavaCompilation since they chop off
+  # one directory level.
+  $(eval $(call SetupCopyFiles, COPY_SA_IMAGES, \
+      SRC := $(HOTSPOT_TOPDIR)/agent/src/share/classes/images, \
+      DEST := $(JDK_OUTPUTDIR)/modules/$(MODULE), \
+      FILES := $(wildcard $(HOTSPOT_TOPDIR)/agent/src/share/classes/images/*/*/*.gif), \
+  ))
+  jdk.hotspot.agent: $(COPY_SA_IMAGES)
+endif
+
+################################################################################
+
 jdk.internal.le_COPY := .properties
 
 ################################################################################
@@ -369,6 +398,10 @@
 
 ################################################################################
 
+jdk.dynalink_CLEAN := .properties
+
+################################################################################
+
 jdk.javadoc_COPY := .xml .css .js .png
 
 ################################################################################
@@ -471,33 +504,29 @@
 jdk.localedata_EXCLUDE_FILES += sun/text/resources/th/BreakIteratorRules_th.java
 
 ################################################################################
-# Setup the compilation of each module
-#
-# Do not include nashorn src here since it needs to be compiled separately due
-# to nasgen.
+# Setup the compilation for the module
 #
 # Order src dirs in order of override with the most important first. Generated
 # source before static source and platform specific source before shared.
 #
-# To use this variable, use $(call ALL_SRC_DIRS,module) with no space.
 GENERATED_SRC_DIRS += \
-    $(SUPPORT_OUTPUTDIR)/gensrc/$1 \
-    $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$1 \
+    $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE) \
+    $(SUPPORT_OUTPUTDIR)/gensrc_no_docs/$(MODULE) \
     #
 
-OS_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS)/classes
+OS_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS)/classes
 ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
-  OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS_TYPE)/classes
+  OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$(MODULE)/$(OPENJDK_TARGET_OS_TYPE)/classes
 endif
 
 SHARE_SRC_DIRS += \
-    $(HOTSPOT_TOPDIR)/src/$1/share/classes \
-    $(JDK_TOPDIR)/src/$1/share/classes \
-    $(LANGTOOLS_TOPDIR)/src/$1/share/classes \
-    $(CORBA_TOPDIR)/src/$1/share/classes \
-    $(JAXP_TOPDIR)/src/$1/share/classes \
-    $(JAXWS_TOPDIR)/src/$1/share/classes \
-    $(NASHORN_TOPDIR)/src/$1/share/classes \
+    $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes \
+    $(JDK_TOPDIR)/src/$(MODULE)/share/classes \
+    $(LANGTOOLS_TOPDIR)/src/$(MODULE)/share/classes \
+    $(CORBA_TOPDIR)/src/$(MODULE)/share/classes \
+    $(JAXP_TOPDIR)/src/$(MODULE)/share/classes \
+    $(JAXWS_TOPDIR)/src/$(MODULE)/share/classes \
+    $(NASHORN_TOPDIR)/src/$(MODULE)/share/classes \
     #
 
 ALL_SRC_DIRS = \
@@ -507,11 +536,6 @@
     $(SHARE_SRC_DIRS) \
     #
 
-# Find all modules with java sources. Filter out nashorn since it needs to be
-# compiled separately.
-ALL_JAVA_MODULES := $(filter-out jdk.scripting.nashorn, $(call FindJavaModules))
-JAVA_MODULES := $(ALL_JAVA_MODULES)
-
 # The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
 # JDK_FILTER at the make command line, only a subset of the JDK java files will
 # be recompiled. If multiple paths are separated by comma, convert that into a
@@ -522,50 +546,38 @@
 EMPTY_DIR := $(SUPPORT_OUTPUTDIR)/empty-dir
 $(call MakeDir, $(EMPTY_DIR))
 
-# This macro sets up compilation of a module and declares dependencies for it.
-# Param 1 - module name
-define SetupModuleCompilation
-  # Find the module dependencies by parsing modules.list file
-  $1_DEPS := $$(call FindDepsForModule, $1)
+# Find the module dependencies by parsing modules.list file
+DEPS := $(call FindDepsForModule, $(MODULE))
 
-  $1_CLASSPATH := $$(foreach d,$$($1_DEPS), $$(if $$($$d_BIN), $$($$d_BIN), \
-      $(JDK_OUTPUTDIR)/modules/$$d))
+CLASSPATH := $(foreach d, $(DEPS), $(if $($d_BIN), $($d_BIN), \
+    $(JDK_OUTPUTDIR)/modules/$d))
   # When crypto classes are prebuilt, need to look for classes already in
   # output dir.
   ifneq ($(BUILD_CRYPTO), true)
-    $1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
+  CLASSPATH += $(JDK_OUTPUTDIR)/modules/$(MODULE)
   endif
-  ifeq ($1, jdk.hotspot.agent)
-    ## The source of this module is compiled elsewhere, hotspot, and imported.
-    ## Service types are required in the classpath when compiing module-info
-    $1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix $(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
-  endif
-  $1_JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) -endorseddirs $(EMPTY_DIR) $$($1_ADD_JAVAC_FLAGS)
+JAVAC_FLAGS := -bootclasspath $(EMPTY_DIR) -extdirs $(EMPTY_DIR) \
+    -endorseddirs $(EMPTY_DIR) $($(MODULE)_ADD_JAVAC_FLAGS)
 
-  $$(eval $$(call SetupJavaCompilation,$1, \
-      SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
-      SRC := $$(if $$($1_SRC), $$($1_SRC), $$(wildcard $$(call ALL_SRC_DIRS,$1))), \
+$(eval $(call SetupJavaCompilation, $(MODULE), \
+    SETUP := $(if $($(MODULE)_SETUP), $($(MODULE)_SETUP), GENERATE_JDKBYTECODE), \
+    SRC := $(if $($(MODULE)_SRC), $($(MODULE)_SRC), $(wildcard $(ALL_SRC_DIRS))), \
       INCLUDES := $(JDK_USER_DEFINED_FILTER),\
-      BIN := $$(if $$($1_BIN), $$($1_BIN), $(JDK_OUTPUTDIR)/modules/$1), \
-      HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$1, \
-      CLASSPATH := $$($1_CLASSPATH), \
-      ADD_JAVAC_FLAGS := $$($1_ADD_JAVAC_FLAGS) $$($1_JAVAC_FLAGS)))
+    BIN := $(if $($(MODULE)_BIN), $($(MODULE)_BIN), $(JDK_OUTPUTDIR)/modules/$(MODULE)), \
+    HEADERS := $(SUPPORT_OUTPUTDIR)/headers/$(MODULE), \
+    CLASSPATH := $(CLASSPATH), \
+    ADD_JAVAC_FLAGS := $($(MODULE)_ADD_JAVAC_FLAGS) $(JAVAC_FLAGS) \
+))
+TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
 
-  $1: $$($1) $$($1_COPY_EXTRA)
-
-  # Declare dependencies between java compilation of different modules.
-  # Since not all modules have been declared yet, or might be declared
-  # in different invocations of this file, use the macro to find the
-  # correct target file to depend on.
-  # Only the javac compilation actually depends on other modules so limit
-  # dependency declaration to that by using the *_COMPILE_TARGET variable.
-  $$($1_COMPILE_TARGETS): $$(foreach d,$$($1_DEPS), \
-      $$(call SetupJavaCompilationCompileTarget, $$d, \
-          $$(if $$($$d_BIN), $$($$d_BIN), $(JDK_OUTPUTDIR)/modules/$$d)))
-endef
-
-# Setup compilation for each module
-$(foreach m,$(JAVA_MODULES),$(eval $(call SetupModuleCompilation,$m)))
+# Declare dependencies between java compilations of different modules.
+# Since the other modules are declared in different invocations of this file,
+# use the macro to find the correct target file to depend on.
+# Only the javac compilation actually depends on other modules so limit
+# dependency declaration to that by using the *_COMPILE_TARGET variable.
+$($(MODULE)_COMPILE_TARGET): $(foreach d, $($(MODULE)_DEPS), \
+    $(call SetupJavaCompilationCompileTarget, $d, \
+        $(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
 
 ################################################################################
 # Copy zh_HK properties files from zh_TW
@@ -573,15 +585,21 @@
 $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.properties
 	$(install-file)
 
-define CreateHkTargets
-  $(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
-    $(subst /share/classes,, \
-      $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
-endef
+CreateHkTargets = \
+    $(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
+      $(subst /share/classes,, \
+        $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
 
-java.sql.rowset: $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
-java.rmi: $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
+ifeq ($(MODULE), java.sql.rowset)
+  TARGETS += $(call CreateHkTargets, $(java.sql.rowset_CLEAN_FILES))
+endif
 
-all: $(JAVA_MODULES)
+ifeq ($(MODULE), java.rmi)
+  TARGETS += $(call CreateHkTargets, $(java.rmi_CLEAN_FILES))
+endif
 
-.PHONY: all $(JAVA_MODULES)
+################################################################################
+
+all: $(TARGETS)
+
+.PHONY: all
--- a/make/Images.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/Images.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -27,6 +27,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Modules.gmk
 
 TOOL_TARGETS :=
 JDK_TARGETS :=
@@ -39,12 +40,13 @@
 
 MAIN_MODULES += java.se java.smartcardio jdk.httpserver jdk.sctp \
                jdk.security.auth jdk.security.jgss jdk.pack200 jdk.xml.dom \
-               jdk.accessibility jdk.internal.le jdk.scripting.nashorn.shell \
+               jdk.accessibility jdk.internal.le jdk.dynalink \
+               jdk.scripting.nashorn jdk.scripting.nashorn.shell \
                jdk.vm.ci jdk.management
 
 # providers
-PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.localedata \
-               jdk.naming.dns jdk.naming.rmi jdk.scripting.nashorn jdk.zipfs
+PROVIDER_MODULES += jdk.charsets jdk.crypto.ec jdk.crypto.pkcs11 jdk.jvmstat jdk.jvmstat.rmi \
+               jdk.localedata jdk.naming.dns jdk.naming.rmi jdk.zipfs
 
 # tools
 TOOLS_MODULES += jdk.attach jdk.compiler jdk.dev \
@@ -64,8 +66,8 @@
   MAIN_MODULES += jdk.deploy.osx
 endif
 
-JRE_MODULES := $(MAIN_MODULES) $(PROVIDER_MODULES)
-JDK_MODULES := $(JRE_MODULES) $(TOOLS_MODULES)
+JRE_MODULES := $(filter-out $(MODULES_FILTER), $(MAIN_MODULES) $(PROVIDER_MODULES))
+JDK_MODULES := $(filter-out $(MODULES_FILTER), $(JRE_MODULES) $(TOOLS_MODULES))
 
 # compact3 builds have additional modules
 JDK_COMPACT3_MODULES := java.compact3 java.smartcardio jdk.httpserver jdk.naming.dns \
@@ -510,7 +512,6 @@
 jimages: $(TOOL_JRE_TARGETS) $(TOOL_JDK_TARGETS) $(JRE_TARGETS) $(JDK_TARGETS) \
     $(SYMBOLS_TARGETS)
 
-
 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
 $(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
 $(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
--- a/make/InitSupport.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/InitSupport.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -287,13 +287,6 @@
 
   BUILD_LOG_WRAPPER := $(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)
 
-  # Disable the build log wrapper on sjavac+windows until
-  # we have solved how to prevent the log wrapper to wait
-  # for the background sjavac server process.
-  ifeq ($(ENABLE_SJAVAC)X$(OPENJDK_BUILD_OS),yesXwindows)
-    LOG_NOFILE := true
-  endif
-
   # Sanity check the spec file, so it matches this source code
   define CheckSpecSanity
     ifneq ($$(ACTUAL_TOPDIR), $$(TOPDIR))
--- a/make/Jprt.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/Jprt.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -49,7 +49,7 @@
 # When running in JPRT these will be provided. Need defaults so that this makefile
 # is valid anyway.
 ifndef JPRT_ARCHIVE_BUNDLE
-  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/j2sdk-image.zip
+  JPRT_ARCHIVE_BUNDLE=/tmp/jprt_bundles/jdk-image.zip
 endif
 ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
   JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
--- a/make/Main.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/Main.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -53,8 +53,7 @@
 $(eval $(call IncludeCustomExtension, , Main.gmk))
 
 # All modules for the current target platform.
-# Manually add jdk.hotspot.agent for now.
-ALL_MODULES := $(call FindAllModules) jdk.hotspot.agent
+ALL_MODULES := $(call FindAllModules)
 
 ################################################################################
 ################################################################################
@@ -144,8 +143,8 @@
 
 define DeclareCompileJavaRecipe
   $1-java:
-	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CompileJavaModules.gmk \
-	    $1 JAVA_MODULES=$1 MODULE=$1)
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
+	    -f CompileJavaModules.gmk MODULE=$1)
 endef
 
 $(foreach m, $(filter-out jdk.scripting.nashorn, $(JAVA_MODULES)), \
@@ -154,7 +153,8 @@
 # Build nashorn. Needs to be compiled separately from the rest of the modules
 # due to nasgen.
 jdk.scripting.nashorn-java:
-	+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildNashorn.gmk compile)
+	+($(CD) $(NASHORN_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
+	    -f BuildNashorn.gmk compile)
 
 ALL_TARGETS += $(JAVA_TARGETS)
 
@@ -195,7 +195,7 @@
 
 ifeq ($(BUILD_HOTSPOT),true)
   hotspot:
-	($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
+	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
 endif
 
 ALL_TARGETS += hotspot
@@ -225,8 +225,8 @@
 BOOTCYCLE_TARGET := product-images
 bootcycle-images:
 	@$(ECHO) Boot cycle build step 2: Building a new JDK image using previously built image
-	+$(MAKE) $(MAKE_ARGS) -f $(SRC_ROOT)/make/Main.gmk \
-	    SPEC=$(dir $(SPEC))bootcycle-spec.gmk $(BOOTCYCLE_TARGET)
+	+$(MAKE) -f $(SRC_ROOT)/make/Init.gmk PARALLEL_TARGETS=$(BOOTCYCLE_TARGET) \
+	    JOBS= SPEC=$(dir $(SPEC))bootcycle-spec.gmk main
 
 zip-security:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSecurity.gmk)
@@ -423,11 +423,6 @@
   # virtual target.
   jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
 
-  # Until the module system is in place, jdk.jdi-gensrc needs to combine service
-  # loader configuration with jdk.hotspot.agent so is dependent on importing
-  # hotspot.
-  jdk.jdi-gensrc-jdk: import-hotspot
-
   # The swing beans need to have java base properly generated to avoid errors
   # in javadoc.
   java.desktop-gensrc-jdk: java.base-gensrc
@@ -511,7 +506,7 @@
 jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
 
 # Declare dependencies from <module> to all the individual targets specific
-# to that module <module>-*.
+# to that module <module>-*, that are needed for the exploded image.
 $(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
 $(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
 $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
@@ -520,15 +515,12 @@
 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
 $(foreach m, $(COPY_MODULES), $(eval $m: $m-copy))
 
-ALL_MODULE_TARGETS := $(sort $(GENSRC_MODULES) $(JAVA_MODULES) \
-    $(GENDATA_MODULES) $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES))
-
 demos: demos-jdk
 
 samples: samples-jdk
 
 # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
-exploded-image: $(ALL_MODULE_TARGETS)
+exploded-image: $(ALL_MODULES)
 
 mac-bundles: mac-bundles-jdk
 
@@ -554,7 +546,7 @@
 all-images: product-images test-image docs-image
 
 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
-    jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) demos samples exploded-image \
+    jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
     mac-bundles product-images docs-image test-image all-images
 
 ################################################################################
--- a/make/common/CORE_PKGS.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/common/CORE_PKGS.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -224,6 +224,7 @@
     javax.tools \
     javax.transaction \
     javax.transaction.xa \
+    javax.xml.catalog \
     javax.xml.parsers \
     javax.xml.bind \
     javax.xml.bind.annotation \
--- a/make/common/JavaCompilation.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/common/JavaCompilation.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -74,7 +74,7 @@
   # already has one
   ifneq ($$($1_COPY_$$($2_TARGET)), 1)
     $1_COPY_$$($2_TARGET) := 1
-    # Now we can setup the depency that will trigger the copying.
+    # Now we can setup the dependency that will trigger the copying.
     $$($1_BIN)$$($2_TARGET) : $2
 	$(MKDIR) -p $$(@D)
 	$(CP) $$< $$@
@@ -311,22 +311,23 @@
   $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
       $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
 
+  $1_COMPILE_TARGET := $$($1_BIN)/_the.$1_batch
+
   ifeq ($$($1_DISABLE_SJAVAC)x$$(ENABLE_SJAVAC),xyes)
+    # Using sjavac to compile.
+
     ifneq (,$$($1_HEADERS))
       $1_HEADERS_ARG := -h $$($1_HEADERS)
     endif
 
-    # Using sjavac to compile.
-    $1_COMPILE_TARGETS := $$($1_BIN)/_the.$1_batch
-
     $1_VARDEPS := $$($1_JVM) $$($1_SJAVAC) $$($1_SJAVAC_ARGS) $$($1_FLAGS) \
         $$($1_HEADERS_ARG) $$($1_BIN) $$($1_EXCLUDES) $$($1_INCLUDES) \
         $$($1_EXCLUDE_FILES) $$($1_INCLUDE_FILES)
     $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BIN)/_the.$1.vardeps)
 
-    $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
+    $$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
 	$(MKDIR) -p $$(@D) $$(dir $$($1_SJAVAC_PORTFILE))
-	$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
+	$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
 	$(ECHO) Compiling $1
 	$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
 	    $$($1_JVM) $$($1_SJAVAC) \
@@ -334,14 +335,14 @@
 	        -j 1 \
 	        --permit-unidentified-artifacts \
 	        --permit-sources-without-package \
-	        --compare-found-sources $$($1_BIN)/_the.$1_batch.tmp \
+	        --compare-found-sources $$@.tmp \
 	        --log=$(LOG_LEVEL) \
 	        --state-dir=$$($1_BIN) \
 	        $$($1_SJAVAC_ARGS) \
 	        $$($1_FLAGS) \
 	        $$($1_HEADERS_ARG) \
 	        -d $$($1_BIN)) && \
-	$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch
+	$(MV) $$@.tmp $$@
         # Create a pubapi file that only changes when the pubapi changes. Dependent
         # compilations can use this file to only get recompiled when pubapi has changed.
         # Grep returns 1 if no matching lines are found. Do not fail for this.
@@ -354,14 +355,13 @@
 
   else
     # Using plain javac to batch compile everything.
-    $1_COMPILE_TARGETS := $$($1_BIN)/_the.$1_batch
 
     # When building in batch, put headers in a temp dir to filter out those that actually
     # changed before copying them to the real header dir.
     ifneq (,$$($1_HEADERS))
       $1_HEADERS_ARG := -h $$($1_HEADERS).$1.tmp
 
-      $$($1_HEADERS)/_the.$1_headers: $$($1_BIN)/_the.$1_batch
+      $$($1_HEADERS)/_the.$1_headers: $$($1_COMPILE_TARGET)
 		$(MKDIR) -p $$(@D)
 		if [ -d "$$($1_HEADERS).$1.tmp" ]; then \
 		  for f in `ls $$($1_HEADERS).$1.tmp`; do \
@@ -389,19 +389,19 @@
     endif
 
     # When not using sjavac, pass along all sources to javac using an @file.
-    $$($1_BIN)/_the.$1_batch: $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
+    $$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_DEPENDS) $$($1_VARDEPS_FILE)
 	$(MKDIR) -p $$(@D)
-	$$(eval $$(call ListPathsSafely,$1_SRCS, $$($1_BIN)/_the.$1_batch.tmp))
-	$(ECHO) Compiling `$(WC) $$($1_BIN)/_the.$1_batch.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
+	$$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp))
+	$(ECHO) Compiling `$(WC) $$@.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1
 	$(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \
 	    $$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \
 	        -implicit:none \
-	        -d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_BIN)/_the.$1_batch.tmp) && \
-	$(MV) $$($1_BIN)/_the.$1_batch.tmp $$($1_BIN)/_the.$1_batch
+		-d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \
+	$(MV) $$@.tmp $$@
   endif
 
   # Add all targets to main variable
-  $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGETS) \
+  $1 := $$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS) $$($1_COMPILE_TARGET) \
       $$($1_HEADER_TARGETS)
 
   # Check if a jar file was specified, then setup the rules for the jar.
--- a/make/common/Modules.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/common/Modules.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -30,6 +30,12 @@
 include SetupJavaCompilers.gmk
 
 ################################################################################
+# Some platforms don't have the serviceability agent
+ifeq ($(INCLUDE_SA), false)
+  MODULES_FILTER += jdk.hotspot.agent
+endif
+
+################################################################################
 # Module list macros
 
 ALL_TOP_SRC_DIRS := \
@@ -43,21 +49,25 @@
     #
 
 # Find all modules with java sources by looking in the source dirs
+# jdk.hotspot.agent currently doesn't comply with source dir policy.
 define FindJavaModules
   $(filter-out $(MODULES_FILTER), $(sort $(notdir \
       $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir \
       $(wildcard $(patsubst %,%/*/share/classes/*, $(ALL_TOP_SRC_DIRS)) \
           $(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS)) \
-          $(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
+          $(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))) \
+      jdk.hotspot.agent)
 endef
 
 # Find all modules with source for the target platform.
+# jdk.hotspot.agent currently doesn't comply with source dir policy.
 define FindAllModules
   $(sort $(filter-out $(MODULES_FILTER) closed demo sample, \
       $(notdir $(patsubst %/,%, $(dir \
       $(wildcard $(patsubst %, %/*/share, $(ALL_TOP_SRC_DIRS)) \
       $(patsubst %, %/*/$(OPENJDK_TARGET_OS), $(ALL_TOP_SRC_DIRS)) \
-      $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS))))))))
+      $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS)))))) \
+      jdk.hotspot.agent))
 endef
 
 ################################################################################
--- a/make/common/NativeCompilation.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/common/NativeCompilation.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -120,9 +120,11 @@
 # are to be run during the build.
 # The BUILD_SYSROOT_*FLAGS variables are empty for now.
 $(eval $(call DefineNativeToolchain, TOOLCHAIN_BUILD, \
-    EXTENDS := TOOLCHAIN_DEFAULT, \
     CC := $(BUILD_CC), \
+    CXX := $(BUILD_CXX), \
     LD := $(BUILD_LD), \
+    AR := $(BUILD_AR), \
+    AS := $(BUILD_AS), \
     SYSROOT_CFLAGS := $(BUILD_SYSROOT_CFLAGS), \
     SYSROOT_LDFLAGS := $(BUILD_SYSROOT_LDFLAGS), \
 ))
@@ -294,6 +296,10 @@
 #   LD the linker to use, default is $(LD)
 #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
 #   DISABLED_WARNINGS_<toolchain> Disable the given warnings for the specified toolchain
+#   DISABLED_WARNINGS_C_<toolchain> Disable the given warnings for the specified toolchain
+#       when compiling C code
+#   DISABLED_WARNINGS_CXX_<toolchain> Disable the given warnings for the specified
+#       toolchain when compiling C++ code
 #   STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it
 #   STRIPFLAGS Optionally change the flags given to the strip command
 SetupNativeCompilation = $(NamedParamsMacroTemplate)
@@ -537,8 +543,12 @@
 
   # Pick up disabled warnings, if possible on this platform.
   ifneq ($(DISABLE_WARNING_PREFIX),)
-    $1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
-    $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
+    $1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
+        $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
+        $$($1_DISABLED_WARNINGS_C_$(TOOLCHAIN_TYPE)))
+    $1_EXTRA_CXXFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), \
+        $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)) \
+        $$($1_DISABLED_WARNINGS_CXX_$(TOOLCHAIN_TYPE)))
   endif
 
   # Check if warnings should be considered errors.
--- a/make/common/SetupJavaCompilers.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/common/SetupJavaCompilers.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -63,7 +63,7 @@
 # The generate new bytecode javac setup uses the new compiler to compile for the
 # new jdk. This new bytecode might only be possible to run using the new jvm.
 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
-    JVM := $(JAVA), \
+    JVM := $(JAVA_JAVAC), \
     JAVAC := $(NEW_JAVAC), \
     FLAGS := -source 9 -target 9 \
         -encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
@@ -73,7 +73,7 @@
 # The generate new bytecode javac setup uses the new compiler to compile for the
 # new jdk. This new bytecode might only be possible to run using the new jvm.
 $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
-    JVM := $(JAVA), \
+    JVM := $(JAVA_JAVAC), \
     JAVAC := $(NEW_JAVAC), \
     FLAGS := -source 9 -target 9 \
         -encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
--- a/make/devkit/Makefile	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/devkit/Makefile	Wed Dec 02 09:34:13 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -43,12 +43,12 @@
 #
 # To build the full set of crosstools, use a command line looking like this:
 #
-# make tars RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
+# make tars RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
 #
 # To create a x86_64 package without the redundant i686 cross compiler, do
 # like this:
 #
-# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel55-x86_64/Server/ RPM_DIR_i686=/tmp/oel55-i686/Server/
+# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
 
 #
 # Main makefile which iterates over all host and target platforms.
--- a/make/devkit/Tools.gmk	Sun Nov 29 20:28:47 2015 -0800
+++ b/make/devkit/Tools.gmk	Wed Dec 02 09:34:13 2015 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 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
@@ -63,11 +63,11 @@
 GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
 MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
 
-# RPMs in OEL5.5
-LINUX_VERSION := OEL5.5
+# RPMs in OEL6.4
+LINUX_VERSION := OEL6.4
 RPM_LIST := \
     kernel-headers \
-    glibc-2 glibc-headers glibc-devel \
+    glibc glibc-headers glibc-devel \
     cups-libs cups-devel \
     libX11 libX11-devel \
     xorg-x11-proto-devel \
@@ -87,7 +87,7 @@
 
 ifeq ($(ARCH),x86_64)
   RPM_DIR ?= $(RPM_DIR_x86_64)
-  RPM_ARCHS := x86_64
+  RPM_ARCHS := x86_64 noarch
   ifeq ($(BUILD),$(HOST))
     ifeq ($(TARGET),$(HOST))
       # When building the native compiler for x86_64, enable mixed mode.
@@ -102,6 +102,8 @@
 # Sort to remove duplicates
 RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
 
+#$(info RPM_FILE_LIST $(RPM_FILE_LIST))
+
 ifeq ($(RPM_FILE_LIST),)
   $(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
 endif
@@ -473,13 +475,25 @@
 
 ##########################################################################################
 
+ifeq ($(TARGET), $(HOST))
+  $(PREFIX)/bin/%:
+	@echo 'Creating missing $* soft link'
+	ln -s $(TARGET)-$* $@
+
+  missing-links := $(addprefix $(PREFIX)/bin/, \
+      addr2line ar as c++ c++filt elfedit g++ gcc gprof ld nm objcopy ranlib readelf \
+      size strings strip)
+endif
+
+##########################################################################################
+
 bfdlib : $(bfdlib)
 binutils : $(binutils)
 rpms : $(rpms)
 libs : $(libs)
 sysroot : rpms libs
 gcc : sysroot $(gcc) $(gccpatch)
-all : binutils gcc bfdlib $(PREFIX)/devkit.info
+all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links)
 
 # this is only built for host. so separate.
 ccache : $(ccache)
--- a/modules.xml	Sun Nov 29 20:28:47 2015 -0800
+++ b/modules.xml	Wed Dec 02 09:34:13 2015 -0800
@@ -342,7 +342,9 @@
       <to>java.logging</to>
       <to>java.sql</to>
       <to>java.sql.rowset</to>
+      <to>jdk.dynalink</to>
       <to>jdk.scripting.nashorn</to>
+      <to>jdk.vm.cds</to>
     </export>
     <export>
       <name>sun.reflect.annotation</name>
@@ -1065,6 +1067,9 @@
       <name>javax.xml</name>
     </export>
     <export>
+      <name>javax.xml.catalog</name>
+    </export>
+    <export>
       <name>javax.xml.datatype</name>
     </export>
     <export>
@@ -1657,6 +1662,26 @@
     <depend>java.base</depend>
   </module>
   <module>
+    <name>jdk.dynalink</name>
+    <depend>java.base</depend>
+    <depend>java.logging</depend>
+    <export>
+      <name>jdk.dynalink</name>
+    </export>
+    <export>
+      <name>jdk.dynalink.beans</name>
+    </export>
+    <export>
+      <name>jdk.dynalink.linker</name>
+    </export>
+    <export>
+      <name>jdk.dynalink.linker.support</name>
+    </export>
+    <export>
+      <name>jdk.dynalink.support</name>
+    </export>
+  </module>
+  <module>
     <name>jdk.hotspot.agent</name>
     <depend>java.base</depend>
     <depend>java.datatransfer</depend>
@@ -1789,16 +1814,31 @@
   <module>
     <name>jdk.jvmstat</name>
     <depend>java.base</depend>
-    <depend>java.rmi</depend>
     <export>
       <name>sun.jvmstat.monitor</name>
       <to>jdk.attach</to>
       <to>jdk.jcmd</to>
       <to>jdk.jconsole</to>
+      <to>jdk.jvmstat.rmi</to>
     </export>
     <export>
       <name>sun.jvmstat.monitor.event</name>
       <to>jdk.jcmd</to>
+      <to>jdk.jvmstat.rmi</to>
+    </export>
+    <export>
+      <name>sun.jvmstat.perfdata.monitor</name>
+      <to>jdk.jvmstat.rmi</to>
+    </export>
+  </module>
+  <module>
+    <name>jdk.jvmstat.rmi</name>
+    <depend>java.base</depend>
+    <depend>java.rmi</depend>
+    <depend>jdk.jvmstat</depend>
+    <export>
+      <name>sun.jvmstat.monitor.remote</name>
+      <to>java.rmi</to>
     </export>
   </module>
   <module>
@@ -1849,6 +1889,7 @@
     <name>jdk.scripting.nashorn</name>
     <depend>java.base</depend>
     <depend>java.logging</depend>
+    <depend>jdk.dynalink</depend>
     <depend re-exports="true">java.scripting</depend>
     <export>
       <name>jdk.nashorn.internal.runtime</name>
--- a/test/lib/sun/hotspot/WhiteBox.java	Sun Nov 29 20:28:47 2015 -0800
+++ b/test/lib/sun/hotspot/WhiteBox.java	Wed Dec 02 09:34:13 2015 -0800
@@ -407,6 +407,7 @@
   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
 
   // Sharing
+  public native boolean isSharedClass(Class<?> c);
   public native boolean isShared(Object o);
   public native boolean areSharedStringsIgnored();
 }