changeset 1244:f7c11da0b048 jdk9-b42

Merge
author lana
date Thu, 04 Dec 2014 15:21:09 -0800
parents 5ea84bf087c5 56e20ce67f01
children 5c2328aa5a91 fdde67c3f703 9738ed79cfb5
files
diffstat 39 files changed, 930 insertions(+), 716 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Dec 04 12:58:11 2014 -0800
+++ b/Makefile	Thu Dec 04 15:21:09 2014 -0800
@@ -33,7 +33,7 @@
 
 # The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
 # /usr/ccs/bin/make lacks basically every other flow control mechanism.
-TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
+.TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
 
 # Assume we have GNU make, but check version.
 ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
@@ -46,7 +46,17 @@
 else
   makefile_path:=$(lastword $(MAKEFILE_LIST))
 endif
-root_dir:=$(dir $(makefile_path))
+root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
+
+ifneq ($(findstring qp,$(MAKEFLAGS)),)
+  # When called with -qp, assume an external part (e.g. bash completion) is trying
+  # to understand our targets.
+  # Duplication of global targets, needed before ParseConfAndSpec in case we have
+  # no configurations.
+  help:
+  # If CONF is not set, look for all available configurations
+  CONF?=
+endif
 
 # ... and then we can include our helper functions
 include $(root_dir)/make/MakeHelpers.gmk
@@ -89,6 +99,7 @@
     # The wrapper target was called so we now have a single configuration. Load the spec file
     # and call the real Main.gmk.
     include $(SPEC)
+    include $(SRC_ROOT)/make/common/MakeBase.gmk
 
     ### Clean up from previous run
     # Remove any build.log from a previous run, if they exist
--- a/common/autoconf/basics.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/basics.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -69,7 +69,7 @@
 
 # This will make sure the given variable points to a full and proper
 # path. This means:
-# 1) There will be no spaces in the path. On posix platforms,
+# 1) There will be no spaces in the path. On unix platforms,
 #    spaces in the path will result in an error. On Windows,
 #    the path will be rewritten using short-style to be space-free.
 # 2) The path will be absolute, and it will be in unix-style (on
@@ -82,7 +82,7 @@
   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
     BASIC_FIXUP_PATH_MSYS($1)
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="[$]$1"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -102,7 +102,7 @@
 
 # This will make sure the given variable points to a executable
 # with a full and proper path. This means:
-# 1) There will be no spaces in the path. On posix platforms,
+# 1) There will be no spaces in the path. On unix platforms,
 #    spaces in the path will result in an error. On Windows,
 #    the path will be rewritten using short-style to be space-free.
 # 2) The path will be absolute, and it will be in unix-style (on
@@ -118,7 +118,7 @@
   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
     BASIC_FIXUP_EXECUTABLE_MSYS($1)
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="[$]$1"
@@ -268,7 +268,7 @@
   fi
 ])
 
-# Setup a tool for the given variable. If correctly specified by the user, 
+# Setup a tool for the given variable. If correctly specified by the user,
 # use that value, otherwise search for the tool using the supplied code snippet.
 # $1: variable to set
 # $2: code snippet to call to look for the tool
@@ -546,7 +546,7 @@
       XCODEBUILD=
       AC_SUBST(XCODEBUILD)
     fi
-  
+
     AC_MSG_CHECKING([for sdk name])
     AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
         [use the platform SDK of the given name. @<:@macosx@:>@])],
--- a/common/autoconf/boot-jdk.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/boot-jdk.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -24,31 +24,31 @@
 #
 
 ########################################################################
-# This file handles detection of the Boot JDK. The Boot JDK detection 
-# process has been developed as a response to solve a complex real-world 
-# problem. Initially, it was simple, but it has grown as platform after 
+# This file handles detection of the Boot JDK. The Boot JDK detection
+# process has been developed as a response to solve a complex real-world
+# problem. Initially, it was simple, but it has grown as platform after
 # platform, idiosyncracy after idiosyncracy has been supported.
 #
 # The basic idea is this:
 # 1) You need an acceptable *) JDK to use as a Boot JDK
-# 2) There are several ways to locate a JDK, that are mostly platform 
+# 2) There are several ways to locate a JDK, that are mostly platform
 #    dependent **)
 # 3) You can have multiple JDKs installed
-# 4) If possible, configure should try to dig out an acceptable JDK 
+# 4) If possible, configure should try to dig out an acceptable JDK
 #    automatically, without having to resort to command-line options
 #
-# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with 
-#     javac) and not a JRE, etc. 
+# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
+#     javac) and not a JRE, etc.
 #
-# **) On Windows we typically use a well-known path. 
+# **) On Windows we typically use a well-known path.
 #     On MacOSX we typically use the tool java_home.
-#     On Linux we typically find javac in the $PATH, and then follow a 
-#     chain of symlinks that often ends up in a real JDK. 
+#     On Linux we typically find javac in the $PATH, and then follow a
+#     chain of symlinks that often ends up in a real JDK.
 #
-# This leads to the code where we check in different ways to locate a 
-# JDK, and if one is found, check if it is acceptable. If not, we print 
-# our reasons for rejecting it (useful when debugging non-working 
-# configure situations) and continue checking the next one. 
+# This leads to the code where we check in different ways to locate a
+# JDK, and if one is found, check if it is acceptable. If not, we print
+# our reasons for rejecting it (useful when debugging non-working
+# configure situations) and continue checking the next one.
 ########################################################################
 
 # Execute the check given as argument, and verify the result
@@ -244,7 +244,7 @@
 AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
 [
   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
-  BASIC_SETUP_TOOL($1, 
+  BASIC_SETUP_TOOL($1,
     [
       AC_MSG_CHECKING([for $2 in Boot JDK])
       $1=$BOOT_JDK/bin/$2
--- a/common/autoconf/bootcycle-spec.gmk.in	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/bootcycle-spec.gmk.in	Thu Dec 04 15:21:09 2014 -0800
@@ -56,4 +56,3 @@
 NATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii
 JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
 SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
-
--- a/common/autoconf/build-aux/config.guess	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/build-aux/config.guess	Thu Dec 04 15:21:09 2014 -0800
@@ -77,7 +77,7 @@
 fi
 
 # Test and fix little endian PowerPC64.
-# TODO: should be handled by autoconf-config.guess. 
+# TODO: should be handled by autoconf-config.guess.
 if [ "x$OUT" = x ]; then
   if [ `uname -m` = ppc64le ]; then
     if [ `uname -s` = Linux ]; then
--- a/common/autoconf/build-aux/install.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/build-aux/install.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -1,5 +1,5 @@
-#!/bin/sh 
-echo >&2 "No suitable 'install' command found.'" 
-echo >&2 "If automake is installed, running 'automake -fa'" 
-echo >&2 "(and ignoring the errors) might produce one." 
-exit 1 
+#!/bin/sh
+echo >&2 "No suitable 'install' command found.'"
+echo >&2 "If automake is installed, running 'automake -fa'"
+echo >&2 "(and ignoring the errors) might produce one."
+exit 1
--- a/common/autoconf/compare.sh.in	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/compare.sh.in	Thu Dec 04 15:21:09 2014 -0800
@@ -48,6 +48,7 @@
 JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
 JIMAGE="@FIXPATH@ @BUILD_OUTPUT@/jdk/bin/jimage"
 LDD="@LDD@"
+LN="@LN@"
 MKDIR="@MKDIR@"
 NAWK="@NAWK@"
 NM="@GNM@"
--- a/common/autoconf/configure.ac	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/configure.ac	Thu Dec 04 15:21:09 2014 -0800
@@ -275,3 +275,4 @@
 # Finally output some useful information to the user
 HELP_PRINT_SUMMARY_AND_WARNINGS
 CUSTOM_SUMMARY_AND_WARNINGS_HOOK
+HELP_REPEAT_WARNINGS
--- a/common/autoconf/flags.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/flags.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -94,9 +94,9 @@
 
   # On Windows, we need to set RC flags.
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
-    RC_FLAGS="-nologo -l 0x409 -r"
+    RC_FLAGS="-nologo -l0x409"
     if test "x$VARIANT" = xOPT; then
-      RC_FLAGS="$RC_FLAGS -d NDEBUG"
+      RC_FLAGS="$RC_FLAGS -DNDEBUG"
     fi
 
     # The version variables used to create RC_FLAGS may be overridden
@@ -105,13 +105,13 @@
     # The \$ are escaped to the shell, and the $(...) variables
     # are evaluated by make.
     RC_FLAGS="$RC_FLAGS \
-        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
-        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
+        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
+        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
+        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
+        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   fi
   AC_SUBST(RC_FLAGS)
 
@@ -348,10 +348,6 @@
       # Add runtime stack smashing and undefined behavior checks
       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
-      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
-        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
-        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
-      fi
       ;;
     esac
   fi
@@ -668,7 +664,7 @@
   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
       -I${JDK_TOPDIR}/src/java.base/share/native/include \
       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
+      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
 
   # The shared libraries are compiled using the picflag.
   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
@@ -746,25 +742,6 @@
     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
   fi
 
-  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
-    # If undefined behaviour detection is enabled then we need to tell linker.
-    case $DEBUG_LEVEL in
-      release | fastdebug )
-        ;;
-      slowdebug )
-        AC_MSG_WARN([$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR])
-        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
-          # enable undefined behaviour checking
-          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/[ ]*\([^ ]\+\)/ -Xlinker \1/g"`"
-          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/[ ]*\([^ ]\+\)/ -Xlinker \1/g"`"
-        fi
-        ;;
-      * )
-        AC_MSG_ERROR([Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL])
-        ;;
-    esac
-  fi
-
   # Customize LDFLAGS for executables
 
   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
--- a/common/autoconf/generated-configure.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/generated-configure.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -906,7 +906,6 @@
 DEFINE_CROSS_COMPILE_ARCH
 LP64
 OPENJDK_TARGET_OS_EXPORT_DIR
-OPENJDK_TARGET_OS_API_DIR
 OPENJDK_TARGET_CPU_JLI_CFLAGS
 OPENJDK_TARGET_CPU_OSARCH
 OPENJDK_TARGET_CPU_ISADIR
@@ -921,14 +920,14 @@
 OPENJDK_TARGET_CPU_ARCH
 OPENJDK_TARGET_CPU
 OPENJDK_TARGET_OS_ENV
-OPENJDK_TARGET_OS_API
+OPENJDK_TARGET_OS_TYPE
 OPENJDK_TARGET_OS
 OPENJDK_BUILD_CPU_ENDIAN
 OPENJDK_BUILD_CPU_BITS
 OPENJDK_BUILD_CPU_ARCH
 OPENJDK_BUILD_CPU
 OPENJDK_BUILD_OS_ENV
-OPENJDK_BUILD_OS_API
+OPENJDK_BUILD_OS_TYPE
 OPENJDK_BUILD_OS
 OPENJDK_BUILD_AUTOCONF_NAME
 OPENJDK_TARGET_AUTOCONF_NAME
@@ -1063,6 +1062,7 @@
 with_update_version
 with_user_release_suffix
 with_build_number
+with_copyright_year
 with_boot_jdk
 with_add_source_root
 with_override_source_root
@@ -1904,6 +1904,7 @@
                           Add a custom string to the version string if build
                           number is not set.[username_builddateb00]
   --with-build-number     Set build number value for build [b00]
+  --with-copyright-year   Set copyright year value for build [current year]
   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
   --with-add-source-root  for each and every source directory, look in this
                           additional source root for the same directory; if it
@@ -3410,7 +3411,7 @@
 
 # This will make sure the given variable points to a full and proper
 # path. This means:
-# 1) There will be no spaces in the path. On posix platforms,
+# 1) There will be no spaces in the path. On unix platforms,
 #    spaces in the path will result in an error. On Windows,
 #    the path will be rewritten using short-style to be space-free.
 # 2) The path will be absolute, and it will be in unix-style (on
@@ -3420,7 +3421,7 @@
 
 # This will make sure the given variable points to a executable
 # with a full and proper path. This means:
-# 1) There will be no spaces in the path. On posix platforms,
+# 1) There will be no spaces in the path. On unix platforms,
 #    spaces in the path will result in an error. On Windows,
 #    the path will be rewritten using short-style to be space-free.
 # 2) The path will be absolute, and it will be in unix-style (on
@@ -3968,6 +3969,8 @@
 
 
 
+
+
 #
 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -4097,7 +4100,7 @@
 
 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
 # Converts autoconf style OS name to OpenJDK style, into
-# VAR_OS and VAR_OS_API.
+# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
 
 
 # Expects $host_os $host_cpu $build_os and $build_cpu
@@ -4326,7 +4329,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1416999037
+DATE_WHEN_GENERATED=1417630847
 
 ###############################################################################
 #
@@ -13523,38 +13526,31 @@
   case "$build_os" in
     *linux*)
       VAR_OS=linux
-      VAR_OS_API=posix
-      VAR_OS_ENV=linux
+      VAR_OS_TYPE=unix
       ;;
     *solaris*)
       VAR_OS=solaris
-      VAR_OS_API=posix
-      VAR_OS_ENV=solaris
+      VAR_OS_TYPE=unix
       ;;
     *darwin*)
       VAR_OS=macosx
-      VAR_OS_API=posix
-      VAR_OS_ENV=macosx
+      VAR_OS_TYPE=unix
       ;;
     *bsd*)
       VAR_OS=bsd
-      VAR_OS_API=posix
-      VAR_OS_ENV=bsd
+      VAR_OS_TYPE=unix
       ;;
     *cygwin*)
       VAR_OS=windows
-      VAR_OS_API=winapi
       VAR_OS_ENV=windows.cygwin
       ;;
     *mingw*)
       VAR_OS=windows
-      VAR_OS_API=winapi
       VAR_OS_ENV=windows.msys
       ;;
     *aix*)
       VAR_OS=aix
