Skip to content

Commit

Permalink
Merge jdk
Browse files Browse the repository at this point in the history
Merge jdk-23+10
  • Loading branch information
David Simms committed Jun 12, 2024
2 parents 0a87e69 + 8cb9b47 commit 349c6c2
Show file tree
Hide file tree
Showing 620 changed files with 11,572 additions and 12,366 deletions.
8 changes: 7 additions & 1 deletion .github/actions/get-jtreg/action.yml
Original file line number Diff line number Diff line change
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 "$(realpath bootjdk/jdk)"
bash make/build.sh --jdk "$JDK"
mkdir ../installed
mv build/images/jtreg/* ../installed
working-directory: jtreg/src
Expand Down
2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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 "committer"]
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
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
16 changes: 5 additions & 11 deletions make/conf/jib-profiles.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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 @@ -441,7 +441,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-x64": {
target_os: "macosx",
target_cpu: "x64",
dependencies: ["devkit", "gtest", "pandoc"],
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=11.00.00",
"--enable-compatible-cds-alignment",
Expand All @@ -453,7 +453,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"macosx-aarch64": {
target_os: "macosx",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "pandoc"],
dependencies: ["devkit", "gtest", "graphviz", "pandoc"],
configure_args: concat(common.configure_args_64bit,
"--with-macosx-version-max=11.00.00"),
},
Expand Down Expand Up @@ -486,7 +486,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"linux-aarch64": {
target_os: "linux",
target_cpu: "aarch64",
dependencies: ["devkit", "gtest", "build_devkit", "pandoc"],
dependencies: ["devkit", "gtest", "build_devkit", "graphviz", "pandoc"],
configure_args: [
"--with-zlib=system",
"--disable-dtrace",
Expand Down Expand Up @@ -1181,12 +1181,6 @@ var getJibProfilesDependencies = function (input, common) {
revision: (input.build_cpu == "x64" ? "Xcode11.3.1-MacOSX10.15+1.2" : devkit_platform_revisions[devkit_platform])
},

cups: {
organization: common.organization,
ext: "tar.gz",
revision: "1.0118+1.0"
},

jtreg: {
server: "jpg",
product: "jtreg",
Expand Down Expand Up @@ -1237,7 +1231,7 @@ var getJibProfilesDependencies = function (input, common) {
graphviz: {
organization: common.organization,
ext: "tar.gz",
revision: "2.38.0-1+1.1",
revision: "9.0.0+1.0",
module: "graphviz-" + input.target_platform,
configure_args: "DOT=" + input.get("graphviz", "install_path") + "/dot",
environment_path: input.get("graphviz", "install_path")
Expand Down
Loading

0 comments on commit 349c6c2

Please sign in to comment.