Skip to content

Commit

Permalink
Merge branch 'master' into 8323782__Race__Thread__interrupt_vs__Abstr…
Browse files Browse the repository at this point in the history
…actInterruptibleChannel_begin
  • Loading branch information
reinrich committed Feb 15, 2024
2 parents 81a9f81 + b718ae3 commit d9a71c2
Show file tree
Hide file tree
Showing 911 changed files with 16,177 additions and 14,664 deletions.
10 changes: 8 additions & 2 deletions .github/actions/get-jtreg/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2023, 2024, 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 @@ -56,8 +56,14 @@ runs:

- name: 'Build JTReg'
run: |
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
if [[ '${{ runner.arch }}' == 'X64' ]]; then
JDK="$JAVA_HOME_17_X64"
else
JDK="$JAVA_HOME_17_arm64"
fi
# Build JTReg and move files to the proper locations
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
bash make/build.sh --jdk "$JDK"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, 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 @@ -31,6 +31,9 @@ on:
platform:
required: true
type: string
runs-on:
required: true
type: string
extra-conf-options:
required: false
type: string
Expand All @@ -55,7 +58,7 @@ on:
jobs:
build-macos:
name: build
runs-on: macos-13
runs-on: ${{ inputs.runs-on }}

strategy:
fail-fast: false
Expand All @@ -74,7 +77,7 @@ jobs:
id: bootjdk
uses: ./.github/actions/get-bootjdk
with:
platform: macos-x64
platform: ${{ inputs.platform }}

- name: 'Get JTReg'
id: jtreg
Expand All @@ -87,7 +90,7 @@ jobs:
- name: 'Install toolchain and dependencies'
run: |
# Run Homebrew installation and xcode-select
brew install make
brew install autoconf make
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2022, 2024, 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 @@ -228,6 +228,7 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-x64
runs-on: 'macos-13'
xcode-toolset-version: '14.3.1'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
Expand All @@ -239,8 +240,8 @@ jobs:
uses: ./.github/workflows/build-macos.yml
with:
platform: macos-aarch64
runs-on: 'macos-14'
xcode-toolset-version: '14.3.1'
extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-aarch64 == 'true'
Expand Down Expand Up @@ -321,6 +322,16 @@ jobs:
bootjdk-platform: macos-x64
runs-on: macos-13

test-macos-aarch64:
name: macos-aarch64
needs:
- build-macos-aarch64
uses: ./.github/workflows/test.yml
with:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14

test-windows-x64:
name: windows-x64
needs:
Expand Down
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ version=0
domain=openjdk.org

[checks "whitespace"]
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.md|.*\.gmk|.*\.m4|.*\.ac|Makefile
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.md|.*\.properties|.*\.gmk|.*\.m4|.*\.ac|Makefile
ignore-tabs=.*\.gmk|Makefile