-      VAR_OS_API=posix
-      VAR_OS_ENV=aix
+      VAR_OS_TYPE=unix
       ;;
     *)
       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
@@ -13631,8 +13627,16 @@
 
   # ..and setup our own variables. (Do this explicitely to facilitate searching)
   OPENJDK_BUILD_OS="$VAR_OS"
-  OPENJDK_BUILD_OS_API="$VAR_OS_API"
-  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+  if test "x$VAR_OS_TYPE" != x; then
+    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
+  else
+    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
+  fi
+  if test "x$VAR_OS_ENV" != x; then
+    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+  else
+    OPENJDK_BUILD_OS_ENV="$VAR_OS"
+  fi
   OPENJDK_BUILD_CPU="$VAR_CPU"
   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
@@ -13655,38 +13659,31 @@
   case "$host_os" in
     *linux*)
       VAR_OS=linux
-      VAR_OS_API=posix
-      VAR_OS_ENV=linux
+      VAR_OS_TYPE=unix
       ;;
     *solaris*)
       VAR_OS=solaris
-      VAR_OS_API=posix
-      VAR_OS_ENV=solaris
+      VAR_OS_TYPE=unix
       ;;
     *darwin*)
       VAR_OS=macosx
-      VAR_OS_API=posix
-      VAR_OS_ENV=macosx
+      VAR_OS_TYPE=unix
       ;;
     *bsd*)
       VAR_OS=bsd
-      VAR_OS_API=posix
-      VAR_OS_ENV=bsd
+      VAR_OS_TYPE=unix
       ;;
     *cygwin*)
       VAR_OS=windows
-      VAR_OS_API=winapi
       VAR_OS_ENV=windows.cygwin
       ;;
     *mingw*)
       VAR_OS=windows
-      VAR_OS_API=winapi
       VAR_OS_ENV=windows.msys
       ;;
     *aix*)
       VAR_OS=aix
-      VAR_OS_API=posix
-      VAR_OS_ENV=aix
+      VAR_OS_TYPE=unix
       ;;
     *)
       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
@@ -13763,8 +13760,16 @@
 
   # ... and setup our own variables. (Do this explicitely to facilitate searching)
   OPENJDK_TARGET_OS="$VAR_OS"
-  OPENJDK_TARGET_OS_API="$VAR_OS_API"
-  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+  if test "x$VAR_OS_TYPE" != x; then
+    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
+  else
+    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
+  fi
+  if test "x$VAR_OS_ENV" != x; then
+    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+  else
+    OPENJDK_TARGET_OS_ENV="$VAR_OS"
+  fi
   OPENJDK_TARGET_CPU="$VAR_CPU"
   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
@@ -13932,19 +13937,10 @@
   fi
 
 
-  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
-  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
-    OPENJDK_TARGET_OS_API_DIR="unix"
-  fi
-  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
-    OPENJDK_TARGET_OS_API_DIR="windows"
-  fi
-
-
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
   else
-      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
+      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
   fi
 
 
@@ -14194,7 +14190,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$CURDIR"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -14316,7 +14312,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$TOPDIR"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -14836,7 +14832,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$with_devkit"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -15310,7 +15306,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$OUTPUT_ROOT"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -15677,7 +15673,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$FOUND_MAKE"
@@ -16050,7 +16046,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$FOUND_MAKE"
@@ -16420,7 +16416,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$FOUND_MAKE"
@@ -16795,7 +16791,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$FOUND_MAKE"
@@ -17164,7 +17160,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$FOUND_MAKE"
@@ -20132,7 +20128,19 @@
 
 
 
-  COPYRIGHT_YEAR=`date +'%Y'`
+
+# Check whether --with-copyright-year was given.
+if test "${with_copyright_year+set}" = set; then :
+  withval=$with_copyright_year;
+fi
+
+  if test "x$with_copyright_year" = xyes; then
+    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
+  elif test "x$with_copyright_year" != x; then
+    COPYRIGHT_YEAR="$with_copyright_year"
+  else
+    COPYRIGHT_YEAR=`date +'%Y'`
+  fi
 
 
   if test "x$JDK_UPDATE_VERSION" != x; then
@@ -20319,7 +20327,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -20651,7 +20659,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -20845,7 +20853,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -21032,7 +21040,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -21218,7 +21226,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -21404,7 +21412,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -21581,7 +21589,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -21727,7 +21735,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$JAVA_HOME_PROCESSED"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -21899,7 +21907,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -22227,7 +22235,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -22442,7 +22450,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -22622,7 +22630,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -22830,7 +22838,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -23010,7 +23018,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -23218,7 +23226,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -23398,7 +23406,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -23606,7 +23614,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -23786,7 +23794,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -23981,7 +23989,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -24159,7 +24167,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -24355,7 +24363,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -24533,7 +24541,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -24728,7 +24736,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -24906,7 +24914,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -25102,7 +25110,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -25280,7 +25288,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -25457,7 +25465,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$BOOT_JDK"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -27484,7 +27492,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$VS_ENV_CMD"
@@ -28144,7 +28152,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$CC"
@@ -28601,7 +28609,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$PROPER_COMPILER_CC"
@@ -29884,7 +29892,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$CXX"
@@ -30341,7 +30349,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$PROPER_COMPILER_CXX"
@@ -31203,7 +31211,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$CPP"
@@ -31618,7 +31626,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$CXXCPP"
@@ -31962,7 +31970,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$LD"
@@ -32457,7 +32465,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$AS"
@@ -33085,7 +33093,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$AR"
@@ -33621,7 +33629,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$OBJC"
@@ -34089,7 +34097,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$LIPO"
@@ -34430,7 +34438,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$MT"
@@ -34767,7 +34775,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$RC"
@@ -35086,7 +35094,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$DUMPBIN"
@@ -35601,7 +35609,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$STRIP"
@@ -36069,7 +36077,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$NM"
@@ -36537,7 +36545,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$GNM"
@@ -37006,7 +37014,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$MCS"
@@ -37586,7 +37594,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$STRIP"
@@ -38164,7 +38172,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$NM"
@@ -38751,7 +38759,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$OBJCOPY"
@@ -39335,7 +39343,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$OBJDUMP"
@@ -39828,7 +39836,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$BUILD_CC"
@@ -40296,7 +40304,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$BUILD_CXX"
@@ -40764,7 +40772,7 @@
   fi
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     # First separate the path from the arguments. This will split at the first
     # space.
     complete="$BUILD_LD"
@@ -40993,74 +41001,6 @@
   fi
 
 
-    # "-fsanitize=undefined" supported for GCC 4.9 and later
-    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
-$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
-  supports=yes
-
-  saved_cflags="$CFLAGS"
-  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
-  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 $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
-  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
-    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
-  else
-    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
-  fi
-
-
     # "-z relro" supported in GNU binutils 2.17 and later
     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
 
@@ -41316,7 +41256,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$JT_HOME"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -41617,9 +41557,9 @@
 
   # On Windows, we need to set RC flags.
   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
-    RC_FLAGS="-nologo -l 0x409 -r"
+    RC_FLAGS="-nologo -l0x409"
     if test "x$VARIANT" = xOPT; then
-      RC_FLAGS="$RC_FLAGS -d NDEBUG"
+      RC_FLAGS="$RC_FLAGS -DNDEBUG"
     fi
 
     # The version variables used to create RC_FLAGS may be overridden
@@ -41628,13 +41568,13 @@
     # The \$ are escaped to the shell, and the $(...) variables
     # are evaluated by make.
     RC_FLAGS="$RC_FLAGS \
-        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
-        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
-        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
-        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
-        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
-        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
+        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
+        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
+        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
+        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
+        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
+        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
+        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   fi
 
 
@@ -41844,8 +41784,8 @@
   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
 
   elif test "x$COMPILE_TYPE" = xreduced; then
-    if test "x$OPENJDK_TARGET_OS" != xwindows; then
-      # Specify -m if running reduced on other Posix platforms
+    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
+      # Specify -m if running reduced on unix platforms
 
   # When we add flags to the "official" CFLAGS etc, we need to
   # keep track of these additions in ADDED_CFLAGS etc. These
@@ -42404,10 +42344,6 @@
       # Add runtime stack smashing and undefined behavior checks
       CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
       CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
-      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
-        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
-        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIsOR_FLAG"
-      fi
       ;;
     esac
   fi
@@ -42737,7 +42673,7 @@
   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
       -I${JDK_TOPDIR}/src/java.base/share/native/include \
       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_API_DIR/native/include"
+      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
 
   # The shared libraries are compiled using the picflag.
   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
@@ -42815,26 +42751,6 @@
     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
   fi
 
-  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
-    # If undefined behaviour detection is enabled then we need to tell linker.
-    case $DEBUG_LEVEL in
-      release | fastdebug )
-        ;;
-      slowdebug )
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
-$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
-        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
-          # enable undefined behaviour checking
-          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
-          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
-        fi
-        ;;
-      * )
-        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
-        ;;
-    esac
-  fi
-
   # Customize LDFLAGS for executables
 
   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
@@ -44723,7 +44639,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -44845,7 +44761,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -45076,7 +44992,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -45198,7 +45114,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -45690,7 +45606,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -45812,7 +45728,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46018,7 +45934,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46140,7 +46056,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46337,7 +46253,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46459,7 +46375,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46656,7 +46572,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46778,7 +46694,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -46976,7 +46892,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -47098,7 +47014,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -47297,7 +47213,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -47419,7 +47335,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -47614,7 +47530,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -47736,7 +47652,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -47931,7 +47847,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -48053,7 +47969,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$POTENTIAL_FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -48231,7 +48147,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$FREETYPE_INCLUDE_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -48361,7 +48277,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$FREETYPE_LIB_PATH"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -50260,7 +50176,7 @@
   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
 
   else
-    # We're on a posix platform. Hooray! :)
+    # We're on a unix platform. Hooray! :)
     path="$MSVCR_DLL"
     has_space=`$ECHO "$path" | $GREP " "`
     if test "x$has_space" != x; then
@@ -52405,15 +52321,15 @@
   printf "====================================================\n"
   if test "x$no_create" != "xyes"; then
     if test "x$IS_RECONFIGURE" != "xyes"; then
-      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
-    else
-      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
+      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
+    else
+      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
     fi
   else
     if test "x$IS_RECONFIGURE" != "xyes"; then
       printf "A configuration has been successfully checked but not created\n"
     else
-      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
+      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
     fi
   fi
   if test "x$CONFIGURE_COMMAND_LINE" != x; then
@@ -52485,3 +52401,15 @@
   fi
 
 
+
+if test -e "$OUTPUT_ROOT/config.log"; then
+  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
+  if test $? -eq 0; then
+    printf "The following warnings were produced. Repeated here for convenience:\n"
+    # We must quote sed expression (using []) to stop m4 from eating the [].
+    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
+    printf "\n"
+  fi
+fi
+
+
--- a/common/autoconf/help.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/help.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -178,15 +178,15 @@
   printf "====================================================\n"
   if test "x$no_create" != "xyes"; then
     if test "x$IS_RECONFIGURE" != "xyes"; then
-      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
+      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
     else
-      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
+      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
     fi
   else
     if test "x$IS_RECONFIGURE" != "xyes"; then
       printf "A configuration has been successfully checked but not created\n"
     else
-      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
+      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
     fi
   fi
   if test "x$CONFIGURE_COMMAND_LINE" != x; then
@@ -257,3 +257,17 @@
     printf "\n"
   fi
 ])
+
+AC_DEFUN_ONCE([HELP_REPEAT_WARNINGS],
+[
+if test -e "$OUTPUT_ROOT/config.log"; then
+  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
+  if test $? -eq 0; then
+    printf "The following warnings were produced. Repeated here for convenience:\n"
+    # We must quote sed expression (using []) to stop m4 from eating the [].
+    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e [ 's/^configure:[0-9]*: //' ]
+    printf "\n"
+  fi
+fi
+
+])
--- a/common/autoconf/jdk-options.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/jdk-options.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -549,7 +549,15 @@
   AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
   AC_SUBST(MACOSX_BUNDLE_ID_BASE)
 
-  COPYRIGHT_YEAR=`date +'%Y'`
+  AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
+      [Set copyright year value for build @<:@current year@:>@])])
+  if test "x$with_copyright_year" = xyes; then
+    AC_MSG_ERROR([Copyright year must have a value])
+  elif test "x$with_copyright_year" != x; then
+    COPYRIGHT_YEAR="$with_copyright_year"
+  else
+    COPYRIGHT_YEAR=`date +'%Y'`
+  fi
   AC_SUBST(COPYRIGHT_YEAR)
 
   if test "x$JDK_UPDATE_VERSION" != x; then
--- a/common/autoconf/libraries.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/libraries.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -355,7 +355,7 @@
       FOUND_FREETYPE=no
     fi
   fi
-  
+
   if test "x$FOUND_FREETYPE" = xyes; then
     # Include file found, let's continue the sanity check.
     AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
--- a/common/autoconf/platform.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/platform.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -98,44 +98,37 @@
 
 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
 # Converts autoconf style OS name to OpenJDK style, into
-# VAR_OS and VAR_OS_API.
+# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
 AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
 [
   case "$1" in
     *linux*)
       VAR_OS=linux
-      VAR_OS_API=posix
-      VAR_OS_ENV=linux
+      VAR_OS_TYPE=unix
       ;;
     *solaris*)
       VAR_OS=solaris
-      VAR_OS_API=posix
-      VAR_OS_ENV=solaris
+      VAR_OS_TYPE=unix
       ;;
     *darwin*)
       VAR_OS=macosx
-      VAR_OS_API=posix
-      VAR_OS_ENV=macosx
+      VAR_OS_TYPE=unix
       ;;
     *bsd*)
       VAR_OS=bsd
