Skip to content

Commit 2de3164

Browse files
author
David Simms
committed
Merge jdk
Merge jdk-25+17
2 parents 0f63f74 + bd74922 commit 2de3164

File tree

665 files changed

+14619
-9404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

665 files changed

+14619
-9404
lines changed

doc/hotspot-style.html

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -207,27 +207,34 @@ <h3 id="source-files">Source Files</h3>
207207
<ul>
208208
<li><p>All source files must have a globally unique basename. The build
209209
system depends on this uniqueness.</p></li>
210-
<li><p>Keep the include lines within a section alphabetically sorted.</p></li>
211-
<li><p>Put conditional inclusions (`#if ...`) at the end of the section of HotSpot
212-
include lines. This also applies to macro-expanded includes of platform
213-
dependent files.</p></li>
214-
<li><p>Put system includes in a section after the HotSpot include lines with a blank
215-
line separating the two sections.</p></li>
210+
<li><p>Keep the include lines within a section alphabetically sorted by
211+
their lowercase value. If an include must be out of order for
212+
correctness, suffix with it a comment such as
213+
<code>// do not reorder</code>. Source code processing tools can also
214+
use this hint.</p></li>
215+
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of
216+
the section of HotSpot include lines. This also applies to
217+
macro-expanded includes of platform dependent files.</p></li>
218+
<li><p>Put system includes in a section after the HotSpot include lines
219+
with a blank line separating the two sections.</p></li>
216220
<li><p>Do not put non-trivial function implementations in .hpp files. If
217-
the implementation depends on other .hpp files, put it in a .cpp or
218-
a .inline.hpp file.</p></li>
221+
the implementation depends on other .hpp files, put it in a .cpp or a
222+
.inline.hpp file.</p></li>
219223
<li><p>.inline.hpp files should only be included in .cpp or .inline.hpp
220224
files.</p></li>
221-
<li><p>All .inline.hpp files should include their corresponding .hpp file as
222-
the first include line with a blank line separating it from the rest of the
223-
include lines. Declarations needed by other files should be put in the .hpp
224-
file, and not in the .inline.hpp file. This rule exists to resolve problems
225-
with circular dependencies between .inline.hpp files.</p></li>
226-
<li><p>Do not include a .hpp file if the corresponding .inline.hpp file is included.</p></li>
227-
<li><p>Use include guards for .hpp and .inline.hpp files. The name of the defined
228-
guard should be derived from the full search path of the file relative to the
229-
hotspot source directory. The guard should be all upper case with all paths
230-
separators and periods replaced by underscores.</p></li>
225+
<li><p>All .inline.hpp files should include their corresponding .hpp
226+
file as the first include line with a blank line separating it from the
227+
rest of the include lines. Declarations needed by other files should be
228+
put in the .hpp file, and not in the .inline.hpp file. This rule exists
229+
to resolve problems with circular dependencies between .inline.hpp
230+
files.</p></li>
231+
<li><p>Do not include a .hpp file if the corresponding .inline.hpp file
232+
is included.</p></li>
233+
<li><p>Use include guards for .hpp and .inline.hpp files. The name of
234+
the defined guard should be derived from the full search path of the
235+
file relative to the hotspot source directory. The guard should be all
236+
upper case with all paths separators and periods replaced by
237+
underscores.</p></li>
231238
<li><p>Some build configurations use precompiled headers to speed up the
232239
build times. The precompiled headers are included in the precompiled.hpp
233240
file. Note that precompiled.hpp is just a build time optimization, so

doc/hotspot-style.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ change should be done with a "setter" accessor matched to the simple
138138
* All source files must have a globally unique basename. The build
139139
system depends on this uniqueness.
140140

141-
* Keep the include lines within a section alphabetically sorted.
141+
* Keep the include lines within a section alphabetically sorted by their
142+
lowercase value. If an include must be out of order for correctness,
143+
suffix with it a comment such as `// do not reorder`. Source code
144+
processing tools can also use this hint.
142145

143146
* Put conditional inclusions (`#if ...`) at the end of the section of HotSpot
144147
include lines. This also applies to macro-expanded includes of platform

make/autoconf/configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
260260
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
261261
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
262262
JDKOPT_SETUP_MACOSX_SIGNING
263+
JDKOPT_SETUP_SIGNING_HOOK
263264

264265
################################################################################
265266
#

make/autoconf/flags-cflags.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
924924
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
925925
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
926926
# ACLE and this flag are required to build the aarch64 SVE related functions in
927-
# libvectormath.
928-
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
927+
# libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
928+
# that check.
929+
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_CPU" = "xlinux"; then
929930
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
930931
AC_LANG_PUSH(C)
931932
OLD_CFLAGS="$CFLAGS"

make/autoconf/jdk-options.m4

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,29 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
967967
AC_SUBST(MACOSX_CODESIGN_MODE)
968968
])
969969

