changeset 36615:c744e3b0f8c5

Merge
author chegar
date Tue, 22 Mar 2016 10:43:58 +0000
parents 65c9e1e09863 a6614ff7bf09
children 5172e3dd60f2
files hotspot/src/jdk.vm.ci/share/classes/META-INF/services/jdk.vm.ci.hotspot.HotSpotJVMCIBackendFactory hotspot/src/share/vm/classfile/vmSymbols.hpp hotspot/src/share/vm/oops/method.cpp hotspot/src/share/vm/opto/library_call.cpp hotspot/src/share/vm/prims/nativeLookup.cpp hotspot/src/share/vm/runtime/arguments.cpp hotspot/test/compiler/jsr292/NonInlinedCall/NonInlinedReinvoker.java hotspot/test/compiler/jvmci/common/CompilerToVMHelper.java hotspot/test/compiler/jvmci/common/PublicMetaspaceWrapperObject.java hotspot/test/compiler/jvmci/events/MetaAccessWrapper.java hotspot/test/runtime/BadObjectClass/Object.java hotspot/test/testlibrary/jdk/test/lib/PerfCounter.java hotspot/test/testlibrary/jdk/test/lib/PerfCounters.java jdk/make/gendata/Gendata-jdk.jdeps.gmk jdk/make/gensrc/Gensrc-jdk.dev.gmk jdk/make/gensrc/Gensrc-jdk.jvmstat.gmk jdk/make/launcher/Launcher-jdk.dev.gmk jdk/make/scripts/localelist.sh jdk/make/src/classes/build/tools/module/GenJdepsModulesXml.java jdk/make/src/classes/build/tools/module/GenModulesList.java jdk/make/src/classes/build/tools/module/ImageBuilder.java jdk/make/src/classes/build/tools/module/ModuleArchive.java jdk/make/src/classes/build/tools/module/boot.modules jdk/make/src/classes/build/tools/module/ext.modules jdk/src/java.base/share/classes/jdk/internal/jimage/Archive.java jdk/src/java.base/share/classes/jdk/internal/jimage/BasicImageWriter.java jdk/src/java.base/share/classes/jdk/internal/jimage/ExternalFilesWriter.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageFileCreator.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageJavaSubstrate.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageLocationBase.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageLocationWriter.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageModuleData.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageModuleDataWriter.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageNativeSubstrate.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageResourcesTree.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageStringsWriter.java jdk/src/java.base/share/classes/jdk/internal/jimage/ImageSubstrate.java jdk/src/java.base/share/classes/jdk/internal/jimage/PerfectHashBuilder.java jdk/src/java.base/share/classes/jdk/internal/jimage/ResourcePool.java jdk/src/java.base/share/classes/jdk/internal/jimage/ResourcePoolImpl.java jdk/src/java.base/share/classes/jdk/internal/jimage/StringTable.java jdk/src/java.base/share/classes/jdk/internal/jimage/UTF8String.java jdk/src/java.base/share/classes/sun/misc/Launcher.java jdk/src/java.base/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template jdk/src/java.base/share/native/libjava/Package.c jdk/src/java.base/share/native/libjava/Proxy.c jdk/src/java.base/share/native/libjimage/ImageNativeSubstrate.cpp jdk/src/java.desktop/share/classes/META-INF/services/java.net.ContentHandlerFactory jdk/src/java.desktop/share/classes/META-INF/services/javax.print.PrintServiceLookup jdk/src/java.desktop/share/classes/META-INF/services/javax.print.StreamPrintServiceFactory jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.midi.spi.MidiDeviceProvider jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.midi.spi.MidiFileReader jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.midi.spi.MidiFileWriter jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.midi.spi.SoundbankReader jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.sampled.spi.AudioFileReader jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.sampled.spi.AudioFileWriter jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.sampled.spi.FormatConversionProvider jdk/src/java.desktop/share/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider jdk/src/java.desktop/share/classes/META-INF/services/sun.datatransfer.DesktopDatatransferService jdk/src/java.logging/share/classes/META-INF/services/jdk.internal.logger.DefaultLoggerFinder jdk/src/java.security.jgss/share/classes/META-INF/services/sun.security.ssl.ClientKeyExchangeService jdk/src/jdk.accessibility/windows/classes/META-INF/services/javax.accessibility.AccessibilityProvider jdk/src/jdk.attach/share/classes/META-INF/services/com.sun.tools.attach.spi.AttachProvider jdk/src/jdk.charsets/share/classes/META-INF/services/java.nio.charset.spi.CharsetProvider jdk/src/jdk.dev/share/classes/jdk/tools/jimage/ExtractedImage.java jdk/src/jdk.dev/share/classes/jdk/tools/jimage/JImageTask.java jdk/src/jdk.dev/share/classes/jdk/tools/jimage/Main.java jdk/src/jdk.dev/share/classes/jdk/tools/jimage/TaskHelper.java jdk/src/jdk.dev/share/classes/jdk/tools/jimage/resources/jimage.properties jdk/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector jdk/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.spi.TransportService jdk/src/jdk.jvmstat.rmi/share/classes/META-INF/services/sun.jvmstat.monitor.MonitoredHostService jdk/src/jdk.jvmstat/share/classes/META-INF/services/sun.jvmstat.monitor.MonitoredHostService jdk/src/jdk.localedata/share/classes/META-INF/services/sun.util.locale.provider.LocaleDataMetaInfo jdk/src/jdk.management/share/classes/META-INF/services/sun.management.spi.PlatformMBeanProvider jdk/src/jdk.naming.dns/share/classes/META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor jdk/src/jdk.zipfs/share/classes/META-INF/services/java.nio.file.spi.FileSystemProvider jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/java/net/MyDatagramSocketImplFactory.java jdk/test/java/net/httpclient/whitebox/TEST.properties jdk/test/java/net/httpclient/whitebox/java/net/http/SelectorTest.java jdk/test/java/util/stream/bootlib/TEST.properties jdk/test/jdk/internal/jimage/ExecutableTest.java jdk/test/jdk/internal/jimage/JImageTest.java jdk/test/jdk/internal/jimage/VerifyJimage.java jdk/test/sun/security/krb5/config/NamingManager.java jdk/test/sun/security/krb5/config/dns.sh jdk/test/sun/security/mscapi/IsSunMSCAPIAvailable.sh jdk/test/sun/security/ssl/StatusStapling/BogusStatusRequest.java jdk/test/sun/security/ssl/StatusStapling/CertStatusReqExtensionTests.java jdk/test/sun/security/ssl/StatusStapling/CertStatusReqItemV2Tests.java jdk/test/sun/security/ssl/StatusStapling/CertStatusReqListV2ExtensionTests.java jdk/test/sun/security/ssl/StatusStapling/OCSPStatusRequestTests.java jdk/test/sun/security/ssl/StatusStapling/StatusResponseManagerTests.java jdk/test/sun/security/ssl/StatusStapling/TestCase.java jdk/test/sun/security/ssl/StatusStapling/TestUtils.java langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/sym/CreateSymbols.java langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/sym/Profiles.java langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/ServiceLoader.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractProfileIndexWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfileWriterImpl.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ProfilePackageSummaryWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/ProfileSummaryWriter.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfilePackageSummaryBuilder.java langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ProfileSummaryBuilder.java langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ModulesXmlReader.java langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/PlatformClassPath.java langtools/test/com/sun/javadoc/testLinkOption/java/lang/StringBuilderChild.java langtools/test/com/sun/javadoc/testLinkOption/package-list langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java langtools/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java langtools/test/com/sun/javadoc/testProfiles/pkg1/Class1Pkg1.java langtools/test/com/sun/javadoc/testProfiles/pkg1/Class2Pkg1.java langtools/test/com/sun/javadoc/testProfiles/pkg1/Class3Pkg1.java langtools/test/com/sun/javadoc/testProfiles/pkg1/Interface1Pkg1.java langtools/test/com/sun/javadoc/testProfiles/pkg2/Anno1Pkg2.java langtools/test/com/sun/javadoc/testProfiles/pkg2/Anno2Pkg2.java langtools/test/com/sun/javadoc/testProfiles/pkg2/Class1Pkg2.java langtools/test/com/sun/javadoc/testProfiles/pkg2/ClassError.java langtools/test/com/sun/javadoc/testProfiles/pkg2/ClassException.java langtools/test/com/sun/javadoc/testProfiles/pkg3/Class1Pkg3.java langtools/test/com/sun/javadoc/testProfiles/pkg3/Class2Pkg3.java langtools/test/com/sun/javadoc/testProfiles/pkg3/Interface1Pkg3.java langtools/test/com/sun/javadoc/testProfiles/pkg4/Anno1Pkg4.java langtools/test/com/sun/javadoc/testProfiles/pkg4/Class1Pkg4.java langtools/test/com/sun/javadoc/testProfiles/pkg5/Class1Pkg5.java langtools/test/com/sun/javadoc/testProfiles/pkg5/Interface1Pkg5.java langtools/test/com/sun/javadoc/testProfiles/pkgDeprecated/Class1PkgDeprecated.java langtools/test/com/sun/javadoc/testProfiles/pkgDeprecated/package-info.java langtools/test/com/sun/javadoc/testProfiles/profile-rtjar-includes-nopkgs.txt langtools/test/com/sun/javadoc/testProfiles/profile-rtjar-includes.txt langtools/test/jdk/javadoc/doclet/testLinkOption/java/lang/StringBuilderChild.java langtools/test/jdk/javadoc/doclet/testLinkOption/package-list langtools/test/tools/javac/Object1.java langtools/test/tools/javac/Object1.out langtools/test/tools/javac/Object2.java langtools/test/tools/javac/Object2.out langtools/test/tools/javac/profiles/ProfileTest.java langtools/test/tools/javac/proprietary/WarnClass.java langtools/test/tools/javac/proprietary/WarnClass.out langtools/test/tools/javac/proprietary/WarnImport.java langtools/test/tools/javac/proprietary/WarnImport.out langtools/test/tools/javac/proprietary/WarnMethod.java langtools/test/tools/javac/proprietary/WarnMethod.out langtools/test/tools/javac/proprietary/WarnStaticImport.java langtools/test/tools/javac/proprietary/WarnStaticImport.out langtools/test/tools/javac/proprietary/WarnVariable.java langtools/test/tools/javac/proprietary/WarnVariable.out langtools/test/tools/javac/proprietary/WarnWildcard.java langtools/test/tools/javac/proprietary/WarnWildcard.out langtools/test/tools/javac/synthesize/Boolean.java langtools/test/tools/javac/synthesize/Byte.java langtools/test/tools/javac/synthesize/Character.java langtools/test/tools/javac/synthesize/Cloneable.java langtools/test/tools/javac/synthesize/Double.java langtools/test/tools/javac/synthesize/Float.java langtools/test/tools/javac/synthesize/Integer.java langtools/test/tools/javac/synthesize/Long.java langtools/test/tools/javac/synthesize/Number.java langtools/test/tools/javac/synthesize/Object.java langtools/test/tools/javac/synthesize/Serializable.java langtools/test/tools/javac/synthesize/Short.java langtools/test/tools/javac/synthesize/Test.java langtools/test/tools/javac/synthesize/Void.java langtools/test/tools/jdeps/VerboseFormat/use/indirect/DontUseUnsafe2.java langtools/test/tools/jdeps/VerboseFormat/use/indirect/UseUnsafeIndirectly.java langtools/test/tools/jdeps/VerboseFormat/use/indirect2/DontUseUnsafe3.java langtools/test/tools/jdeps/VerboseFormat/use/indirect2/UseUnsafeIndirectly2.java langtools/test/tools/jdeps/VerboseFormat/use/unsafe/DontUseUnsafe.java langtools/test/tools/jdeps/VerboseFormat/use/unsafe/UseClassWithUnsafe.java langtools/test/tools/jdeps/VerboseFormat/use/unsafe/UseUnsafeClass.java langtools/test/tools/jdeps/VerboseFormat/use/unsafe/UseUnsafeClass2.java langtools/test/tools/jdeps/javax/activity/NotCompactProfile.java make/CheckModules.gmk make/GenerateModuleDeps.gmk modules.xml nashorn/src/jdk.scripting.nashorn/share/classes/META-INF/MANIFEST.MF nashorn/src/jdk.scripting.nashorn/share/classes/META-INF/services/javax.script.ScriptEngineFactory
diffstat 2571 files changed, 148266 insertions(+), 34204 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Mar 15 14:48:45 2016 -0700
+++ b/.hgtags	Tue Mar 22 10:43:58 2016 +0000
@@ -352,3 +352,4 @@
 1c076468bf7dad5b8f2ee5dcf66e2279caa3e208 jdk-9+107
 257b579d813201682931d6b42f0445ffe5b4210d jdk-9+108
 c870cb782aca71093d2584376f27f0cfbfec0e3a jdk-9+109