-      VAR_OS_API=posix
-      VAR_OS_ENV=bsd
+      VAR_OS_TYPE=unix
       ;;
     *cygwin*)
       VAR_OS=windows
-      VAR_OS_API=winapi
       VAR_OS_ENV=windows.cygwin
       ;;
     *mingw*)
       VAR_OS=windows
-      VAR_OS_API=winapi
       VAR_OS_ENV=windows.msys
       ;;
     *aix*)
       VAR_OS=aix
-      VAR_OS_API=posix
-      VAR_OS_ENV=aix
+      VAR_OS_TYPE=unix
       ;;
     *)
       AC_MSG_ERROR([unsupported operating system $1])
@@ -165,14 +158,22 @@
   PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
   # ..and setup our own variables. (Do this explicitely to facilitate searching)
   OPENJDK_BUILD_OS="$VAR_OS"
-  OPENJDK_BUILD_OS_API="$VAR_OS_API"
-  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+  if test "x$VAR_OS_TYPE" != x; then
+    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
+  else
+    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
+  fi
+  if test "x$VAR_OS_ENV" != x; then
+    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
+  else
+    OPENJDK_BUILD_OS_ENV="$VAR_OS"
+  fi
   OPENJDK_BUILD_CPU="$VAR_CPU"
   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
   AC_SUBST(OPENJDK_BUILD_OS)
-  AC_SUBST(OPENJDK_BUILD_OS_API)
+  AC_SUBST(OPENJDK_BUILD_OS_TYPE)
   AC_SUBST(OPENJDK_BUILD_OS_ENV)
   AC_SUBST(OPENJDK_BUILD_CPU)
   AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
@@ -187,14 +188,22 @@
   PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
   # ... and setup our own variables. (Do this explicitely to facilitate searching)
   OPENJDK_TARGET_OS="$VAR_OS"
-  OPENJDK_TARGET_OS_API="$VAR_OS_API"
-  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+  if test "x$VAR_OS_TYPE" != x; then
+    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
+  else
+    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
+  fi
+  if test "x$VAR_OS_ENV" != x; then
+    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
+  else
+    OPENJDK_TARGET_OS_ENV="$VAR_OS"
+  fi
   OPENJDK_TARGET_CPU="$VAR_CPU"
   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
   AC_SUBST(OPENJDK_TARGET_OS)
-  AC_SUBST(OPENJDK_TARGET_OS_API)
+  AC_SUBST(OPENJDK_TARGET_OS_TYPE)
   AC_SUBST(OPENJDK_TARGET_OS_ENV)
   AC_SUBST(OPENJDK_TARGET_CPU)
   AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
@@ -331,19 +340,10 @@
   fi
   AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
 
-  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
-  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
-    OPENJDK_TARGET_OS_API_DIR="unix"
-  fi
-  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
-    OPENJDK_TARGET_OS_API_DIR="windows"
-  fi
-  AC_SUBST(OPENJDK_TARGET_OS_API_DIR)
-
   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
   else
-      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
+      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
   fi
   AC_SUBST(OPENJDK_TARGET_OS_EXPORT_DIR)
 
@@ -472,8 +472,8 @@
     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
     PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
   elif test "x$COMPILE_TYPE" = xreduced; then
-    if test "x$OPENJDK_TARGET_OS" != xwindows; then
-      # Specify -m if running reduced on other Posix platforms
+    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
+      # Specify -m if running reduced on unix platforms
       PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
     fi
   fi
--- a/common/autoconf/spec.gmk.in	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/spec.gmk.in	Thu Dec 04 15:21:09 2014 -0800
@@ -36,6 +36,7 @@
 X:=
 SPACE:=$(X) $(X)
 COMMA:=,
+DOLLAR:=$$
 HASH:=\#
 LEFT_PAREN:=(
 RIGHT_PAREN:=)
@@ -82,7 +83,7 @@
 
 # The built jdk will run in this target system.
 OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@
-OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@
+OPENJDK_TARGET_OS_TYPE:=@OPENJDK_TARGET_OS_TYPE@
 OPENJDK_TARGET_OS_ENV:=@OPENJDK_TARGET_OS_ENV@
 
 OPENJDK_TARGET_CPU:=@OPENJDK_TARGET_CPU@
@@ -99,13 +100,12 @@
 OPENJDK_TARGET_CPU_LEGACY_LIB:=@OPENJDK_TARGET_CPU_LEGACY_LIB@
 OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
 OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
-OPENJDK_TARGET_OS_API_DIR:=@OPENJDK_TARGET_OS_API_DIR@
 OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
 
 # We are building on this build system.
 # When not cross-compiling, it is the same as the target.
 OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
-OPENJDK_BUILD_OS_API:=@OPENJDK_BUILD_OS_API@
+OPENJDK_BUILD_OS_TYPE:=@OPENJDK_BUILD_OS_TYPE@
 OPENJDK_BUILD_OS_ENV:=@OPENJDK_BUILD_OS_ENV@
 
 OPENJDK_BUILD_CPU:=@OPENJDK_BUILD_CPU@
@@ -343,7 +343,7 @@
 CPP:=@FIXPATH@ @CPP@
 #CPPFLAGS:=@CPPFLAGS@
 
-# The linker can be gcc or ld on posix systems, or link.exe on windows systems.
+# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
 LD:=@FIXPATH@ @LD@
 
 # Xcode SDK path
@@ -384,7 +384,7 @@
 
 AS:=@FIXPATH@ @AS@
 
-# AR is used to create a static library (is ar in posix, lib.exe in windows)
+# AR is used to create a static library (is ar in unix, lib.exe in windows)
 AR:=@FIXPATH@ @AR@
 ARFLAGS:=@ARFLAGS@
 
@@ -448,7 +448,7 @@
 JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
 SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
 
-# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk 
+# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
 # for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
 # versions of the variables directly.
 JAVA_CMD:=@JAVA@
@@ -562,10 +562,10 @@
 # Where the build output is stored for your convenience.
 BUILD_LOG:=@BUILD_LOG@
 BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
-# Disable the build log wrapper on sjavac+winapi until
+# 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_API@,yesXwinapi)
+ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS@,yesXwindows)
   BUILD_LOG_WRAPPER:=
 else
   BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
@@ -702,7 +702,7 @@
 
 # This macro is called to allow inclusion of closed source counterparts.
 # Unless overridden in closed sources, it expands to nothing.
-# Usage: This function is called in an open makefile, with the following 
+# Usage: This function is called in an open makefile, with the following
 # arguments:
 # $1 the name of the repo, or empty if the top-level repo.
 # $2 the name of the makefile
--- a/common/autoconf/toolchain.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/toolchain.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -712,12 +712,6 @@
       [HAS_CFLAG_OPTIMIZE_DEBUG=true],
       [HAS_CFLAG_OPTIMIZE_DEBUG=false])
 
-    # "-fsanitize=undefined" supported for GCC 4.9 and later
-    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
-    FLAGS_COMPILER_CHECK_ARGUMENTS([$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG],
-      [HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true],
-      [HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false])
-
     # "-z relro" supported in GNU binutils 2.17 and later
     LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
     FLAGS_LINKER_CHECK_ARGUMENTS([$LINKER_RELRO_FLAG],
--- a/common/autoconf/toolchain_windows.m4	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/autoconf/toolchain_windows.m4	Thu Dec 04 15:21:09 2014 -0800
@@ -248,7 +248,7 @@
   METHOD="$2"
   if test -e "$POSSIBLE_MSVCR_DLL"; then
     AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
-    
+
     # Need to check if the found msvcr is correct architecture
     AC_MSG_CHECKING([found msvcr100.dll architecture])
     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
@@ -291,7 +291,7 @@
       AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
     fi
   fi
-  
+
   if test "x$MSVCR_DLL" = x; then
     # Probe: Using well-known location from Visual Studio 10.0
     if test "x$VCINSTALLDIR" != x; then
@@ -311,9 +311,9 @@
     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
     TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
   fi
-  
+
   if test "x$MSVCR_DLL" = x; then
-    # Probe: Look in the Windows system32 directory 
+    # Probe: Look in the Windows system32 directory
     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
     BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
@@ -333,7 +333,7 @@
       TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
     fi
   fi
-      
+
   if test "x$MSVCR_DLL" = x; then
     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
     # (This was the original behaviour; kept since it might turn up something)
@@ -347,11 +347,11 @@
           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
         fi
       fi
-      
+
       TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
     fi
   fi
-  
+
   if test "x$MSVCR_DLL" = x; then
     AC_MSG_CHECKING([for msvcr100.dll])
     AC_MSG_RESULT([no])
--- a/common/bin/compare_exceptions.sh.incl	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/bin/compare_exceptions.sh.incl	Thu Dec 04 15:21:09 2014 -0800
@@ -110,6 +110,7 @@
 ./bin/wsimport
 ./bin/xjc
 ./jre/bin/java
+./jre/bin/jjs
 ./jre/bin/keytool
 ./jre/bin/orbd
 ./jre/bin/pack200
@@ -199,6 +200,7 @@
 ./bin/wsimport
 ./bin/xjc
 ./jre/bin/java
+./jre/bin/jjs
 ./jre/bin/keytool
 ./jre/bin/orbd
 ./jre/bin/pack200
@@ -924,11 +926,6 @@
 /META-INF/INDEX.LIST
 "
 
-KNOWN_BIN_DIFF="
-./jre/lib/libJObjC.dylib
-./lib/libJObjC.dylib
-"
-
 ACCEPTED_BIN_DIFF="
 ./bin/appletviewer
 ./bin/idlj
@@ -980,34 +977,82 @@
 ./jre/bin/tnameserv
 ./jre/lib/libsaproc.dylib
 ./jre/lib/server/libjvm.dylib
+./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.dylib
+./demo/jvmti/gctest/lib/libgctest.dylib
+./demo/jvmti/heapTracker/lib/libheapTracker.dylib
+./demo/jvmti/heapViewer/lib/libheapViewer.dylib
+./demo/jvmti/minst/lib/libminst.dylib
+./demo/jvmti/mtrace/lib/libmtrace.dylib
+./demo/jvmti/versionCheck/lib/libversionCheck.dylib
+./demo/jvmti/waiters/lib/libwaiters.dylib
+./Contents/Home/lib/libAppleScriptEngine.dylib
+./Contents/Home/lib/libattach.dylib
+./Contents/Home/lib/libawt_lwawt.dylib
+./Contents/Home/lib/libdeploy.dylib
+./Contents/Home/lib/libdt_socket.dylib
+./Contents/Home/lib/libhprof.dylib
+./Contents/Home/lib/libinstrument.dylib
+./Contents/Home/lib/libjava_crw_demo.dylib
+./Contents/Home/lib/libjdwp.dylib
+./Contents/Home/lib/libjsdt.dylib
+./Contents/Home/lib/libjsig.dylib
+./Contents/Home/lib/libmanagement.dylib
+./Contents/Home/lib/libnpjp2.dylib
+./Contents/Home/lib/libosx.dylib
+./Contents/Home/lib/libosxapp.dylib
+./Contents/Home/lib/libsaproc.dylib
+./Contents/Home/lib/libsplashscreen.dylib
+./Contents/Home/lib/libverify.dylib
+./Contents/Home/lib/server/libjsig.dylib
+./Contents/Home/lib/server/libjvm.dylib
+./jre/lib/libAppleScriptEngine.dylib
+./jre/lib/libattach.dylib
+./jre/lib/libawt_lwawt.dylib
+./jre/lib/libdeploy.dylib
+./jre/lib/libdt_socket.dylib
+./jre/lib/libhprof.dylib
+./jre/lib/libinstrument.dylib
+./jre/lib/libjava_crw_demo.dylib
+./jre/lib/libjdwp.dylib
+./jre/lib/libjsdt.dylib
+./jre/lib/libjsig.dylib
+./jre/lib/libmanagement.dylib
+./jre/lib/libosx.dylib
+./jre/lib/libosxapp.dylib
+./jre/lib/libsaproc.dylib
+./jre/lib/libsplashscreen.dylib
+./jre/lib/libverify.dylib
+./jre/lib/server/libjvm.dylib
+./lib/libAppleScriptEngine.dylib
+./lib/libattach.dylib
+./lib/libawt_lwawt.dylib
+./lib/libdeploy.dylib
+./lib/libdt_socket.dylib
+./lib/libhprof.dylib
+./lib/libinstrument.dylib
+./lib/libjava_crw_demo.dylib
+./lib/libjdwp.dylib
+./lib/libjsdt.dylib
+./lib/libjsig.dylib
+./lib/libmanagement.dylib
+./lib/libnpjp2.dylib
+./lib/libosx.dylib
+./lib/libosxapp.dylib
+./lib/libverify.dylib
 ./lib/libsaproc.dylib
+./lib/libsplashscreen.dylib
 ./lib/server/libjvm.dylib
 ./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel
 "
 
-KNOWN_SIZE_DIFF="
-./jre/lib/libJObjC.dylib
-./lib/libJObjC.dylib
+SORT_SYMBOLS="
+./Contents/Home/lib/libsaproc.dylib
+./jre/lib/libsaproc.dylib
+./lib/libsaproc.dylib
 "
 
-SORT_SYMBOLS="
-./jre/lib/libJObjC.dylib
-./lib/libJObjC.dylib
+ACCEPTED_SMALL_SIZE_DIFF="
+./bin/javaws
+./Contents/Home/bin/_javaws
 "
-
-KNOWN_SYM_DIFF="
-./jre/lib/libJObjC.dylib
-./lib/libJObjC.dylib
-"
-
-KNOWN_ELF_DIFF="
-./jre/lib/libJObjC.dylib
-./lib/libJObjC.dylib
-"
-
-KNOWN_DIS_DIFF="
-./jre/lib/libJObjC.dylib
-./lib/libJObjC.dylib
-"
-
 fi
--- a/common/bin/logger.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/bin/logger.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -22,10 +22,10 @@
 # questions.
 #
 
-# Usage: ./logger.sh theloggfile acommand arg1 arg2 
+# Usage: ./logger.sh theloggfile acommand arg1 arg2
 #
 # Execute acommand with args, in such a way that
-# both stdout and stderr from acommand are appended to 
+# both stdout and stderr from acommand are appended to
 # theloggfile.
 #
 # Preserve stdout and stderr, so that the stdout
--- a/common/bin/shell-tracer.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/bin/shell-tracer.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -26,12 +26,12 @@
 #
 # This shell script is supposed to be set as a replacement for SHELL in make,
 # causing it to be called whenever make wants to execute shell commands.
-# The <shell command line> is suitable for passing on to the old shell, 
+# The <shell command line> is suitable for passing on to the old shell,
 # typically beginning with -c.
 #
-# This script will make sure the shell command line is executed with 
+# This script will make sure the shell command line is executed with
 # OLD_SHELL -x, and it will also store a simple log of the the time it takes to
-# execute the command in the OUTPUT_FILE, using the "time" utility as pointed 
+# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
 # to by TIME_CMD. If TIME_CMD is "-", no timestamp will be stored.
 
 TIME_CMD="$1"
--- a/common/bin/test_builds.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/bin/test_builds.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -171,7 +171,7 @@
 ) 2>&1 | tee ${t3}.build.txt
 checkErrors
 
