8318693: Fix rendering for code blocks nested under list items in building.md

Reviewed-by: erikj, ccleary
This commit is contained in:
Zixian Cai 2023-10-24 14:36:52 +00:00 committed by Conor Cleary
parent e67550cfec
commit 54c613acd7
2 changed files with 78 additions and 44 deletions

View File

@ -819,11 +819,11 @@ about the problem.</p>
<p>Some command line examples:</p> <p>Some command line examples:</p>
<ul> <ul>
<li><p>Create a 32-bit build for Windows with FreeType2 in <li><p>Create a 32-bit build for Windows with FreeType2 in
<code>C:\freetype-i586</code>: <code>C:\freetype-i586</code>:</p>
<code>bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32</code></p></li> <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 <li><p>Create a debug build with the <code>server</code> JVM and DTrace
enabled: enabled:</p>
<code>bash configure --enable-debug --with-jvm-variants=server --enable-dtrace</code></p></li> <pre><code>bash configure --enable-debug --with-jvm-variants=server --enable-dtrace</code></pre></li>
</ul> </ul>
<h3 id="common-configure-arguments">Common Configure Arguments</h3> <h3 id="common-configure-arguments">Common Configure Arguments</h3>
<p>Here follows some of the most common and important <p>Here follows some of the most common and important
@ -1331,14 +1331,12 @@ Package Search</a> and search for the <code>libasound2</code> and
<code>libasound2-dev</code> packages for your <em>target</em> system. <code>libasound2-dev</code> packages for your <em>target</em> system.
Download them to /tmp.</p></li> Download them to /tmp.</p></li>
<li><p>Install the libraries into the cross-compilation toolchain. For <li><p>Install the libraries into the cross-compilation toolchain. For
instance:</p></li> instance:</p>
</ul>
<pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc <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_1.0.25-4_armhf.deb .
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre> dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb .</code></pre></li>
<ul> <li><p>If alsa is not properly detected by <code>configure</code>, you
<li>If alsa is not properly detected by <code>configure</code>, you can can point it out by <code>--with-alsa</code>.</p></li>
point it out by <code>--with-alsa</code>.</li>
</ul> </ul>
<h4 id="x11-1">X11</h4> <h4 id="x11-1">X11</h4>
<p>You will need X11 libraries suitable for your <em>target</em> system. <p>You will need X11 libraries suitable for your <em>target</em> system.
@ -1372,21 +1370,18 @@ Package Search</a>, search for the following packages for your
</ul></li> </ul></li>
<li><p>Install the libraries into the cross-compilation toolchain. For <li><p>Install the libraries into the cross-compilation toolchain. For
instance:</p> instance:</p>
<pre><code> cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr <pre><code>cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr
mkdir X11R6 mkdir X11R6
cd X11R6 cd X11R6
for deb in /tmp/target-x11/*.deb ; do dpkg-deb -x $deb . ; done for deb in /tmp/target-x11/*.deb ; do dpkg-deb -x $deb . ; done
mv usr/* . mv usr/* .
cd lib cd lib
cp arm-linux-gnueabihf/* . 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>
You can ignore the following messages. These libraries are not needed to <pre><code>cp: cannot stat `arm-linux-gnueabihf/libICE.so&#39;: No such file or directory
successfully complete a full JDK build.</code></pre> cp: cannot stat `arm-linux-gnueabihf/libSM.so&#39;: No such file or directory
<p>cp: cannot stat cp: cannot stat `arm-linux-gnueabihf/libXt.so&#39;: No such file or directory</code></pre></li>
<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>
<li><p>If the X11 libraries are not properly detected by <li><p>If the X11 libraries are not properly detected by
<code>configure</code>, you can point them out by <code>configure</code>, you can point them out by
<code>--with-x</code>.</p></li> <code>--with-x</code>.</p></li>
@ -1404,17 +1399,30 @@ native compilation speed.</p>
<p>For example, cross-compiling to AArch64 from x86_64 could be done <p>For example, cross-compiling to AArch64 from x86_64 could be done
like this:</p> like this:</p>
<ul> <ul>
<li><p>Install cross-compiler on the <em>build</em> system: <li><p>Install cross-compiler on the <em>build</em> system:</p>
<code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></p></li> <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 <li><p>Create chroot on the <em>build</em> system, configuring it for
<em>target</em> system: <em>target</em> system:</p>
<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> <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>Make sure the symlinks inside the newly created chroot point to <li><p>Make sure the symlinks inside the newly created chroot point to
proper locations: proper locations:</p>
<code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></p></li> <pre><code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></pre></li>
<li><p>Configure and build with newly created chroot as <li><p>Configure and build with newly created chroot as
sysroot/toolchain-path: sysroot/toolchain-path:</p>
<code>sh ./configure \ --openjdk-target=aarch64-linux-gnu \ --with-sysroot=~/sysroot-arm64 make images ls build/linux-aarch64-server-release/</code></p></li> <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> </ul>
<p>The build does not create new files in that chroot, so it can be <p>The build does not create new files in that chroot, so it can be
reused for multiple builds without additional cleanup.</p> reused for multiple builds without additional cleanup.</p>
@ -1566,12 +1574,27 @@ libraries</a> required by OpenJDK complicate the building process. The
placeholder <code>&lt;toolchain-installed-path&gt;</code> shown below is placeholder <code>&lt;toolchain-installed-path&gt;</code> shown below is
the path where you want to install the toolchain.</p> the path where you want to install the toolchain.</p>
<ul> <ul>
<li><p>Install the RISC-V GNU compiler toolchain: <li><p>Install the RISC-V GNU compiler toolchain:</p>
<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> <pre><code>git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain
<li><p>Cross-compile all the required libraries: cd riscv-gnu-toolchain
<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> ./configure --prefix=&lt;toolchain-installed-path&gt;
<li><p>Configure and build OpenJDK: make linux
<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> 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> </ul>
<h3 id="building-for-musl">Building for musl</h3> <h3 id="building-for-musl">Building for musl</h3>
<p>Just like it's possible to cross-compile for a different CPU, it's <p>Just like it's possible to cross-compile for a different CPU, it's

View File

@ -626,11 +626,13 @@ automatically, it will exit and inform you about the problem.
Some command line examples: Some command line examples:
* Create a 32-bit build for Windows with FreeType2 in `C:\freetype-i586`: * 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 bash configure --with-freetype=/cygdrive/c/freetype-i586 --with-target-bits=32
``` ```
* Create a debug build with the `server` JVM and DTrace enabled: * Create a debug build with the `server` JVM and DTrace enabled:
``` ```
bash configure --enable-debug --with-jvm-variants=server --enable-dtrace bash configure --enable-debug --with-jvm-variants=server --enable-dtrace
``` ```
@ -1100,11 +1102,12 @@ Note that alsa is needed even if you only want to build a headless JDK.
system. Download them to /tmp. system. Download them to /tmp.
* Install the libraries into the cross-compilation toolchain. For instance: * 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 . cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc
dpkg-deb -x /tmp/libasound2-dev_1.0.25-4_armhf.deb . 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 * If alsa is not properly detected by `configure`, you can point it out by
`--with-alsa`. `--with-alsa`.
@ -1140,6 +1143,7 @@ Note that X11 is needed even if you only want to build a headless JDK.
* libxext-dev * libxext-dev
* Install the libraries into the cross-compilation toolchain. For instance: * 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 cd /tools/gcc-linaro-arm-linux-gnueabihf-raspbian-2012.09-20120921_linux/arm-linux-gnueabihf/libc/usr
mkdir X11R6 mkdir X11R6
@ -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: For example, cross-compiling to AArch64 from x86_64 could be done like this:
* Install cross-compiler on the *build* system: * Install cross-compiler on the *build* system:
``` ```
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
``` ```
* Create chroot on the *build* system, configuring it for *target* system: * Create chroot on the *build* system, configuring it for *target* system:
``` ```
sudo debootstrap \ sudo debootstrap \
--arch=arm64 \ --arch=arm64 \
@ -1192,11 +1198,13 @@ For example, cross-compiling to AArch64 from x86_64 could be done like this:
``` ```
* Make sure the symlinks inside the newly created chroot point to proper locations: * Make sure the symlinks inside the newly created chroot point to proper locations:
``` ```
sudo chroot ~/sysroot-arm64 symlinks -cr . sudo chroot ~/sysroot-arm64 symlinks -cr .
``` ```
* Configure and build with newly created chroot as sysroot/toolchain-path: * Configure and build with newly created chroot as sysroot/toolchain-path:
``` ```
sh ./configure \ sh ./configure \
--openjdk-target=aarch64-linux-gnu \ --openjdk-target=aarch64-linux-gnu \
@ -1255,6 +1263,7 @@ complicate the building process. The placeholder `<toolchain-installed-path>`
shown below is the path where you want to install the toolchain. shown below is the path where you want to install the toolchain.
* Install the RISC-V GNU compiler toolchain: * Install the RISC-V GNU compiler toolchain:
``` ```
git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain git clone --recursive https://github.com/riscv-collab/riscv-gnu-toolchain
cd riscv-gnu-toolchain cd riscv-gnu-toolchain
@ -1264,6 +1273,7 @@ shown below is the path where you want to install the toolchain.
``` ```
* Cross-compile all the required libraries: * Cross-compile all the required libraries:
``` ```
# An example for libffi # An example for libffi
git clone https://github.com/libffi/libffi git clone https://github.com/libffi/libffi
@ -1274,6 +1284,7 @@ shown below is the path where you want to install the toolchain.
``` ```
* Configure and build OpenJDK: * Configure and build OpenJDK:
``` ```
bash configure \ bash configure \
--with-boot-jdk=$BOOT_JDK \ --with-boot-jdk=$BOOT_JDK \