Skip to content

Commit 80a67a5

Browse files
Merge branch 'master' into fix/Deoptimization-and-re-compilation-cycle-with-C2-compiled-code
2 parents 41d7a1d + 2592513 commit 80a67a5

File tree

1,638 files changed

+20981
-40030
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,638 files changed

+20981
-40030
lines changed

Diff for: make/Images.gmk

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ ifeq ($(JLINK_PRODUCE_LINKABLE_RUNTIME), true)
9797
JLINK_JDK_EXTRA_OPTS += --generate-linkable-runtime
9898
endif
9999

100+
ifneq ($(JLINK_USER_EXTRA_FLAGS), )
101+
JLINK_JDK_EXTRA_OPTS += $(JLINK_USER_EXTRA_FLAGS)
102+
endif
103+
100104
$(eval $(call SetupExecute, jlink_jdk, \
101105
WARN := Creating jdk image, \
102106
DEPS := $(JDK_JMODS) $(BASE_RELEASE_FILE) \

Diff for: make/Main.gmk

+1-4
Original file line numberDiff line numberDiff line change
@@ -1321,10 +1321,7 @@ endif
13211321
################################################################################
13221322

13231323
# all-images builds all our deliverables as images.
1324-
all-images: product-images test-image all-docs-images
1325-
ifeq ($(call isTargetOs, linux macosx windows), true)
1326-
all-images: static-jdk-image
1327-
endif
1324+
all-images: product-images static-jdk-image test-image all-docs-images
13281325

13291326
# all-bundles packages all our deliverables as tar.gz bundles.
13301327
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles

Diff for: make/PreInit.gmk

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ ifneq ($(SKIP_SPEC), true)
7575

7676
# Basic checks on environment and command line.
7777
$(eval $(call CheckControlVariables))
78-
$(eval $(call CheckDeprecatedEnvironment))
7978
$(eval $(call CheckInvalidMakeFlags))
8079

8180
# Check that CONF_CHECK is valid.

Diff for: make/PreInitSupport.gmk

-12
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,6 @@ define CheckControlVariables
9494
endif
9595
endef
9696

97-
# Check for deprecated ALT_ variables
98-
define CheckDeprecatedEnvironment
99-
defined_alt_variables := $$(filter ALT_%, $$(.VARIABLES))
100-
ifneq ($$(defined_alt_variables), )
101-
$$(info Warning: You have the following ALT_ variables set:)
102-
$$(foreach var, $$(defined_alt_variables), $$(info * $$(var)=$$($$(var))))
103-
$$(info ALT_ variables are deprecated, and may result in a failed build.)
104-
$$(info Please clean your environment.)
105-
$$(info )
106-
endif
107-
endef
108-
10997
# Check for invalid make flags like -j
11098
define CheckInvalidMakeFlags
11199
# This is a trick to get this rule to execute before any other rules

Diff for: make/RunTestsPrebuilt.gmk

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2017, 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
@@ -140,7 +140,6 @@ $(eval $(call SetupVariable,JIB_JAR,OPTIONAL))
140140
include $(TOPDIR)/make/PreInitSupport.gmk
141141
include $(TOPDIR)/make/common/LogUtils.gmk
142142

143-
$(eval $(call CheckDeprecatedEnvironment))
144143
$(eval $(call CheckInvalidMakeFlags))
145144
$(eval $(call ParseLogLevel))
146145

Diff for: make/StaticLibs.gmk

+20
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ include CopyFiles.gmk
3131
include DebugInfoUtils.gmk
3232
include Modules.gmk
3333
include modules/LauncherCommon.gmk
34+
include Execute.gmk
3435

3536
################################################################################
3637
#
@@ -68,6 +69,10 @@ else ifeq ($(call isTargetOs, windows), true)
6869
BROKEN_STATIC_LIBS += sspi_bridge
6970
# dt_shmem define jdwpTransport_OnLoad which conflict with dt_socket
7071
BROKEN_STATIC_LIBS += dt_shmem
72+
else ifeq ($(call isTargetOs, aix), true)
73+
# libsplashscreen has a name conflict with libawt in the function
74+
# BitmapToYXBandedRectangles, so we exclude it for now.
75+
BROKEN_STATIC_LIBS += splashscreen
7176
endif
7277

7378
$(foreach module, $(STATIC_LIB_MODULES), \
@@ -99,6 +104,18 @@ else ifeq ($(call isTargetOs, linux), true)
99104
STATIC_LIBS := -Wl,--export-dynamic -Wl,--whole-archive $(STATIC_LIB_FILES) -Wl,--no-whole-archive
100105
else ifeq ($(call isTargetOs, windows), true)
101106
STATIC_LIBS := $(addprefix -wholearchive:, $(STATIC_LIB_FILES))
107+
else ifeq ($(call isTargetOs, aix), true)
108+
# on AIX we have to generate export files for all static libs, because we have no whole-archive linker flag
109+
$(foreach lib, $(STATIC_LIB_FILES), \
110+
$(eval $(call SetupExecute, generate_export_list_$(notdir $(lib)), \
111+
INFO := Generating export list for $(notdir $(lib)), \
112+
DEPS := $(lib), \
113+
OUTPUT_FILE := $(lib).exp, \
114+
COMMAND := ( $(AR) $(ARFLAGS) -w $(lib) | $(GREP) -v '^\.' | $(AWK) '{print $$1}' | $(SORT) -u > $(lib).exp ), \
115+
)) \
116+
$(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \
117+
)
118+
STATIC_LIBS := -Wl,-bexpfull $(STATIC_LIB_FILES) $(addprefix -Wl$(COMMA)-bE:, $(STATIC_LIB_EXPORT_FILES))
102119
else
103120
$(error Unsupported platform)
104121
endif
@@ -118,6 +135,9 @@ $(eval $(call SetupBuildLauncher, java, \
118135
))
119136

120137
$(java): $(STATIC_LIB_FILES)
138+
ifeq ($(call isTargetOs, aix), true)
139+
$(java): $(STATIC_LIB_EXPORT_FILES)
140+
endif
121141

122142
TARGETS += $(java)
123143

Diff for: make/autoconf/basic.m4

+4-6
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
7575
AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
7676
fi
7777
78+
if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
79+
AC_MSG_ERROR([32-bit x86 builds are not supported])
80+
fi
81+
7882
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
79-
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
80-
AC_MSG_ERROR([32-bit Windows builds are not supported])
81-
fi
8283
BASIC_SETUP_PATHS_WINDOWS
8384
fi
8485
@@ -549,9 +550,6 @@ AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
549550
550551
BASIC_CHECK_SRC_PERMS
551552
552-
# Check if the user has any old-style ALT_ variables set.
553-
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
554-
555553
# Before generating output files, test if they exist. If they do, this is a reconfigure.
556554
# Since we can't properly handle the dependencies for this, warn the user about the situation
557555
if test -e $OUTPUTDIR/spec.gmk; then

Diff for: make/autoconf/configure.ac

+2-5
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
@@ -174,9 +174,6 @@ SRCDIRS_SETUP_IMPORT_MODULES
174174
#
175175
################################################################################
176176

177-
# See if we are doing a complete static build or not
178-
JDKOPT_SETUP_STATIC_BUILD
179-
180177
# First determine the toolchain type (compiler family)
181178
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
182179

@@ -259,11 +256,11 @@ LIB_TESTS_ENABLE_DISABLE_JTREG_TEST_THREAD_FACTORY
259256

260257
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
261258
JDKOPT_EXCLUDE_TRANSLATIONS
262-
JDKOPT_ENABLE_DISABLE_MANPAGES
263259
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
264260
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE_COH
265261
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
266262
JDKOPT_SETUP_MACOSX_SIGNING
263+
JDKOPT_SETUP_SIGNING_HOOK
267264

268265
################################################################################
269266
#

Diff for: make/autoconf/help.m4

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2022, 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
@@ -341,14 +341,6 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
341341
printf "\n"
342342
fi
343343
344-
if test "x$FOUND_ALT_VARIABLES" != "x"; then
345-
printf "WARNING: You have old-style ALT_ environment variables set.\n"
346-
printf "These are not respected, and will be ignored. It is recommended\n"
347-
printf "that you clean your environment. The following variables are set:\n"
348-
printf "$FOUND_ALT_VARIABLES\n"
349-
printf "\n"
350-
fi
351-
352344
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
353345
printf "WARNING: Your build output directory is not on a local disk.\n"
354346
printf "This will severely degrade build performance!\n"

Diff for: make/autoconf/jdk-options.m4

+35-21
Original file line numberDiff line numberDiff line change
@@ -554,16 +554,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
554554
AC_SUBST(UBSAN_ENABLED)
555555
])
556556

557-
################################################################################
558-
#
559-
# Static build support. When enabled will generate static
560-
# libraries instead of shared libraries for all JDK libs.
561-
#
562-
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
563-
[
564-
UTIL_DEPRECATED_ARG_ENABLE(static-build)
565-
])
566-
567557
################################################################################
568558
#
569559
# jmod options.
@@ -630,6 +620,18 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
630620
DEFAULT_DESC: [enabled by default unless --enable-linkable-runtime is set],
631621
CHECKING_MSG: [if packaged modules are kept])
632622
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
623+
624+
################################################################################
625+
#
626+
# Extra jlink options to be (optionally) passed to the JDK build
627+
#
628+
UTIL_ARG_WITH(NAME: extra-jlink-flags, TYPE: string,
629+
DEFAULT: [],
630+
DESC: [extra flags to be passed to jlink during the build],
631+
OPTIONAL: true)
632+
633+
JLINK_USER_EXTRA_FLAGS="$EXTRA_JLINK_FLAGS"
634+
AC_SUBST(JLINK_USER_EXTRA_FLAGS)
633635
])
634636

