Skip to content

Commit 7d30219

Browse files
committed
Merge master jdk-17.0.7+2 into openj9-staging
Signed-off-by: Jason Feng <[email protected]>
2 parents 77e36f9 + 461d3bd commit 7d30219

File tree

531 files changed

+32590
-7364
lines changed

Some content is hidden

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

531 files changed

+32590
-7364
lines changed

.jcheck/conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[general]
22
project=jdk-updates
33
jbs=JDK
4-
version=17.0.6
4+
version=17.0.7
55

66
[checks]
77
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists

doc/building.html

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -239,49 +239,49 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
239239
<table>
240240
<thead>
241241
<tr class="header">
242-
<th style="text-align: left;">Operating system</th>
243-
<th style="text-align: left;">Supported toolchain</th>
242+
<th>Operating system</th>
243+
<th>Supported toolchain</th>
244244
</tr>
245245
</thead>
246246
<tbody>
247247
<tr class="odd">
248-
<td style="text-align: left;">Linux</td>
249-
<td style="text-align: left;">gcc, clang</td>
248+
<td>Linux</td>
249+
<td>gcc, clang</td>
250250
</tr>
251251
<tr class="even">
252-
<td style="text-align: left;">macOS</td>
253-
<td style="text-align: left;">Apple Xcode (using clang)</td>
252+
<td>macOS</td>
253+
<td>Apple Xcode (using clang)</td>
254254
</tr>
255255
<tr class="odd">
256-
<td style="text-align: left;">AIX</td>
257-
<td style="text-align: left;">IBM XL C/C++</td>
256+
<td>AIX</td>
257+
<td>IBM XL C/C++</td>
258258
</tr>
259259
<tr class="even">
260-
<td style="text-align: left;">Windows</td>
261-
<td style="text-align: left;">Microsoft Visual Studio</td>
260+
<td>Windows</td>
261+
<td>Microsoft Visual Studio</td>
262262
</tr>
263263
</tbody>
264264
</table>
265265
<p>Please see the individual sections on the toolchains for version recommendations. As a reference, these versions of the toolchains are used, at the time of writing, by Oracle for the daily builds of the JDK. It should be possible to compile the JDK with both older and newer versions, but the closer you stay to this list, the more likely you are to compile successfully without issues.</p>
266266
<table>
267267
<thead>
268268
<tr class="header">
269-
<th style="text-align: left;">Operating system</th>
270-
<th style="text-align: left;">Toolchain version</th>
269+
<th>Operating system</th>
270+
<th>Toolchain version</th>
271271
</tr>
272272
</thead>
273273
<tbody>
274274
<tr class="odd">
275-
<td style="text-align: left;">Linux</td>
276-
<td style="text-align: left;">gcc 10.2.0</td>
275+
<td>Linux</td>
276+
<td>gcc 10.2.0</td>
277277
</tr>
278278
<tr class="even">
279-
<td style="text-align: left;">macOS</td>
280-
<td style="text-align: left;">Apple Xcode 10.1 (using clang 10.0.0)</td>
279+
<td>macOS</td>
280+
<td>Apple Xcode 10.1 (using clang 10.0.0)</td>
281281
</tr>
282282
<tr class="odd">
283-
<td style="text-align: left;">Windows</td>
284-
<td style="text-align: left;">Microsoft Visual Studio 2022 update 17.1.0</td>
283+
<td>Windows</td>
284+
<td>Microsoft Visual Studio 2022 update 17.1.0</td>
285285
</tr>
286286
</tbody>
287287
</table>
@@ -295,12 +295,16 @@ <h3 id="clang">clang</h3>
295295
<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
296296
<h3 id="apple-xcode">Apple Xcode</h3>
297297
<p>The oldest supported version of Xcode is 8.</p>
298-
<p>You will need the Xcode command lines developers tools to be able to build the JDK. (Actually, <em>only</em> the command lines tools are needed, not the IDE.) The simplest way to install these is to run:</p>
298+
<p>You will need the Xcode command line developer tools to be able to build the JDK. (Actually, <em>only</em> the command line tools are needed, not the IDE.) The simplest way to install these is to run:</p>
299299
<pre><code>xcode-select --install</code></pre>
300-
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
300+
<p>When updating Xcode, it is advisable to keep an older version for building the JDK. To use a specific version of Xcode you have multiple options:</p>
301+
<ul>
302+
<li>Use <code>xcode-select -s</code> before running <code>configure</code>, e.g. <code>xcode-select -s /Applications/Xcode13.1.app</code>. The drawback is that the setting is system wide and you may have to revert it after an OpenJDK build.</li>
303+
<li>Use configure option <code>--with-xcode-path</code>, e.g. <code>configure --with-xcode-path=/Applications/Xcode13.1.app</code> This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by <code>xcode-select</code>.</li>
304+
</ul>
301305
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
302306
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
303-
<p>For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019 (16.8 or higher). For all other platforms the minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. For all platforms the maximum accepted version of Visual Studio is 2019.</p>
307+
<p>The minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2019.</p>
304308
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2017</code>.</p>
305309
<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
306310
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>

