From bc3ed7bdb49dc26f2ce284f0827fe2a040118dd7 Mon Sep 17 00:00:00 2001
From: Erik Joelsson <erikj@openjdk.org>
Date: Mon, 20 Apr 2020 10:38:16 -0700
Subject: [PATCH] 8242863: Bump minimum boot jdk to JDK 14

Reviewed-by: ihse, jlahoda, dholmes
---
 make/autoconf/boot-jdk.m4     |  4 +++-
 make/autoconf/version-numbers |  2 +-
 make/conf/jib-profiles.js     | 17 +++++++++++------
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/make/autoconf/boot-jdk.m4 b/make/autoconf/boot-jdk.m4
index 841f0e9bbe7..71f7584313f 100644
--- a/make/autoconf/boot-jdk.m4
+++ b/make/autoconf/boot-jdk.m4
@@ -345,7 +345,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
 
   # When compiling code to be executed by the Boot JDK, force compatibility with the
   # oldest supported bootjdk.
-  BOOT_JDK_SOURCETARGET="-source 13 -target 13"
+  OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
+      | $TR " " "\n" | $SORT -n | $HEAD -n1`
+  BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK"
   AC_SUBST(BOOT_JDK_SOURCETARGET)
 
   AC_SUBST(JAVAC_FLAGS)
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
index 2200399b9af..7f6fac8de2b 100644
--- a/make/autoconf/version-numbers
+++ b/make/autoconf/version-numbers
@@ -36,7 +36,7 @@ DEFAULT_VERSION_EXTRA3=0
 DEFAULT_VERSION_DATE=2020-09-15
 DEFAULT_VERSION_CLASSFILE_MAJOR=59  # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
 DEFAULT_VERSION_CLASSFILE_MINOR=0
-DEFAULT_ACCEPTABLE_BOOT_VERSIONS="13 14 15"
+DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15"
 DEFAULT_JDK_SOURCE_TARGET_VERSION=15
 DEFAULT_PROMOTED_VERSION_PRE=ea
 
diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js
index eb0b16760f6..a024c98be5e 100644
--- a/make/conf/jib-profiles.js
+++ b/make/conf/jib-profiles.js
@@ -381,8 +381,8 @@ var getJibProfilesCommon = function (input, data) {
         };
     };
 
-    common.boot_jdk_version = "13";
-    common.boot_jdk_build_number = "33";
+    common.boot_jdk_version = "14";
+    common.boot_jdk_build_number = "36";
     common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
         + common.boot_jdk_version
         + (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
@@ -1009,16 +1009,16 @@ var getJibProfilesDependencies = function (input, common) {
         : input.get("gnumake", "install_path") + "/bin");
 
     if (input.build_cpu == 'aarch64') {
-	boot_jdk = {
+        boot_jdk = {
             organization: common.organization,
             ext: "tar.gz",
             module: "jdk-linux_aarch64",
             revision: "13+1.0",
             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
             environment_path: common.boot_jdk_home + "/bin"
-	}
+        }
     } else {
-	boot_jdk = {
+        boot_jdk = {
             server: "jpg",
             product: "jdk",
             version: common.boot_jdk_version,
@@ -1027,7 +1027,12 @@ var getJibProfilesDependencies = function (input, common) {
                 + boot_jdk_platform + "_bin" + boot_jdk_ext,
             configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
             environment_path: common.boot_jdk_home + "/bin"
-	}
+        }
+    }
+    if (input.build_cpu == 'sparcv9') {
+        boot_jdk.file = "bundles/openjdk/GPL/" + boot_jdk_platform
+            + "/openjdk-" + common.boot_jdk_version + "_"
+            + boot_jdk_platform + "_bin" + boot_jdk_ext;
     }
 
     var dependencies = {