Skip to content

Commit a1044aa

Browse files
Merge tag 'jdk-25+14' into labsjdk/adopt-jdk-25+14-master
Added tag jdk-25+14 for changeset a347ecd
2 parents 2ca50ea + a347ecd commit a1044aa

File tree

621 files changed

+28456
-23013
lines changed

Some content is hidden

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

621 files changed

+28456
-23013
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
@@ -1250,7 +1250,7 @@ var getJibProfilesDependencies = function (input, common) {
12501250
organization: common.organization,
12511251
ext: "tar.gz",
12521252
revision: "9.0.0+1.0",
1253-
module: "graphviz-" + input.target_platform,
1253+
module: "graphviz-" + input.build_platform,
12541254
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
12551255
environment_path: input.get("graphviz", "install_path")
12561256
},

make/modules/java.base/Gensrc.gmk

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

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

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

92-
TARGETS += $(COPY_ZH_HK)
93+
TARGETS += $(LIST_RESOURCE_BUNDLE) $(SUN_UTIL) $(SECURITY_RESOURCES) $(KEYTOOL_RESOURCES)
9394

9495
################################################################################
9596

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)

0 commit comments

Comments
 (0)