Skip to content

Commit e479a47

Browse files
author
sendaoYan
authored
Merge branch 'openjdk:master' into backport-sendaoYan-43029006-master
2 parents 199b8d3 + 4a5c578 commit e479a47

File tree

658 files changed

+30629
-9459
lines changed

Some content is hidden

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

658 files changed

+30629
-9459
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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'

.github/workflows/main.yml

Lines changed: 24 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ on:
3535
platforms:
3636
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
3737
required: true
38-
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
38+
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
3939
configure-arguments:
4040
description: 'Additional configure arguments'
4141
required: false
@@ -58,7 +58,7 @@ jobs:
5858
runs-on: ubuntu-22.04
5959
outputs:
6060
linux-x64: ${{ steps.include.outputs.linux-x64 }}
61-
linux-x86: ${{ steps.include.outputs.linux-x86 }}
61+
linux-x86-hs: ${{ steps.include.outputs.linux-x86-hs }}
6262
linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
6363
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
6464
macos-x64: ${{ steps.include.outputs.macos-x64 }}
@@ -110,7 +110,7 @@ jobs:
110110
}
111111
112112
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
113-
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
113+
echo "linux-x86-hs=$(check_platform linux-x86-hs linux x86)" >> $GITHUB_OUTPUT
114114
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
115115
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
116116
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
@@ -134,12 +134,13 @@ jobs:
134134
make-arguments: ${{ github.event.inputs.make-arguments }}
135135
if: needs.select.outputs.linux-x64 == 'true'
136136

137-
build-linux-x86:
138-
name: linux-x86
137+
build-linux-x86-hs:
138+
name: linux-x86-hs
139139
needs: select
140140
uses: ./.github/workflows/build-linux.yml
141141
with:
142142
platform: linux-x86
143+
make-target: 'hotspot'
143144
gcc-major-version: '10'
144145
gcc-package-suffix: '-multilib'
145146
apt-architecture: 'i386'
@@ -149,7 +150,7 @@ jobs:
149150
extra-conf-options: '--with-target-bits=32'
150151
configure-arguments: ${{ github.event.inputs.configure-arguments }}
151152
make-arguments: ${{ github.event.inputs.make-arguments }}
152-
if: needs.select.outputs.linux-x86 == 'true'
153+
if: needs.select.outputs.linux-x86-hs == 'true'
153154

154155
build-linux-x64-hs-nopch:
155156
name: linux-x64-hs-nopch
@@ -299,16 +300,6 @@ jobs:
299300
bootjdk-platform: linux-x64
300301
runs-on: ubuntu-22.04
301302

302-
test-linux-x86:
303-
name: linux-x86
304-
needs:
305-
- build-linux-x86
306-
uses: ./.github/workflows/test.yml
307-
with:
308-
platform: linux-x86
309-
bootjdk-platform: linux-x64
310-
runs-on: ubuntu-22.04
311-
312303
test-macos-x64:
313304
name: macos-x64
314305
needs:
@@ -346,7 +337,7 @@ jobs:
346337
if: always()
347338
needs:
348339
- build-linux-x64
349-
- build-linux-x86
340+
- build-linux-x86-hs
350341
- build-linux-x64-hs-nopch
351342
- build-linux-x64-hs-zero
352343
- build-linux-x64-hs-minimal
@@ -357,31 +348,28 @@ jobs:
357348
- build-windows-x64
358349
- build-windows-aarch64
359350
- test-linux-x64
360-
- test-linux-x86
361351
- test-macos-x64
352+
- test-macos-aarch64
362353
- test-windows-x64
363354

364355
steps:
365-
# Hack to get hold of the api environment variables that are only defined for actions
366-
- name: 'Get API configuration'
367-
id: api
368-
uses: actions/github-script@v7
369-
with:
370-
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
371-
372356
- name: 'Remove bundle artifacts'
373357
run: |
374358
# Find and remove all bundle artifacts
375-
ALL_ARTIFACT_URLS="$(curl -s \
376-
-H 'Accept: application/json;api-version=6.0-preview' \
377-
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
378-
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
379-
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
380-
for url in $BUNDLE_ARTIFACT_URLS; do
381-
echo "Removing $url"
382-
curl -s \
383-
-H 'Accept: application/json;api-version=6.0-preview' \
384-
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
385-
-X DELETE "$url" \
359+
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
360+
ALL_ARTIFACT_IDS="$(curl -sL \
361+
-H 'Accept: application/vnd.github+json' \
362+
-H 'Authorization: Bearer ${{ github.token }}' \
363+
-H 'X-GitHub-Api-Version: 2022-11-28' \
364+
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
365+
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
366+
for id in $BUNDLE_ARTIFACT_IDS; do
367+
echo "Removing $id"
368+
curl -sL \
369+
-X DELETE \
370+
-H 'Accept: application/vnd.github+json' \
371+
-H 'Authorization: Bearer ${{ github.token }}' \
372+
-H 'X-GitHub-Api-Version: 2022-11-28' \
373+
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
386374
|| echo "Failed to remove bundle"
387375
done