doc/building.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ be able to run on the target platform. In theory, toolchain and operating
305305
system should be independent factors, but in practice there's more or less a
306306
one-to-one correlation between target operating system and toolchain.
307307

308-
Operating system Supported toolchain
309-
------------------ -------------------------
310-
Linux gcc, clang
311-
macOS Apple Xcode (using clang)
312-
AIX IBM XL C/C++
313-
Windows Microsoft Visual Studio
308+
| Operating system | Supported toolchain |
309+
| ------------------ | ------------------------- |
310+
| Linux | gcc, clang |
311+
| macOS | Apple Xcode (using clang) |
312+
| AIX | IBM XL C/C++ |
313+
| Windows | Microsoft Visual Studio |
314314

315315
Please see the individual sections on the toolchains for version
316316
recommendations. As a reference, these versions of the toolchains are used, at
@@ -319,11 +319,11 @@ possible to compile the JDK with both older and newer versions, but the closer
319319
you stay to this list, the more likely you are to compile successfully without
320320
issues.
321321

322-
Operating system Toolchain version
323-
------------------ -------------------------------------------------------
324-
Linux gcc 10.2.0
325-
macOS Apple Xcode 10.1 (using clang 10.0.0)
326-
Windows Microsoft Visual Studio 2022 update 17.1.0
322+
| Operating system | Toolchain version |
323+
| ------------------ | ------------------------------------------ |
324+
| Linux | gcc 10.2.0 |
325+
| macOS | Apple Xcode 10.1 (using clang 10.0.0) |
326+
| Windows | Microsoft Visual Studio 2022 update 17.1.0 |
327327

328328
All compilers are expected to be able to compile to the C99 language standard,
329329
as some C99 features are used in the source code. Microsoft Visual Studio
@@ -351,20 +351,20 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
351351

352352
The oldest supported version of Xcode is 8.
353353

354-
You will need the Xcode command lines developers tools to be able to build
355-
the JDK. (Actually, *only* the command lines tools are needed, not the IDE.)
354+
You will need the Xcode command line developer tools to be able to build
355+
the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
356356
The simplest way to install these is to run:
357357
```
358358
xcode-select --install
359359
```
360360

361-
It is advisable to keep an older version of Xcode for building the JDK when
362-
updating Xcode. This [blog page](
363-
http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html) has
364-
good suggestions on managing multiple Xcode versions. To use a specific version
365-
of Xcode, use `xcode-select -s` before running `configure`, or use
366-
`--with-toolchain-path` to point to the version of Xcode to use, e.g.
367-
`configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin`
361+
When updating Xcode, it is advisable to keep an older version for building the JDK.
362+
To use a specific version of Xcode you have multiple options:
363+
364+
* Use `xcode-select -s` before running `configure`, e.g. `xcode-select -s /Applications/Xcode13.1.app`. The drawback is that the setting
365+
is system wide and you may have to revert it after an OpenJDK build.
366+
* Use configure option `--with-xcode-path`, e.g. `configure --with-xcode-path=/Applications/Xcode13.1.app`
367+
This allows using a specific Xcode version for an OpenJDK build, independently of the active Xcode version by `xcode-select`.
368368

