Skip to content

Commit 915c0f2

Browse files
Merge tag 'jdk-24+21' into labsjdk/adopt-jdk-24+21-master
Added tag jdk-24+21 for changeset 8bcd492
2 parents d5bba5d + 8bcd492 commit 915c0f2

File tree

422 files changed

+92716
-2592
lines changed

Some content is hidden

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

422 files changed

+92716
-2592
lines changed

.github/workflows/build-cross-compile.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
- target-cpu: riscv64
8585
gnu-arch: riscv64
8686
debian-arch: riscv64
87-
debian-repository: https://snapshot.debian.org/archive/debian/20240228T034848Z/
87+
debian-repository: https://httpredir.debian.org/debian/
8888
debian-version: sid
8989
tolerate-sysroot-errors: true
9090

@@ -131,6 +131,7 @@ jobs:
131131
id: create-sysroot
132132
run: >
133133
sudo debootstrap
134+
--no-merged-usr
134135
--arch=${{ matrix.debian-arch }}
135136
--verbose
136137
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
@@ -151,6 +152,9 @@ jobs:
151152
rm -rf sysroot/usr/{sbin,bin,share}
152153
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
153154
rm -rf sysroot/usr/libexec/gcc
155+
# /{bin,sbin,lib}/ are not symbolic links to /usr/{bin,sbin,lib}/ when debootstrap with --no-merged-usr
156+
rm -rf sysroot/{sbin,bin}
157+
rm -rf sysroot/lib/{udev,systemd}
154158
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'
155159

156160
- name: 'Remove broken sysroot'

make/Global.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ help:
102102
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
103103
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
104104
$(info $(_) # make test TEST="jdk_lang gtest:all")
105+
$(info $(_) TEST_DEPS="dependency1 ..." # Specify additional dependencies for running tests, e.g docs-jdk
105106
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'make test-only JTREG=help' to list)
106107
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'make test-only GTEST=help' to list)
107108
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'make test-only MICRO=help' to list)

make/InitSupport.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ifeq ($(HAS_SPEC), )
5050

5151
# Make control variables, handled by Init.gmk
5252
INIT_CONTROL_VARIABLES += LOG CONF CONF_NAME SPEC JOBS TEST_JOBS CONF_CHECK \
53-
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS
53+
COMPARE_BUILD JTREG GTEST MICRO TEST_OPTS TEST_VM_OPTS TEST_DEPS
5454

5555
# All known make control variables
5656
MAKE_CONTROL_VARIABLES := $(INIT_CONTROL_VARIABLES) TEST JDK_FILTER SPEC_FILTER

make/Main.gmk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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
@@ -785,13 +785,13 @@ $(eval $(call SetupTarget, build-microbenchmark, \
785785
$(eval $(call SetupTarget, test, \
786786
MAKEFILE := RunTests, \
787787
ARGS := TEST="$(TEST)", \
788-
DEPS := jdk-image test-image, \
788+
DEPS := jdk-image test-image $(TEST_DEPS), \
789789
))
790790

791791
$(eval $(call SetupTarget, exploded-test, \
792792
MAKEFILE := RunTests, \
793793
ARGS := TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR), \
794-
DEPS := exploded-image test-image, \
794+
DEPS := exploded-image test-image $(TEST_DEPS), \
795795
))
796796

797797
ifeq ($(JCOV_ENABLED), true)
@@ -1110,8 +1110,8 @@ else
11101110
test-make-compile-commands: compile-commands
11111111

11121112
# Declare dependency for all generated test targets
1113-
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
1114-
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
1113+
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image $(TEST_DEPS)))
1114+
$(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image $(TEST_DEPS)))
11151115

11161116
interim-image: $(INTERIM_JMOD_TARGETS)
11171117

make/RunTests.gmk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
264264
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
265265
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
266266
lib-test_JTREG_PROBLEM_LIST += $(TOPDIR)/test/lib-test/ProblemList.txt
267+
docs_JTREG_PROBLEM_LIST += $(TOPDIR)/test/docs/ProblemList.txt
267268

268269
################################################################################
269270
# Parse test selection
@@ -739,6 +740,11 @@ define SetupRunJtregTestBody
739740
# Only the problem list for the current test root should be used.
740741
$1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))
741742

743+
# Pass along the path to the tidy html checker
744+
ifneq ($$(TIDY), )
745+
$1_JTREG_BASIC_OPTIONS += -Dtidy=$$(TIDY)
746+
endif
747+
742748
ifneq ($(TEST_JOBS), 0)
743749
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
744750
else
@@ -868,6 +874,8 @@ define SetupRunJtregTestBody
868874

869875
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
870876

877+
$1_JTREG_BASIC_OPTIONS += -e:DOCS_JDK_IMAGE_DIR=$$(DOCS_JDK_IMAGE_DIR)
878+
871879
ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
872880
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
873881
endif

