Skip to content

Commit a8ad275

Browse files
author
David Simms
committed
Merge jdk
Merge jdk-25+14
2 parents c55102a + a347ecd commit a8ad275

File tree

623 files changed

+28473
-23018
lines changed

Some content is hidden

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

623 files changed

+28473
-23018
lines changed

doc/hotspot-style.html

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -207,23 +207,31 @@ <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>
210216
<li><p>Do not put non-trivial function implementations in .hpp files. If
211-
the implementation depends on other .hpp files, put it in a .cpp or a
212-
.inline.hpp file.</p></li>
217+
the implementation depends on other .hpp files, put it in a .cpp or
218+
a .inline.hpp file.</p></li>
213219
<li><p>.inline.hpp files should only be included in .cpp or .inline.hpp
214220
files.</p></li>
215-
<li><p>All .inline.hpp files should include their corresponding .hpp
216-
file as the first include line. Declarations needed by other files
217-
should be put in the .hpp file, and not in the .inline.hpp file. This
218-
rule exists to resolve problems with circular dependencies between
219-
.inline.hpp 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>
220231
<li><p>Some build configurations use precompiled headers to speed up the
221232
build times. The precompiled headers are included in the precompiled.hpp
222233
file. Note that precompiled.hpp is just a build time optimization, so
223234
don't rely on it to resolve include problems.</p></li>
224-
<li><p>Keep the include lines alphabetically sorted.</p></li>
225-
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of
226-
the include list.</p></li>
227235
</ul>
228236
<h3 id="jtreg-tests">JTReg Tests</h3>
229237
<ul>

doc/hotspot-style.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,18 @@ change should be done with a "setter" accessor matched to the simple
135135

136136
### Source Files
137137

138-
* All source files must have a globally unique basename. The build
138+
* 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.
142+
143+
* Put conditional inclusions (`#if ...`) at the end of the section of HotSpot
144+
include lines. This also applies to macro-expanded includes of platform
145+
dependent files.
146+
147+
* Put system includes in a section after the HotSpot include lines with a blank
148+
line separating the two sections.
149+
141150
* Do not put non-trivial function implementations in .hpp files. If
142151
the implementation depends on other .hpp files, put it in a .cpp or
143152
a .inline.hpp file.
@@ -146,19 +155,23 @@ a .inline.hpp file.
146155
files.
147156

148157
* All .inline.hpp files should include their corresponding .hpp file as
149-
the first include line. Declarations needed by other files should be put
150-
in the .hpp file, and not in the .inline.hpp file. This rule exists to
151-
resolve problems with circular dependencies between .inline.hpp files.
158+
the first include line with a blank line separating it from the rest of the
159+
include lines. Declarations needed by other files should be put in the .hpp
160+
file, and not in the .inline.hpp file. This rule exists to resolve problems
161+
with circular dependencies between .inline.hpp files.
162+
163+
* Do not include a .hpp file if the corresponding .inline.hpp file is included.
164+
165+
* Use include guards for .hpp and .inline.hpp files. The name of the defined
166+
guard should be derived from the full search path of the file relative to the
167+
hotspot source directory. The guard should be all upper case with all paths
168+
separators and periods replaced by underscores.
152169

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

158-
* Keep the include lines alphabetically sorted.
159-
160-
* Put conditional inclusions (`#if ...`) at the end of the include list.
161-
162175
### JTReg Tests
163176

164177
* JTReg tests should have meaningful names.

make/RunTests.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ define SetupRunGtestTestBody
543543
print arr[0]; \
544544
found=1; \
545545
} \
546-
if (!found) { print 0; } \
547-
}' \
546+
} \
547+
END { if (!found) print 0; }' \
548548
$$($1_RESULT_FILE))) \
549549
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \
550550
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \

make/autoconf/basic.m4

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,4 @@ AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
624624
625625
# Make the compare script executable
626626
$CHMOD +x $OUTPUTDIR/compare.sh
627-
628-
# Copy the linker wrapper script for clang on AIX and make it executable
629-
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
630-
$CP -f "$TOPDIR/make/scripts/aix/ld.sh" "$OUTPUTDIR/ld.sh"
631-
$CHMOD +x "$OUTPUTDIR/ld.sh"
632-
fi
633627
])

