Skip to content

Commit

Permalink
Merge pull request #1910 from SAP/pr-jdk-25+8
Browse files Browse the repository at this point in the history
Merge to tag jdk-25+8
  • Loading branch information
RealCLanger authored Feb 5, 2025
2 parents 6a00bc3 + d985b31 commit 98992f4
Show file tree
Hide file tree
Showing 988 changed files with 11,464 additions and 5,523 deletions.
2 changes: 1 addition & 1 deletion bin/idea.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if [ "$VERBOSE" = "true" ] ; then
echo "idea template dir: $IDEA_TEMPLATE"
fi

cd $TOP ; make idea-gen-config IDEA_OUTPUT=$IDEA_OUTPUT MODULES="$*" $CONF_ARG || exit 1
cd $TOP ; make idea-gen-config ALLOW=IDEA_OUTPUT,MODULES IDEA_OUTPUT=$IDEA_OUTPUT MODULES="$*" $CONF_ARG || exit 1
cd $SCRIPT_DIR

. $IDEA_OUTPUT/env.cfg
Expand Down
8 changes: 4 additions & 4 deletions doc/hotspot-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ <h3 id="source-files">Source Files</h3>
should be put in the .hpp file, and not in the .inline.hpp file. This
rule exists to resolve problems with circular dependencies between
.inline.hpp files.</p></li>
<li><p>All .cpp files include precompiled.hpp as the first include
line.</p></li>
<li><p>precompiled.hpp is just a build time optimization, so don't rely
on it to resolve include problems.</p></li>
<li><p>Some build configurations use precompiled headers to speed up the
build times. The precompiled headers are included in the precompiled.hpp
file. Note that precompiled.hpp is just a build time optimization, so
don't rely on it to resolve include problems.</p></li>
<li><p>Keep the include lines alphabetically sorted.</p></li>
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of
the include list.</p></li>
Expand Down
8 changes: 4 additions & 4 deletions doc/hotspot-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ the first include line. Declarations needed by other files should be put
in the .hpp file, and not in the .inline.hpp file. This rule exists to
resolve problems with circular dependencies between .inline.hpp files.

* All .cpp files include precompiled.hpp as the first include line.

* precompiled.hpp is just a build time optimization, so don't rely on
it to resolve include problems.
* Some build configurations use precompiled headers to speed up the
build times. The precompiled headers are included in the precompiled.hpp
file. Note that precompiled.hpp is just a build time optimization, so
don't rely on it to resolve include problems.

* Keep the include lines alphabetically sorted.

Expand Down
3 changes: 2 additions & 1 deletion make/Global.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2025, 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
Expand Down Expand Up @@ -108,6 +108,7 @@ help:
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
$(info $(_) ALLOW="FOO,BAR" # Do not warn that FOO and BAR are non-control variables)
$(info )
$(if $(all_confs), $(info Available configurations in $(build_dir):) $(foreach var,$(all_confs),$(info * $(var))), \
$(info No configurations were found in $(build_dir).) $(info Run 'bash configure' to create a configuration.))
Expand Down
31 changes: 19 additions & 12 deletions make/InitSupport.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, 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
Expand Down Expand Up @@ -48,12 +48,15 @@ ifeq ($(HAS_SPEC), )
# from the command-line.
##############################################################################

# Make control variables, handled by Init.gmk
INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
# Essential control variables that are handled by Init.gmk
INIT_CONTROL_VARIABLES := LOG CONF CONF_NAME SPEC JOBS CONF_CHECK ALLOW \
COMPARE_BUILD

# All known make control variables
MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER
# All known make control variables; these are handled in other makefiles
MAKE_CONTROL_VARIABLES += JDK_FILTER SPEC_FILTER \
TEST TEST_JOBS JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS

ALL_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) $(MAKE_CONTROL_VARIABLES)

