Skip to content

Commit 251d414

Browse files
authored
Merge branch 'openjdk:master' into JDK-8367384
2 parents d0b4484 + 2aafda1 commit 251d414

File tree

1,225 files changed

+128706
-19076
lines changed

Some content is hidden

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

1,225 files changed

+128706
-19076
lines changed

doc/hotspot-style.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,8 +1859,6 @@ <h3 id="stdlaunder"><code>std::launder()</code></h3>
18591859
<h3 id="additional-undecided-features">Additional Undecided
18601860
Features</h3>
18611861
<ul>
1862-
<li><p>Trailing return type syntax for functions (<a
1863-
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">n2541</a>)</p></li>
18641862
<li><p>Member initializers and aggregates (<a
18651863
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
18661864
<li><p>Rvalue references and move semantics</p></li>

doc/hotspot-style.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,9 +1853,6 @@ See Object Lifetime: C++17 6.8/8, C++20 6.7.3/8
18531853
18541854
### Additional Undecided Features
18551855
1856-
* Trailing return type syntax for functions
1857-
([n2541](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm))
1858-
18591856
* Member initializers and aggregates
18601857
([n3653](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html))
18611858

make/Hsdis.gmk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ ifeq ($(HSDIS_BACKEND), binutils)
114114
TOOLCHAIN_TYPE := gcc
115115
OPENJDK_TARGET_OS := linux
116116
OPENJDK_TARGET_OS_TYPE := unix
117-
CC_OUT_OPTION := -o$(SPACE)
118117
GENDEPS_FLAGS := -MMD -MF
119118
CFLAGS_DEBUG_SYMBOLS := -g
120119
DISABLED_WARNINGS :=

make/autoconf/boot-jdk.m4

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -597,51 +597,25 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
597597
AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
598598
[path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
599599
600-
CREATE_BUILDJDK=false
601-
EXTERNAL_BUILDJDK=false
602-
BUILD_JDK_FOUND="no"
600+
EXTERNAL_BUILDJDK_PATH=""
603601
if test "x$with_build_jdk" != "x"; then
602+
BUILD_JDK_FOUND=no
604603
BOOTJDK_CHECK_BUILD_JDK([
605604
if test "x$with_build_jdk" != x; then
606605
BUILD_JDK=$with_build_jdk
607606
BUILD_JDK_FOUND=maybe
608607
AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
609608
fi
610609
])
611-
EXTERNAL_BUILDJDK=true
612-
else
613-
if test "x$COMPILE_TYPE" = "xcross"; then
614-
BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
615-
BUILD_JDK_FOUND=yes
616-
CREATE_BUILDJDK=true
617-
AC_MSG_CHECKING([for Build JDK])
618-
AC_MSG_RESULT([yes, will build it for the host platform])
619-
else
620-
BUILD_JDK="\$(JDK_OUTPUTDIR)"
621-
BUILD_JDK_FOUND=yes
610+
if test "x$BUILD_JDK_FOUND" != "xyes"; then
622611
AC_MSG_CHECKING([for Build JDK])
623-
AC_MSG_RESULT([yes, will use output dir])
612+
AC_MSG_RESULT([no])
613+
AC_MSG_ERROR([Could not find a suitable Build JDK])
624614
fi
615+
EXTERNAL_BUILDJDK_PATH="$BUILD_JDK"
625616
fi
626617
627-
# Since these tools do not yet exist, we cannot use UTIL_FIXUP_EXECUTABLE to
628-
# detect the need of fixpath
629-
JMOD="$BUILD_JDK/bin/jmod"
630-
UTIL_ADD_FIXPATH(JMOD)
631-
JLINK="$BUILD_JDK/bin/jlink"
632-
UTIL_ADD_FIXPATH(JLINK)
633-
AC_SUBST(JMOD)
634-
AC_SUBST(JLINK)
635-
636-
if test "x$BUILD_JDK_FOUND" != "xyes"; then
637-
AC_MSG_CHECKING([for Build JDK])
638-
AC_MSG_RESULT([no])
639-
AC_MSG_ERROR([Could not find a suitable Build JDK])
640-
fi
641-
642-
AC_SUBST(CREATE_BUILDJDK)
643-
AC_SUBST(BUILD_JDK)
644-
AC_SUBST(EXTERNAL_BUILDJDK)
618+
AC_SUBST(EXTERNAL_BUILDJDK_PATH)
645619
])
646620

647621
# The docs-reference JDK is used to run javadoc for the docs-reference targets.

make/autoconf/flags-cflags.m4

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -37,56 +37,25 @@ AC_DEFUN([FLAGS_SETUP_SHARED_LIBS],
3737
if test "x$TOOLCHAIN_TYPE" = xgcc; then
3838
# Default works for linux, might work on other platforms as well.
3939
SHARED_LIBRARY_FLAGS='-shared'
40-
# --disable-new-dtags forces use of RPATH instead of RUNPATH for rpaths.
41-
# This protects internal library dependencies within the JDK from being
42-
# overridden using LD_LIBRARY_PATH. See JDK-8326891 for more information.
43-
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1 -Wl,--disable-new-dtags'
44-
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
45-
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
4640
4741
elif test "x$TOOLCHAIN_TYPE" = xclang; then
4842
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
4943
# Linking is different on MacOSX
5044
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0"
51-
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or [$]1,/.)'
52-
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
53-
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
5445
5546
elif test "x$OPENJDK_TARGET_OS" = xaix; then
5647
# Linking is different on aix
5748
SHARED_LIBRARY_FLAGS="-shared -Wl,-bM:SRE -Wl,-bnoentry"
58-
SET_EXECUTABLE_ORIGIN=""
59-
SET_SHARED_LIBRARY_ORIGIN=''
60-
SET_SHARED_LIBRARY_NAME=''
6149
6250
else
6351
# Default works for linux, might work on other platforms as well.
6452
SHARED_LIBRARY_FLAGS='-shared'
65-
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN[$]1'
66-
if test "x$OPENJDK_TARGET_OS" = xlinux; then
67-
SET_EXECUTABLE_ORIGIN="$SET_EXECUTABLE_ORIGIN -Wl,--disable-new-dtags"
68-
fi
69-
SET_SHARED_LIBRARY_NAME='-Wl,-soname=[$]1'
70-
71-
# arm specific settings
72-
if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
73-
# '-Wl,-z,origin' isn't used on arm.
74-
SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN[$]1'
75-
else
76-
SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
77-
fi
7853
fi
7954
8055
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
8156
SHARED_LIBRARY_FLAGS="-dll"
82-
SET_EXECUTABLE_ORIGIN=''
83-
SET_SHARED_LIBRARY_ORIGIN=''
84-
SET_SHARED_LIBRARY_NAME=''
8557
fi
8658
87-
AC_SUBST(SET_EXECUTABLE_ORIGIN)
88-
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
89-
AC_SUBST(SET_SHARED_LIBRARY_NAME)
9059
AC_SUBST(SHARED_LIBRARY_FLAGS)
9160
])
9261