-# Compare old build to build-infra build 
+# Compare old build to build-infra build
 ( \
   sh ${t0}/common/bin/compareimage.sh \
     ${t3}/build/*/j2sdk-image \
@@ -181,4 +181,3 @@
 checkErrors
 
 exit 0
-
--- a/common/bin/unshuffle_patch.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/common/bin/unshuffle_patch.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -80,7 +80,7 @@
   if [ $repo = "$r" ] ; then
     found="true"
     break;
-  fi 
+  fi
 done
 if [ $found = "false" ] ; then
   echo "ERROR: Unknown repo: $repo. Should be one of [$repos]." >&2
@@ -200,4 +200,3 @@
     printf "%s\n" "$line" >> $output
   fi
 done < "$input"
-
--- a/make/CompileJavaModules.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/CompileJavaModules.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -329,7 +329,7 @@
 
 ################################################################################
 
-jdk.jcmd_COPY := _options 
+jdk.jcmd_COPY := _options
 
 ################################################################################
 
@@ -433,8 +433,8 @@
     #
 
 OS_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS)/classes
-ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_API_DIR))
-OS_API_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS_API_DIR)/classes
+ifneq ($(OPENJDK_TARGET_OS), $(OPENJDK_TARGET_OS_TYPE))
+  OS_TYPE_SRC_DIRS += $(JDK_TOPDIR)/src/$1/$(OPENJDK_TARGET_OS_TYPE)/classes
 endif
 
 SHARE_SRC_DIRS += \
@@ -448,7 +448,7 @@
 ALL_SRC_DIRS = \
     $(GENERATED_SRC_DIRS) \
     $(OS_SRC_DIRS) \
-    $(OS_API_SRC_DIRS) \
+    $(OS_TYPE_SRC_DIRS) \
     $(SHARE_SRC_DIRS) \
     #
 
@@ -470,7 +470,7 @@
   $1_DEPS := $$(call FindDepsForModule, $1)
 
   $1_CLASSPATH := $$(addprefix $(JDK_OUTPUTDIR)/modules/,$$($1_DEPS))
-  # When crypto classes are prebuilt, need to look for classes already in 
+  # When crypto classes are prebuilt, need to look for classes already in
   # output dir.
   ifneq ($(BUILD_CRYPTO), true)
     $1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
@@ -495,7 +495,7 @@
 
   # 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 
+  # 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.
--- a/make/Javadoc.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/Javadoc.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -74,6 +74,7 @@
 SCTPAPI_FIRST_COPYRIGHT_YEAR = 2009
 TRACING_FIRST_COPYRIGHT_YEAR = 2008
 TREEAPI_FIRST_COPYRIGHT_YEAR = 2005
+NASHORNAPI_FIRST_COPYRIGHT_YEAR = 2014
 JNLP_FIRST_COPYRIGHT_YEAR = 1998
 PLUGIN2_FIRST_COPYRIGHT_YEAR = 2007
 JDKNET_FIRST_COPYRIGHT_YEAR = 2014
@@ -137,8 +138,10 @@
 # command (newline or shell ; character)
 ALL_SOURCE_DIRS := $(wildcard \
       $(JDK_TOPDIR)/src/*/share/classes \
-      $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \
+      $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
+      $(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_TYPE)/classes \
       $(LANGTOOLS_TOPDIR)/src/*/share/classes \
+      $(NASHORN_TOPDIR)/src/*/share/classes \
       $(CORBA_TOPDIR)/src/*/share/classes \
       $(JAXP_TOPDIR)/src/*/share/classes \
       $(JAXWS_TOPDIR)/src/*/share/classes \
@@ -473,7 +476,7 @@
 	) >> $@
 
 # Create a file with the package names in it
-$(DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(DOCLETAPI_PKGS)) 
+$(DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(DOCLETAPI_PKGS))
 	$(prep-target)
 	$(call PackageFilter,$(DOCLETAPI_PKGS))
 
@@ -1121,6 +1124,60 @@
 
 #############################################################
 #
+# nashornapidocs
+#
+
+ALL_OTHER_TARGETS += nashornapidocs
+
+NASHORNAPI_DOCDIR := $(JDK_API_DOCSDIR)/nashorn
+NASHORNAPI2COREAPI := ../$(JDKJRE2COREAPI)
+NASHORNAPI_DOCTITLE := Nashorn API
+NASHORNAPI_WINDOWTITLE := Nashorn API
+NASHORNAPI_HEADER := <strong>Nashorn API</strong>
+NASHORNAPI_BOTTOM := $(call CommonBottom,$(NASHORNAPI_FIRST_COPYRIGHT_YEAR))
+NASHORNAPI_GROUPNAME := Packages
+NASHORNAPI_REGEXP := jdk.nashorn.api.scripting.*
+# NASHORNAPI_PKGS is located in NON_CORE_PKGS.gmk
+
+NASHORNAPI_INDEX_HTML = $(NASHORNAPI_DOCDIR)/index.html
+NASHORNAPI_OPTIONS_FILE = $(DOCSTMPDIR)/nashornapi.options
+NASHORNAPI_PACKAGES_FILE = $(DOCSTMPDIR)/nashornapi.packages
+
+nashornapidocs: $(NASHORNAPI_INDEX_HTML)
+
+# Set relative location to core api document root
+$(NASHORNAPI_INDEX_HTML): GET2DOCSDIR=$(NASHORNAPI2COREAPI)/..
+
+# Run javadoc if the index file is out of date or missing
+$(NASHORNAPI_INDEX_HTML): $(NASHORNAPI_OPTIONS_FILE) $(NASHORNAPI_PACKAGES_FILE) $(COREAPI_INDEX_FILE)
+	$(prep-javadoc)
+	$(call JavadocSummary,$(NASHORNAPI_OPTIONS_FILE),$(NASHORNAPI_PACKAGES_FILE))
+	$(JAVADOC_CMD) -d $(@D) \
+	    @$(NASHORNAPI_OPTIONS_FILE) @$(NASHORNAPI_PACKAGES_FILE)
+
+# Create file with javadoc options in it
+$(NASHORNAPI_OPTIONS_FILE):
+	$(prep-target)
+	@($(call COMMON_JAVADOCFLAGS) ; \
+          $(call COMMON_JAVADOCTAGS) ; \
+	  $(call OptionOnly,-Xdoclint:all) ; \
+	  $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
+	  $(call OptionPair,-encoding,ascii) ; \
+	  $(call OptionPair,-doctitle,$(NASHORNAPI_DOCTITLE)) ; \
+	  $(call OptionPair,-windowtitle,$(NASHORNAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
+	  $(call OptionPair,-header,$(NASHORNAPI_HEADER)$(DRAFT_HEADER)) ; \
+	  $(call OptionPair,-bottom,$(NASHORNAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
+	  $(call OptionTrip,-group,$(NASHORNAPI_GROUPNAME),$(NASHORNAPI_REGEXP)); \
+	  $(call OptionTrip,-linkoffline,$(NASHORNAPI2COREAPI),$(COREAPI_DOCSDIR)/); \
+	) >> $@
+
+# Create a file with the package names in it
+$(NASHORNAPI_PACKAGES_FILE): $(call PackageDependencies,$(NASHORNAPI_PKGS))
+	$(prep-target)
+	$(call PackageFilter,$(NASHORNAPI_PKGS))
+
+#############################################################
+#
 # sctpdocs
 #
 
--- a/make/Main.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/Main.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -40,7 +40,7 @@
 include $(SRC_ROOT)/make/common/Modules.gmk
 
 # Declare ALL_TARGETS as an immediate variable. This variable is a list of all
-# valid top level targets. It's used to declare them all as PHONY and to 
+# valid top level targets. It's used to declare them all as PHONY and to
 # generate the -only targets.
 ALL_TARGETS :=
 
@@ -285,9 +285,9 @@
 
 ################################################################################
 #
-# Dependency declarations between targets. 
+# Dependency declarations between targets.
 #
-# These are declared in two groups. First all dependencies between targets that 
+# These are declared in two groups. First all dependencies between targets that
 # have recipes above as these dependencies may be disabled. Then the aggregator
 # targets that do not have recipes of their own, which will never have their
 # dependencies disabled.
@@ -295,10 +295,10 @@
 ################################################################################
 # Targets with recipes above
 
-# If running an *-only target, parallel execution and dependencies between 
-# recipe targets are disabled. This makes it possible to run a select set of 
+# If running an *-only target, parallel execution and dependencies between
+# recipe targets are disabled. This makes it possible to run a select set of
 # recipe targets in order. It's the responsibility of the user to make sure
-# all prerequisites are fulfilled. 
+# all prerequisites are fulfilled.
 ifneq ($(findstring -only, $(MAKECMDGOALS)), )
   .NOTPARALLEL:
 else
@@ -349,11 +349,11 @@
   # Declare dependencies from all other <module>-lib to java.base-lib
   $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
       $(eval $t: java.base-libs))
-  # Declare the special case dependency for jdk.deploy.osx where libosx 
+  # Declare the special case dependency for jdk.deploy.osx where libosx
   # links against libosxapp.
   jdk.deploy.osx-libs: java.desktop-libs
 
-  # This dependency needs to be explicitly declared as jdk.jdi-gensrc generates a 
+  # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
   # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
   # virtual target.
   jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
@@ -467,7 +467,7 @@
 # Clean targets
 #
 ################################################################################
-# Clean targets are automatically run serially by the Makefile calling this 
+# Clean targets are automatically run serially by the Makefile calling this
 # file.
 
 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
@@ -525,8 +525,8 @@
 
 ################################################################################
 
-# Setup a rule for SPEC file that fails if executed. This check makes sure the 
-# configuration is up to date after changes to configure. 
+# Setup a rule for SPEC file that fails if executed. This check makes sure the
+# configuration is up to date after changes to configure.
 ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
   $(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
 	@$(ECHO) "ERROR: $(SPEC) is not up to date."
--- a/make/MakeHelpers.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/MakeHelpers.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -228,25 +228,26 @@
     # If we only have global targets, no need to bother with SPEC or CONF
     ifneq ($$(origin SPEC),undefined)
       # We have been given a SPEC, check that it works out properly
-      ifeq ($$(wildcard $$(SPEC)),)
-        $$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
-        $$(eval $$(call FatalError))
-      endif
       ifneq ($$(origin CONF),undefined)
         # We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
         # but complain if this is the top-level make call.
         ifeq ($$(MAKELEVEL),0)
-          $$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
+          $$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
           $$(eval $$(call FatalError))
         endif
       endif
+      ifeq ($$(wildcard $$(SPEC)),)
+        $$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
+        $$(eval $$(call FatalError))
+      endif
       # ... OK, we're satisfied, we'll use this SPEC later on
     else
       # Find all spec.gmk files in the build output directory
       output_dir=$$(root_dir)/build
       all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
       ifeq ($$(all_spec_files),)
-        $$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
+        $$(info Error: No configurations found for $$(root_dir).)
+        $$(info Please run 'bash configure' to create a configuration.)
         $$(eval $$(call FatalError))
       endif
       # Extract the configuration names from the path
@@ -262,15 +263,15 @@
           matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
         endif
         ifeq ($$(matching_confs),)
-          $$(info No configurations found matching CONF=$$(CONF))
-          $$(info Available configurations:)
+          $$(info Error: No configurations found matching CONF=$$(CONF).)
+          $$(info Available configurations in $$(output_dir):)
           $$(foreach var,$$(all_confs),$$(info * $$(var)))
           $$(eval $$(call FatalError))
         else
           ifeq ($$(words $$(matching_confs)),1)
             $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
           else
-            $$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
+            $$(info Building target '$(call GetRealTarget)' in these configurations (matching CONF=$$(CONF)):)
             $$(foreach var,$$(matching_confs),$$(info * $$(var)))
           endif
         endif
@@ -280,10 +281,10 @@
       else
         # No CONF or SPEC given, check the available configurations
         ifneq ($$(words $$(all_spec_files)),1)
-          $$(info No CONF given, but more than one configuration found in $$(output_dir).)
-          $$(info Available configurations:)
+          $$(info Error: No CONF given, but more than one configuration found.)
+          $$(info Available configurations in $$(output_dir):)
           $$(foreach var,$$(all_confs),$$(info * $$(var)))
-          $$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
+          $$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>).)
           $$(eval $$(call FatalError))
         endif
 
--- a/make/common/IdlCompilation.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/IdlCompilation.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, 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
@@ -75,10 +75,25 @@
 	$(RM) -rf $3/$$($4_TMPDIR)
 endef
 
+# Setup make rules for creating an IDL compilation.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+#   IDLJ
+#   SRC
+#   BIN
+#   INCLUDES
+#   EXCLUDES
+#   OLDIMPLBASES
+#   DELETES
 define SetupIdlCompilation
-  # param 1 is for example BUILD_IDLS
-  # param 2,3,4,5,6,7,8 are named args.
-  #   IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupIdlCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
+endef
+
+define SetupIdlCompilationInner
   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   $(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
--- a/make/common/JavaCompilation.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/JavaCompilation.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, 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
@@ -42,17 +42,29 @@
   $(error You must include MakeBase.gmk prior to including JavaCompilation.gmk)
 endif
 
+# Java compilation needs SetupZipArchive if we're generating a source zip.
+include ZipArchive.gmk
+
 FALSE_FIND_PATTERN:=-name FILE_NAME_THAT_DOESNT_EXIST
 
+# Setup make rules for defining a Java compiler, which is needed to compile
+# Java code. This rule generates no output.
+#
+# Parameter 1 is the name of the compiler definition. This name needs to be
+# passed to SetupJavaCompilation. This name is used as variable prefix.
+#
+# Remaining parameters are named arguments. These include:
+#   JVM:=The jvm used to run the javac/javah command
+#   JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
+#   FLAGS:=Flags to be supplied to javac
+#   SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
+#   SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
 define SetupJavaCompiler
-  # param 1 is for example GENERATE_OLD_BYTECODE or GENERATE_NEW_JDKBYTECODE
-  # This is the name of the compiler setup.
-  # param 2-9 are named args.
-  #   JVM:=The jvm used to run the javac/javah command
-  #   JAVAC:=The javac jar and bootstrap classpath changes, or just bin/javac if JVM is left out
-  #   FLAGS:=Flags to be supplied to javac
-  #   SERVER_DIR:=Use a javac server (-XDserver) and store the server related files here
-  #   SERVER_JVM:=Use this JVM for the server. Defaults to the JVM above.
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupJavaCompilerInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
+endef
+
+define SetupJavaCompilerInner
   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   $(call LogSetupMacroEntry,SetupJavaCompiler($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompiler, please update JavaCompilation.gmk))
@@ -67,25 +79,32 @@
   endif
 endef
 
+# Setup make rules for creating a jar archive.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+#   SRCS:=List of directories in where to find files to add to archive
+#   SUFFIXES:=File suffixes to include in jar
+#   INCLUDES:=List of directories/packages in SRCS that should be included
+#   EXCLUDES:=List of directories/packages in SRCS that should be excluded
+#   EXCLUDE_FILES:=List of files in SRCS that should be excluded
+#   EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
+#   JAR:=Jar file to create
+#   MANIFEST:=Optional manifest file template.
+#   JARMAIN:=Optional main class to add to manifest
+#   JARINDEX:=true means generate the index in the jar file.
+#   SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
+#       added to the archive.
+#   EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
+#   CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
 define SetupArchive
-  # param 1 is for example ARCHIVE_MYPACKAGE
-  # param 2 are the dependecies
-  # param 3,4,5,6,7,8,9 are named args.
-  #   SRCS:=List of directories in where to find files to add to archive
-  #   SUFFIXES:=File suffixes to include in jar
-  #   INCLUDES:=List of directories/packages in SRCS that should be included
-  #   EXCLUDES:=List of directories/packages in SRCS that should be excluded
-  #   EXCLUDE_FILES:=List of files in SRCS that should be excluded
-  #   EXTRA_FILES:=List of files in SRCS that should be included regardless of suffix match.
-  #   JAR:=Jar file to create
-  #   MANIFEST:=Optional manifest file template.
-  #   JARMAIN:=Optional main class to add to manifest
-  #   JARINDEX:=true means generate the index in the jar file.
-  #   SKIP_METAINF:=Set to prevent contents of an META-INF directory to be automatically
-  #       added to the archive.
-  #   EXTRA_MANIFEST_ATTR:=Extra attribute to add to manifest.
-  #   CHECK_COMPRESS_JAR Check the COMPRESS_JAR variable
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupArchive, please update JavaCompilation.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupArchiveInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
+endef
 
+define SetupArchiveInner
   # NOTE: $2 is dependencies, not a named argument!
   $(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   $(call LogSetupMacroEntry,SetupArchive($1),<dependencies>,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
@@ -147,7 +166,7 @@
   ifneq (,$2)
     $1_DEPS:=$2
   else
-    # Add all source roots to the find cache since we are likely going to run find 
+    # Add all source roots to the find cache since we are likely going to run find
     # on these more than once. The cache will only be updated if necessary.
     $$(eval $$(call FillCacheFind, $$($1_FIND_LIST)))
     $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
@@ -287,78 +306,13 @@
   $1 += $$($1_JAR)
 endef
 
-define SetupZipArchive
-  # param 1 is for example ZIP_MYSOURCE
-  # param 2,3,4,5,6,7,8,9 are named args.
-  #   SRC,ZIP,INCLUDES,INCLUDE_FILES,EXCLUDES,EXCLUDE_FILES,SUFFIXES,EXTRA_DEPS
-  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
-  $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
-  $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
-
-  # To avoid running find over too large sets of files, which causes make to crash
-  # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
-  # of directories to run find in, if available.
-  ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
-    $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
-        $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
-  else
-    $1_FIND_LIST := $$($1_SRC)
-  endif
-
-  # Find all files in the source tree.
-  $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
-
-  # Filter on suffixes if set
-  ifneq ($$($1_SUFFIXES),)
-    $1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
-  endif
-
-  ifneq ($$($1_INCLUDES),)
-    ifneq ($$($1_SUFFIXES),)
-      $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
-          $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
-    else
-      $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
-    endif
-  endif
-  ifneq ($$($1_INCLUDE_FILES),)
-    $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
-  endif
-  ifneq ($$($1_EXCLUDES),)
-    $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
     $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
-    $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
-  endif
   ifneq ($$($1_EXCLUDE_FILES),)
     # Cannot precompute ZIP_EXCLUDE_FILES as it is dependent on which src root is being
     # zipped at the moment.
     $1_SRC_EXCLUDE_FILES := $$(addprefix %, $$($1_EXCLUDE_FILES)) $$($1_EXCLUDE_FILES)
     $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDE_FILES), $$($1_ALL_SRCS))
   endif
-
-  # Use a slightly shorter name for logging, but with enough path to identify this zip.
-  $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
-
-  # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
-  # I.e. the zip -i and -x options should match the filtering done in the makefile.
-  # Explicitly excluded files can be given with absolute path. The patsubst solution
-  # isn't perfect but the likelyhood of an absolute path to match something in a src
-  # dir is very small.
-  # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
-  # and only fail if it's not.
-  $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
-	$(MKDIR) -p $$(@D)
-	$(ECHO) Updating $$($1_NAME)
-	$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$@ . $$($1_ZIP_INCLUDES) \
-	    $$($1_ZIP_EXCLUDES) -x \*_the.\* \
-	    $$(addprefix -x$(SPACE), $$(patsubst $$i/%,%, $$($1_EXCLUDE_FILES))) \
-	    || test "$$$$?" = "12" )$$(NEWLINE)) true
-	$(TOUCH) $$@
-
-  # Add zip to target list
-  $1 += $$($1_ZIP)
-endef
-
 define add_file_to_copy
   # param 1 = BUILD_MYPACKAGE
   # parma 2 = The source file to copy.
@@ -389,7 +343,7 @@
 #
 # The sed expression does this:
 # 1. Add a backslash before any :, = or ! that do not have a backslash already.
-# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX 
+# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
 #    conversions.
 # 3. Delete all lines starting with #.
 # 4. Delete empty lines.
@@ -398,7 +352,7 @@
 #    as sed on macosx does not understand '\t'.
 # 7. Replace the first \= with just =.
 # 8. Finally it's all sorted to create a stable output.
-# 
+#
 # It is assumed that = is the character used for separating names and values.
 define add_file_to_clean
   # param 1 = BUILD_MYPACKAGE
@@ -409,13 +363,15 @@
   # Now we can setup the depency that will trigger the copying.
   $$($1_BIN)$$($2_TARGET) : $2
 	$(MKDIR) -p $$(@D)
-	$(CAT) $$< | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
+	export LC_ALL=C ; $(CAT) $$< \
+	    | $(SED) -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' \
 	        -e 's/\([^\\]\)!/\1\\!/g' -e 's/#.*/#/g' \
 	    | $(SED) -f "$(SRC_ROOT)/make/common/support/unicode2x.sed" \
 	    | $(SED) -e '/^#/d' -e '/^$$$$/d' \
 	        -e :a -e '/\\$$$$/N; s/\\\n//; ta' \
 	        -e 's/^[ 	]*//;s/[ 	]*$$$$//' \
-	        -e 's/\\=/=/' | LC_ALL=C $(SORT) > $$@
+	        -e 's/\\=/=/' \
+	    | $(SORT) > $$@
 	$(CHMOD) -f ug+w $$@
 
   # And do not forget this target
@@ -430,29 +386,39 @@
   $1:=$(subst $(SPACE),$(PATH_SEP),$(strip $(patsubst %,%,$2)))
 endef
 
+# Setup make rules for compiling Java source code to class files and/or a
+# resulting jar file.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+#   SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
+#   JVM:=path to ..bin/java
+#   ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
+#   SRC:=one or more directories to search for sources
+#   BIN:=store classes here
+#   INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
+#   EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
+#   COPY:=.prp means copy all prp files to the corresponding package in BIN.
+#   COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
+#   CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
+#   CLEAN_FILES:=myapp/foo/setting.txt means clean this file over to the package myapp/foo
+#   SRCZIP:=Create a src.zip based on the found sources and copied files.
+#   INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
+#   EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
+#       "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
+#   JAVAC_SOURCE_PATH_OVERRIDE:=This forces an explicit -sourcepath to javac instead of the complete
+#       source roots from SRC. This is sometimes needed when compiling specific subsets of the source.
+#   HEADERS:=path to directory where all generated c-headers are written.
+#   DEPENDS:=Extra dependecy
+#   DISABLE_SJAVAC:=Explicitly disable the use of sjavac for this compilation unit.
 define SetupJavaCompilation
-  # param 1 is for example BUILD_MYPACKAGE
-  # param 2,3,4,5,6,7,8 are named args.
-  #   SETUP:=must point to a previously setup java compiler, for example: SETUP:=BOOTJAVAC
-  #   JVM:=path to ..bin/java
-  #   ADD_JAVAC_FLAGS:=javac flags to append to the default ones.
-  #   SRC:=one or more directories to search for sources
-  #   BIN:=store classes here
-  #   INCLUDES:=myapp.foo means will only compile java files in myapp.foo or any of its sub-packages.
-  #   EXCLUDES:=myapp.foo means will do not compile java files in myapp.foo or any of its sub-packages.
-  #   COPY:=.prp means copy all prp files to the corresponding package in BIN.
-  #   COPY_FILES:=myapp/foo/setting.txt means copy this file over to the package myapp/foo
-  #   CLEAN:=.properties means copy and clean all properties file to the corresponding package in BIN.
-  #   CLEAN_FILES:=myapp/foo/setting.txt means clean this file over to the package myapp/foo
-  #   SRCZIP:=Create a src.zip based on the found sources and copied files.
-  #   INCLUDE_FILES:="com/sun/SolarisFoobar.java" means only compile this file!
-  #   EXCLUDE_FILES:="com/sun/SolarisFoobar.java" means do not compile this particular file!
-  #       "SolarisFoobar.java" means do not compile SolarisFoobar, wherever it is found.
-  #   JAVAC_SOURCE_PATH_OVERRIDE:=This forces an explicit -sourcepath to javac instead of the complete
-  #       source roots from SRC. This is sometimes needed when compiling specific subsets of the source.
-  #   HEADERS:=path to directory where all generated c-headers are written.
-  #   DEPENDS:=Extra dependecy
-  #   DISABLE_SJAVAC:=Explicitly disable the use of sjavac for this compilation unit.
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupJavaCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
+endef
+
+define SetupJavaCompilationInner
   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   $(call LogSetupMacroEntry,SetupJavaCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   $(if $(16),$(error Internal makefile error: Too many arguments to SetupJavaCompilation, please update JavaCompilation.gmk))
@@ -472,7 +438,7 @@
   # Make sure the dirs exist.
   $$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
   $$(eval $$(call MakeDir,$$($1_BIN)))
-  # Add all source roots to the find cache since we are likely going to run find 
+  # Add all source roots to the find cache since we are likely going to run find
   # on these more than once. The cache will only be updated if necessary.
   $$(eval $$(call FillCacheFind,$$($1_SRC)))
   # Find all files in the source trees. Preserve order of source roots for overrides to
--- a/make/common/MakeBase.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/MakeBase.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -380,6 +380,17 @@
   $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i))))))
 endef
 