make/autoconf/flags-ldflags.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
7878
fi
7979
fi
8080
if test "x$OPENJDK_TARGET_OS" = xaix; then
81-
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-bnolibpath -Wl,-bnoexpall \
82-
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k -fuse-ld=$OUTPUTDIR/ld.sh"
81+
BASIC_LDFLAGS="-Wl,-b64 -Wl,-brtl -Wl,-bnorwexec -Wl,-blibpath:/usr/lib:lib -Wl,-bnoexpall \
82+
-Wl,-bernotok -Wl,-bdatapsize:64k -Wl,-btextpsize:64k -Wl,-bstackpsize:64k"
8383
BASIC_LDFLAGS_JVM_ONLY="$BASIC_LDFLAGS_JVM_ONLY -Wl,-lC_r -Wl,-bbigtoc"
8484
fi
8585
@@ -100,7 +100,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
100100
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang; then
101101
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
102102
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
103-
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
103+
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN -Wl,-reproducible"
104104
fi
105105
106106
# Setup debug level-dependent LDFLAGS

make/autoconf/libraries.m4

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
139139
140140
# Threading library
141141
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xaix; then
142-
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
142+
BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD"
143143
fi
144144
145145
# librt for legacy clock_gettime
@@ -197,6 +197,14 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
197197
AC_SUBST(LIBDL)
198198
LIBS="$save_LIBS"
199199
200+
# Setup posix pthread support
201+
if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
202+
LIBPTHREAD="-lpthread"
203+
else
204+
LIBPTHREAD=""
205+
fi
206+
AC_SUBST(LIBPTHREAD)
207+
200208
# Control if libzip can use mmap. Available for purposes of overriding.
201209
LIBZIP_CAN_USE_MMAP=true
202210
AC_SUBST(LIBZIP_CAN_USE_MMAP)

make/autoconf/spec.gmk.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ endif
144144

145145
LIBM := @LIBM@
146146
LIBDL := @LIBDL@
147+
LIBPTHREAD := @LIBPTHREAD@
147148

148149
WINENV_ROOT := @WINENV_ROOT@
149150
WINENV_PREFIX := @WINENV_PREFIX@

make/conf/jib-profiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ var getJibProfilesDependencies = function (input, common) {
12371237
organization: common.organization,
12381238
ext: "tar.gz",
12391239
revision: "9.0.0+1.0",
1240-
module: "graphviz-" + input.target_platform,
1240+
module: "graphviz-" + input.build_platform,
12411241
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
12421242
environment_path: input.get("graphviz", "install_path")
12431243
},

make/modules/java.base/Gensrc.gmk

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,17 @@ $(eval $(call SetupCompileProperties, SUN_UTIL, \
8181
CLASS := sun.util.resources.LocaleNamesBundle, \
8282
))
8383

84-
TARGETS += $(LIST_RESOURCE_BUNDLE) $(SUN_UTIL)
84+
$(eval $(call SetupCompileProperties, SECURITY_RESOURCES, \
85+
SRC_DIRS := $(MODULE_SRC)/share/classes/sun/security/util/resources, \
86+
CLASS := ListResourceBundle, \
87+
))
8588

86-
# Some resources bundles are already present as java files but still need to be
87-
# copied to zh_HK locale.
88-
$(eval $(call SetupCopy-zh_HK,COPY_ZH_HK, \
89-
$(addprefix $(TOPDIR)/src/java.base/share/classes/, \
90-
sun/security/util/AuthResources_zh_TW.java \
91-
sun/security/util/Resources_zh_TW.java)))
89+
$(eval $(call SetupCompileProperties, KEYTOOL_RESOURCES, \
90+
SRC_DIRS := $(MODULE_SRC)/share/classes/sun/security/tools/keytool/resources, \
91+
CLASS := ListResourceBundle, \
92+
))
9293

93-
TARGETS += $(COPY_ZH_HK)
94+
TARGETS += $(LIST_RESOURCE_BUNDLE) $(SUN_UTIL) $(SECURITY_RESOURCES) $(KEYTOOL_RESOURCES)
9495

9596
################################################################################
9697