@@ -934,48 +903,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
934903
IF_FALSE: [$2FDLIBM_CFLAGS=""])
935904
fi
936905
AC_SUBST($2FDLIBM_CFLAGS)
937-
938-
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
939-
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
940-
# ACLE and this flag are required to build the aarch64 SVE related functions in
941-
# libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
942-
# that check.
943-
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
944-
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
945-
AC_LANG_PUSH(C)
946-
OLD_CFLAGS="$CFLAGS"
947-
CFLAGS="$CFLAGS -march=armv8-a+sve"
948-
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
949-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <arm_sve.h>],
950-
[
951-
svint32_t r = svdup_n_s32(1);
952-
return 0;
953-
])],
954-
[
955-
AC_MSG_RESULT([yes])
956-
$2SVE_CFLAGS="-march=armv8-a+sve"
957-
# Switching the initialization mode with gcc from 'pattern' to 'zero'
958-
# avoids the use of unsupported `__builtin_clear_padding` for variable
959-
# length aggregates
960-
if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
961-
INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
962-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG],
963-
IF_TRUE: [
964-
$2SVE_CFLAGS="${$2SVE_CFLAGS} $INIT_ZERO_FLAG"
965-
]
966-
)
967-
fi
968-
],
969-
[
970-
AC_MSG_RESULT([no])
971-
$2SVE_CFLAGS=""
972-
]
973-
)
974-
CFLAGS="$OLD_CFLAGS"
975-
AC_LANG_POP(C)
976-
fi
977-
fi
978-
AC_SUBST($2SVE_CFLAGS)
979906
])
980907