+# Support macro for all SetupFoo macros.
+define EvalDebugWrapper
+  $(if $(DEBUG_$1),
+    $(info -------- <<< Begin expansion of $1)
+    $(info $2)
+    $(info -------- >>> End expansion of $1)
+  )
+
+  $2
+endef
+
 # Make directory without forking mkdir if not needed
 define MakeDir
   ifneq ($$(wildcard $1 $2 $3 $4 $5 $6 $7 $8 $9),$$(strip $1 $2 $3 $4 $5 $6 $7 $8 $9))
@@ -394,7 +405,7 @@
   # If the source and target parent directories are the same, recursive copy doesn't work
   # so we fall back on regular copy, which isn't preserving symlinks.
   define install-file
-	$(MKDIR) -p $(@D)
+	$(MKDIR) -p '$(@D)'
 	$(RM) '$@'
 	if [ "$(@D)" != "$(<D)" ]; then \
 	  $(CP) -f -r -P '$<' '$(@D)'; \
@@ -416,7 +427,7 @@
   # output dir. When these are copied again to images, xattr would fail. By only clearing
   # attributes when they are present, failing on this is avoided.
   define install-file
-	$(MKDIR) -p $(@D)
+	$(MKDIR) -p '$(@D)'
 	$(CP) -fRP '$<' '$@'
 	if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
   endef