+4a95f4b1bd8bfce85dc02a593896749feab96c34 jdk-9+110
--- a/.hgtags-top-repo	Tue Mar 15 14:48:45 2016 -0700
+++ b/.hgtags-top-repo	Tue Mar 22 10:43:58 2016 +0000
@@ -352,3 +352,4 @@
 4d65eba233a8730f913734a6804910b842d2cb54 jdk-9+107
 c7be2a78c31b3b6132f2f5e9e4b3d3bb1c20245c jdk-9+108
 1787bdaabb2b6f4193406e25a50cb0419ea8e8f3 jdk-9+109
+925be13b3740d07a5958ccb5ab3c0ae1baba7055 jdk-9+110
--- a/common/autoconf/basics.m4	Tue Mar 15 14:48:45 2016 -0700
+++ b/common/autoconf/basics.m4	Tue Mar 22 10:43:58 2016 +0000
@@ -843,6 +843,8 @@
   AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
   # The bootcycle-spec.gmk file contains support for boot cycle builds.
   AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
+  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
+  AC_CONFIG_FILES([$OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in])
   # The compare.sh is used to compare the build output to other builds.
   AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
   # The generated Makefile knows where the spec.gmk is and where the source is.
--- a/common/autoconf/boot-jdk.m4	Tue Mar 15 14:48:45 2016 -0700
+++ b/common/autoconf/boot-jdk.m4	Tue Mar 22 10:43:58 2016 +0000
@@ -304,6 +304,18 @@
   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
   AC_SUBST(BOOT_JDK_SOURCETARGET)