981908
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],

make/autoconf/flags-ldflags.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
9898
9999
# Setup OS-dependent LDFLAGS
100100
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang; then
101-
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
101+
# FIXME: We should really generalize SetSharedLibraryOrigin instead.
102102
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
103103
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN -Wl,-reproducible"
104104
fi

make/autoconf/flags-other.m4

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,62 @@ AC_DEFUN([FLAGS_SETUP_NMFLAGS],
107107
AC_SUBST(NMFLAGS)
108108
])
109109

110+
# Check whether the compiler supports the Arm C Language Extensions (ACLE)
111+
# for SVE. Set SVE_CFLAGS to -march=armv8-a+sve if it does.
112+
# ACLE and this flag are required to build the aarch64 SVE related functions
113+
# in libvectormath.
114+
AC_DEFUN([FLAGS_SETUP_SVE],
115+
[
116+
AARCH64_SVE_AVAILABLE=false
117+
# Apple Silicon does not support SVE; use macOS as a proxy for that check.
118+
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
119+
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
120+
# check the compiler and binutils support sve or not
121+
AC_MSG_CHECKING([if Arm SVE ACLE is supported])
122+
AC_LANG_PUSH([C])
123+
saved_cflags="$CFLAGS"
124+
CFLAGS="$CFLAGS -march=armv8-a+sve $CFLAGS_WARNINGS_ARE_ERRORS ARG_ARGUMENT"
125+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
126+
[
127+
#include <arm_sve.h>
128+
svfloat64_t a() {}
129+
],
130+
[
131+
svint32_t r = svdup_n_s32(1)
132+
])],
133+
[
134+
AARCH64_SVE_AVAILABLE=true
135+
]
136+
)
137+
CFLAGS="$saved_cflags"
138+
AC_LANG_POP([C])
139+
AC_MSG_RESULT([$AARCH64_SVE_AVAILABLE])
140+
fi
141+
fi
142+
143+
UTIL_ARG_ENABLE(NAME: aarch64-sve, DEFAULT: auto,
144+
RESULT: AARCH64_SVE_ENABLED,
145+
DESC: [Use SVE when compiling libsleef],
146+
AVAILABLE: $AARCH64_SVE_AVAILABLE)
147+
SVE_CFLAGS=""
148+
if test "x$AARCH64_SVE_ENABLED" = xtrue; then
149+
SVE_CFLAGS="-march=armv8-a+sve"
150+
# Switching the initialization mode with gcc from 'pattern' to 'zero'
151+
# avoids the use of unsupported `__builtin_clear_padding` for variable
152+
# length aggregates
153+
if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
154+
AC_MSG_CHECKING([Switching the initialization mode with gcc from pattern to zero])
155+
INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
156+
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG],
157+
IF_TRUE: [
158+
SVE_CFLAGS="${SVE_CFLAGS} $INIT_ZERO_FLAG"
159+
]
160+
)
161+
fi
162+
fi
163+
AC_SUBST(SVE_CFLAGS)
164+
])
165+
110166
################################################################################
111167
# platform independent
112168
AC_DEFUN([FLAGS_SETUP_ASFLAGS],

make/autoconf/flags.m4

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -319,16 +319,10 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
319319
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
320320
[
321321
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
322-
CC_OUT_OPTION=-Fo
323322
if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
324323
AS_NON_ASM_EXTENSION_OPTION=-Ta
325324
fi
326-
else
327-
# The option used to specify the target .o,.a or .so file.
328-
# When compiling, how to specify the to be created object file.
329-
CC_OUT_OPTION='-o$(SPACE)'
330325
fi
331-
AC_SUBST(CC_OUT_OPTION)
332326
AC_SUBST(AS_NON_ASM_EXTENSION_OPTION)
333327
334328
# Generate make dependency files
@@ -374,6 +368,7 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
374368
FLAGS_SETUP_RCFLAGS
375369
FLAGS_SETUP_NMFLAGS
376370
371+
FLAGS_SETUP_SVE
377372
FLAGS_SETUP_ASFLAGS
378373
FLAGS_SETUP_ASFLAGS_CPU_DEP([TARGET])
379374
FLAGS_SETUP_ASFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])

