Skip to content

Commit

Permalink
Merge pull request #13 from Tencent/merge_17.0.8
Browse files Browse the repository at this point in the history
Merge from KonaJDK 17.0.8
  • Loading branch information
shiyuexw authored Jul 25, 2023
2 parents 758b77a + 99c7ea8 commit 90ebd87
Show file tree
Hide file tree
Showing 1,186 changed files with 62,683 additions and 18,661 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,26 @@ jobs:
id: gtest
uses: ./.github/actions/get-gtest

- name: 'Check toolchain installed'
id: toolchain-check
run: |
set +e
'/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/vc/auxiliary/build/vcvars64.bat' -vcvars_ver=${{ inputs.msvc-toolset-version }}
if [ $? -eq 0 ]; then
echo "Toolchain is already installed"
echo "toolchain-installed=true" >> $GITHUB_OUTPUT
else
echo "Toolchain is not yet installed"
echo "toolchain-installed=false" >> $GITHUB_OUTPUT
fi
- name: 'Install toolchain and dependencies'
run: |
# Run Visual Studio Installer
'/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
modify --quiet --installPath 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' \
--add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
if: steps.toolchain-check.outputs.toolchain-installed != 'true'

- name: 'Configure'
run: >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
msvc-toolset-version: '14.25'
msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'x86.x64'
if: needs.select.outputs.windows-x64 == 'true'

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ NashornProfile.txt
/src/utils/LogCompilation/target/
/.project/
/.settings/
/compile_commands.json
/.cache
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk-updates
jbs=JDK
version=17.0.7
version=17.0.8

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
Expand Down
9 changes: 9 additions & 0 deletions bin/jib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ install_jib() {
exit 1
fi
fi
# Want to check the filetype using file, to see if we got served a HTML error page.
# This is sensitive to the filename containing a specific string, but good enough.
file "${installed_jib_script}.gz" | grep "gzip compressed data" > /dev/null
if [ $? -ne 0 ]; then
echo "Warning: ${installed_jib_script}.gz is not a gzip file."
echo "If you are behind a proxy you may need to configure exceptions using no_proxy."
echo "The download URL was: ${jib_url}"
exit 1
fi
echo "Extracting JIB bootstrap script"
rm -f "${installed_jib_script}"
gunzip "${installed_jib_script}.gz"
Expand Down
4 changes: 2 additions & 2 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
<tbody>
<tr class="odd">
<td>Linux</td>
<td>gcc 10.2.0</td>
<td>gcc 11.2.0</td>
</tr>
<tr class="even">
<td>macOS</td>
Expand All @@ -288,7 +288,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
<h3 id="gcc">gcc</h3>
<p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
<p>The JDK is currently known to be able to compile with at least version 10.2 of gcc.</p>
<p>The JDK is currently known to be able to compile with at least version 11.2 of gcc.</p>
<p>In general, any version between these two should be usable.</p>
<h3 id="clang">clang</h3>
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
Expand Down
4 changes: 2 additions & 2 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ issues.

| Operating system | Toolchain version |
| ------------------ | ------------------------------------------ |
| Linux | gcc 10.2.0 |
| Linux | gcc 11.2.0 |
| macOS | Apple Xcode 10.1 (using clang 10.0.0) |
| Windows | Microsoft Visual Studio 2022 update 17.1.0 |

Expand All @@ -335,7 +335,7 @@ features that it does support.
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
by `configure` and are unlikely to work.

The JDK is currently known to be able to compile with at least version 10.2 of
The JDK is currently known to be able to compile with at least version 11.2 of
gcc.

In general, any version between these two should be usable.
Expand Down
31 changes: 28 additions & 3 deletions doc/testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,39 @@ <h3 id="pkcs11-tests">PKCS11 Tests</h3>
JTREG=&quot;JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs&quot;</code></pre>
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
<h3 id="client-ui-tests">Client UI Tests</h3>
<h4 id="system-key-shortcuts">System key shortcuts</h4>
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
<h4 id="macos">MacOS</h4>
<h5 id="macos">MacOS</h5>
<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect &quot;Turn keyboard access on or off&quot; option which is responsible for <code>CTRL + F1</code> combination.</p>
<h4 id="linux">Linux</h4>
<h5 id="linux">Linux</h5>
<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
<h4 id="windows">Windows</h4>
<h5 id="windows">Windows</h5>
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -&gt; Administrative Templates -&gt; Windows Components -&gt; File Explorer; in the right-side pane look for &quot;Turn off Windows key hotkeys&quot; and double click on it; enable or disable hotkeys.</p>
<p>Note: restart is required to make the settings take effect.</p>
<h4 id="robot-api">Robot API</h4>
<p>Most automated Client UI tests use <code>Robot</code> API to control
the UI. Usually, the default operating system settings need to be
adjusted for Robot to work correctly. The detailed steps how to access
and update these settings for different platforms are provided
below.</p>
<h5 id="macos-1">macOS</h5>
<p><code>Robot</code> is not permitted to control your Mac by default
since macOS 10.15. To allow it, choose Apple menu -&gt; System Settings,
click Privacy &amp; Security; then click Accessibility and ensure the
following apps are allowed to control your computer: <em>Java</em> and
<em>Terminal</em>. If the tests are run from an IDE, the IDE should be
granted this permission too.</p>
<h5 id="windows-1">Windows</h5>
<p>On Windows if Cygwin terminal is used to run the tests, there is a
delay in focus transfer. Usually it causes automated UI test failure. To
disable the delay, type <code>regedit</code> in the Search and then
select Registry Editor; navigate to the following key:
<code>HKEY_CURRENT_USER\Control Panel\Desktop</code>; make sure the
<code>ForegroundLockTimeout</code> value is set to 0.</p>
<p>Additional information about Client UI tests configuration for
various operating systems can be obtained at <a
href="https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements">Automated
client GUI testing system set up requirements</a></p>
</body>
</html>
35 changes: 32 additions & 3 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,14 @@ test/jdk/sun/security/pkcs11/README.

### Client UI Tests

#### System key shortcuts

Some Client UI tests use key sequences which may be reserved by the operating
system. Usually that causes the test failure. So it is highly recommended to
disable system key shortcuts prior testing. The steps to access and disable
system key shortcuts for various platforms are provided below.

#### MacOS
##### macOS

Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
select or deselect desired shortcut.
Expand All @@ -564,12 +566,12 @@ test correctly the default global key shortcut should be disabled using the
steps described above, and then deselect "Turn keyboard access on or off"
option which is responsible for `CTRL + F1` combination.

#### Linux
##### Linux

Open the Activities overview and start typing Settings; Choose Settings, click
Devices, then click Keyboard; set or override desired shortcut.

#### Windows
##### Windows

Type `gpedit` in the Search and then click Edit group policy; navigate to User
Configuration -> Administrative Templates -> Windows Components -> File
Expand All @@ -578,6 +580,33 @@ double click on it; enable or disable hotkeys.

Note: restart is required to make the settings take effect.

#### Robot API

Most automated Client UI tests use `Robot` API to control the UI. Usually,
the default operating system settings need to be adjusted for Robot
to work correctly. The detailed steps how to access and update these settings
for different platforms are provided below.

##### macOS

`Robot` is not permitted to control your Mac by default since
macOS 10.15. To allow it, choose Apple menu -> System Settings, click
Privacy & Security; then click Accessibility and ensure the following apps are
allowed to control your computer: *Java* and *Terminal*. If the tests are run
from an IDE, the IDE should be granted this permission too.

##### Windows

On Windows if Cygwin terminal is used to run the tests, there is a delay in
focus transfer. Usually it causes automated UI test failure. To disable the
delay, type `regedit` in the Search and then select Registry Editor; navigate
to the following key: `HKEY_CURRENT_USER\Control Panel\Desktop`; make sure
the `ForegroundLockTimeout` value is set to 0.

Additional information about Client UI tests configuration for various operating
systems can be obtained at [Automated client GUI testing system set up
requirements](https://wiki.openjdk.org/display/ClientLibs/Automated+client+GUI+testing+system+set+up+requirements)

---
# Override some definitions in the global css file that are not optimal for
# this document.
Expand Down
1 change: 1 addition & 0 deletions make/ReleaseFile.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ define create-info-file
$(if $(VENDOR_VERSION_STRING), \
$(call info-file-item, "IMPLEMENTOR_VERSION", "$(VENDOR_VERSION_STRING)"))
$(call info-file-item, "JAVA_VERSION_DATE", "$(VERSION_DATE)")
$(call info-file-item, "JAVA_RUNTIME_VERSION", "$(VERSION_STRING)")
$(call info-file-item, "OS_NAME", "$(RELEASE_FILE_OS_NAME)")
$(call info-file-item, "OS_ARCH", "$(RELEASE_FILE_OS_ARCH)")
$(call info-file-item, "LIBC", "$(RELEASE_FILE_LIBC)")
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/basic.m4
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],

###############################################################################
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
[
# Save the current directory this script was started from
Expand Down
40 changes: 26 additions & 14 deletions make/autoconf/basic_tools.m4
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#

###############################################################################
# Setup the most fundamental tools that relies on not much else to set up,
# but is used by much of the early bootstrap code.
# Setup the most fundamental tools, used for setting up build platform and
# path handling.
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
[
# Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
Expand All @@ -37,15 +37,35 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_CHECK_NONEMPTY(FILE)
AC_PATH_PROGS(LDD, ldd)
# First are all the fundamental required tools.
# Required tools
UTIL_REQUIRE_PROGS(ECHO, echo)
UTIL_REQUIRE_PROGS(TR, tr)
UTIL_REQUIRE_PROGS(UNAME, uname)
UTIL_REQUIRE_PROGS(WC, wc)
# Required tools with some special treatment
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
# Tools only needed on some platforms
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
])

###############################################################################
# Setup further tools that should be resolved early but after setting up
# build platform and path handling.
AC_DEFUN_ONCE([BASIC_SETUP_TOOLS],
[
# Required tools
UTIL_REQUIRE_PROGS(BASH, bash)
UTIL_REQUIRE_PROGS(CAT, cat)
UTIL_REQUIRE_PROGS(CHMOD, chmod)
UTIL_REQUIRE_PROGS(CP, cp)
UTIL_REQUIRE_PROGS(CUT, cut)
UTIL_REQUIRE_PROGS(DATE, date)
UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
UTIL_REQUIRE_PROGS(ECHO, echo)
UTIL_REQUIRE_PROGS(EXPR, expr)
UTIL_REQUIRE_PROGS(FIND, find)
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
Expand All @@ -67,26 +87,18 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_REQUIRE_PROGS(TAR, gtar tar)
UTIL_REQUIRE_PROGS(TEE, tee)
UTIL_REQUIRE_PROGS(TOUCH, touch)
UTIL_REQUIRE_PROGS(TR, tr)
UTIL_REQUIRE_PROGS(UNAME, uname)
UTIL_REQUIRE_PROGS(WC, wc)
UTIL_REQUIRE_PROGS(XARGS, xargs)
# Then required tools that require some special treatment.
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
# Required tools with some special treatment
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
# Optional tools, we can do without them
UTIL_LOOKUP_PROGS(DF, df)
UTIL_LOOKUP_PROGS(NICE, nice)
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
# These are only needed on some platforms
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
# Tools only needed on some platforms
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
# For compare.sh only
UTIL_LOOKUP_PROGS(CMP, cmp)
Expand Down
1 change: 1 addition & 0 deletions make/autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET

# Continue setting up basic stuff. Most remaining code require fundamental tools.
BASIC_SETUP_PATHS
BASIC_SETUP_TOOLS

# Check if it's a pure open build or if custom sources are to be used.
JDKOPT_SETUP_OPEN_OR_CUSTOM
Expand Down
6 changes: 5 additions & 1 deletion make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -188,6 +188,10 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
DISABLED_WARNINGS="unused-parameter unused"
# gcc10/11 on ppc generate lots of abi warnings about layout of aggregates containing vectors
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xppc"; then
DISABLED_WARNINGS="$DISABLED_WARNINGS psabi"
fi
;;
clang)
Expand Down
9 changes: 6 additions & 3 deletions make/autoconf/jvm-features.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -248,8 +248,11 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
[
JVM_FEATURES_CHECK_AVAILABILITY(dtrace, [
AC_MSG_CHECKING([for dtrace tool])
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
AC_MSG_CHECKING([for dtrace tool and platform support])
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xppc"; then
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU_ARCH])
AVAILABLE=false
elif test "x$DTRACE" != "x" && test -x "$DTRACE"; then
AC_MSG_RESULT([$DTRACE])
else
AC_MSG_RESULT([no])
Expand Down
2 changes: 1 addition & 1 deletion make/autoconf/libraries.m4
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
if test "x$OPENJDK_TARGET_OS" = xwindows; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib powrprof.lib uuid.lib \
wsock32.lib winmm.lib version.lib psapi.lib"
fi
Expand Down
3 changes: 2 additions & 1 deletion make/autoconf/platform.m4
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],
])

#%%% Build and target systems %%%
# Make sure to only use tools set up in BASIC_SETUP_FUNDAMENTAL_TOOLS.
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
[
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
Expand Down Expand Up @@ -718,7 +719,7 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
[
###############################################################################
#
# Is the target little of big endian?
# Is the target little or big endian?
#
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
Expand Down
9 changes: 7 additions & 2 deletions make/common/NativeCompilation.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,15 @@ define SetupCompileNativeFileBody
endif
endif

ifneq ($(DISABLE_WARNING_PREFIX), )
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)))
endif

$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)

ifneq ($$(filter %.c, $$($1_FILENAME)), )
Expand Down
Loading

0 comments on commit 90ebd87

Please sign in to comment.