Skip to content

Commit e4dad5f

Browse files
authored
Merge pull request SAP#2267 from SAP/pr-jdk-27+25
Merge to tag jdk-27+25
2 parents cbb3a3d + f8f7ad2 commit e4dad5f

758 files changed

Lines changed: 25678 additions & 15846 deletions

File tree

Some content is hidden

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

doc/building.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ <h2 id="operating-system-requirements">Operating System
394394
<tbody>
395395
<tr class="odd">
396396
<td>Linux/x64</td>
397-
<td>Oracle Enterprise Linux 6.4 / 8.x</td>
397+
<td>Oracle Linux 6.4 / 8.x</td>
398398
</tr>
399399
<tr class="even">
400400
<td>Linux/aarch64</td>
401-
<td>Oracle Enterprise Linux 7.6 / 8.x</td>
401+
<td>Oracle Linux 7.6 / 8.x</td>
402402
</tr>
403403
<tr class="odd">
404404
<td>macOS</td>
@@ -1495,26 +1495,24 @@ <h4 id="using-openjdk-devkits">Using OpenJDK Devkits</h4>
14951495
</tr>
14961496
</tbody>
14971497
</table>
1498-
<p><code>BASE_OS</code> must be one of <code>OL</code> for Oracle
1499-
Enterprise Linux or <code>Fedora</code>. If the base OS is
1500-
<code>Fedora</code> the corresponding Fedora release can be specified
1501-
with the help of the <code>BASE_OS_VERSION</code> option. If the build
1502-
is successful, the new devkits can be found in the
1498+
<p><code>BASE_OS</code> must be one of <code>OL</code> for Oracle Linux
1499+
or <code>Fedora</code>. The release/version of the base OS can be
1500+
specified using the <code>BASE_OS_VERSION</code> option. If the build is
1501+
successful, the new devkits can be found in the
15031502
<code>build/devkit/result</code> subdirectory:</p>
15041503
<pre><code>cd make/devkit
1505-
make TARGETS=&quot;ppc64le-linux-gnu aarch64-linux-gnu&quot; BASE_OS=Fedora BASE_OS_VERSION=21
1504+
make TARGETS=&quot;ppc64le-linux-gnu aarch64-linux-gnu&quot; BASE_OS=Fedora
15061505
ls -1 ../../build/devkit/result/
15071506
x86_64-linux-gnu-to-aarch64-linux-gnu
15081507
x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
15091508
<p>Notice that devkits are not only useful for targeting different build
15101509
platforms. Because they contain the full build dependencies for a system
1511-
(i.e. compiler and root file system), they can easily be used to build
1512-
well-known, reliable and reproducible build environments. You can for
1513-
example create and use a devkit with GCC 7.3 and a Fedora 12 sysroot
1514-
environment (with glibc 2.11) on Ubuntu 14.04 (which doesn't have GCC
1515-
7.3 by default) to produce JDK binaries which will run on all Linux
1516-
systems with runtime libraries newer than the ones from Fedora 12 (e.g.
1517-
Ubuntu 16.04, SLES 11 or RHEL 6).</p>
1510+
(i.e., compiler and root file system/sysroot), they can easily be used
1511+
to build well-known, reliable, and reproducible build environments. You
1512+
can, for example, create and use a devkit with a version of the GCC
1513+
compiler not provided by the host OS, using a sysroot from an older
1514+
Linux distribution to produce JDK binaries which will run on all Linux
1515+
systems with newer runtime libraries.</p>
15181516
<h4 id="using-debian-debootstrap">Using Debian debootstrap</h4>
15191517
<p>On Debian (or a derivative like Ubuntu), you can create sysroots for
15201518
foreign architectures with tools provided by the OS. You can use

doc/building.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ time of writing.
195195

196196
| Operating system | Vendor/version used |
197197
| ----------------- | ---------------------------------- |
198-
| Linux/x64 | Oracle Enterprise Linux 6.4 / 8.x |
199-
| Linux/aarch64 | Oracle Enterprise Linux 7.6 / 8.x |
198+
| Linux/x64 | Oracle Linux 6.4 / 8.x |
199+
| Linux/aarch64 | Oracle Linux 7.6 / 8.x |
200200
| macOS | macOS 14.x |
201201
| Windows | Windows Server 2016 |
202202