[checks "merge"]
Expand Down
40 changes: 30 additions & 10 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ <h1 class="title">Building the JDK</h1>
<li><a href="#autoconf" id="toc-autoconf">Autoconf</a></li>
<li><a href="#gnu-make" id="toc-gnu-make">GNU Make</a></li>
<li><a href="#gnu-bash" id="toc-gnu-bash">GNU Bash</a></li>
<li><a href="#graphviz-and-pandoc" id="toc-graphviz-and-pandoc">Graphviz
and Pandoc</a></li>
</ul></li>
<li><a href="#running-configure" id="toc-running-configure">Running
Configure</a>
Expand Down Expand Up @@ -524,7 +526,7 @@ <h3 id="linux">Linux</h3>
<p>The basic tooling is provided as part of the core operating system,
but you will most likely need to install developer packages.</p>
<p>For apt-based distributions (Debian, Ubuntu, etc), try this:</p>
<pre><code>sudo apt-get install build-essential</code></pre>
<pre><code>sudo apt-get install build-essential autoconf</code></pre>
<p>For rpm-based distributions (Fedora, Red Hat, etc), try this:</p>
<pre><code>sudo yum groupinstall &quot;Development Tools&quot;</code></pre>
<p>For Alpine Linux, aside from basic tooling, install the GNU versions
Expand Down Expand Up @@ -862,6 +864,13 @@ <h3 id="gnu-bash">GNU Bash</h3>
href="https://www.gnu.org/software/bash">GNU Bash</a>. No other shells
are supported.</p>
<p>At least version 3.2 of GNU Bash must be used.</p>
<h3 id="graphviz-and-pandoc">Graphviz and Pandoc</h3>
<p>In order to build the full docs (see the
<code>--enable-full-docs</code> configure option) <a
href="https://www.graphviz.org">Graphviz</a> and <a
href="https://pandoc.org">Pandoc</a> are required. Any recent versions
should work. For reference, and subject to change, Oracle builds use
Graphviz 9.0.0 and Pandoc 2.19.2.</p>
<h2 id="running-configure">Running Configure</h2>
<p>To build the JDK, you need a "configuration", which consists of a
directory where to store the build output, coupled with information
Expand Down Expand Up @@ -2157,15 +2166,26 @@ <h3 id="using-multiple-configurations">Using Multiple
<code>configure</code> from there, e.g.
<code>mkdir build/&lt;name&gt; &amp;&amp; cd build/&lt;name&gt; &amp;&amp; bash ../../configure</code>.</p>
<p>Then you can build that configuration using
<code>make CONF_NAME=&lt;name&gt;</code> or
<code>make CONF=&lt;pattern&gt;</code>, where
<code>&lt;pattern&gt;</code> is a substring matching one or several
configurations, e.g. <code>CONF=debug</code>. The special empty pattern
(<code>CONF=</code>) will match <em>all</em> available configuration, so
<code>make CONF= hotspot</code> will build the <code>hotspot</code>
target for all configurations. Alternatively, you can execute
<code>make</code> in the configuration directory, e.g.
<code>cd build/&lt;name&gt; &amp;&amp; make</code>.</p>
<code>make CONF=&lt;selector&gt;</code>, where
<code>&lt;selector&gt;</code> is interpreted as follows:</p>
<ul>
<li>If <code>&lt;selector&gt;</code> exacly matches the name of a
configuration, this and only this configuration will be selected.</li>
<li>If <code>&lt;selector&gt;</code> matches (i.e. is a substring of)
the names of several configurations, then all these configurations will
be selected.</li>
<li>If <code>&lt;selector&gt;</code> is empty (i.e. <code>CONF=</code>),
then all configurations will be selected.</li>
<li>If <code>&lt;selector&gt;</code> begins with <code>!</code>, then
all configurations <strong>not</strong> matching the string following
<code>!</code> will be selected.</li>
</ul>
<p>A more specialized version, <code>CONF_NAME=&lt;name&gt;</code> also
exists, which will only match if the given <code>&lt;name&gt;</code>
exactly matches a single configuration.</p>
<p>Alternatively, you can execute <code>make</code> in the configuration
directory, e.g. <code>cd build/&lt;name&gt; &amp;&amp; make</code>.</p>
<p><code>make CONF_NAME=&lt;name&gt;</code> or</p>
<h3 id="handling-reconfigurations">Handling Reconfigurations</h3>
<p>If you update the repository and part of the configure script has
changed, the build system will force you to re-run
Expand Down
35 changes: 28 additions & 7 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ will most likely need to install developer packages.
For apt-based distributions (Debian, Ubuntu, etc), try this:

```
sudo apt-get install build-essential
sudo apt-get install build-essential autoconf
```

For rpm-based distributions (Fedora, Red Hat, etc), try this:
Expand Down Expand Up @@ -685,6 +685,14 @@ shells are supported.

At least version 3.2 of GNU Bash must be used.

### Graphviz and Pandoc