@@ -424,7 +435,7 @@
   # Running mkdir and cp in the same shell speeds up copy intensive tasks in Cygwin
   # significantly.
   define install-file
-	$(MKDIR) -p $(@D) && $(CP) -fP '$<' '$@'
+	$(MKDIR) -p '$(@D)' && $(CP) -fP '$<' '$@'
   endef
 endif
 
--- a/make/common/Modules.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/Modules.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -46,8 +46,8 @@
   $(filter-out $(JAVA_MODULES_FILTER), $(sort $(notdir \
       $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir $(patsubst %/,%, $(dir \
       $(wildcard $(patsubst %,%/*/share/classes/*, $(ALL_TOP_SRC_DIRS)) \
-          $(patsubst %,%/*/$(OPENJDK_TARGET_OS_API_DIR)/classes/*, $(ALL_TOP_SRC_DIRS)) \
-          $(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
+          $(patsubst %,%/*/$(OPENJDK_TARGET_OS)/classes/*, $(ALL_TOP_SRC_DIRS)) \
+          $(patsubst %,%/*/$(OPENJDK_TARGET_OS_TYPE)/classes/*, $(ALL_TOP_SRC_DIRS))))))))))))
 endef
 
 # Find all modules with source for the target platform.
@@ -55,7 +55,7 @@
   $(sort $(filter-out 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_API_DIR), $(ALL_TOP_SRC_DIRS))))))))
+      $(patsubst %, %/*/$(OPENJDK_TARGET_OS_TYPE), $(ALL_TOP_SRC_DIRS))))))))
 endef
 
 ################################################################################
--- a/make/common/NON_CORE_PKGS.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/NON_CORE_PKGS.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -82,6 +82,8 @@
     com.sun.source.util \
     jdk
 
+NASHORNAPI_PKGS = jdk.nashorn.api.scripting
+
 SMARTCARDIO_PKGS = javax.smartcardio
 
 SCTPAPI_PKGS = com.sun.nio.sctp
--- a/make/common/NativeCompilation.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/NativeCompilation.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -34,17 +34,18 @@
   $(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
 endif
 
-ifneq ($(TOOLCHAIN_TYPE), microsoft)
-  COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
-  LINKING_MSG=echo $(LOG_INFO) "Linking $1"
-  LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
-  ARCHIVING_MSG=echo $(LOG_INFO) "Archiving $1"
-else
-  COMPILING_MSG=
-  LINKING_MSG=
-  LINKING_EXE_MSG=
-  ARCHIVING_MSG=
-endif
+# Extensions of files handled by this macro.
+NATIVE_SOURCE_EXTENSIONS := %.s %.c %.cpp %.m %.mm
+
+# Replaces native source extensions with the object file extension in a string.
+# Param 1: the string containing source file names with extensions
+# The surrounding strip is needed to keep additional whitespace out
+define replace_with_obj_extension
+$(strip \
+  $(foreach extension, $(NATIVE_SOURCE_EXTENSIONS), \
+      $(patsubst $(extension),%$(OBJ_SUFFIX),$(filter $(extension),$1))) \
+)
+endef
 
 ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
   UNIX_PATH_PREFIX := /cygdrive
@@ -52,6 +53,15 @@
   UNIX_PATH_PREFIX :=
 endif
 
+WINDOWS_SHOWINCLUDE_SED_PATTERN := \
+    -e '/^Note: including file:/!d' \
+    -e 's|Note: including file: *||' \
+    -e 's|\\|/|g' \
+    -e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
+    -e '/$(subst /,\/,$(TOPDIR))/!d' \
+    -e 's|$$$$| \\|g' \
+    #
+
 define add_native_source
   # param 1 = BUILD_MYPACKAGE
   # parma 2 = the source file name (..../alfa.c or .../beta.cpp)
@@ -60,7 +70,8 @@
   # param 5 = the c compiler
   # param 6 = the c++ flags to the compiler
   # param 7 = the c++ compiler
-  # param 8 = the flags to the assembler
+  # param 8 = the objc compiler
+  # param 9 = the flags to the assembler
 
   ifneq (,$$(filter %.c,$2))
     # Compile as a C file
@@ -70,25 +81,27 @@
   else ifneq (,$$(filter %.m,$2))
     # Compile as a objective-c file
     $1_$2_FLAGS=-x objective-c $4 $$($1_$(notdir $2)_CFLAGS) -DTHIS_FILE='"$$(<F)"' -c
-    $1_$2_COMP=$5
+    $1_$2_COMP=$8
     $1_$2_DEP_FLAG:=$(C_FLAG_DEPS)
   else ifneq (,$$(filter %.s,$2))
     # Compile as assembler file
-    $1_$2_FLAGS=$8 -DTHIS_FILE='"$$(<F)"'
+    $1_$2_FLAGS=$9 -DTHIS_FILE='"$$(<F)"'
     $1_$2_COMP=$(AS)
     $1_$2_DEP_FLAG:=
-  else
+  else ifneq (,$$(filter %.cpp,$2)$$(filter %.mm,$2))
     # Compile as a C++ file
     $1_$2_FLAGS=$6 $$($1_$(notdir $2)_CXXFLAGS) -DTHIS_FILE='"$$(<F)"' -c
     $1_$2_COMP=$7
     $1_$2_DEP_FLAG:=$(CXX_FLAG_DEPS)
+  else
+    $$(error Internal error in NativeCompilation.gmk: no compiler for file $2)
   endif
   # Generate the .o (.obj) file name and place it in the bin dir.
-  $1_$2_OBJ:=$3/$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $2)))))
+  $1_$2_OBJ := $3/$$(call replace_with_obj_extension, $$(notdir $2))
   # Only continue if this object file hasn't been processed already. This lets the first found
   # source file override any other with the same name.
-  ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_OBJS_SO_FAR)))
-    $1_OBJS_SO_FAR+=$$($1_$2_OBJ)
+  ifeq (,$$(findstring $$($1_$2_OBJ),$$($1_ALL_OBJS)))
+    $1_ALL_OBJS+=$$($1_$2_OBJ)
     ifeq (,$$(filter %.s,$2))
       # And this is the dependency file for this obj file.
       $1_$2_DEP:=$$(patsubst %$(OBJ_SUFFIX),%.d,$$($1_$2_OBJ))
@@ -101,9 +114,9 @@
       endif
     endif
 
-    $$($1_$2_OBJ) : $2
+    $$($1_$2_OBJ) : $2 | $$($1_BUILD_INFO)
+	$(ECHO) $(LOG_INFO) "Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET)))"
         ifneq ($(TOOLCHAIN_TYPE), microsoft)
-	  $$(call COMPILING_MSG,$2,$$($1_TARGET))
           # The Solaris studio compiler doesn't output the full path to the object file in the
           # generated deps files. Fixing it with sed. If compiling assembly, don't try this.
           ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio)
@@ -119,47 +132,52 @@
         ifeq ($(TOOLCHAIN_TYPE), microsoft)
 	  ($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
 	      $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
-	      | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
-	      && exit `cat $$($1_$2_DEP).exitvalue`
+	      | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v -e "^Note: including file:" \
+	      -e "^$(notdir $2)$$$$" ; exit `cat $$($1_$2_DEP).exitvalue`
 	  $(RM) $$($1_$2_DEP).exitvalue
 	  ($(ECHO) $$@: \\ \
-	  && $(SED) -e '/^Note: including file:/!d' \
-	      -e 's|Note: including file: *||' \
-	      -e 's|\\|/|g' \
-	      -e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
-	      -e '/$(subst /,\/,$(TOPDIR))/!d' \
-	      -e 's|$$$$| \\|g' \
-	      $$($1_$2_DEP).raw) > $$($1_$2_DEP)
+	  && $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_$2_DEP).raw) > $$($1_$2_DEP)
         endif
   endif
 endef
 
+# Setup make rules for creating a native binary (a shared library or an
+# executable).
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+#   SRC one or more directory roots to scan for C/C++ files.
+#   LANG C or C++
+#   CFLAGS the compiler flags to be used, used both for C and C++.
+#   CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
+#   LDFLAGS the linker flags to be used, used both for C and C++.
+#   LDFLAGS_SUFFIX the linker flags to be added last on the commandline
+#       typically the libraries linked to.
+#   ARFLAGS the archiver flags to be used
+#   OBJECT_DIR the directory where we store the object files
+#   LIBRARY the resulting library file
+#   PROGRAM the resulting exec file
+#   INCLUDES only pick source from these directories
+#   EXCLUDES do not pick source from these directories
+#   INCLUDE_FILES only compile exactly these files!
+#   EXCLUDE_FILES with these names
+#   EXTRA_FILES List of extra files not in any of the SRC dirs
+#   VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
+#   RC_FLAGS flags for RC.
+#   MAPFILE mapfile
+#   REORDER reorder file
+#   DEBUG_SYMBOLS add debug symbols (if configured on)
+#   CC the compiler to use, default is $(CC)
+#   LDEXE the linker to use for linking executables, default is $(LDEXE)
+#   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
 define SetupNativeCompilation
-  # param 1 is for example BUILD_MYPACKAGE
-  # param 2,3,4,5,6,7,8 are named args.
-  #   SRC one or more directory roots to scan for C/C++ files.
-  #   LANG C or C++
-  #   CFLAGS the compiler flags to be used, used both for C and C++.
-  #   CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
-  #   LDFLAGS the linker flags to be used, used both for C and C++.
-  #   LDFLAGS_SUFFIX the linker flags to be added last on the commandline
-  #       typically the libraries linked to.
-  #   ARFLAGS the archiver flags to be used
-  #   OBJECT_DIR the directory where we store the object files
-  #   LIBRARY the resulting library file
-  #   PROGRAM the resulting exec file
-  #   INCLUDES only pick source from these directories
-  #   EXCLUDES do not pick source from these directories
-  #   INCLUDE_FILES only compile exactly these files!
-  #   EXCLUDE_FILES with these names
-  #   VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
-  #   RC_FLAGS flags for RC.
-  #   MAPFILE mapfile
-  #   REORDER reorder file
-  #   DEBUG_SYMBOLS add debug symbols (if configured on)
-  #   CC the compiler to use, default is $(CC)
-  #   LDEXE the linker to use for linking executables, default is $(LDEXE)
-  #   OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST
+  $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupNativeCompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26)))
+endef
+
+define SetupNativeCompilationInner
   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26))
   $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk))
@@ -193,7 +211,11 @@
       $$(error LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
     endif
 
-    $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$(SHARED_LIBRARY_SUFFIX)
+    ifeq ($$($1_SUFFIX), )
+      $1_SUFFIX := $(SHARED_LIBRARY_SUFFIX)
+    endif
+
+    $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_LIBRARY)$$($1_SUFFIX)
     $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
     $1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_LIBRARY)
   endif
@@ -215,7 +237,11 @@
       $$(error STATIC_LIBRARY should be specified without LIBRARY_PREFIX: $(LIBRARY_PREFIX))
     endif
 
-    $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$(STATIC_LIBRARY_SUFFIX)
+    ifeq ($$($1_SUFFIX), )
+      $1_SUFFIX := $(STATIC_LIBRARY_SUFFIX)
+    endif
+
+    $1_BASENAME:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)$$($1_SUFFIX)
     $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
     $1_NOSUFFIX:=$(LIBRARY_PREFIX)$$($1_STATIC_LIBRARY)
   endif
@@ -233,7 +259,11 @@
       $$(error PROGRAM should be specified without EXE_SUFFIX: $(EXE_SUFFIX))
     endif
 
-    $1_BASENAME:=$$($1_PROGRAM)$(EXE_SUFFIX)
+    ifeq ($$($1_SUFFIX), )
+      $1_SUFFIX := $(EXE_SUFFIX)
+    endif
+
+    $1_BASENAME:=$$($1_PROGRAM)$$($1_SUFFIX)
     $1_TARGET:=$$($1_OUTPUT_DIR)/$$($1_BASENAME)
     $1_NOSUFFIX:=$$($1_PROGRAM)
   endif
@@ -249,11 +279,17 @@
     ifeq ($$($1_LDEXE),)
       $1_LDEXE:=$(LDEXE)
     endif
-    $1_LD:=$(LD)
+    ifeq ($$($1_LD),)
+      $1_LD:=$(LD)
+    endif
   else
     ifeq (C++,$$($1_LANG))
-      $1_LD:=$(LDCXX)
-      $1_LDEXE:=$(LDEXECXX)
+      ifeq ($$($1_LD),)
+        $1_LD:=$(LDCXX)
+      endif
+      ifeq ($$($1_LDEXE),)
+        $1_LDEXE:=$(LDEXECXX)
+      endif
     else
       $$(error Unknown native language $$($1_LANG) for $1)
     endif
@@ -262,6 +298,12 @@
   ifeq ($$($1_CC),)
     $1_CC:=$(CC)
   endif
+  ifeq ($$($1_CXX),)
+    $1_CXX:=$(CXX)
+  endif
+  ifeq ($$($1_OBJC),)
+    $1_OBJC:=$(OBJC)
+  endif
 
   # Make sure the dirs exist.
   $$(eval $$(call MakeDir,$$($1_OBJECT_DIR) $$($1_OUTPUT_DIR)))
@@ -275,7 +317,7 @@
   ifneq ($$($1_EXCLUDE_FILES),)
     $1_EXCLUDE_FILES:=$$(addprefix %,$$($1_EXCLUDE_FILES))
   endif