@@ -1288,27 +1288,26 @@ at least the following targets are known to work:
12881288
| riscv64-linux-gnu |
12891289
| s390x-linux-gnu |
12901290

1291-
`BASE_OS` must be one of `OL` for Oracle Enterprise Linux or `Fedora`. If the
1292-
base OS is `Fedora` the corresponding Fedora release can be specified with the
1293-
help of the `BASE_OS_VERSION` option. If the build is successful, the new
1294-
devkits can be found in the `build/devkit/result` subdirectory:
1291+
`BASE_OS` must be one of `OL` for Oracle Linux or `Fedora`. The release/version
1292+
of the base OS can be specified using the `BASE_OS_VERSION` option. If the build
1293+
is successful, the new devkits can be found in the `build/devkit/result`
1294+
subdirectory:
12951295

12961296
```
12971297
cd make/devkit
1298-
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
1298+
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora
12991299
ls -1 ../../build/devkit/result/
13001300
x86_64-linux-gnu-to-aarch64-linux-gnu
13011301
x86_64-linux-gnu-to-ppc64le-linux-gnu
13021302
```
13031303

13041304
Notice that devkits are not only useful for targeting different build
1305-
platforms. Because they contain the full build dependencies for a system (i.e.
1306-
compiler and root file system), they can easily be used to build well-known,
1307-
reliable and reproducible build environments. You can for example create and
1308-
use a devkit with GCC 7.3 and a Fedora 12 sysroot environment (with glibc 2.11)
1309-
on Ubuntu 14.04 (which doesn't have GCC 7.3 by default) to produce JDK binaries
1310-
which will run on all Linux systems with runtime libraries newer than the ones
1311-
from Fedora 12 (e.g. Ubuntu 16.04, SLES 11 or RHEL 6).
1305+
platforms. Because they contain the full build dependencies for a system (i.e.,
1306+
compiler and root file system/sysroot), they can easily be used to build
1307+
well-known, reliable, and reproducible build environments. You can, for example,
1308+
create and use a devkit with a version of the GCC compiler not provided by the
1309+
host OS, using a sysroot from an older Linux distribution to produce JDK
1310+
binaries which will run on all Linux systems with newer runtime libraries.
13121311

13131312
#### Using Debian debootstrap
13141313

make/devkit/Common.gmk

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#
2+
# Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved.
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# This code is free software; you can redistribute it and/or modify it
6+
# under the terms of the GNU General Public License version 2 only, as
7+
# published by the Free Software Foundation. Oracle designates this
8+
# particular file as subject to the "Classpath" exception as provided
9+
# by Oracle in the LICENSE file that accompanied this code.
10+
#
11+
# This code is distributed in the hope that it will be useful, but WITHOUT
12+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
# version 2 for more details (a copy is included in the LICENSE file that
15+
# accompanied this code).
16+
#
17+
# You should have received a copy of the GNU General Public License version
18+
# 2 along with this work; if not, write to the Free Software Foundation,
19+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22+
# or visit www.oracle.com if you need additional information or have any
23+
# questions.
24+
#
25+
26+
ARCH := $(word 1,$(subst -, ,$(TARGET)))
27+
28+
ifeq ($(TARGET), arm-linux-gnueabihf)
29+
ARCH=armhfp
30+
endif
31+
32+
$(info ARCH=$(ARCH))
33+
34+
ifeq ($(PREFIX),)
35+
$(error PREFIX not set)
36+
endif
37+
38+
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
39+
TARGETDIR := $(PREFIX)/$(TARGET)
40+
SYSROOT := $(TARGETDIR)/sysroot
41+
42+
# Base OS information and repositories
43+
#
44+
# BASE_OS_REPOS is a space-separated set of repositories. Each entry
45+
# is of the format <repo_name>,<url> where <repo_name> is a unique
46+
# identifier across the set of repositories.
47+
48+
ifeq ($(BASE_OS), OL)
49+
ifeq ($(filter aarch64 x86_64, $(ARCH)), )
50+
$(error Only "aarch64 x86_64" architectures are supported for OL, but "$(ARCH)" was requested)
51+
endif
52+
BASE_OS_VERSION ?= 7
53+
ifeq ($(BASE_OS_VERSION), 6)
54+
ifeq ($(filter x86_64, $(ARCH)), )
55+
$(error Only "x86_64" architectures are supported for OL6, but "$(ARCH)" was requested)
56+
endif
57+
BASE_OS_DESCRIPTION_VERSION := 6.4
58+
REPO_BASE_URL := https://yum.oracle.com/repo/OracleLinux/OL6/4
59+
BASE_OS_REPOS := base,$(REPO_BASE_URL)/base/$(ARCH)
60+
else ifeq ($(BASE_OS_VERSION), 7)
61+
BASE_OS_DESCRIPTION_VERSION := 7.6
62+
REPO_BASE_URL := https://yum.oracle.com/repo/OracleLinux/OL7/6
63+
BASE_OS_REPOS := base,$(REPO_BASE_URL)/base/$(ARCH)
64+
else
65+
REPO_BASE_URL := https://yum.oracle.com/repo/OracleLinux/OL$(BASE_OS_VERSION)
66+
BASE_OS_REPOS := baseos,$(REPO_BASE_URL)/baseos/latest/$(ARCH) appstream,$(REPO_BASE_URL)/appstream/$(ARCH)
67+
BASE_OS_DESCRIPTION_VERSION := $(BASE_OS_VERSION)
68+
endif
69+
BASE_OS_DESCRIPTION := OL$(BASE_OS_DESCRIPTION_VERSION)
70+
else ifeq ($(BASE_OS), Fedora)
71+
ifeq ($(filter aarch64 armhfp ppc64le riscv64 s390x x86_64, $(ARCH)), )
72+
$(error Only "aarch64 armhfp ppc64le riscv64 s390x x86_64" architectures are supported for Fedora, but "$(ARCH)" was requested)
73+
endif
74+
ifeq ($(ARCH), riscv64)
75+
BASE_OS_VERSION ?= 43
76+
BASE_OS_BUILD := 6640
77+
REPO_BASE_URL := https://riscv-koji.fedoraproject.org/repos-dist/f$(BASE_OS_VERSION)/$(BASE_OS_BUILD)/riscv64
78+
BASE_OS_REPOS := riscv64,$(REPO_BASE_URL)
79+
else
80+
ifeq ($(ARCH), armhfp)
81+
BASE_OS_VERSION ?= 36
82+
else
83+
BASE_OS_VERSION ?= 41
84+
endif
85+
ifeq ($(ARCH), armhfp)
86+
ifneq ($(BASE_OS_VERSION), 36)
87+
$(error Fedora 36 is the last release supporting "armhfp", but $(BASE_OS_VERSION) was requested)
88+
endif
89+
endif
90+
LATEST_ARCHIVED_OS_VERSION := 41
91+
ifeq ($(filter aarch64 x86_64 armhfp, $(ARCH)), )
92+
FEDORA_TYPE := fedora-secondary
93+
else
94+
FEDORA_TYPE := fedora/linux
95+
endif
96+
NOT_ARCHIVED := $(shell [ $(BASE_OS_VERSION) -gt $(LATEST_ARCHIVED_OS_VERSION) ] && echo true)
97+
ifeq ($(NOT_ARCHIVED),true)
98+
RPM_REPO_URL := https://dl.fedoraproject.org/pub/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os
99+
else
100+
RPM_REPO_URL := https://archives.fedoraproject.org/pub/archive/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os
101+
endif
102+
BASE_OS_REPOS := os,$(RPM_REPO_URL)
103+
endif
104+
BASE_OS_DESCRIPTION := Fedora_$(BASE_OS_VERSION)
105+
else
106+
$(error Unknown base OS $(BASE_OS))
107+
endif

make/devkit/Makefile

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2013, 2026, 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
@@ -39,7 +39,7 @@
3939
#
4040
# make TARGETS="aarch64-linux-gnu" BASE_OS=Fedora
4141
# or
42-
# make TARGETS="arm-linux-gnueabihf ppc64le-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=17
42+
# make TARGETS="aarch64-linux-gnu ppc64le-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=41
4343
#
4444
# to build several devkits for a specific OS version at once.
4545
# You can find the final results under ../../build/devkit/result/<host>-to-<target>
@@ -50,7 +50,7 @@
5050
# makefile again for cross compilation. Ex:
5151
#
5252
# PATH=$PWD/../../build/devkit/result/x86_64-linux-gnu-to-x86_64-linux-gnu/bin:$PATH \
53-
# make TARGETS="arm-linux-gnueabihf ppc64le-linux-gnu" BASE_OS=Fedora
53+
# make TARGETS="aarch64-linux-gnu ppc64le-linux-gnu" BASE_OS=Fedora
5454
#
5555
# This is the makefile which iterates over all host and target platforms.
5656
#
@@ -79,49 +79,50 @@ TARGET_PLATFORMS := $(PLATFORMS)
7979
$(info HOST_PLATFORMS $(HOST_PLATFORMS))
8080
$(info TARGET_PLATFORMS $(TARGET_PLATFORMS))
8181

82-
all compile : $(PLATFORMS)
82+
all compile: $(PLATFORMS)
8383

8484
ifeq ($(SKIP_ME), )
85-
$(foreach p,$(filter-out $(ME),$(PLATFORMS)),$(eval $(p) : $$(ME)))
85+
$(foreach p,$(filter-out $(ME),$(PLATFORMS)),$(eval $(p): $$(ME)))
8686
endif
8787

8888
OUTPUT_ROOT = $(abspath ../../build/devkit)
8989
RESULT = $(OUTPUT_ROOT)/result
9090

9191
SUBMAKEVARS = HOST=$@ BUILD=$(ME) RESULT=$(RESULT) OUTPUT_ROOT=$(OUTPUT_ROOT)
9292

93-
$(HOST_PLATFORMS) :
93+
$(HOST_PLATFORMS):
9494
@echo 'Building compilers for $@'
9595
@echo 'Targets: $(TARGET_PLATFORMS)'
9696
for p in $(filter $@, $(TARGET_PLATFORMS)) $(filter-out $@, $(TARGET_PLATFORMS)); do \
97-
$(MAKE) -f Tools.gmk download-rpms $(SUBMAKEVARS) \
97+
$(MAKE) -f Sysroot.gmk sysroot $(SUBMAKEVARS) \
9898
TARGET=$$p PREFIX=$(RESULT)/$@-to-$$p && \
9999
$(MAKE) -f Tools.gmk all $(SUBMAKEVARS) \
100100
TARGET=$$p PREFIX=$(RESULT)/$@-to-$$p && \
101101
$(MAKE) -f Tools.gmk ccache $(SUBMAKEVARS) \
102-
TARGET=$@ PREFIX=$(RESULT)/$@-to-$$p || exit 1 ; \
102+
TARGET=$@ PREFIX=$(RESULT)/$@-to-$$p || exit 1; \
103103
done
104-
@echo 'All done"'
104+
@echo 'All done'
105105

106106
TODAY := $(shell date +%Y%m%d)
107107

108108
define Mktar
109109
$(1)-to-$(2)_tar = $$(RESULT)/sdk-$(1)-to-$(2)-$$(TODAY).tar.gz
110-
$$($(1)-to-$(2)_tar) : PLATFORM = $(1)-to-$(2)
110+
$$($(1)-to-$(2)_tar): PLATFORM = $(1)-to-$(2)
111111
TARFILES += $$($(1)-to-$(2)_tar)
112112
endef
113113

114114
$(foreach p,$(HOST_PLATFORMS),$(foreach t,$(TARGET_PLATFORMS),$(eval $(call Mktar,$(p),$(t)))))
115115

116-
tars : all $(TARFILES)
117-
onlytars : $(TARFILES)
118-
%.tar.gz :
116+
tars: all $(TARFILES)
117+
onlytars: $(TARFILES)
118+
119+
%.tar.gz:
119120
$(MAKE) -r -f Tars.gmk SRC_DIR=$(RESULT)/$(PLATFORM) TAR_FILE=$@
120121

121-
clean :
122+
clean:
122123
rm -rf $(addprefix ../../build/devkit/, result $(HOST_PLATFORMS))
124+
123125
dist-clean: clean
124126
rm -rf $(addprefix ../../build/devkit/, src download)
125127

126-
FORCE :
127-
.PHONY : all compile tars $(HOST_PLATFORMS) clean dist-clean
128+
.PHONY: all compile tars $(HOST_PLATFORMS) clean dist-clean

0 commit comments

Comments
 (0)