Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge jdk-22+21 into rivos/main #143

Merged
merged 125 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
278de7a
8318458: Update javac and java manpages with restricted method options
mcimadamore Oct 18, 2023
ab13568
8318029: Minor improvement to logging output in container at-requires
Oct 18, 2023
ce8ebeb
8317979: Use TZ database style abbreviations in the CLDR locale provider
naotoj Oct 18, 2023
e25a49a
8318471: ProblemList compiler/sharedstubs/SharedTrampolineTest.java
Oct 18, 2023
24bc5bd
8318104: macOS 10.13 check in TabButtonAccessibility.m can be removed
Oct 19, 2023
c0e154c
8318089: Class space not marked as such with NMT when CDS is off
tstuefe Oct 19, 2023
80bd22d
8316144: Remove unused field jdk.internal.util.xml.impl.XMLStreamWrit…
Oct 19, 2023
47bb1a1
8318415: Adjust describing comment of os_getChildren after 8315026
MBaesken Oct 19, 2023
1a09835
8317358: G1: Make TestMaxNewSize use createTestJvm
lkorinth Oct 19, 2023
15acf4b
8318324: Drop redundant default methods from FFM API
mcimadamore Oct 19, 2023
3c70f2c
8318418: hsdis build fails with system binutils on Ubuntu
djelinski Oct 19, 2023
defc7e0
8318454: TestLayoutPaths broken on Big Endian platforms after JDK-831…
minborg Oct 19, 2023
9cf334f
8318383: Remove duplicated checks in os::get_native_stack() in posix …
zhengyu123 Oct 19, 2023
599560a
8317635: Improve GetClassFields test to verify correctness of field o…
Oct 19, 2023
cc8f8da
8318322: Update IANA Language Subtag Registry to Version 2023-10-16
Oct 19, 2023
1740950
8314901: AES-GCM interleaved implementation using AVX2 instructions
Oct 19, 2023
684b91e
8315064: j.text.ChoiceFormat provides no specification on quoting beh…
Oct 19, 2023
8f5f440
8317692: jcmd GC.heap_dump performance regression after JDK-8292818
SirYwell Oct 19, 2023
c46a54e
8312777: notifyJvmtiMount before notifyJvmtiUnmount
Oct 20, 2023
d9ce525
8318150: StaticProxySelector.select should not throw NullPointerExcep…
djelinski Oct 20, 2023
387504c
8317575: AArch64: C2_MacroAssembler::fast_lock uses rscratch1 for cmp…
stefank Oct 20, 2023
292aad2
8316436: ContinuationWrapper uses unhandled nullptr oop
stefank Oct 20, 2023
bd3bc2c
8317350: Move code cache purging out of CodeCache::UnloadingScope
Oct 20, 2023
bd02cfd
8318540: make test cannot run .jasm tests directly
shipilev Oct 20, 2023
4812cab
8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl
liach Oct 20, 2023
138437f
8314438: NMT: Performance benchmarks are needed to have a baseline fo…
Oct 20, 2023
8099261
8318489: Remove unused alignment_unit and alignment_offset
albertnetymk Oct 20, 2023
744f206
8318525: Atomic gtest should run as TEST_VM to access VM capabilities
shipilev Oct 20, 2023
cd25d1a
8318296: Move Space::initialize to ContiguousSpace
albertnetymk Oct 20, 2023
8f4ebd8
8317920: JDWP-agent sends broken exception event with onthrow option
parttimenerd Oct 20, 2023
6f1d896
8318510: Serial: Remove TenuredGeneration::block_size
albertnetymk Oct 20, 2023
b07da3a
8317819: Scope should reflect lifetime of underying resource (mainline)
mcimadamore Oct 20, 2023
848ecc1
8318538: Add a way to obtain a strided var handle from a layout
mcimadamore Oct 20, 2023
a03767c
8318049: C2: assert(!failure) failed: Missed optimization opportunity…
jaskarth Oct 20, 2023
deadb9c
8304684: Memory leak in DirectivesParser::set_option_flag
jcking Oct 20, 2023
2c23391
8318101: Additional test cases for CSSAttributeEqualityBug
aivanov-jdk Oct 20, 2023
71c99a0
8318448: Link PopupMenu/PopupMenuLocation.java failure to JDK-8259913
aivanov-jdk Oct 20, 2023
fe52917
8318457: Use prefix-less prepend methods directly to reduce branches …
cl4es Oct 20, 2023
4010642
8077371: Binary files in JAXP test should be removed
Oct 20, 2023
9144287
8318601: Remove javadoc text about restricted methods
mcimadamore Oct 20, 2023
5a97411
8317971: RISC-V: implement copySignF/D and signumF/D intrinsics
Oct 20, 2023
b1228de
8314588: gc/metaspace/TestMetaspaceInitialization.java failed "assert…
tstuefe Oct 20, 2023
8065233
8318598: FFM stylistic cleanups
JornVernee Oct 20, 2023
5281499
8316563: test tools/jpackage/linux/LinuxResourceTest.java fails on Ce…
yaqsun Oct 20, 2023
200b5a2
8318420: AbstractPipeline invokes overridden method in constructor
Oct 20, 2023
2121575
8318421: AbstractPipeline.sourceStageSpliterator() chases pointers ne…
Oct 20, 2023
a045258
8209595: MonitorVmStartTerminate.java timed out
kevinjwalls Oct 20, 2023
158293d
8316030: Update Libpng to 1.6.40
Oct 20, 2023
4dfa379
7061097: [Doc] Inconsistenency between the spec and the implementatio…
Oct 20, 2023
66d90d5
8318107: Un-ProblemList LocaleProvidersRun and CalendarDataRegression
Oct 20, 2023
d3ebb4a
8317373: Add Telia Root CA v2
rhalade Oct 20, 2023
77b2394
8318482: problemlist compiler/codecache/CheckLargePages.java on Linux…
Oct 20, 2023
a1a62d9
8306308: (ch) Writer created by Channels::newWriter may lose data
Oct 20, 2023
af2f4bf
8318622: ProblemList gc/cslocker/TestCSLocker.java on linux-x64 in Xc…
Oct 20, 2023
4cf195f
8318573: The nsk.share.jpda.SocketConnection should fail if socket wa…
lmesnik Oct 21, 2023
a876beb
8316741: BasicStroke.createStrokedShape miter-limits failing on small…
Oct 21, 2023
ecd25e7
8318484: Initial version of cdsConfig.hpp
iklam Oct 21, 2023
ffadd63
8317868: Add @sealedGraph to MethodHandleDesc and descendants
minborg Oct 23, 2023
4eab39d
8318585: Rename CodeCache::UnloadingScope to UnlinkingScope
Oct 23, 2023
729f4c5
8318507: G1: Improve remset clearing for humongous candidates
Oct 23, 2023
fc29a2e
8318082: ConcurrentModificationException from IndexWriter
pavelrappo Oct 23, 2023
ff5c5b6
8318643: +UseTransparentHugePages must enable +UseLargePages
tstuefe Oct 23, 2023
7c0a828
8318649: G1: Remove unimplemented HeapRegionRemSet::add_code_root_locked
albertnetymk Oct 23, 2023
704c6ea
8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParame…
Oct 23, 2023
99de9bb
8317807: JAVA_FLAGS removed from jtreg running in JDK-8317039
magicus Oct 23, 2023
c2efd77
8295795: hsdis does not build with binutils 2.39+
robehn Oct 23, 2023
bd22d23
8318027: Support alternative name to jdk.internal.vm.compiler
Oct 23, 2023
9f767aa
8318109: Writing JFR records while a CHT has taken its lock asserts i…
Oct 23, 2023
bea2d48
8312475: org.jline.util.PumpReader signed byte problem
msobiers Oct 23, 2023
d888b26
8318071: IgnoreUnrecognizedVMOptions flag still causes failure in Arc…
Oct 23, 2023
c1aeac7
8318445: More broken bailout chains in C2
tstuefe Oct 23, 2023
69c0ae2
8318124: JFR: Rewrite instrumentation to use Class-File API
egahlin Oct 23, 2023
8d9a4b4
8317678: Fix up hashCode() for ZipFile.Source.Key
coffeys Oct 23, 2023
5ba9705
8318485: Narrow klass shift should be zero if encoding range extends …
tstuefe Oct 23, 2023
1b15011
8318476: Add resource consumption note to BigInteger and BigDecimal
jddarcy Oct 23, 2023
eb59167
8318691: runtime/CompressedOops/CompressedClassPointersEncodingScheme…
DamonFool Oct 24, 2023
728b858
8318130: SocksSocketImpl needlessly encodes hostname for IPv6 addresses
djelinski Oct 24, 2023
08f7914
8305753: Allow JIT compilation for -Xshare:dump
iklam Oct 24, 2023
4bfe226
8310031: Parallel: Implement better work distribution for large objec…
reinrich Oct 24, 2023
cb383c0
8318587: refresh libraries cache on AIX in print_vm_info
MBaesken Oct 24, 2023
6d3cb45
8318591: avoid leaks in loadlib_aix.cpp reload_table()
MBaesken Oct 24, 2023
fd332da
8317289: javadoc fails with -sourcepath if module-info.java contains …
pavelrappo Oct 24, 2023
e6f23a9
8315024: Vector API FP reduction tests should not test for exact equa…
Oct 24, 2023
a644670
8318609: Upcall stubs should be smaller
TheRealMDoerr Oct 24, 2023
4a16d11
8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and S…
Oct 24, 2023
0baa9ec
8318474: Fix memory reporter for thread_count
jdksjolen Oct 24, 2023
3f446c5
8318528: Rename TestUnstructuredLocking test
shipilev Oct 24, 2023
9bfa082
8318646: Integer#parseInt("") throws empty NumberFormatException message
rgiulietti Oct 24, 2023
5224e97
8293713: java/net/httpclient/BufferingSubscriberTest.java fails in ti…
Oct 24, 2023
bf1a14e
8316470: Incorrect error location for "invalid permits clause" depend…
lahodaj Oct 24, 2023
d4b7612
8318240: [AIX] Cleaners.java test failure
varada1110 Oct 24, 2023
21d8a47
8318701: Fix copyright year
lkorinth Oct 24, 2023
d1077d6
8316046: x64 platforms unecessarily save xmm16-31 when UseAVX >= 3
JornVernee Oct 24, 2023
f9795d0
8318222: RISC-V: C2 CmpU3
Oct 24, 2023
8879c78
8317689: [JVMCI] include error message when CreateJavaVM in libgraal …
Oct 24, 2023
e67550c
8318509: x86 count_positives intrinsic broken for -XX:AVX3Threshold=0
cl4es Oct 24, 2023
54c613a
8318693: Fix rendering for code blocks nested under list items in bui…
caizixian Oct 24, 2023
e272098
8318160: javac does not reject private method reference with type-var…
Oct 24, 2023
6f35274
8318702: G1: Fix nonstandard indentation in g1HeapTransition.cpp
Oct 24, 2023
1165037
8318569: Add getter methods for Locale and Patterns in ListFormat
naotoj Oct 24, 2023
1f2a80b
8318306: java/util/Arrays/Sorting.java fails with "Array is not sorte…
vamsi-parasa Oct 24, 2023
1ddf826
8316964: Security tools should not call System.exit
wangweij Oct 24, 2023
9c819fd
8318051: Duration.between uses exceptions for control flow
Oct 24, 2023
f1dfdc1
8311877: [macos] Add CLI options to provide signing identity directly…
Oct 24, 2023
5ce718e
8318100: Remove redundant check for Metal support
jayathirthrao Oct 25, 2023
d7205e6
8318102: macos10.14 check in CSystemColors can be removed.
prsadhuk Oct 25, 2023
ba7d08b
8316961: Fallback implementations for 64-bit Atomic::{add,xchg} on 32…
shipilev Oct 25, 2023
c3cdfe2
8318692: Add instructions for creating Ubuntu-based sysroot for cross…
caizixian Oct 25, 2023
d2d1592
8318713: G1: Use more accurate age in predict_eden_copy_time_ms
albertnetymk Oct 25, 2023
14090ef
8294158: HTML formatting for PassFailJFrame instructions
aivanov-jdk Oct 25, 2023
42b9ac8
8294156: Allow PassFailJFrame.Builder to create test UI
aivanov-jdk Oct 25, 2023
c587211
8316003: Update FileChooserSymLinkTest.java to HTML instructions
aivanov-jdk Oct 25, 2023
202c013
8318669: Target OS detection in 'test-prebuilt' makefile target is in…
fthevenet Oct 25, 2023
3abd772
8316017: Refactor timeout handler in PassFailJFrame
aivanov-jdk Oct 25, 2023
b026d0b
8312980: C2: "malformed control flow" created during incremental inli…
rwestrel Oct 25, 2023
cee44a6
8318608: Enable parallelism in vmTestbase/nsk/stress/threads tests
elifaslan1 Oct 25, 2023
43f31d7
8318607: Enable parallelism in vmTestbase/nsk/stress/jni tests
elifaslan1 Oct 25, 2023
29d462a
8318727: Enable parallelism in vmTestbase/vm/gc/concurrent tests
elifaslan1 Oct 25, 2023
9e98ee6
8318735: RISC-V: Enable related hotspot tests run on riscv
Oct 25, 2023
cf4ede0
8317360: Missing null checks in JfrCheckpointManager and JfrStringPoo…
Oct 25, 2023
a520887
8318487: Specification of the ListFormat.equals() method can be improved
naotoj Oct 25, 2023
ca3bdfc
8318186: ChoiceFormat inconsistency between applyPattern() and setCho…
Oct 25, 2023
10427c0
8318613: ChoiceFormat patterns are not well tested
Oct 25, 2023
d96f38b
8317510: Change Windows debug symbol files naming to avoid losing inf…
fthevenet Oct 25, 2023
5e74fdb
Merge branch 'rivos/main' into rivos/merge-jdk-22+21
luhenry Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 73 additions & 39 deletions doc/building.html
Original file line number Diff line number Diff line change
Expand Up @@ -819,11 +819,11 @@ <h2 id="running-configure">Running Configure</h2>
<p>Some command line examples:</p>
<ul>
<li><p>Create a 32-bit build for Windows with FreeType2 in
<code>C:\freetype-i586</code>:
<code>bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code></p></li>
<code>C:\freetype-i586</code>:</p>
<pre><code>bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code></pre></li>
<li><p>Create a debug build with the <code>server</code> JVM and DTrace
enabled:
<code>bash configure --enable-debug --with-jvm-variants=server --enable-dtrace</code></p></li>
enabled:</p>
<pre><code>bash configure --enable-debug --with-jvm-variants=server --enable-dtrace</code></pre></li>
</ul>
<h3 id="common-configure-arguments">Common Configure Arguments</h3>
<p>Here follows some of the most common and important
Expand Down Expand Up @@ -1331,14 +1331,12 @@ <h4 id="alsa-1">ALSA</h4>
<code>libasound2-dev</code> packages for your <em>target</em> system.
Download them to /tmp.</p></li>
<li><p>Install the libraries into the cross-compilation toolchain. For
instance:</p></li>
</ul>
instance:</p>
<pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre>
<ul>
<li>If alsa is not properly detected by <code>configure</code>, you can
point it out by <code>--with-alsa</code>.</li>
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre></li>
<li><p>If alsa is not properly detected by <code>configure</code>, you
can point it out by <code>--with-alsa</code>.</p></li>
</ul>
<h4 id="x11-1">X11</h4>
<p>You will need X11 libraries suitable for your <em>target</em> system.
Expand Down Expand Up @@ -1372,21 +1370,18 @@ <h4 id="x11-1">X11</h4>
</ul></li>
<li><p>Install the libraries into the cross-compilation toolchain. For
instance:</p>
<pre><code> cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr
mkdir X11R6
cd X11R6
for deb in /tmp/target-x11/*.deb ; do dpkg-deb -x $deb . ; done
mv usr/* .
cd lib
cp arm-linux-gnueabihf/* .
```

You can ignore the following messages. These libraries are not needed to
successfully complete a full JDK build.</code></pre>
<p>cp: cannot stat
<code>arm-linux-gnueabihf/libICE.so': No such file or directory cp: cannot stat</code>arm-linux-gnueabihf/libSM.so':
No such file or directory cp: cannot stat
`arm-linux-gnueabihf/libXt.so': No such file or directory ```</p></li>
<pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr
mkdir X11R6
cd X11R6
for deb in /tmp/target-x11/*.deb ; do dpkg-deb -x $deb . ; done
mv usr/* .
cd lib
cp arm-linux-gnueabihf/* .</code></pre>
<p>You can ignore the following messages. These libraries are not needed
to successfully complete a full JDK build.</p>
<pre><code>cp: cannot stat `arm-linux-gnueabihf/libICE.so&#39;: No such file or directory
cp: cannot stat `arm-linux-gnueabihf/libSM.so&#39;: No such file or directory
cp: cannot stat `arm-linux-gnueabihf/libXt.so&#39;: No such file or directory</code></pre></li>
<li><p>If the X11 libraries are not properly detected by
<code>configure</code>, you can point them out by
<code>--with-x</code>.</p></li>
Expand All @@ -1404,17 +1399,41 @@ <h3 id="cross-compiling-with-debian-sysroots">Cross compiling with
<p>For example, cross-compiling to AArch64 from x86_64 could be done
like this:</p>
<ul>
<li><p>Install cross-compiler on the <em>build</em> system:
<code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></p></li>
<li><p>Install cross-compiler on the <em>build</em> system:</p>
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre></li>
<li><p>Create chroot on the <em>build</em> system, configuring it for
<em>target</em> system:
<code>sudo debootstrap \ --arch=arm64 \ --verbose \ --include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev \ --resolve-deps \ buster \ ~/sysroot-arm64 \ http://httpredir.debian.org/debian/ # If the target architecture is `riscv64`, # the path should be `debian-ports` instead of `debian`.</code></p></li>
<em>target</em> system:</p>
<pre><code>sudo debootstrap \
--arch=arm64 \
--verbose \
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev \
--resolve-deps \
buster \
~/sysroot-arm64 \
http://httpredir.debian.org/debian/
# If the target architecture is `riscv64`,
# the path should be `debian-ports` instead of `debian`.</code></pre></li>
<li><p>To create a Ubuntu-based chroot:</p>
<pre><code>sudo debootstrap \
--arch=arm64 \
--verbose \
--components=main,universe \
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev \
--resolve-deps \
jammy \
~/sysroot-arm64 \
http://ports.ubuntu.com/ubuntu-ports/
# symlinks is in the universe repository</code></pre></li>
<li><p>Make sure the symlinks inside the newly created chroot point to
proper locations:
<code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></p></li>
proper locations:</p>
<pre><code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></pre></li>
<li><p>Configure and build with newly created chroot as
sysroot/toolchain-path:
<code>sh ./configure \ --openjdk-target=aarch64-linux-gnu \ --with-sysroot=~/sysroot-arm64 make images ls build/linux-aarch64-server-release/</code></p></li>
sysroot/toolchain-path:</p>
<pre><code>sh ./configure \
--openjdk-target=aarch64-linux-gnu \
--with-sysroot=~/sysroot-arm64
make images
ls build/linux-aarch64-server-release/</code></pre></li>
</ul>
<p>The build does not create new files in that chroot, so it can be
reused for multiple builds without additional cleanup.</p>
Expand Down Expand Up @@ -1566,12 +1585,27 @@ <h3 id="building-for-risc-v">Building for RISC-V</h3>
placeholder <code>&lt;toolchain-installed-path&gt;</code> shown below is
the path where you want to install the toolchain.</p>
<ul>
<li><p>Install the RISC-V GNU compiler toolchain:
<code>git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain cd riscv-gnu-toolchain ./configure --prefix=&lt;toolchain-installed-path&gt; make linux export PATH=&lt;toolchain-installed-path&gt;/bin:$PATH</code></p></li>
<li><p>Cross-compile all the required libraries:
<code># An example for libffi git clone https://github.com/libffi/libffi cd libffi ./configure --host=riscv64-unknown-linux-gnu --prefix=&lt;toolchain-installed-path&gt;/sysroot/usr make make install</code></p></li>
<li><p>Configure and build OpenJDK:
<code>bash configure \ --with-boot-jdk=$BOOT_JDK \ --openjdk-target=riscv64-linux-gnu \ --with-sysroot=&lt;toolchain-installed-path&gt;/sysroot \ --with-toolchain-path=&lt;toolchain-installed-path&gt;/bin \ --with-extra-path=&lt;toolchain-installed-path&gt;/bin make images</code></p></li>
<li><p>Install the RISC-V GNU compiler toolchain:</p>
<pre><code>git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain
cd riscv-gnu-toolchain
./configure --prefix=&lt;toolchain-installed-path&gt;
make linux
export PATH=&lt;toolchain-installed-path&gt;/bin:$PATH</code></pre></li>
<li><p>Cross-compile all the required libraries:</p>
<pre><code># An example for libffi
git clone https://github.com/libffi/libffi
cd libffi
./configure --host=riscv64-unknown-linux-gnu --prefix=&lt;toolchain-installed-path&gt;/sysroot/usr
make
make install</code></pre></li>
<li><p>Configure and build OpenJDK:</p>
<pre><code>bash configure \
--with-boot-jdk=$BOOT_JDK \
--openjdk-target=riscv64-linux-gnu \
--with-sysroot=&lt;toolchain-installed-path&gt;/sysroot \
--with-toolchain-path=&lt;toolchain-installed-path&gt;/bin \
--with-extra-path=&lt;toolchain-installed-path&gt;/bin
make images</code></pre></li>
</ul>
<h3 id="building-for-musl">Building for musl</h3>
<p>Just like it's possible to cross-compile for a different CPU, it's
Expand Down
36 changes: 31 additions & 5 deletions doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,13 @@ automatically, it will exit and inform you about the problem.
Some command line examples:

* Create a 32-bit build for Windows with FreeType2 in `C:\freetype-i586`:

```
bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32
```

* Create a debug build with the `server` JVM and DTrace enabled:

```
bash configure --enable-debug --with-jvm-variants=server --enable-dtrace
```
Expand Down Expand Up @@ -1100,11 +1102,12 @@ Note that alsa is needed even if you only want to build a headless JDK.
system. Download them to /tmp.

* Install the libraries into the cross-compilation toolchain. For instance:
```
cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .
```

```
cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
dpkg-deb -x /tmp/libasound2_1.0.25-4_armhf.deb .
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .
```

* If alsa is not properly detected by `configure`, you can point it out by
`--with-alsa`.
Expand Down Expand Up @@ -1140,6 +1143,7 @@ Note that X11 is needed even if you only want to build a headless JDK.
* libxext-dev

* Install the libraries into the cross-compilation toolchain. For instance:

```
cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr
mkdir X11R6
Expand Down Expand Up @@ -1173,11 +1177,13 @@ for foreign architectures with native compilation speed.
For example, cross-compiling to AArch64 from x86_64 could be done like this:

* Install cross-compiler on the *build* system:

```
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
```

* Create chroot on the *build* system, configuring it for *target* system:

```
sudo debootstrap \
--arch=arm64 \
Expand All @@ -1191,12 +1197,29 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
# the path should be `debian-ports` instead of `debian`.
```

* To create a Ubuntu-based chroot:

```
sudo debootstrap \
--arch=arm64 \
--verbose \
--components=main,universe \
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev,libffi-dev \
--resolve-deps \
jammy \
~/sysroot-arm64 \
http://ports.ubuntu.com/ubuntu-ports/
# symlinks is in the universe repository
```

* Make sure the symlinks inside the newly created chroot point to proper locations:

```
sudo chroot ~/sysroot-arm64 symlinks -cr .
```

* Configure and build with newly created chroot as sysroot/toolchain-path:

```
sh ./configure \
--openjdk-target=aarch64-linux-gnu \
Expand Down Expand Up @@ -1255,6 +1278,7 @@ complicate the building process. The placeholder `<toolchain-installed-path>`
shown below is the path where you want to install the toolchain.

* Install the RISC-V GNU compiler toolchain:

```
git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain
cd riscv-gnu-toolchain
Expand All @@ -1264,6 +1288,7 @@ shown below is the path where you want to install the toolchain.
```

* Cross-compile all the required libraries:

```
# An example for libffi
git clone https://github.com/libffi/libffi
Expand All @@ -1274,6 +1299,7 @@ shown below is the path where you want to install the toolchain.
```

* Configure and build OpenJDK:

```
bash configure \
--with-boot-jdk=$BOOT_JDK \
Expand Down
20 changes: 3 additions & 17 deletions make/CreateJmods.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2023, 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 @@ -81,13 +81,11 @@ endif
ifneq ($(CMDS_DIR), )
DEPS += $(call FindFiles, $(CMDS_DIR))
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
# and filter out a few launcher pdbs where there's a lib that goes by the same name
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR)))
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
SRC := $(CMDS_DIR), \
DEST := $(CMDS_DIR_FILTERED), \
Expand All @@ -96,18 +94,6 @@ ifneq ($(CMDS_DIR), )
))
DEPS += $(COPY_FILTERED_CMDS)
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
else ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+full)
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
# where there's a lib that goes by the same name
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
SRC := $(CMDS_DIR), \
DEST := $(CMDS_DIR_FILTERED), \
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
$(call FindFiles, $(CMDS_DIR))), \
))
DEPS += $(COPY_FILTERED_CMDS)
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
else
JMOD_FLAGS += --cmds $(CMDS_DIR)
endif
Expand Down
7 changes: 2 additions & 5 deletions make/Images.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,6 @@ else
endif
endif

FILTERED_PDBS := %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb \
%jimage.pdb %jpackage.pdb %java.pdb %jimage.map %jpackage.map %java.map

# Param 1 - either JDK or JRE
SetupCopyDebuginfo = \
$(foreach m, $(ALL_$1_MODULES), \
Expand All @@ -290,8 +287,8 @@ SetupCopyDebuginfo = \
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
FILES := $(filter-out $(FILTERED_PDBS), $(call FindDebuginfoFiles, \
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m)), \
FILES := $(call FindDebuginfoFiles, \
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m), \
)) \
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
)
Expand Down
2 changes: 1 addition & 1 deletion make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ ExpandJtregPath = \
# with test id: dir/Test.java#selection -> Test.java#selection -> .java#selection -> #selection
# without: dir/Test.java -> Test.java -> .java -> <<empty string>>
TestID = \
$(subst .sh,,$(subst .html,,$(subst .java,,$(suffix $(notdir $1)))))
$(subst .jasm,,$(subst .sh,,$(subst .html,,$(subst .java,,$(suffix $(notdir $1))))))

# The test id starting with a hash (#testid) will be stripped by all
# evals in ParseJtregTestSelectionInner and will be reinserted by calling
Expand Down
11 changes: 9 additions & 2 deletions make/RunTestsPrebuilt.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $(eval $(call SetupVariable,JT_HOME))
$(eval $(call SetupVariable,JDK_IMAGE_DIR,$(OUTPUTDIR)/images/jdk))
$(eval $(call SetupVariable,TEST_IMAGE_DIR,$(OUTPUTDIR)/images/test))
$(eval $(call SetupVariable,SYMBOLS_IMAGE_DIR,$(OUTPUTDIR)/images/symbols,NO_CHECK))
$(eval $(call SetupVariable,JTREG_JAVA,$(BOOT_JDK)/bin/java))
$(eval $(call SetupVariable,JTREG_JDK,$(BOOT_JDK)))

# Provide default values for tools that we need
$(eval $(call SetupVariable,MAKE,make,NO_CHECK))
Expand Down Expand Up @@ -158,6 +158,10 @@ ifeq ($(UNAME_OS), CYGWIN)
OPENJDK_TARGET_OS := windows
OPENJDK_TARGET_OS_TYPE := windows
OPENJDK_TARGET_OS_ENV := windows.cygwin
else ifeq ($(UNAME_OS), MINGW64)
OPENJDK_TARGET_OS := windows
OPENJDK_TARGET_OS_TYPE := windows
OPENJDK_TARGET_OS_ENV := windows.msys2
else
OPENJDK_TARGET_OS_TYPE:=unix
ifeq ($(UNAME_OS), Linux)
Expand All @@ -170,6 +174,9 @@ else
OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS)
endif

# Sanity check env detection
$(info Detected target OS, type and env: [$(OPENJDK_TARGET_OS)] [$(OPENJDK_TARGET_OS_TYPE)] [$(OPENJDK_TARGET_OS_ENV)])

# Assume little endian unless otherwise specified
OPENJDK_TARGET_CPU_ENDIAN := little

Expand Down Expand Up @@ -249,7 +256,7 @@ $(call CreateNewSpec, $(NEW_SPEC), \
TOPDIR := $(TOPDIR), \
OUTPUTDIR := $(OUTPUTDIR), \
BOOT_JDK := $(BOOT_JDK), \
JTREG_JAVA := $(FIXPATH) $(JTREG_JAVA), \
JTREG_JDK := $(JTREG_JDK), \
JT_HOME := $(JT_HOME), \
JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
Expand Down
2 changes: 2 additions & 0 deletions make/RunTestsPrebuiltSpec.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ JAR := $(FIXPATH) $(JAR_CMD)
JLINK := $(FIXPATH) $(JLINK_CMD)
JMOD := $(FIXPATH) $(JMOD_CMD)

JTREG_JAVA := $(FIXPATH) $(JTREG_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)

BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
################################################################################
# Some common tools. Assume most common name and no path.
Expand Down
6 changes: 3 additions & 3 deletions make/ZipSecurity.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupZipArchive,BUILD_JGSS_BIN_ZIP, \
SRC := $(SUPPORT_OUTPUTDIR), \
INCLUDE_FILES := modules_libs/java.security.jgss/w2k_lsa_auth.dll \
modules_libs/java.security.jgss/w2k_lsa_auth.diz \
modules_libs/java.security.jgss/w2k_lsa_auth.map \
modules_libs/java.security.jgss/w2k_lsa_auth.pdb, \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.diz \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.map \
modules_libs/java.security.jgss/w2k_lsa_auth.dll.pdb, \
ZIP := $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)))

TARGETS += $(IMAGES_OUTPUTDIR)/$(JGSS_ZIP_NAME)
Expand Down
Loading
Loading