635637
################################################################################
@@ -671,15 +673,6 @@ AC_DEFUN([JDKOPT_EXCLUDE_TRANSLATIONS],
671673
AC_SUBST(EXCLUDE_TRANSLATIONS)
672674
])
673675

674-
################################################################################
675-
#
676-
# Optionally disable man pages (deprecated)
677-
#
678-
AC_DEFUN([JDKOPT_ENABLE_DISABLE_MANPAGES],
679-
[
680-
UTIL_DEPRECATED_ARG_ENABLE(manpages)
681-
])
682-
683676
################################################################################
684677
#
685678
# Disable the default CDS archive generation
@@ -866,8 +859,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
866859
AC_SUBST(SOURCE_DATE)
867860
AC_SUBST(ISO_8601_FORMAT_STRING)
868861
AC_SUBST(SOURCE_DATE_ISO_8601)
869-
870-
UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
871862
])
872863

873864
################################################################################
@@ -974,6 +965,29 @@ AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
974965
AC_SUBST(MACOSX_CODESIGN_MODE)
975966
])
976967

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

Diff for: make/autoconf/jvm-features.m4

+3-4
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
@@ -50,9 +50,8 @@ m4_define(jvm_features_valid, m4_normalize( \
5050
))
5151

5252
# Deprecated JVM features (these are ignored, but with a warning)
53-
m4_define(jvm_features_deprecated, m4_normalize(
54-
cmsgc trace \
55-
))
53+
# This list is empty at the moment.
54+
m4_define(jvm_features_deprecated, m4_normalize( ))
5655