.jcheck/conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[general]
22
project=jdk-updates
33
jbs=JDK
4-
version=21.0.5
4+
version=21.0.6
55

66
[checks]
77
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
8+
warning=issuestitle,binary
89

910
[repository]
1011
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)

SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# JDK Vulnerabilities
2+
3+
Please follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.

doc/building.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -569,10 +569,9 @@ <h3 id="clang">clang</h3>
569569
<code>--with-toolchain-type=clang</code>.</p>
570570
<h3 id="apple-xcode">Apple Xcode</h3>
571571
<p>The oldest supported version of Xcode is 8.</p>
572-
<p>You will need the Xcode command line developer tools to be able to
573-
build the JDK. (Actually, <em>only</em> the command line tools are
574-
needed, not the IDE.) The simplest way to install these is to run:</p>
575-
<pre><code>xcode-select --install</code></pre>
572+
<p>You will need to download Xcode either from the App Store or specific
573+
versions can be easily located via the <a
574+
href="https://xcodereleases.com">Xcode Releases</a> website.</p>
576575
<p>When updating Xcode, it is advisable to keep an older version for
577576
building the JDK. To use a specific version of Xcode you have multiple
578577
options:</p>

doc/building.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,9 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
366366

367367
The oldest supported version of Xcode is 8.
368368

369-
You will need the Xcode command line developer tools to be able to build
370-
the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
371-
The simplest way to install these is to run:
372-
```
373-
xcode-select --install
374-
```
369+
You will need to download Xcode either from the App Store or specific versions
370+
can be easily located via the [Xcode Releases](https://xcodereleases.com)
371+
website.
375372

376373
When updating Xcode, it is advisable to keep an older version for building the JDK.
377374
To use a specific version of Xcode you have multiple options:

make/autoconf/configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,11 @@ AC_OUTPUT
313313

314314
# After AC_OUTPUT, we need to do final work
315315
CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK
316-
BASIC_POST_CONFIG_OUTPUT
317316

318317
# Finally output some useful information to the user
319318
HELP_PRINT_SUMMARY_AND_WARNINGS
320319
CUSTOM_SUMMARY_AND_WARNINGS_HOOK
321320
HELP_REPEAT_WARNINGS
321+
322+
# All output is done. Do the post-config output management.
323+
BASIC_POST_CONFIG_OUTPUT

make/autoconf/jdk-options.m4

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,15 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
500500
#
501501
AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
502502
[
503+
UTIL_ARG_WITH(NAME: additional-ubsan-checks, TYPE: string,
504+
DEFAULT: [],
505+
DESC: [Customizes the ubsan checks],
506+
OPTIONAL: true)
507+
503508
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
504509
# Silence them for now.
505-
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
510+
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
511+
$ADDITIONAL_UBSAN_CHECKS"
506512
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
507513
UBSAN_LDFLAGS="$UBSAN_CHECKS"
508514
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,

make/autoconf/lib-alsa.m4

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,25 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
7070
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
7171
fi
7272
fi
73+
if test "x$ALSA_FOUND" = xno; then
74+
# If we have sysroot set, and no explicit library location is set,
75+
# look at known locations in sysroot.
76+
if test "x$SYSROOT" != "x" && test "x${with_alsa_lib}" == x; then
77+
if test -f "$SYSROOT/usr/lib64/libasound.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
78+
ALSA_LIBS="-L$SYSROOT/usr/lib64 -lasound"
79+
ALSA_FOUND=yes
80+
elif test -f "$SYSROOT/usr/lib/libasound.so"; then
81+
ALSA_LIBS="-L$SYSROOT/usr/lib -lasound"
82+
ALSA_FOUND=yes
83+
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
84+
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
85+
ALSA_FOUND=yes
86+
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
87+
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
88+
ALSA_FOUND=yes
89+
fi
90+
fi
91+
fi
7392
if test "x$ALSA_FOUND" = xno; then
7493
AC_CHECK_HEADERS([alsa/asoundlib.h],
7594
[

make/autoconf/lib-x11.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
7171
elif test -f "$SYSROOT/usr/lib/libX11.so"; then
7272
x_libraries="$SYSROOT/usr/lib"
7373
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
74-
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
74+
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
7575
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
76-
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
76+
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
7777
fi
7878
fi
7979
fi

0 commit comments

Comments
 (0)