-  $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter %.s %.c %.cpp %.m,$$($1_ALL_SRCS)))
+  $1_SRCS := $$(filter-out $$($1_EXCLUDE_FILES),$$(filter $$(NATIVE_SOURCE_EXTENSIONS),$$($1_ALL_SRCS)))
   ifneq (,$$(strip $$($1_INCLUDE_FILES)))
     $1_SRCS := $$(filter $$($1_INCLUDE_FILES),$$($1_SRCS))
   endif
@@ -298,9 +340,12 @@
     $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
   endif
 
+  $1_SRCS += $$($1_EXTRA_FILES)
+
   # Calculate the expected output from compiling the sources (sort to remove duplicates. Also provides
   # a reproducable order on the input files to the linker).
-  $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$(patsubst %.cpp,%$(OBJ_SUFFIX),$$(patsubst %.c,%$(OBJ_SUFFIX),$$(patsubst %.m,%$(OBJ_SUFFIX),$$(patsubst %.s,%$(OBJ_SUFFIX),$$(notdir $$($1_SRCS))))))))
+  $1_EXPECTED_OBJS_FILENAMES := $$(call replace_with_obj_extension, $$(notdir $$($1_SRCS)))
+  $1_EXPECTED_OBJS:=$$(sort $$(addprefix $$($1_OBJECT_DIR)/,$$($1_EXPECTED_OBJS_FILENAMES)))
   # Are there too many object files on disk? Perhaps because some source file was removed?
   $1_SUPERFLOUS_OBJS:=$$(sort $$(filter-out $$($1_EXPECTED_OBJS),$$($1_BINS)))
   # Clean out the superfluous object files.
@@ -308,33 +353,33 @@
     $$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
   endif
 
-  # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
-  $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
+  # Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CFLAGS.
+  $1_EXTRA_CFLAGS:=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CFLAGS_$(OPENJDK_TARGET_OS))
   ifneq ($(DEBUG_LEVEL),release)
     # Pickup extra debug dependent variables for CFLAGS
     $1_EXTRA_CFLAGS+=$$($1_CFLAGS_debug)
-    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
     $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_debug)
   else
     $1_EXTRA_CFLAGS+=$$($1_CFLAGS_release)
-    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+    $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
     $1_EXTRA_CFLAGS+=$$($1_CFLAGS_$(OPENJDK_TARGET_OS)_release)
   endif
 
-  # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
-  $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
+  # Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables for CXXFLAGS.
+  $1_EXTRA_CXXFLAGS:=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_CXXFLAGS_$(OPENJDK_TARGET_OS))
   ifneq ($(DEBUG_LEVEL),release)
     # Pickup extra debug dependent variables for CXXFLAGS
     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_debug)
-    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_debug)
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_debug)
     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_debug)
   else
     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_release)
-    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_API)_release)
+    $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS_TYPE)_release)
     $1_EXTRA_CXXFLAGS+=$$($1_CXXFLAGS_$(OPENJDK_TARGET_OS)_release)
   endif
 
-  ifneq (,$$($1_DEBUG_SYMBOLS))
+  ifeq ($$($1_DEBUG_SYMBOLS), true)
     ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
       ifdef OPENJDK
         # Always add debug symbols
@@ -379,22 +424,38 @@
     $$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
   endif
 
-  # Add sys root specific cflags last
-  $1_EXTRA_CFLAGS += $(SYSROOT_CFLAGS)
-  $1_EXTRA_CXXFLAGS += $(SYSROOT_CFLAGS)
+  $1_BUILD_INFO := $$($1_OBJECT_DIR)/_build-info.marker
+
+  # Setup rule for printing progress info when compiling source files.
+  # This is a rough heuristic and may not always print accurate information.
+  $$($1_BUILD_INFO): $$($1_SRCS)
+        ifeq ($$(wildcard $$($1_TARGET)),)
+	  $(ECHO) 'Creating $$($1_BASENAME) from $$(words $$?) file(s)'
+        else
+	  $(ECHO) 'Updating $$($1_BASENAME) from $$(words $$?) file(s)'
+        endif
+	$(TOUCH) $$@
 
   # Now call add_native_source for each source file we are going to compile.
   $$(foreach p,$$($1_SRCS), \
       $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
-          $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
-          $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
+          $(SYSROOT_CFLAGS) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
+          $(SYSROOT_CFLAGS) $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$$($1_CXX),$$($1_OBJC),$$($1_ASFLAGS))))
 
   # On windows we need to create a resource file
   ifeq ($(OPENJDK_TARGET_OS), windows)
     ifneq (,$$($1_VERSIONINFO_RESOURCE))
       $1_RES:=$$($1_OBJECT_DIR)/$$($1_BASENAME).res
+      $1_RES_DEP:=$$($1_RES).d
+      -include $$($1_RES_DEP)
       $$($1_RES): $$($1_VERSIONINFO_RESOURCE)
+		$(ECHO) $(LOG_INFO) "Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$(notdir $$($1_TARGET)))"
 		$(RC) $$($1_RC_FLAGS) $(CC_OUT_OPTION)$$@ $$($1_VERSIONINFO_RESOURCE)
+                # Windows RC compiler does not support -showIncludes, so we mis-use CL for this.
+		$(CC) $$($1_RC_FLAGS) -showIncludes -nologo -TC \
+		    $(CC_OUT_OPTION)$$($1_RES_DEP).obj $$($1_VERSIONINFO_RESOURCE) > $$($1_RES_DEP).raw 2>&1 || exit 0
+		($(ECHO) $$($1_RES): \\ \
+		&& $(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEP).raw) > $$($1_RES_DEP)
     endif
     ifneq (,$$($1_MANIFEST))
       $1_GEN_MANIFEST:=$$($1_OBJECT_DIR)/$$($1_PROGRAM).manifest
@@ -420,20 +481,18 @@
     endif
   endif
 
-  # Pickup extra OPENJDK_TARGET_OS_API and/or OPENJDK_TARGET_OS dependent variables
+  # Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
   # for LDFLAGS and LDFLAGS_SUFFIX
-  $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
-  $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_API)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
+  $1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
+  $1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
   ifneq (,$$($1_REAL_MAPFILE))
     $1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
   endif
 
-  $1_EXTRA_LDFLAGS += $(SYSROOT_LDFLAGS)
-
   # Need to make sure TARGET is first on list
   $1 := $$($1_TARGET)
   ifeq ($$($1_STATIC_LIBRARY),)
-    ifneq ($$($1_DEBUG_SYMBOLS),)
+    ifeq ($$($1_DEBUG_SYMBOLS), true)
       ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
         ifneq ($(OPENJDK_TARGET_OS), macosx) # no MacOS X support yet
           ifneq ($$($1_OUTPUT_DIR),$$($1_OBJECT_DIR))
@@ -517,7 +576,7 @@
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_REAL_MAPFILE) \
         $$($1_DEBUGINFO_EXTRA_DEPS)
 		$$(call LINKING_MSG,$$($1_BASENAME))
-		$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
+		$$($1_LD) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(LD_OUT_OPTION)$$@ \
 		    $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
 		    $$($1_EXTRA_LDFLAGS_SUFFIX)
 		$$($1_CREATE_DEBUGINFO_CMDS)
@@ -532,7 +591,7 @@
   ifneq (,$$($1_STATIC_LIBRARY))
     # Generating a static library, ie object file archive.
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES)
-	$$(call ARCHIVING_MSG,$$($1_LIBRARY))
+	$(ECHO) $(LOG_INFO) "Archiving $$($1_STATIC_LIBRARY)"
 	$(AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
 	    $$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)
   endif
@@ -544,7 +603,7 @@
     $$($1_TARGET): $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_GEN_MANIFEST) \
         $$($1_DEBUGINFO_EXTRA_DEPS)
 		$$(call LINKING_EXE_MSG,$$($1_BASENAME))
-		$$($1_LDEXE) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
+		$$($1_LDEXE) $(SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $(EXE_OUT_OPTION)$$($1_TARGET) \
 		    $$($1_EXPECTED_OBJS) $$($1_RES) $$($1_LDFLAGS_SUFFIX) \
 		    $$($1_EXTRA_LDFLAGS_SUFFIX)
                 ifneq (,$$($1_GEN_MANIFEST))
--- a/make/common/RMICompilation.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/RMICompilation.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2014, 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
@@ -23,17 +23,26 @@
 # questions.
 #
 
+# Setup make rules for creating an RMI compilation.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+#   CLASSES:=List of classes to generate stubs for
+#   CLASSES_DIR:=Directory where to look for classes
+#   STUB_CLASSES_DIR:=Directory in where to put stub classes
+#   RUN_V11:=Set to run rmic with -v1.1
+#   RUN_V12:=Set to run rmic with -v1.2
+#   RUN_IIOP:=Set to run rmic with -iiop
+#   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
+#   KEEP_GENERATED:=Set to keep generated sources around
 define SetupRMICompilation
-  # param 1 is a name for a variable to depend on.
-  # param 2 and up are named args.
-  #   CLASSES:=List of classes to generate stubs for
-  #   CLASSES_DIR:=Directory where to look for classes
-  #   STUB_CLASSES_DIR:=Directory in where to put stub classes
-  #   RUN_V11:=Set to run rmic with -v1.1
-  #   RUN_V12:=Set to run rmic with -v1.2
-  #   RUN_IIOP:=Set to run rmic with -iiop
-  #   RUN_IIOP_STDPKG:=Set to run rmic with -iiop -standardPackage
-  #   KEEP_GENERATED:=Set to keep generated sources around
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupRMICompilationInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
+endef
+
+define SetupRMICompilationInner
   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
   $(call LogSetupMacroEntry,SetupRMICompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   $(if $(16),$(error Internal makefile error: Too many arguments to SetupRMICompilation, please update RMICompilation.gmk))
@@ -78,11 +87,9 @@
 
   $$($1_DEP_FILE): $$($1_CLASS_FILES)
 	$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
-	if [ "x$$($1_ARGS)" != "x" ]; then \
-	  $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
-	  $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-	      -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
-	fi;
+	$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
+	$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
+	    -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
 	if [ "x$$($1_ARGS2)" != "x" ]; then \
 	  $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
 	  $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
--- a/make/common/SetupJavaCompilers.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/SetupJavaCompilers.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -40,9 +40,9 @@
     JAVAC := $(JAVAC), \
     FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
 
-# Any java code executed during a JDK build to build other parts of the JDK must be 
-# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this 
-# purpose must be built with -target PREVIOUS for bootstrapping purposes, which 
+# Any java code executed during a JDK build to build other parts of the JDK must be
+# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
+# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
 # requires restricting to language level and api of previous JDK.
 #
 # The generate old bytecode javac setup uses the new compiler to compile for the
--- a/make/common/TextFileProcessing.gmk	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/common/TextFileProcessing.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -23,15 +23,9 @@
 # questions.
 #
 
-define EvalDebugWrapper
-  $(if $(DEBUG_$1),
-    $(info -------- <<< Begin expansion of $1)
-    $(info $2)
-    $(info -------- >>> End expansion of $1)
-  )
-    
-  $2
-endef
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including TextFileProcessing.gmk)
+endif
 
 # Helper function for SetupTextFileProcessing; adds a rule for a single file
 # to be processed.
@@ -52,18 +46,20 @@
   $1 += $(strip $3)/$(strip $4)
 endef
 
-# Setup a text file for processing, in which specified markers are replaced with
-# a given text, or with the contents of a given file.
+# Setup make rules for processing one or more text files, in which specified
+# markers are replaced with a given text, or with the contents of a given file.
 #
-# param 1 is the name space for this setup, e.g. BUILD_VERSION_FILE
-# param 2, 3, .. etc are named args:
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
 #   SOURCE_DIRS one or more directory roots to search for files to process
 #   SOURCE_FILES complete paths to one or more files to process
 #   OUTPUT_DIR the directory where we store the processed files.
 #   OUTPUT_FILE the name of the resulting file. Only allowed if processing a
 #       single file.
 #   SOURCE_BASE_DIR a common root to all SOURCE_DIRS.
-#       If specified, files will keep the path relative to the base in the 
+#       If specified, files will keep the path relative to the base in the
 #       OUTPUT_DIR. Otherwise, the hierarchy will be flattened into the OUTPUT_DIR.
 #   INCLUDE_FILES only include files matching these patterns (used only with
 #       SOURCE_DIRS)
@@ -77,9 +73,9 @@
 #   REPLACEMENTS one or more text replacement patterns, using the syntax:
 #       PATTERN => REPLACEMENT_TEXT ; ...
 #
-#   At least one of INCLUDES or REPLACEMENTS must be present. If both are
-#   present, then the includes will be processed first, and replacements will be
-#   done on the included fragments as well.
+#   If both INCLUDES or REPLACEMENTS are present, then the includes will be
+#   processed first, and replacements will be done on the included fragments as well.
+#   If neither is present, the files will just be copied without modifications.
 #
 define SetupTextFileProcessing
   $(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
@@ -91,10 +87,6 @@
   $(call LogSetupMacroEntry,SetupTextFileProcessing($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
   $(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
 
-  ifeq ($$($1_REPLACEMENTS)$$($1_INCLUDES),)
-    $$(error At least one of REPLACEMENTS or INCLUDES are required for $1)
-  endif
-
   ifneq ($$($1_SOURCE_FILES),)
     ifneq ($$($1_SOURCE_DIRS),)
       $$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
@@ -106,6 +98,9 @@
       $$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
     endif
   else
+    ifeq ($$($1_SOURCE_DIRS),)
+      $$(error Must specify either SOURCE_FILES or SOURCE_DIRS (in $1))
+    endif
     # Find all files in the source trees. Sort to remove duplicates.
     $$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \
         $$(error SOURCE_DIRS contains missing directory $$(src) (in $1))))
@@ -158,7 +153,7 @@
       $1_REPLACEMENTS += ;
     endif
 
-    # If we have a trailing ";", add a dummy replacement, since there is no easy 
+    # If we have a trailing ";", add a dummy replacement, since there is no easy
     # way to delete the last word in make.
     ifeq ($$(lastword $$($1_REPLACEMENTS)), ;)
       $1_REPLACEMENTS += DUMMY_REPLACEMENT => DUMMY_REPLACEMENT
@@ -167,11 +162,11 @@
     # Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command
     # line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/'
     # and ';' with '/" -e "s/', and adjusting for edge cases.
-    $1_REPLACEMENTS_COMMAND_LINE := $(SED) -e "s$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)" \
-        -e "s$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),//" \
-        -e "s$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)"
+    $1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)' \
+        -e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)' \
+        -e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)'
   else
-    # We don't have any replacements, just pipe the file through cat.  
+    # We don't have any replacements, just pipe the file through cat.
     $1_REPLACEMENTS_COMMAND_LINE := $(CAT)
   endif
 
@@ -180,8 +175,8 @@
     # Convert an INCLUDE like this PATTERN_1 => file1 ; PATTERN_2 => file2 ;
     # into an awk script fragment like this:
     # {
-    #   if (matches("PATTERN_1")) { include("file1") } else 
-    #   if (matches("PATTERN_2")) { include("file2") } else 
+    #   if (matches("PATTERN_1")) { include("file1") } else
+    #   if (matches("PATTERN_2")) { include("file2") } else
     #   print
     # }
 
@@ -194,12 +189,12 @@
     $1_INCLUDES_COMMAND_LINE := $(NAWK) '$$($1_INCLUDES_HEADER_AWK) \
         { if (matches("$$($1_INCLUDES_PARTIAL_AWK)") } else print }'
   else
-    # We don't have any includes, just pipe the file through cat.  
+    # We don't have any includes, just pipe the file through cat.
     $1_INCLUDES_COMMAND_LINE := $(CAT)
   endif
 
   # Reset target list before populating it
-  $1 := 
+  $1 :=
 
   ifneq ($$($1_OUTPUT_FILE),)
     ifneq ($$(words $$($1_SOURCE_FILES)), 1)
@@ -208,7 +203,7 @@
 
     # Note that $1 is space sensitive and must disobey whitespace rules
     $$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \
-        $$(dir $$($1_OUTPUT_FILE)), $$(notdir $$($1_OUTPUT_FILE))))
+        $$(patsubst %/, %, $$(dir $$($1_OUTPUT_FILE))), $$(notdir $$($1_OUTPUT_FILE))))
   else
     ifeq ($$($1_OUTPUT_DIR),)
       $$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1))