369369
If you have recently (inadvertently) updated your OS and/or Xcode version, and
370370
the JDK can no longer be built, please see the section on [Problems with the

make/ZipSource.gmk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2014, 2022, 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
@@ -31,6 +31,7 @@ include JavaCompilation.gmk
3131
include Modules.gmk
3232

3333
SRC_ZIP_WORK_DIR := $(SUPPORT_OUTPUTDIR)/src
34+
$(if $(filter $(TOPDIR)/%, $(SUPPORT_OUTPUTDIR)), $(eval SRC_ZIP_BASE := $(TOPDIR)), $(eval SRC_ZIP_BASE := $(SUPPORT_OUTPUTDIR)))
3435

3536
# Hook to include the corresponding custom file, if present.
3637
$(eval $(call IncludeCustomExtension, ZipSource.gmk))
@@ -45,10 +46,10 @@ ALL_MODULES := $(FindAllModules)
4546
# again to create src.zip.
4647
$(foreach m, $(ALL_MODULES), \
4748
$(foreach d, $(call FindModuleSrcDirs, $m), \
48-
$(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \
49+
$(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$(patsubst $(SUPPORT_OUTPUTDIR)/%,%,$d))/$m) \
4950
$(if $(SRC_GENERATED), , \
5051
$(eval $$($d_TARGET): $d ; \
51-
$$(if $(filter $(TOPDIR)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \
52+
$$(if $(filter $(SRC_ZIP_BASE)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \
5253
) \
5354
) \
5455
$(eval SRC_ZIP_SRCS += $$($d_TARGET)) \

make/autoconf/basic.m4

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,18 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
212212
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
213213
)
214214
215+
AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
216+
[set up toolchain on Mac OS using a path to an Xcode installation])])
217+
218+
if test "x$with_xcode_path" != x; then
219+
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
220+
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
221+
$with_xcode_path/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$with_xcode_path/Contents/Developer/usr/bin)
222+
else
223+
AC_MSG_WARN([Option --with-xcode-path is only valid on Mac OS, ignoring.])
224+
fi
225+
fi
226+
215227
AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],
216228
[prepend these directories to the default path])],
217229
[UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]
@@ -222,7 +234,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
222234
# If not, detect if Xcode is installed by running xcodebuild -version
223235
# if no Xcode installed, xcodebuild exits with 1
224236
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
225-
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
237+
if test "x$DEVKIT_ROOT" != x || test "x$TOOLCHAIN_PATH" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
226238
# We need to use xcodebuild in the toolchain dir provided by the user
227239
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
228240
if test x$XCODEBUILD = x; then