5756
# Feature descriptions
5857
m4_define(jvm_feature_desc_cds, [enable class data sharing (CDS)])

Diff for: make/autoconf/platform.m4

+1-11
Original file line numberDiff line numberDiff line change
@@ -666,17 +666,7 @@ AC_DEFUN([PLATFORM_CHECK_DEPRECATION],
666666
[
667667
AC_ARG_ENABLE(deprecated-ports, [AS_HELP_STRING([--enable-deprecated-ports@<:@=yes/no@:>@],
668668
[Suppress the error when configuring for a deprecated port @<:@no@:>@])])
669-
# Unfortunately, variants have not been parsed yet, so we have to check the configure option
670-
# directly. Allow only the directly specified Zero variant, treat any other mix as containing
671-
# something non-Zero.
672-
if test "x$OPENJDK_TARGET_CPU" = xx86 && test "x$with_jvm_variants" != xzero; then
673-
if test "x$enable_deprecated_ports" = "xyes"; then
674-
AC_MSG_WARN([The 32-bit x86 port is deprecated and may be removed in a future release.])
675-
else
676-
AC_MSG_ERROR(m4_normalize([The 32-bit x86 port is deprecated and may be removed in a future release.
677-
Use --enable-deprecated-ports=yes to suppress this error.]))
678-
fi
679-
fi
669+
# There are no deprecated ports. Implement the deprecation warnings here.
680670
])
681671

682672
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],

Diff for: make/autoconf/spec.gmk.template

+4
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@
@@ -712,6 +715,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
712715
JMOD_COMPRESS := @JMOD_COMPRESS@
713716
JLINK_KEEP_PACKAGED_MODULES := @JLINK_KEEP_PACKAGED_MODULES@
714717
JLINK_PRODUCE_LINKABLE_RUNTIME := @JLINK_PRODUCE_LINKABLE_RUNTIME@
718+
JLINK_USER_EXTRA_FLAGS := @JLINK_USER_EXTRA_FLAGS@
715719

716720
RCFLAGS := @RCFLAGS@
717721

Diff for: make/autoconf/toolchain.m4

+8-1
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
@@ -620,6 +620,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
620620
# All other toolchains use the compiler to link.
621621
LD="$CC"
622622
LDCXX="$CXX"
623+
# Force use of lld, since that is what we expect when setting flags later on
624+
if test "x$TOOLCHAIN_TYPE" = xclang; then
625+
if test "x$OPENJDK_TARGET_OS" = xlinux; then
626+
LD="$LD -fuse-ld=lld"
627+
LDCXX="$LDCXX -fuse-ld=lld"
628+
fi
629+
fi
623630
fi
624631
AC_SUBST(LD)
625632
# FIXME: it should be CXXLD, according to standard (cf CXXCPP)

Diff for: make/autoconf/util.m4

+11-3
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
@@ -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

0 commit comments

Comments
 (0)