8265373: Change to GCC 10.3 for building on Linux at Oracle

Reviewed-by: mikael
diff --git a/make/conf/jib-profiles.js b/make/conf/jib-profiles.js
index 4126d4d..ff6d69f 100644
--- a/make/conf/jib-profiles.js
+++ b/make/conf/jib-profiles.js
@@ -419,8 +419,10 @@
         "linux-x64": {
             target_os: "linux",
             target_cpu: "x64",
-            dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
-            configure_args: concat(common.configure_args_64bit,
+            dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc"],
+            configure_args: concat(
+                (input.build_cpu == "x64" ? common.configure_args_64bit
+                 : "--openjdk-target=x86_64-linux-gnu"),
                 "--with-zlib=system", "--disable-dtrace",
                 (isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
                     "--build=x86_64-unknown-linux-gnu" ] : [])),
@@ -1044,10 +1046,10 @@
 var getJibProfilesDependencies = function (input, common) {
 
     var devkit_platform_revisions = {
-        linux_x64: "gcc10.2.0-OL6.4+1.0",
+        linux_x64: "gcc10.3.0-OL6.4+1.0",
         macosx: "Xcode12.4+1.0",
         windows_x64: "VS2019-16.9.3+1.0",
-        linux_aarch64: "gcc10.2.0-OL7.6+1.0",
+        linux_aarch64: "gcc10.3.0-OL7.6+1.0",
         linux_arm: "gcc8.2.0-Fedora27+1.0",
         linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
         linux_s390x: "gcc8.2.0-Fedora27+1.0"
@@ -1122,7 +1124,10 @@
             organization: common.organization,
             ext: "tar.gz",
             module: "devkit-" + input.build_platform,
-            revision: devkit_platform_revisions[input.build_platform]
+            revision: devkit_platform_revisions[input.build_platform],
+            // Only set --with-build-devkit when cross compiling.
+            configure_args: (input.build_cpu == input.target_cpu ? false
+                : "--with-build-devkit=" + input.get("build_devkit", "home_path"))
         },
 
         lldb: {
diff --git a/make/devkit/Tools.gmk b/make/devkit/Tools.gmk
index d5ef8ea..19eccf8 100644
--- a/make/devkit/Tools.gmk
+++ b/make/devkit/Tools.gmk
@@ -87,8 +87,17 @@
 # Define external dependencies
 
 # Latest that could be made to work.
-GCC_VER := 10.2.0
-ifeq ($(GCC_VER), 10.2.0)
+GCC_VER := 10.3.0
+ifeq ($(GCC_VER), 10.3.0)
+  gcc_ver := gcc-10.3.0
+  binutils_ver := binutils-2.36.1
+  ccache_ver := ccache-3.7.11
+  mpfr_ver := mpfr-4.1.0
+  gmp_ver := gmp-6.2.0
+  mpc_ver := mpc-1.1.0
+  gdb_ver := gdb-10.1
+  REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
+else ifeq ($(GCC_VER), 10.2.0)
   gcc_ver := gcc-10.2.0
   binutils_ver := binutils-2.35
   ccache_ver := ccache-3.7.11
@@ -245,12 +254,8 @@
 
 RPM_ARCHS := $(ARCH) noarch
 ifeq ($(ARCH),x86_64)
-  ifeq ($(BUILD),$(HOST))
-    ifeq ($(TARGET),$(HOST))
-      # When building the native compiler for x86_64, enable mixed mode.
-      RPM_ARCHS += i386 i686
-    endif
-  endif
+  # Enable mixed mode.
+  RPM_ARCHS += i386 i686
 else ifeq ($(ARCH),i686)
   RPM_ARCHS += i386
 else ifeq ($(ARCH), armhfp)