@@ -216,19 +211,20 @@
 
     # Now call add_native_source for each source file we are going to process.
     ifeq ($$($1_SOURCE_BASE_DIR),)
-      # With no base dir specified, put all files in target dir, flattening any 
+      # With no base dir specified, put all files in target dir, flattening any
       # hierarchies. Note that $1 is space sensitive and must disobey whitespace
       # rules.
       $$(foreach src, $$($1_SOURCE_FILES), \
           $$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
-              $$($1_OUTPUT_DIR), $$(notdir $$(src)))))
+              $$(patsubst %/, %, $$($1_OUTPUT_DIR)), $$(notdir $$(src)))))
     else
       # With a base dir, extract the relative portion of the path. Note that $1
       # is space sensitive and must disobey whitespace rules, and so is the
       # arguments to patsubst.
       $$(foreach src, $$($1_SOURCE_FILES), \
           $$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
-              $$($1_OUTPUT_DIR), $$(patsubst $$($1_SOURCE_BASE_DIR)/%,%,$$(src)))))
+              $$(patsubst %/, %, $$($1_OUTPUT_DIR)), \
+              $$(patsubst $$($1_SOURCE_BASE_DIR)/%,%,$$(src)))))
     endif
   endif
 endef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/ZipArchive.gmk	Thu Dec 04 15:21:09 2014 -0800
@@ -0,0 +1,122 @@
+#
+# Copyright (c) 2011, 2014, 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+ifndef _ZIP_ARCHIVE_GMK
+_ZIP_ARCHIVE_GMK := 1
+
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including ZipArchive.gmk)
+endif
+
+# Setup make rules for creating a zip archive.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# Remaining parameters are named arguments. These include:
+#   SRC
+#   ZIP
+#   INCLUDES
+#   INCLUDE_FILES
+#   EXCLUDES
+#   EXCLUDE_FILES
+#   SUFFIXES
+#   EXTRA_DEPS
+#   ZIP_OPTIONS extra options to pass to zip
+define SetupZipArchive
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update ZipArchive.gmk))
+  $(call EvalDebugWrapper,$(strip $1),$(call SetupZipArchiveInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
+endef
+
+define SetupZipArchiveInner
+  $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
+  $(call LogSetupMacroEntry,SetupZipArchive($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
+  $(if $(16),$(error Internal makefile error: Too many arguments to SetupZipArchive, please update JavaCompilation.gmk))
+
+  # To avoid running find over too large sets of files, which causes make to crash
+  # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
+  # of directories to run find in, if available.
+  ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
+    $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
+        $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
+  else
+    $1_FIND_LIST := $$($1_SRC)
+  endif
+
+  # Find all files in the source tree.
+  $1_ALL_SRCS := $$(call not-containing,_the.,$$(call CacheFind,$$($1_FIND_LIST)))
+
+  # Filter on suffixes if set
+  ifneq ($$($1_SUFFIXES),)
+    $1_ALL_SRCS := $$(filter $$(addprefix %, $$($1_SUFFIXES)), $$($1_ALL_SRCS))
+  endif
+
+  ifneq ($$($1_INCLUDES),)
+    ifneq ($$($1_SUFFIXES),)
+      $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
+          $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
+    else
+      $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
+    endif
+  endif
+  ifneq ($$($1_INCLUDE_FILES),)
+    $1_ZIP_INCLUDES += $$(addprefix -i$(SPACE),$$($1_INCLUDE_FILES))
+  endif
+  ifneq ($$($1_EXCLUDES),)
+    $1_ZIP_EXCLUDES := $$(addprefix -x$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_EXCLUDES)))
+    $1_SRC_EXCLUDES := $$(foreach i,$$($1_SRC),$$(addprefix $$i/,$$(addsuffix /%,$$($1_EXCLUDES))))
+    $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_ALL_SRCS))
+  endif
+  ifneq ($$($1_EXCLUDE_FILES),)
+    # Cannot precompute ZIP_EXCLUDE_FILES as it is dependent on which src root is being
+    # zipped at the moment.
+    $1_SRC_EXCLUDE_FILES := $$(addprefix %, $$($1_EXCLUDE_FILES)) $$($1_EXCLUDE_FILES)
+    $1_ALL_SRCS := $$(filter-out $$($1_SRC_EXCLUDE_FILES), $$($1_ALL_SRCS))
+  endif
+
+  # Use a slightly shorter name for logging, but with enough path to identify this zip.
+  $1_NAME:=$$(subst $$(OUTPUT_ROOT)/,,$$($1_ZIP))
+
+  # Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
+  # I.e. the zip -i and -x options should match the filtering done in the makefile.
+  # Explicitly excluded files can be given with absolute path. The patsubst solution
+  # isn't perfect but the likelyhood of an absolute path to match something in a src
+  # dir is very small.
+  # If zip has nothing to do, it returns 12 and would fail the build. Check for 12
+  # and only fail if it's not.
+  $$($1_ZIP) : $$($1_ALL_SRCS) $$($1_EXTRA_DEPS)
+	$(MKDIR) -p $$(@D)
+	$(ECHO) Updating $$($1_NAME)
+	$$(foreach i,$$($1_SRC),(cd $$i && $(ZIP) -qru $$($1_ZIP_OPTIONS) $$@ . $$($1_ZIP_INCLUDES) \
+	    $$($1_ZIP_EXCLUDES) -x \*_the.\* \
+	    $$(addprefix -x$(SPACE), $$(patsubst $$i/%,%, $$($1_EXCLUDE_FILES))) \
+	    || test "$$$$?" = "12" )$$(NEWLINE)) true
+	$(TOUCH) $$@
+
+  # Add zip to target list
+  $1 += $$($1_ZIP)
+endef
+
+endif # _ZIP_ARCHIVE_GMK
--- a/make/jprt.properties	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/jprt.properties	Thu Dec 04 15:21:09 2014 -0800
@@ -50,14 +50,18 @@
 jprt.build.flavor.fastdebug.target=jprt_bundle
 jprt.build.flavor.product.target=jprt_bundle
 jprt.build.flavor.productOpen.target=jprt_bundle
+jprt.build.flavor.optimized.target=jprt_bundle
+jprt.build.flavor.optimizedOpen.target=jprt_bundle
 
 # Use these configure args to define debug level
 jprt.debug.build.configure.args=--with-debug-level=slowdebug
 jprt.fastdebug.build.configure.args=--with-debug-level=fastdebug
 jprt.product.build.configure.args=--with-debug-level=release
+jprt.optimized.build.configure.args=--with-debug-level=optimized
 jprt.debugOpen.build.configure.args=${jprt.debug.build.configure.args} --enable-openjdk-only
 jprt.fastdebugOpen.build.configure.args=${jprt.fastdebug.build.configure.args} --enable-openjdk-only
 jprt.productOpen.build.configure.args=${jprt.product.build.configure.args} --enable-openjdk-only
+jprt.optimizedOpen.build.configure.args=${jprt.product.build.configure.args} --enable-openjdk-only
 
 # Select build flavors and build targets
 jprt.build.flavors=${my.is.hotspot.job ? ${my.build.flavors.hotspot} : ${my.build.flavors.default}}
@@ -150,7 +154,7 @@
     ${my.test.target.set:TESTNAME=jdk_lang},				\
     ${my.test.target.set:TESTNAME=jdk_math},				\
     ${my.test.target.set:TESTNAME=jdk_util}
-    
+
 # Default vm test targets (testset=core)
 my.test.targets.core=
 
@@ -230,18 +234,18 @@
 
 # The hotspot build flavors
 my.build.flavors.hotspot=						\
-    debugOpen,fastdebug,product,productOpen,				\
+    debugOpen,fastdebug,product,productOpen,optimized,optimizedOpen \
     ${my.additional.build.flavors.hotspot}
 
 # Platforms built for hotspot push jobs
 my.build.targets.hotspot=						\
-    solaris_sparcv9_5.11-{product|fastdebug|optimized},			\
+    solaris_sparcv9_5.11-{product|fastdebug},			\
     solaris_x64_5.11-{product|fastdebug},				\
     linux_i586_2.6-{product|fastdebug},					\
-    linux_x64_2.6-{product|fastdebug|optimized},			\
+    linux_x64_2.6-{product|fastdebug},			\
     macosx_x64_10.7-{product|fastdebug},				\
     windows_i586_6.1-{product|fastdebug},				\
-    windows_x64_6.1-{product|fastdebug|optimized},			\
+    windows_x64_6.1-{product|fastdebug},			\
     solaris_x64_5.11-{debugOpen},					\
     linux_x64_2.6-{productOpen},					\
     ${my.additional.build.targets.hotspot}
@@ -491,4 +495,5 @@
   ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime},		\
   ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_runtime_closed},	\
   ${my.make.rule.test.targets.hotspot.reg.group:GROUP=hotspot_serviceability},	\
+  ${my.make.rule.test.targets.hotspot.reg.group:GROUP=jdk_svc_sanity},		\
   ${my.additional.make.rule.test.targets.hotspot}
--- a/make/scripts/normalizer.pl	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/scripts/normalizer.pl	Thu Dec 04 15:21:09 2014 -0800
@@ -32,7 +32,7 @@
 
 if ($#ARGV < 0) {
     &usage;
-    
+
     die;
 }
 
@@ -99,7 +99,7 @@
 
     # Skip directories
     return if -d;
-    
+
     # Skip SCCS files
     return if ($filename =~ /\/SCCS\//);
 
@@ -121,18 +121,18 @@
     chdir $dirname;
 
     open(FILE, $filename) or die "Failed while open $filename: $!\n";
-    
+
     # Read file
     my @content;
     my $line;
     my $emptylinescount = 0;
     my $modified = 0;
-    
+
     while ($line = <FILE>) {
         my $originalline = $line;
 
         # Process line
-        
+
         # Remove from the end of the line spaces and return character
         while ($line =~ /\s$/) {
             chop($line);
@@ -144,16 +144,16 @@
                 $line = substr($line, 0, $i) . $tabvalues[7 - ($i % 8)] . substr($line, $i + 1);
             }
         }
-        
+
         if (length($line) == 0) {
             $emptylinescount++;
         } else {
             while ($emptylinescount > 0) {
                 push(@content, "");
-                
+
                 $emptylinescount--;
             }
-            
+
             push(@content, $line);
         }
 
@@ -162,23 +162,23 @@
         }
 
     }
-    
+
     $allfiles++;
-    
+
     if ($emptylinescount > 0) {
         $modified = 1;
     }
 
     close(FILE);
-    
+
     if ($modified != 0) {
         # Write file
         open(FILE, ">$filename") or die "Failed while open $filename: $!\n";
-    
+
         for (my $i = 0; $i <= $#content; $i++) {
             print FILE "$content[$i]\n";
         }
-    
+
         close(FILE);
 
         # Print name from current dir
@@ -204,5 +204,3 @@
     print "Examples:\n";
     print "  normalizer.pl -e c,cpp,h,hpp .\n";
 }
-
-
--- a/make/scripts/update_copyright_year.sh	Thu Dec 04 12:58:11 2014 -0800
+++ b/make/scripts/update_copyright_year.sh	Thu Dec 04 15:21:09 2014 -0800
@@ -196,4 +196,3 @@
 # Cleanup
 rm -f -r ${tmp}
 exit 0
-