970+
################################################################################
971+
#
972+
# Setup a hook to invoke a script that runs for file produced by the native
973+
# compilation steps, after linking.
974+
# Parameter is the path to the script to be called.
975+
#
976+
AC_DEFUN([JDKOPT_SETUP_SIGNING_HOOK],
977+
[
978+
UTIL_ARG_WITH(NAME: signing-hook, TYPE: executable,
979+
OPTIONAL: true, DEFAULT: "",
980+
DESC: [specify path to script used to code sign native binaries]
981+
)
982+
983+
AC_MSG_CHECKING([for signing hook])
984+
if test "x$SIGNING_HOOK" != x; then
985+
UTIL_FIXUP_EXECUTABLE(SIGNING_HOOK)
986+
AC_MSG_RESULT([$SIGNING_HOOK])
987+
else
988+
AC_MSG_RESULT([none])
989+
fi
990+
AC_SUBST(SIGNING_HOOK)
991+
])
992+
970993
################################################################################
971994
#
972995
# fallback linker

make/autoconf/spec.gmk.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ MACOSX_VERSION_MAX := @MACOSX_VERSION_MAX@
479479
MACOSX_CODESIGN_MODE := @MACOSX_CODESIGN_MODE@
480480
MACOSX_CODESIGN_IDENTITY := @MACOSX_CODESIGN_IDENTITY@
481481

482+
# The code signing hook configuration
483+
SIGNING_HOOK := @SIGNING_HOOK@
484+
482485
# Toolchain type: gcc, clang, microsoft...
483486
TOOLCHAIN_TYPE := @TOOLCHAIN_TYPE@
484487
TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@

make/autoconf/toolchain.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
622622
LDCXX="$CXX"
623623
# Force use of lld, since that is what we expect when setting flags later on
624624
if test "x$TOOLCHAIN_TYPE" = xclang; then
625-
if test "x$OPENJDK_BUILD_OS" != "xmacosx"; then
625+
if test "x$OPENJDK_TARGET_OS" = xlinux; then
626626
LD="$LD -fuse-ld=lld"
627627
LDCXX="$LDCXX -fuse-ld=lld"
628628
fi

make/autoconf/util.m4

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,14 @@ AC_DEFUN([UTIL_CHECK_TYPE_file],
566566
fi
567567
])
568568

569+
AC_DEFUN([UTIL_CHECK_TYPE_executable],
570+
[
571+
# Check that the argument is an existing file that the user has execute access to.
572+
if (test ! -x "$1") || (test ! -f "$1") ; then
573+
FAILURE="File $1 does not exist or is not executable"
574+
fi
575+
])
576+
569577
AC_DEFUN([UTIL_CHECK_TYPE_directory],
570578
[
571579
# Check that the argument is an existing directory
@@ -648,7 +656,7 @@ AC_DEFUN([UTIL_CHECK_TYPE_features],
648656
# Arguments:
649657
# NAME: The base name of this option (i.e. what follows --with-). Required.
650658
# TYPE: The type of the value. Can be one of "string", "integer", "file",
651-
# "directory", "literal", "multivalue" or "features". Required.
659+
# "executable", "directory", "literal", "multivalue" or "features". Required.
652660
# DEFAULT: The default value for this option. Can be any valid string.
653661
# Required.
654662
# OPTIONAL: If this feature can be disabled. Defaults to false. If true,
@@ -758,7 +766,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
758766
# Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement
759767
TEST_TYPE="ARG_TYPE"
760768
# Additional [] needed to keep m4 from mangling shell constructs.
761-
[ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ]
769+
[ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|executable|directory|literal|multivalue|features)$ ]] ; then ]
762770
AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE'])
763771
fi
764772

make/common/native/Link.gmk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ define CreateDynamicLibraryOrExecutable
203203
$(CODESIGN) -f -s $$($1_CODESIGN_OPTS) --entitlements \
204204
$$(call GetEntitlementsFile, $$@) $$@)
205205
endif
206+
ifneq ($(SIGNING_HOOK), )
207+
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_call_signing_hook, \
208+
$(SIGNING_HOOK) $$($1_TARGET))
209+
endif
206210

207211
# This is for IDE integration purposes only, and is not normally generated
208212
$1_LDFLAGS_FILE := $$(MAKESUPPORT_OUTPUTDIR)/compile-commands/$$($1_UNIQUE_NAME)-ldflags.txt

make/common/native/LinkMicrosoft.gmk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ define CreateDynamicLibraryOrExecutableMicrosoft
117117
-identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" \
118118
-outputresource:$$@;#1
119119
endif
120+
ifneq ($(SIGNING_HOOK), )
121+
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_call_signing_hook, \
122+
$(SIGNING_HOOK) $$($1_TARGET))
123+
endif
120124
endef
121125

122126
################################################################################

0 commit comments

Comments
 (0)