8351603: Change to GCC 14.2.0 for building on Linux at Oracle

8344272: gcc devkit doesn't have lto-plugin where needed

Reviewed-by: ihse, erikj
This commit is contained in:
Mikael Vidstedt
2025-04-16 16:28:12 +00:00
parent 84458ec18c
commit 7a107e2fc4
4 changed files with 45 additions and 15 deletions

View File

@@ -586,7 +586,7 @@ to compile successfully without issues.</p>
<tbody>
<tr class="odd">
<td>Linux</td>
<td>gcc 13.2.0</td>
<td>gcc 14.2.0</td>
</tr>
<tr class="even">
<td>macOS</td>
@@ -604,7 +604,7 @@ standard for C, and C++14 for C++.</p>
<p>The minimum accepted version of gcc is 10.0. Older versions will not
be accepted by <code>configure</code>.</p>
<p>The JDK is currently known to compile successfully with gcc version
13.2 or newer.</p>
14.2 or newer.</p>
<p>In general, any version between these two should be usable.</p>
<h3 id="clang">clang</h3>
<p>The minimum accepted version of clang is 13. Older versions will not

View File

@@ -392,7 +392,7 @@ issues.
| Operating system | Toolchain version |
| ------------------ | ------------------------------------------- |
| Linux | gcc 13.2.0 |
| Linux | gcc 14.2.0 |
| macOS | Apple Xcode 14.3.1 (using clang 14.0.3) |
| Windows | Microsoft Visual Studio 2022 version 17.6.5 |
@@ -404,7 +404,7 @@ C, and C++14 for C++.
The minimum accepted version of gcc is 10.0. Older versions will not be accepted
by `configure`.
The JDK is currently known to compile successfully with gcc version 13.2 or
The JDK is currently known to compile successfully with gcc version 14.2 or
newer.
In general, any version between these two should be usable.

View File

@@ -1088,14 +1088,14 @@ var getJibProfilesProfiles = function (input, common, data) {
var getJibProfilesDependencies = function (input, common) {
var devkit_platform_revisions = {
linux_x64: "gcc13.2.0-OL6.4+1.0",
linux_x64: "gcc14.2.0-OL6.4+1.0",
macosx: "Xcode14.3.1+1.0",
windows_x64: "VS2022-17.6.5+1.0",
linux_aarch64: "gcc13.2.0-OL7.6+1.0",
linux_aarch64: "gcc14.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",
linux_ppc64le: "gcc13.2.0-Fedora_41+1.0",
linux_s390x: "gcc13.2.0-Fedora_41+1.0",
linux_riscv64: "gcc13.2.0-Fedora_41+1.0"
linux_ppc64le: "gcc14.2.0-Fedora_41+1.0",
linux_s390x: "gcc14.2.0-Fedora_41+1.0",
linux_riscv64: "gcc14.2.0-Fedora_41+1.0"
};
var devkit_platform = (input.target_cpu == "x86"

View File

@@ -92,8 +92,18 @@ endif
# Define external dependencies
# Latest that could be made to work.
GCC_VER := 13.2.0
ifeq ($(GCC_VER), 13.2.0)
GCC_VER := 14.2.0
ifeq ($(GCC_VER), 14.2.0)
gcc_ver := gcc-14.2.0
binutils_ver := binutils-2.43
ccache_ver := ccache-4.10.2
CCACHE_CMAKE_BASED := 1
mpfr_ver := mpfr-4.2.1
gmp_ver := gmp-6.3.0
mpc_ver := mpc-1.3.1
gdb_ver := gdb-15.2
REQUIRED_MIN_MAKE_MAJOR_VERSION := 4
else ifeq ($(GCC_VER), 13.2.0)
gcc_ver := gcc-13.2.0
binutils_ver := binutils-2.41
ccache_ver := ccache-3.7.12
@@ -262,10 +272,18 @@ define Download
# Allow override
$(1)_DIRNAME ?= $(basename $(basename $(notdir $($(1)))))
$(1)_DIR = $(abspath $(SRCDIR)/$$($(1)_DIRNAME))
$(1)_CFG = $$($(1)_DIR)/configure
ifeq ($$($(1)_CMAKE_BASED),)
$(1)_CFG = $$($(1)_DIR)/configure
$(1)_SRC_MARKER = $$($(1)_DIR)/configure
$(1)_CONFIG = $(CONFIG)
else
$(1)_CFG = cmake
$(1)_SRC_MARKER = $$($(1)_DIR)/CMakeLists.txt
$(1)_CONFIG = $$(CMAKE_CONFIG) $$($(1)_DIR)
endif
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
$$($(1)_CFG) : $$($(1)_FILE)
$$($(1)_SRC_MARKER) : $$($(1)_FILE)
mkdir -p $$(SRCDIR)
tar -C $$(SRCDIR) -xf $$<
$$(foreach p,$$(abspath $$(wildcard patches/$$(ARCH)-$$(notdir $$($(1)_DIR)).patch)), \
@@ -365,6 +383,8 @@ CONFIG = --target=$(TARGET) \
--host=$(HOST) --build=$(BUILD) \
--prefix=$(PREFIX)
CMAKE_CONFIG = -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(PREFIX)
PATHEXT = $(PREFIX)/bin:
PATHPRE = PATH=$(PATHEXT)$(PATH)
@@ -576,6 +596,8 @@ ifeq ($(HOST), $(TARGET))
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" $(GDB_CFG) \
$(CONFIG) \
--with-sysroot=$(SYSROOT) \
--with-mpfr=$(PREFIX) \
--with-gmp=$(PREFIX) \
) > $(@D)/log.config 2>&1
@echo 'done'
@@ -591,13 +613,13 @@ endif
################################################################################
# very straightforward. just build a ccache. it is only for host.
$(BUILDDIR)/$(ccache_ver)/Makefile \
: $(CCACHE_CFG)
: $(CCACHE_SRC_MARKER)
$(info Configuring $@. Log in $(@D)/log.config)
@mkdir -p $(@D)
@( \
cd $(@D) ; \
$(PATHPRE) $(ENVS) $(CCACHE_CFG) \
$(CONFIG) \
$(CCACHE_CONFIG) \
) > $(@D)/log.config 2>&1
@echo 'done'
@@ -703,6 +725,14 @@ ifeq ($(TARGET), $(HOST))
ld.gold nm objcopy objdump ranlib readelf size strings strip)
endif
# Add link to work around "plugin needed to handle lto object" (JDK-8344272)
$(PREFIX)/lib/bfd-plugins/liblto_plugin.so: $(PREFIX)/libexec/gcc/$(TARGET)/$(GCC_VER)/liblto_plugin.so
@echo 'Creating missing $(@F) soft link'
@mkdir -p $(@D)
ln -s $$(realpath -s --relative-to=$(@D) $<) $@
missing-links += $(PREFIX)/lib/bfd-plugins/liblto_plugin.so
################################################################################
bfdlib : $(bfdlib)