make/autoconf/basic_tools.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
161161
[
162162
# Check if make supports the output sync option and if so, setup using it.
163163
UTIL_ARG_WITH(NAME: output-sync, TYPE: literal,
164-
VALID_VALUES: [none recurse line target], DEFAULT: recurse,
164+
VALID_VALUES: [none recurse line target], DEFAULT: none,
165165
OPTIONAL: true, ENABLED_DEFAULT: true,
166166
ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED,
167167
CHECKING_MSG: [for make --output-sync value],

make/autoconf/build-aux/config.guess

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,40 @@
2929
# and fix the broken property, if needed.
3030

3131
DIR=`dirname $0`
32-
OUT=`. $DIR/autoconf-config.guess`
32+
OUT=`. $DIR/autoconf-config.guess 2> /dev/null`
33+
34+
# Handle some cases that autoconf-config.guess is not capable of
35+
if [ "x$OUT" = x ]; then
36+
if [ `uname -s` = Linux ]; then
37+
# Test and fix little endian MIPS.
38+
if [ `uname -m` = mipsel ]; then
39+
OUT=mipsel-unknown-linux-gnu
40+
elif [ `uname -m` = mips64el ]; then
41+
OUT=mips64el-unknown-linux-gnu
42+
# Test and fix little endian PowerPC64.
43+
elif [ `uname -m` = ppc64le ]; then
44+
OUT=powerpc64le-unknown-linux-gnu
45+
# Test and fix LoongArch64.
46+
elif [ `uname -m` = loongarch64 ]; then
47+
OUT=loongarch64-unknown-linux-gnu
48+
# Test and fix RISC-V.
49+
elif [ `uname -m` = riscv64 ]; then
50+
OUT=riscv64-unknown-linux-gnu
51+
fi
52+
# Test and fix cygwin machine arch .x86_64
53+
elif [[ `uname -s` = CYGWIN* ]]; then
54+
if [ `uname -m` = ".x86_64" ]; then
55+
OUT=x86_64-unknown-cygwin
56+
fi
57+
fi
58+
59+
if [ "x$OUT" = x ]; then
60+
# Run autoconf-config.guess again to get the error message.
61+
. $DIR/autoconf-config.guess > /dev/null
62+
else
63+
printf "guessed by custom config.guess... " >&2
64+
fi
65+
fi
3366

3467
# Detect C library.
3568
# Use '-gnu' suffix on systems that use glibc.
@@ -81,36 +114,6 @@ if test $? = 0; then
81114
OUT=powerpc$KERNEL_BITMODE`echo $OUT | sed -e 's/[^-]*//'`
82115
fi
83116

84-
# Test and fix little endian PowerPC64.
85-
# TODO: should be handled by autoconf-config.guess.
86-
if [ "x$OUT" = x ]; then
87-
if [ `uname -m` = ppc64le ]; then
88-
if [ `uname -s` = Linux ]; then
89-
OUT=powerpc64le-unknown-linux-gnu
90-
fi
91-
fi
92-
fi
93-
94-
# Test and fix little endian MIPS.
95-
if [ "x$OUT" = x ]; then
96-
if [ `uname -s` = Linux ]; then
97-
if [ `uname -m` = mipsel ]; then
98-
OUT=mipsel-unknown-linux-gnu
99-
elif [ `uname -m` = mips64el ]; then
100-
OUT=mips64el-unknown-linux-gnu
101-
fi
102-
fi
103-
fi
104-
105-
# Test and fix LoongArch64.
106-
if [ "x$OUT" = x ]; then
107-
if [ `uname -s` = Linux ]; then
108-
if [ `uname -m` = loongarch64 ]; then
109-
OUT=loongarch64-unknown-linux-gnu
110-
fi
111-
fi
112-
fi
113-
114117
# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
115118
echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
116119
if test $? != 0; then

make/autoconf/flags.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,14 @@ UTIL_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
489489
UTIL_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
490490
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
491491
[
492-
FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
492+
FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT,
493493
IF_TRUE: [C_COMP_SUPPORTS="yes"],
494494
IF_FALSE: [C_COMP_SUPPORTS="no"],
495-
PREFIX: [ARG_PREFIX])
496-
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
495+
PREFIX: ARG_PREFIX)
496+
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: ARG_ARGUMENT,
497497
IF_TRUE: [CXX_COMP_SUPPORTS="yes"],
498498
IF_FALSE: [CXX_COMP_SUPPORTS="no"],
499-
PREFIX: [ARG_PREFIX])
499+
PREFIX: ARG_PREFIX)
500500
501501
AC_MSG_CHECKING([if both ARG_PREFIX[CC] and ARG_PREFIX[CXX] support "ARG_ARGUMENT"])
502502
supports=no

make/autoconf/jdk-options.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2011, 2023, 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
@@ -748,7 +748,7 @@ AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
748748
$RM "$CODESIGN_TESTFILE"
749749
$TOUCH "$CODESIGN_TESTFILE"
750750
CODESIGN_SUCCESS=false
751-
$CODESIGN $PARAMS "$CODESIGN_TESTFILE" 2>&AS_MESSAGE_LOG_FD \
751+
eval \"$CODESIGN\" $PARAMS \"$CODESIGN_TESTFILE\" 2>&AS_MESSAGE_LOG_FD \
752752
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
753753
$RM "$CODESIGN_TESTFILE"
754754
AC_MSG_CHECKING([$MESSAGE])
@@ -761,7 +761,7 @@ AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
761761

762762
AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED],
763763
[
764-
JDKOPT_CHECK_CODESIGN_PARAMS([-s "$MACOSX_CODESIGN_IDENTITY" --option runtime],
764+
JDKOPT_CHECK_CODESIGN_PARAMS([-s \"$MACOSX_CODESIGN_IDENTITY\" --option runtime],
765765
[if codesign with hardened runtime is possible])
766766
])
767767

0 commit comments

Comments
 (0)