make/autoconf/configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2024, 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
@@ -202,6 +202,7 @@ FLAGS_POST_TOOLCHAIN
202202
LIB_TESTS_SETUP_JTREG
203203
LIB_TESTS_SETUP_JMH
204204
LIB_TESTS_SETUP_JIB
205+
LIB_TESTS_SETUP_TIDY
205206

206207
# Now we can test some aspects on the target using configure macros.
207208
PLATFORM_SETUP_OPENJDK_TARGET_BITS

make/autoconf/flags-cflags.m4

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -936,15 +936,13 @@ AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
936936
937937
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
938938
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
939-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${BRANCH_PROTECTION_FLAG}],
939+
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$BRANCH_PROTECTION_FLAG],
940940
IF_TRUE: [BRANCH_PROTECTION_AVAILABLE=true])
941941
fi
942942
fi
943943
944-
BRANCH_PROTECTION_CFLAGS=""
945944
UTIL_ARG_ENABLE(NAME: branch-protection, DEFAULT: false,
946-
RESULT: USE_BRANCH_PROTECTION, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
945+
RESULT: BRANCH_PROTECTION_ENABLED, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
947946
DESC: [enable branch protection when compiling C/C++],
948-
IF_ENABLED: [ BRANCH_PROTECTION_CFLAGS=${BRANCH_PROTECTION_FLAG}])
949-
AC_SUBST(BRANCH_PROTECTION_CFLAGS)
947+
IF_ENABLED: [BRANCH_PROTECTION_CFLAGS=$BRANCH_PROTECTION_FLAG])
950948
])

make/autoconf/flags-other.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,9 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS_CPU_DEP],
150150
$2JVM_ASFLAGS="${$2JVM_ASFLAGS} $ARM_ARCH_TYPE_ASFLAGS $ARM_FLOAT_TYPE_ASFLAGS"
151151
fi
152152
153+
if test "x$BRANCH_PROTECTION_ENABLED" = "xtrue"; then
154+
$2JVM_ASFLAGS="${$2JVM_ASFLAGS} $BRANCH_PROTECTION_FLAG"
155+
fi
156+
153157
AC_SUBST($2JVM_ASFLAGS)
154158
])

make/autoconf/lib-tests.m4

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,32 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB],
308308
AC_SUBST(JIB_HOME)
309309
])
310310

311+
# Setup the tidy html checker
312+
AC_DEFUN_ONCE([LIB_TESTS_SETUP_TIDY],
313+
[
314+
UTIL_LOOKUP_PROGS(TIDY, tidy)
315+
316+
if test "x$TIDY" != x; then
317+
AC_MSG_CHECKING([if tidy is working properly])
318+
tidy_output=`$TIDY --version 2>&1`
319+
if ! $ECHO "$tidy_output" | $GREP -q "HTML Tidy" 2>&1 > /dev/null; then
320+
AC_MSG_RESULT([no])
321+
AC_MSG_NOTICE([$TIDY is not a valid tidy executable and will be ignored. Output from --version: $tidy_output])
322+
TIDY=
323+
elif ! $ECHO "$tidy_output" | $GREP -q "version" 2>&1 > /dev/null; then
324+
AC_MSG_RESULT([no])
325+
AC_MSG_NOTICE([$TIDY is missing a proper version number and will be ignored. Output from --version: $tidy_output])
326+
TIDY=
327+
else
328+
AC_MSG_RESULT([yes])
329+
AC_MSG_CHECKING([for tidy version])
330+
tidy_version=`$ECHO $tidy_output | $SED -e 's/.*version //g'`
331+
AC_MSG_RESULT([$tidy_version])
332+
fi
333+
fi
334+
AC_SUBST(TIDY)
335+
])
336+
311337
################################################################################
312338
#
313339
# Check if building of the jtreg failure handler should be enabled.

make/autoconf/spec.gmk.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ ENABLE_LIBFFI_BUNDLING := @ENABLE_LIBFFI_BUNDLING@
429429
LIBFFI_LIB_FILE := @LIBFFI_LIB_FILE@
430430
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
431431
REPRODUCIBLE_CFLAGS := @REPRODUCIBLE_CFLAGS@
432-
BRANCH_PROTECTION_CFLAGS := @BRANCH_PROTECTION_CFLAGS@
433432

434433
STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
435434

@@ -744,6 +743,7 @@ MKDIR := @MKDIR@
744743
MV := @MV@
745744
NICE := @NICE@
746745
PANDOC := @PANDOC@
746+
TIDY := @TIDY@
747747
PATCH := @PATCH@
748748
PRINTF := @PRINTF@
749749
READLINK := @READLINK@

0 commit comments

Comments
 (0)