In order to build the full docs (see the `--enable-full-docs`
configure option) [Graphviz](https://www.graphviz.org) and
[Pandoc](https://pandoc.org) are required. Any recent versions should
work. For reference, and subject to change, Oracle builds use Graphviz
9.0.0 and Pandoc 2.19.2.

## Running Configure

To build the JDK, you need a "configuration", which consists of a directory
Expand Down Expand Up @@ -1944,12 +1952,25 @@ configuration with the name `<name>`. Alternatively, you can create a directory
under `build` and run `configure` from there, e.g. `mkdir build/<name> && cd
build/<name> && bash ../../configure`.
Then you can build that configuration using `make CONF_NAME=<name>` or `make
CONF=<pattern>`, where `<pattern>` is a substring matching one or several
configurations, e.g. `CONF=debug`. The special empty pattern (`CONF=`) will
match *all* available configuration, so `make CONF= hotspot` will build the
`hotspot` target for all configurations. Alternatively, you can execute `make`
in the configuration directory, e.g. `cd build/<name> && make`.
Then you can build that configuration using `make CONF=<selector>`, where
`<selector>` is interpreted as follows:
* If `<selector>` exacly matches the name of a configuration, this and only
this configuration will be selected.
* If `<selector>` matches (i.e. is a substring of) the names of several
configurations, then all these configurations will be selected.
* If `<selector>` is empty (i.e. `CONF=`), then all configurations will be
selected.
* If `<selector>` begins with `!`, then all configurations **not** matching the
string following `!` will be selected.
A more specialized version, `CONF_NAME=<name>` also exists, which will only
match if the given `<name>` exactly matches a single configuration.
Alternatively, you can execute `make` in the configuration directory, e.g. `cd
build/<name> && make`.
`make CONF_NAME=<name>` or
### Handling Reconfigurations
Expand Down
7 changes: 3 additions & 4 deletions make/Global.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ help:
$(info $(_) # (gensrc, java, copy, libs, launchers, gendata))
$(info )
$(info Make control variables)
$(info $(_) CONF= # Build all configurations (note, assignment is empty))
$(info $(_) CONF=<substring> # Build the configuration(s) with a name matching)
$(info $(_) # <substring>)
$(info $(_) CONF_NAME=<string> # Build the configuration with exactly the <string>)
$(info $(_) CONF=<selector> # Select which configuration(s) to build)
$(info $(_) CONF= # Select all configurations (note, assignment is empty))
$(info $(_) CONF_NAME=<string> # Select the configuration with the name <string>)
$(info $(_) SPEC=<spec file> # Build the configuration given by the spec file)
$(info $(_) LOG=<loglevel> # Change the log level from warn to <loglevel>)
$(info $(_) # Available log levels are:)
Expand Down
10 changes: 8 additions & 2 deletions make/InitSupport.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,14 @@ ifeq ($(HAS_SPEC),)
matching_confs := $$(strip $$(all_confs))
else
# Otherwise select those that contain the given CONF string
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
ifeq ($$(patsubst !%,,$$(CONF)),)
# A CONF starting with ! means we should negate the search term
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
$$(if $$(findstring $$(subst !,,$$(CONF)), $$(var)), ,$$(var))))
else
matching_confs := $$(strip $$(foreach var, $$(all_confs), \
$$(if $$(findstring $$(CONF), $$(var)), $$(var))))
endif
ifneq ($$(filter $$(CONF), $$(matching_confs)), )
# If we found an exact match, use that
matching_confs := $$(CONF)
Expand Down
18 changes: 17 additions & 1 deletion make/autoconf/basic.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, 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 @@ -123,6 +123,22 @@ AC_DEFUN_ONCE([BASIC_SETUP_BUILD_ENV],
]
)
AC_SUBST(BUILD_ENV)
if test "x$LOCALE" != x; then
# Check if we actually have C.UTF-8; if so, use it
if $LOCALE -a | $GREP -q -E "^C\.(utf8|UTF-8)$"; then
LOCALE_USED=C.UTF-8
else
AC_MSG_WARN([C.UTF-8 locale not found, using C locale])
LOCALE_USED=C
fi
else
AC_MSG_WARN([locale command not not found, using C locale])
LOCALE_USED=C
fi
export LC_ALL=$LOCALE_USED
AC_SUBST(LOCALE_USED)
])

###############################################################################
Expand Down
3 changes: 2 additions & 1 deletion make/autoconf/basic_tools.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, 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 @@ -54,6 +54,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
# Tools only needed on some platforms
UTIL_LOOKUP_PROGS(LOCALE, locale)
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
])
Expand Down
5 changes: 3 additions & 2 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
#### OS DEFINES, these should be independent on toolchain
if test "x$OPENJDK_TARGET_OS" = xlinux; then
CFLAGS_OS_DEF_JVM="-DLINUX -D_FILE_OFFSET_BITS=64"
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
CFLAGS_OS_DEF_JDK="-D_GNU_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
CFLAGS_OS_DEF_JVM="-D_ALLBSD_SOURCE -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
CFLAGS_OS_DEF_JVM="-DAIX -D_LARGE_FILES"
CFLAGS_OS_DEF_JDK="-D_LARGE_FILES"
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
CFLAGS_OS_DEF_JDK="-D_ALLBSD_SOURCE"
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
Expand Down Expand Up @@ -543,7 +544,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
ALWAYS_DEFINES_JVM="-D_REENTRANT"
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
ALWAYS_DEFINES_JDK="-D_GNU_SOURCE -D_REENTRANT -DSTDC"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# Access APIs for Windows 8 and above
# see https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
Expand Down
6 changes: 3 additions & 3 deletions make/autoconf/spec.gmk.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2024, 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 @@ -56,8 +56,8 @@ COMMA := ,
# What make to use for main processing, after bootstrapping top-level Makefile.
MAKE := @MAKE@

# Make sure all shell commands are executed with the C locale
export LC_ALL := C
# Make sure all shell commands are executed with a proper locale
export LC_ALL := @LOCALE_USED@

# Make sure we override any local CLASSPATH variable
export CLASSPATH := @CLASSPATH@
Expand Down
6 changes: 5 additions & 1 deletion make/conf/github-actions.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, 2024, 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 @@ -36,6 +36,10 @@ MACOS_X64_BOOT_JDK_EXT=tar.gz
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_macos-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=af32e84c11009f72f783fdcdc9917efc277893988f097e198e2576875d1e88c1

MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
MACOS_AARCH64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_macos-aarch64_bin.tar.gz
MACOS_AARCH64_BOOT_JDK_SHA256=f12e1e0a2dffc847951598f597c8ee60fb0913932f24b2b09c62cfd2f0f4dfb9

WINDOWS_X64_BOOT_JDK_EXT=zip
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=5434faaf029e66e7ce6e75770ca384de476750984a7d2881ef7686894c4b4944
Loading

0 comments on commit d9a71c2

Please sign in to comment.