+
+  ADD_JVM_ARG_IF_OK([-Xpatch:], dummy, [$JAVA])
+  AC_MSG_CHECKING([if Boot JDK supports modules])
+  if test "x$JVM_ARG_OK" = "xtrue"; then
+    AC_MSG_RESULT([yes])
+    BOOT_JDK_MODULAR="true"
+  else
+    AC_MSG_RESULT([no])
+    BOOT_JDK_MODULAR="false"
+  fi
+  AC_SUBST(BOOT_JDK_MODULAR)
+
   AC_SUBST(JAVAC_FLAGS)
 
   # Check if the boot jdk is 32 or 64 bit
@@ -397,3 +409,100 @@
   done
   AC_SUBST(JAVA_TOOL_FLAGS_SMALL)
 ])
+
+# BUILD_JDK: the location of the latest JDK that can run
+#   on the host system and supports the target class file version
+#   generated in this JDK build.  This variable should only be
+#   used after the launchers are built.
+#
+
+# Execute the check given as argument, and verify the result.
+# If the JDK was previously found, do nothing.
+# $1 A command line (typically autoconf macro) to execute
+AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
+[
+  if test "x$BUILD_JDK_FOUND" = xno; then
+    # Execute the test
+    $1
+
+    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
+    if test "x$BUILD_JDK_FOUND" = xmaybe; then
+      # Do we have a bin/java?
+      if test ! -x "$BUILD_JDK/bin/java"; then
+        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring])
+        BUILD_JDK_FOUND=no
+      elif test ! -x "$BUILD_JDK/bin/jlink"; then
+        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring])
+        BUILD_JDK_FOUND=no
+      elif test ! -x "$BUILD_JDK/bin/javac"; then
+        # Do we have a bin/javac?
+        AC_MSG_NOTICE([Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring])
+        AC_MSG_NOTICE([(This might be a JRE instead of an JDK)])
+        BUILD_JDK_FOUND=no
+      else
+        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
+        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
+
+        # Extra M4 quote needed to protect [] in grep expression.
+        [FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | grep  '\"1\.[9]\.'`]
+        if test "x$FOUND_CORRECT_VERSION" = x; then
+          AC_MSG_NOTICE([Potential Boot JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring])
+          AC_MSG_NOTICE([(Your Build JDK must be version 9)])
+          BUILD_JDK_FOUND=no
+        else
+          # We're done!
+          BUILD_JDK_FOUND=yes
+          BASIC_FIXUP_PATH(BUILD_JDK)
+          AC_MSG_CHECKING([for Build JDK])
+          AC_MSG_RESULT([$BUILD_JDK])
+          AC_MSG_CHECKING([Build JDK version])
+          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
+          AC_MSG_RESULT([$BUILD_JDK_VERSION])
+        fi # end check jdk version
+      fi # end check java
+    fi # end check build jdk found
+  fi
+])
+
+# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
+# is different than the host system doing the build (e.g. cross-compilation),
+# a special BUILD_JDK is built as part of the build process.  An external
+# prebuilt BUILD_JDK can also be supplied.
+AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
+[
+  AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
+      [path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
+
+  CREATE_BUILDJDK_FOR_HOST=false
+  BUILD_JDK_FOUND="no"
+  if test "x$with_build_jdk" != "x"; then
+    BOOTJDK_CHECK_BUILD_JDK([
+       if test "x$with_build_jdk" != x; then
+         BUILD_JDK=$with_build_jdk
+         BUILD_JDK_FOUND=maybe
+         AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
+       fi])
+  else
+    if test "x$COMPILE_TYPE" = "xcross"; then
+      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
+      BUILD_JDK_FOUND=yes
+      CREATE_BUILDJDK=true
+      AC_MSG_CHECKING([for Build JDK])
+      AC_MSG_RESULT([yes, will build it for the host platform])
+    else
+      BUILD_JDK="\$(JDK_OUTPUTDIR)"
+      BUILD_JDK_FOUND=yes
+      AC_MSG_CHECKING([for Build JDK])
+      AC_MSG_RESULT([yes, will use output dir])
+    fi
+  fi
+
+  if test "x$BUILD_JDK_FOUND" != "xyes"; then
+    AC_MSG_CHECKING([for Build JDK])
+    AC_MSG_RESULT([no])
+    AC_MSG_ERROR([Could not find a suitable Build JDK])
+  fi
+
+  AC_SUBST(CREATE_BUILDJDK)
+  AC_SUBST(BUILD_JDK)
+])
--- a/common/autoconf/bootcycle-spec.gmk.in	Tue Mar 15 14:48:45 2016 -0700
+++ b/common/autoconf/bootcycle-spec.gmk.in	Tue Mar 22 10:43:58 2016 +0000
@@ -25,6 +25,8 @@
 
 # Support for building boot cycle builds
 
+BOOT_JDK_MODULAR := true
+
 # First include the real base spec.gmk file
 include @SPEC@
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/common/autoconf/buildjdk-spec.gmk.in	Tue Mar 22 10:43:58 2016 +0000
@@ -0,0 +1,148 @@
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# 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.
+#
+
+# This spec file is used to compile a BUILD_JDK while cross compiling. The
+# BUILD_JDK runs on the build/host platform and is of the same version as
+# the main build.
+
+# First include the real base spec.gmk file
+include @SPEC@
+
+CC := @BUILD_CC@
+CXX := @BUILD_CXX@
+LD := @BUILD_LD@
+AS := @BUILD_AS@
+NM := @BUILD_NM@
+AR := @BUILD_AR@
+OBJCOPY := @BUILD_OBJCOPY@
+STRIP := @BUILD_STRIP@
+SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
+SYSROOT_LDFLAGS := @BUILD_SYSROOT_LDFLAGS@
+
+# These directories should not be moved to BUILDJDK_OUTPUTDIR
+HOTSPOT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_OUTPUTDIR))
+HOTSPOT_DIST := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_DIST))
+SUPPORT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(SUPPORT_OUTPUTDIR))
+JDK_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(JDK_OUTPUTDIR))
+
+OPENJDK_BUILD_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
+OPENJDK_BUILD_CPU_LEGACY_LIB := @OPENJDK_BUILD_CPU_LEGACY_LIB@
+OPENJDK_BUILD_CPU_LIBDIR := @OPENJDK_BUILD_CPU_LIBDIR@
+OPENJDK_TARGET_CPU_LIBDIR := @OPENJDK_BUILD_CPU_LIBDIR@
+OPENJDK_TARGET_CPU := @OPENJDK_BUILD_CPU@
+OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@
+OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
+OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
+OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
+
+CFLAGS_JDKLIB := @OPENJDK_BUILD_CFLAGS_JDKLIB@
+CXXFLAGS_JDKLIB := @OPENJDK_BUILD_CXXFLAGS_JDKLIB@
+LDFLAGS_JDKLIB := @OPENJDK_BUILD_LDFLAGS_JDKLIB@
+CFLAGS_JDKEXE := @OPENJDK_BUILD_CFLAGS_JDKEXE@
+CXXFLAGS_JDKEXE := @OPENJDK_BUILD_CXXFLAGS_JDKEXE@
+LDFLAGS_JDKEXE := @OPENJDK_BUILD_LDFLAGS_JDKEXE@
+OPENJDK_TARGET_CPU_JLI_CFLAGS := @OPENJDK_BUILD_CPU_JLI_CFLAGS@
+
+# The compiler for the build platform is likely not warning compatible with the official
+# compiler.
+WARNINGS_AS_ERRORS := false
+DISABLE_WARNING_PREFIX := @BUILD_CC_DISABLE_WARNING_PREFIX@
+
+# Save speed and disk space by not enabling debug symbols for the buildjdk
+ENABLE_DEBUG_SYMBOLS := false
+
+####################################################
+#
+# Legacy Hotspot support
+
+# Legacy setting: OPT or DBG
+VARIANT := OPT
+# Legacy setting: true or false
+FASTDEBUG := false
+# Legacy setting: debugging the class files?
+DEBUG_CLASSFILES := false
+
+# Some users still set EXTRA_*FLAGS on the make command line. Must
+# make sure to override that when building buildjdk.
+override EXTRA_CFLAGS :=
+override EXTRA_CXXFLAGS :=
+override EXTRA_LDFLAGS :=
+
+# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
+# compiler that produces code that can be run on the build platform.
+HOSTCC := $(BUILD_CC)
+HOSTCXX := $(BUILD_CXX)
+
+# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
+PLATFORM := $(OPENJDK_BUILD_OS)
+# 32 or 64 bit
+ARCH_DATA_MODEL := $(OPENJDK_BUILD_CPU_BITS)
+
+ALT_BOOTDIR := $(BOOT_JDK)
+# Yet another name for arch used for an extra subdir below the jvm lib.
+# Uses i386 and amd64, instead of x86 and x86_64.
+LIBARCH := @OPENJDK_BUILD_CPU_LEGACY_LIB@
+# Set the cpu architecture. Some users still set ARCH on the make command line. Must
+# make sure to override that when building buildjdk.
+override ARCH := $(OPENJDK_BUILD_CPU_ARCH)
+# Legacy setting for building for a 64 bit machine.
+# If yes then this expands to _LP64 := 1
+ifeq ($(OPENJDK_BUILD_CPU_BITS), 64)
+  _LP64 := 1
+endif
+
+ALT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)
+ALT_EXPORT_PATH := $(HOTSPOT_DIST)
+
+JVM_INTERPRETER := @JVM_INTERPRETER@
+ifeq ($(JVM_INTERPRETER), cpp)
+  CC_INTERP=true
+endif
+
+HOTSPOT_MAKE_ARGS := product docs export_product
+# Control wether Hotspot runs Queens test after building
+TEST_IN_BUILD := false
+
+USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
+
+# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
+# creation.
+FULL_DEBUG_SYMBOLS := 0
+ZIP_DEBUGINFO_FILES := 0
+# Disable stripping
+STRIP_POLICY := none
+
+JVM_VARIANTS := server
+JVM_VARIANT_SERVER := true
+JVM_VARIANT_CLIENT := false
+JVM_VARIANT_MINIMAL1 := false
+JVM_VARIANT_KERNEL := false
+JVM_VARIANT_ZERO := false
+JVM_VARIANT_ZEROSHARK := false
+JVM_VARIANT_CORE := false
+
+# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
+# This is needed to get the LOG setting to work properly.
+include $(SRC_ROOT)/make/common/MakeBase.gmk
--- a/common/autoconf/configure.ac	Tue Mar 15 14:48:45 2016 -0700
+++ b/common/autoconf/configure.ac	Tue Mar 22 10:43:58 2016 +0000
@@ -134,6 +134,7 @@
 
 # We need build & target for this.
 JDKOPT_SETUP_JDK_OPTIONS
+JDKOPT_SETUP_JLINK_OPTIONS
 HOTSPOT_SETUP_HOTSPOT_OPTIONS
 JDKVER_SETUP_JDK_VERSION_NUMBERS
 
@@ -144,6 +145,7 @@
 ###############################################################################
 
 BOOTJDK_SETUP_BOOT_JDK
+BOOTJDK_SETUP_BUILD_JDK
 
 ###############################################################################
 #
@@ -155,6 +157,8 @@
 SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS
 SRCDIRS_SETUP_OUTPUT_DIRS
 
+SRCDIRS_SETUP_IMPORT_MODULES
+
 ###############################################################################
 #
 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
--- a/common/autoconf/flags.m4	Tue Mar 15 14:48:45 2016 -0700
+++ b/common/autoconf/flags.m4	Tue Mar 22 10:43:58 2016 +0000
@@ -689,9 +689,6 @@
       ;;
   esac
 
-  # Setup LP64
-  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
-
   # Set some common defines. These works for all compilers, but assume
   # -D is universally accepted.
 
@@ -722,7 +719,12 @@
   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
 
   # Setup target CPU
-  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
+  OPENJDK_TARGET_CCXXFLAGS_JDK="$OPENJDK_TARGET_CCXXFLAGS_JDK \
+      $ADD_LP64 \
+      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
+  OPENJDK_BUILD_CCXXFLAGS_JDK="$OPENJDK_BUILD_CCXXFLAGS_JDK \
+      $OPENJDK_BUILD_ADD_LP64 \
+      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
 
   # Setup debug/release defines
   if test "x$DEBUG_LEVEL" = xrelease; then
@@ -766,17 +768,35 @@
       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
 
   # The shared libraries are compiled using the picflag.
-  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
-  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
+  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
+      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
+  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
+      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
 
   # Executable flags
-  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
-  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
+  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \
+      $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
+  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $OPENJDK_TARGET_CCXXFLAGS_JDK \