make/autoconf/lib-tests.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
################################################################################
2929

3030
# Minimum supported versions
31-
JTREG_MINIMUM_VERSION=7.5.2
31+
JTREG_MINIMUM_VERSION=8
3232
GTEST_MINIMUM_VERSION=1.14.0
3333

3434
################################################################################

make/autoconf/spec.gmk.template

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,22 @@ CAPSTONE_ARCH_AARCH64_NAME := @CAPSTONE_ARCH_AARCH64_NAME@
386386
# it in sync.
387387
BOOT_JDK := @BOOT_JDK@
388388

389-
BUILD_JDK := @BUILD_JDK@
390-
CREATE_BUILDJDK := @CREATE_BUILDJDK@
391-
EXTERNAL_BUILDJDK := @EXTERNAL_BUILDJDK@
389+
EXTERNAL_BUILDJDK_PATH := @EXTERNAL_BUILDJDK_PATH@
390+
391+
ifneq ($(EXTERNAL_BUILDJDK_PATH), )
392+
EXTERNAL_BUILDJDK := true
393+
CREATE_BUILDJDK := false
394+
BUILD_JDK := $(EXTERNAL_BUILDJDK_PATH)
395+
else
396+
EXTERNAL_BUILDJDK := false
397+
ifeq ($(COMPILE_TYPE), cross)
398+
CREATE_BUILDJDK := true
399+
BUILD_JDK := $(BUILDJDK_OUTPUTDIR)/jdk
400+
else
401+
CREATE_BUILDJDK := false
402+
BUILD_JDK := $(JDK_OUTPUTDIR)
403+
endif
404+
endif
392405

393406
# Whether the boot jdk jar supports --date=TIMESTAMP
394407
BOOT_JDK_JAR_SUPPORTS_DATE := @BOOT_JDK_JAR_SUPPORTS_DATE@
@@ -491,7 +504,6 @@ CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
491504
# Legacy support
492505
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
493506

494-
CC_OUT_OPTION := @CC_OUT_OPTION@
495507
AS_NON_ASM_EXTENSION_OPTION := @AS_NON_ASM_EXTENSION_OPTION@
496508

497509
# Flags used for overriding the default opt setting for a C/C++ source file.
@@ -624,17 +636,8 @@ ASFLAGS_DEBUG_SYMBOLS := @ASFLAGS_DEBUG_SYMBOLS@
624636
# Compress (or not) jars
625637
COMPRESS_JARS := @COMPRESS_JARS@
626638

627-
# Options to linker to specify the library name.
628-
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
629-
SET_SHARED_LIBRARY_NAME = @SET_SHARED_LIBRARY_NAME@
630-
631639
SHARED_LIBRARY_FLAGS := @SHARED_LIBRARY_FLAGS@
632640

633-
# Set origin using the linker, ie use the relative path to the dependent library to find the dependencies.
634-
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
635-
SET_SHARED_LIBRARY_ORIGIN = @SET_SHARED_LIBRARY_ORIGIN@
636-
SET_EXECUTABLE_ORIGIN = @SET_EXECUTABLE_ORIGIN@
637-
638641
LIBRARY_PREFIX := @LIBRARY_PREFIX@
639642
SHARED_LIBRARY_SUFFIX := @SHARED_LIBRARY_SUFFIX@
640643
STATIC_LIBRARY_SUFFIX := @STATIC_LIBRARY_SUFFIX@
@@ -657,8 +660,8 @@ JAVA_CMD := @JAVA@
657660
JAVAC_CMD := @JAVAC@
658661
JAVADOC_CMD := @JAVADOC@
659662
JAR_CMD := @JAR@
660-
JLINK_CMD := @JLINK@
661-
JMOD_CMD := @JMOD@
663+
JLINK_CMD := @FIXPATH@ $(BUILD_JDK)/bin/jlink
664+
JMOD_CMD := @FIXPATH@ $(BUILD_JDK)/bin/jmod
662665
# These variables are meant to be used. They are defined with = instead of := to make
663666
# it possible to override only the *_CMD variables.
664667
JAVA = $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)

0 commit comments

Comments
 (0)