# Define a simple reverse function.
# Should maybe move to MakeBase.gmk, but we can't include that file now.
Expand Down Expand Up @@ -87,8 +90,10 @@ ifeq ($(HAS_SPEC), )
command_line_variables := $$(strip $$(foreach var, \
$$(subst \ ,_,$$(MAKEOVERRIDES)), \
$$(firstword $$(subst =, , $$(var)))))
allowed_command_line_variables := $$(strip $$(subst $$(COMMA), , $$(ALLOW)))
unknown_command_line_variables := $$(strip \
$$(filter-out $$(MAKE_CONTROL_VARIABLES), $$(command_line_variables)))
$$(filter-out $$(ALL_CONTROL_VARIABLES) $$(allowed_command_line_variables), \
$$(command_line_variables)))
ifneq ($$(unknown_command_line_variables), )
$$(info Note: Command line contains non-control variables:)
$$(foreach var, $$(unknown_command_line_variables), $$(info * $$(var)=$$($$(var))))
Expand Down Expand Up @@ -211,13 +216,15 @@ ifeq ($(HAS_SPEC), )
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
endif
ifneq ($$(filter $$(CONF), $$(matching_confs)), )
ifneq ($$(word 2, $$(matching_confs)), )
# Don't repeat this output on make restarts caused by including
# generated files.
ifeq ($$(MAKE_RESTARTS), )
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
endif
endif
# If we found an exact match, use that
matching_confs := $$(CONF)
# Don't repeat this output on make restarts caused by including
# generated files.
ifeq ($$(MAKE_RESTARTS), )
$$(info Using exact match for CONF=$$(CONF) (other matches are possible))
endif
endif
endif
ifeq ($$(matching_confs), )
Expand Down
4 changes: 4 additions & 0 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ $(eval $(call IncludeCustomExtension, RunTests.gmk))

# This is the JDK that we will test
JDK_UNDER_TEST := $(JDK_IMAGE_DIR)
# The JDK used to compile jtreg test code. By default it is the same as
# JDK_UNDER_TEST.
JDK_FOR_COMPILE := $(JDK_IMAGE_DIR)

TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support
Expand Down Expand Up @@ -979,6 +982,7 @@ define SetupRunJtregTestBody
$$(JTREG_JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
$$($1_JTREG_BASIC_OPTIONS) \
-compilejdk:$$(JDK_FOR_COMPILE) \
-testjdk:$$(JDK_UNDER_TEST) \
-dir:$$(JTREG_TOPDIR) \
-reportDir:$$($1_TEST_RESULTS_DIR) \
Expand Down
6 changes: 6 additions & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,15 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
# We get the top-level directory from the supporting wrappers.
BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
orig_topdir="$TOPDIR"
UTIL_FIXUP_PATH(TOPDIR)
AC_MSG_CHECKING([for top-level directory])
AC_MSG_RESULT([$TOPDIR])
if test "x$TOPDIR" != "x$orig_topdir"; then
AC_MSG_WARN([Your top dir was originally represented as $orig_topdir,])
AC_MSG_WARN([but after rewriting it became $TOPDIR.])
AC_MSG_WARN([This typically means you have characters like space in the path, which can cause all kind of trouble.])
fi
AC_SUBST(TOPDIR)
if test "x$CUSTOM_ROOT" != x; then
Expand Down
32 changes: 19 additions & 13 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, 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
Expand Down Expand Up @@ -235,9 +235,10 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
# Additional warnings that are not activated by -Wall and -Wextra
WARNINGS_ENABLE_ADDITIONAL="-Wpointer-arith -Wreturn-type -Wsign-compare \
-Wtrampolines -Wundef -Wunused-const-variable=1 -Wunused-function \
-Wunused-result -Wunused-value -Wtype-limits -Wuninitialized"
WARNINGS_ENABLE_ADDITIONAL="-Winvalid-pch -Wpointer-arith -Wreturn-type \
-Wsign-compare -Wtrampolines -Wtype-limits -Wundef -Wuninitialized \
-Wunused-const-variable=1 -Wunused-function -Wunused-result \
-Wunused-value"
WARNINGS_ENABLE_ADDITIONAL_CXX="-Woverloaded-virtual -Wreorder"
WARNINGS_ENABLE_ALL_CFLAGS="-Wall -Wextra -Wformat=2 $WARNINGS_ENABLE_ADDITIONAL"
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
Expand Down Expand Up @@ -277,7 +278,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
[
# bounds, memory and behavior checking options
if test "x$TOOLCHAIN_TYPE" = xgcc; then
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
case $DEBUG_LEVEL in
release )
# no adjustment
Expand Down Expand Up @@ -516,12 +517,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
-fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
fi
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
# clang compiler on aix needs -ffunction-sections
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char -fstack-protector"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -fstack-protector"
TOOLCHAIN_CFLAGS_JDK="-fvisibility=hidden -pipe -fstack-protector"
Expand All @@ -541,7 +536,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
# Restrict the debug information created by Clang to avoid
# too big object files and speed the build up a little bit
# (see http://llvm.org/bugs/show_bug.cgi?id=7554)
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -flimit-debug-info -fstack-protector"
# In principle the stack alignment below is cpu- and ABI-dependent and
# should agree with values of StackAlignmentInBytes in various
Expand All @@ -559,7 +554,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JDK="-pipe"
TOOLCHAIN_CFLAGS_JDK_CONLY="-fno-strict-aliasing" # technically NOT for CXX
fi
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden"
if test "x$OPENJDK_TARGET_OS" = xaix; then
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM -ffunction-sections -ftls-model -fno-math-errno"
TOOLCHAIN_CFLAGS_JDK="-ffunction-sections -fsigned-char"
fi
TOOLCHAIN_CFLAGS_JDK="$TOOLCHAIN_CFLAGS_JDK -fvisibility=hidden -fstack-protector"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The -utf-8 option sets source and execution character sets to UTF-8 to enable correct
Expand Down Expand Up @@ -736,6 +737,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
# for all archs except arm and ppc, prevent gcc to omit frame pointer
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
if test "x$FLAGS_CPU" = xppc64le; then
# Little endian machine uses ELFv2 ABI.
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
fi
fi
if test "x$OPENJDK_TARGET_OS" = xaix; then
$1_CFLAGS_CPU="-mcpu=pwr8"
Expand Down
7 changes: 6 additions & 1 deletion make/autoconf/util_paths.m4
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ AC_DEFUN([UTIL_FIXUP_PATH],
imported_path=""
fi
fi
if test "x$imported_path" != "x$path"; then
[ imported_path_lower=`$ECHO $imported_path | $TR '[:upper:]' '[:lower:]'` ]
[ orig_path_lower=`$ECHO $path | $TR '[:upper:]' '[:lower:]'` ]
# If only case differs, keep original path
if test "x$imported_path_lower" != "x$orig_path_lower"; then
$1="$imported_path"
fi
else
Expand Down Expand Up @@ -357,6 +360,8 @@ AC_DEFUN([UTIL_SETUP_TOOL],
fi
$1="$tool_command"
fi
# Make sure we add fixpath if needed
UTIL_FIXUP_EXECUTABLE($1)
if test "x$tool_args" != x; then
# If we got arguments, re-append them to the command after the fixup.
$1="[$]$1 $tool_args"
Expand Down
8 changes: 4 additions & 4 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2025, 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
Expand Down Expand Up @@ -1092,9 +1092,9 @@ var getJibProfilesDependencies = function (input, common) {
windows_x64: "VS2022-17.6.5+1.0",
linux_aarch64: "gcc13.2.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",
linux_riscv64: "gcc11.3.0-Fedora_rawhide_68692+1.1"
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"
};

var devkit_platform = (input.target_cpu == "x86"
Expand Down
23 changes: 10 additions & 13 deletions make/devkit/Tools.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2025, 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
Expand Down Expand Up @@ -63,18 +63,14 @@ ifeq ($(BASE_OS), OL)
LINUX_VERSION := OL6.4
endif
else ifeq ($(BASE_OS), Fedora)
DEFAULT_OS_VERSION := 41
ifeq ($(BASE_OS_VERSION), )
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
endif
ifeq ($(ARCH), riscv64)
DEFAULT_OS_VERSION := rawhide/68692
ifeq ($(BASE_OS_VERSION), )
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
endif
BASE_URL := http://fedora.riscv.rocks/repos-dist/$(BASE_OS_VERSION)/$(ARCH)/Packages/
BASE_URL := http://fedora.riscv.rocks/repos-dist/f$(BASE_OS_VERSION)/latest/$(ARCH)/Packages/
else
DEFAULT_OS_VERSION := 27
LATEST_ARCHIVED_OS_VERSION := 35
ifeq ($(BASE_OS_VERSION), )
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
endif
ifeq ($(filter x86_64 armhfp, $(ARCH)), )
FEDORA_TYPE := fedora-secondary
else
Expand Down Expand Up @@ -203,7 +199,7 @@ RPM_LIST := \
glibc glibc-headers glibc-devel \
cups-libs cups-devel \
libX11 libX11-devel \
xorg-x11-proto-devel \
libxcb xorg-x11-proto-devel \
alsa-lib alsa-lib-devel \
libXext libXext-devel \
libXtst libXtst-devel \
Expand Down Expand Up @@ -441,8 +437,9 @@ $(gcc) \
# wants.
$(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))

ifneq ($(ARCH), riscv64)
# gold is not available for riscv64 for some reason,
ifeq ($(filter $(ARCH), s390x riscv64 ppc64le), )
# gold compiles but cannot link properly on s390x @ gcc 13.2 and Fedore 41
# gold is not available for riscv64 and ppc64le,
# and subsequent linking will fail if we try to enable it.
LINKER_CONFIG := --enable-gold=default
endif
Expand Down
7 changes: 2 additions & 5 deletions make/modules/java.desktop/lib/ClientLibraries.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2025, 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
Expand Down Expand Up @@ -360,8 +360,6 @@ else
LIBFONTMANAGER_JDK_LIBS += libfreetype
endif

LIBFONTMANAGER_OPTIMIZATION := HIGHEST

ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
# gcc (and to an extent clang) is particularly bad at optimizing these files,
# causing a massive spike in compile time. We don't care about these
Expand All @@ -372,7 +370,6 @@ endif

ifeq ($(call isTargetOs, windows), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
else ifeq ($(call isTargetOs, macosx), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c X11TextRenderer.c \
fontpath.c lcdglyph.c
Expand All @@ -393,7 +390,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
AccelGlyphCache.c, \
CFLAGS := $(LIBFONTMANAGER_CFLAGS), \
CXXFLAGS := $(LIBFONTMANAGER_CFLAGS), \
OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION), \
OPTIMIZATION := HIGHEST, \
CFLAGS_windows = -DCC_NOEX, \
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
EXTRA_SRC := $(LIBFONTMANAGER_EXTRA_SRC), \
Expand Down
4 changes: 2 additions & 2 deletions make/modules/jdk.incubator.vector/Lib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2021, 2025, 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
Expand Down Expand Up @@ -64,7 +64,7 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, aarch64)+$(INCLUDE_COMPILER2
EXTRA_SRC := libsleef/generated, \
DISABLED_WARNINGS_gcc := unused-function sign-compare tautological-compare ignored-qualifiers, \
DISABLED_WARNINGS_clang := unused-function sign-compare tautological-compare ignored-qualifiers, \
CFLAGS := $(SVE_CFLAGS), \
vector_math_sve.c_CFLAGS := $(SVE_CFLAGS), \
))

TARGETS += $(BUILD_LIBSLEEF)
Expand Down
Loading

0 comments on commit 98992f4

Please sign in to comment.