make/modules/java.base/Lib.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
8181
DISABLED_WARNINGS_clang_Net.c := unused-function unused-variable, \
8282
DISABLED_WARNINGS_clang_UnixNativeDispatcher.c := unused-variable, \
8383
JDK_LIBS := libjava libnet, \
84-
LIBS_linux := $(LIBDL) -lpthread, \
84+
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
8585
LIBS_aix := $(LIBDL), \
8686
LIBS_macosx := \
8787
-framework CoreFoundation \
@@ -124,6 +124,7 @@ ifeq ($(call isTargetOsType, unix), true)
124124
DISABLED_WARNINGS_clang_jsig.c := unused-but-set-variable, \
125125
LIBS_linux := $(LIBDL), \
126126
LIBS_aix := $(LIBDL), \
127+
ONLY_EXPORTED := true, \
127128
))
128129

129130
TARGETS += $(BUILD_LIBJSIG)

make/modules/java.base/lib/CoreLibraries.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
187187
unused-function, \
188188
DISABLED_WARNINGS_clang_java_md_macosx.m := unused-variable, \
189189
LIBS_unix := $(LIBZ_LIBS), \
190-
LIBS_linux := $(LIBDL) -lpthread, \
190+
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
191191
LIBS_macosx := \
192192
-framework ApplicationServices \
193193
-framework Cocoa \

make/modules/java.desktop/lib/AwtLibraries.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
285285
JDK_LIBS := libawt java.base:libjava, \
286286
LIBS_unix := $(LIBDL) $(LIBM) $(X_LIBS) -lX11 -lXext -lXi -lXrender \
287287
-lXtst, \
288-
LIBS_linux := -lpthread, \
288+
LIBS_linux := $(LIBPTHREAD), \
289289
STATIC_LIB_EXCLUDE_OBJS := $(LIBAWT_XAWT_STATIC_EXCLUDE_OBJS), \
290290
))
291291

make/modules/java.desktop/lib/ClientLibraries.gmk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
260260
JDK_LIBS_windows := java.base:libjava, \
261261
JDK_LIBS_macosx := libosxapp, \
262262
LIBS := $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(LIBZ_LIBS) $(PNG_LIBS), \
263-
LIBS_unix := $(LIBM) -lpthread, \
263+
LIBS_unix := $(LIBM) $(LIBPTHREAD), \
264264
LIBS_linux := $(LIBDL) $(X_LIBS) -lX11 -lXext, \
265265
LIBS_macosx := -liconv \
266266
-framework ApplicationServices \
@@ -331,7 +331,7 @@ else
331331

332332
HARFBUZZ_DISABLED_WARNINGS_gcc := missing-field-initializers \
333333
strict-aliasing unused-result array-bounds parentheses \
334-
unused-variable
334+
unused-variable dangling-pointer
335335
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
336336
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
337337
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.

make/modules/jdk.jartool/Gensrc.gmk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ $(eval $(call SetupCompileProperties, COMPILE_PROPERTIES, \
3333
CLASS := ListResourceBundle, \
3434
))
3535

36-
TARGETS += $(COMPILE_PROPERTIES)
36+
$(eval $(call SetupCompileProperties, JARSIGNER_RESOURCES, \
37+
SRC_DIRS := $(TOPDIR)/src/jdk.jartool/share/classes/sun/security/tools/jarsigner/resources, \
38+
CLASS := ListResourceBundle, \
39+
))
40+
41+
TARGETS += $(COMPILE_PROPERTIES) $(JARSIGNER_RESOURCES)
3742

3843
################################################################################

make/modules/jdk.jdwp.agent/Lib.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBDT_SOCKET, \
3838
EXTRA_HEADER_DIRS := \
3939
include \
4040
libjdwp/export, \
41-
LIBS_linux := -lpthread, \
41+
LIBS_linux := $(LIBPTHREAD), \
4242
LIBS_windows := iphlpapi.lib ws2_32.lib, \
4343
))
4444

make/modules/jdk.sctp/Lib.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ifeq ($(call isTargetOs, linux), true)
4141
java.base:libnio \
4242
java.base:libnio/ch, \
4343
JDK_LIBS := java.base:libjava java.base:libnet, \
44-
LIBS_linux := $(LIBDL) -lpthread, \
44+
LIBS_linux := $(LIBDL) $(LIBPTHREAD), \
4545
))
4646

4747
TARGETS += $(BUILD_LIBSCTP)

make/scripts/aix/ld.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)