Skip to content

Commit 17ae343

Browse files
committed
[scripts] Add mechanism to select the Zero interpreter
1 parent 14cb451 commit 17ae343

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

scripts/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bash "$AUTOGEN_PATH"
1818
# Disable GUI: --enable-headless-only
1919
# Help to find freetype: --with-freetype-lib=/usr/lib/arm-linux-gnueabi
2020
# --with-freetype-include=/usr/include
21-
# Build only the Client VM: --with-jvm-variants=client
21+
# Build only the right VM: --with-jvm-variants=client
2222
# Add extra build flags: --with-extra-cflags="-w -Wno-error -D__SOFTFP__"
2323
# --with-extra-cxxflags="-w -Wno-error -D__SOFTFP__"
2424
# - Fix the build on new GCC: -w -Wno-error
@@ -36,7 +36,7 @@ bash ./configure --with-boot-jdk="$HOSTJDK" \
3636
--enable-headless-only \
3737
--with-freetype-lib=/usr/lib/arm-linux-gnueabi \
3838
--with-freetype-include=/usr/include \
39-
--with-jvm-variants=client \
39+
--with-jvm-variants="$HOTSPOT_VARIANT" \
4040
--with-extra-cflags="-w -Wno-error -D__SOFTFP__" \
4141
--with-extra-cxxflags="-w -Wno-error -D__SOFTFP__" \
4242
--with-version-string="$JAVA_VERSION" \

scripts/config.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,42 @@ IMAGEDIR="/build/jdk/build/linux-arm-normal-client-release/images"
1212
HOSTJDK="$SCRIPTDIR/jdk-10"
1313

1414

15+
# Version-specific configuration
16+
17+
# mercurial repository
18+
#JAVA_REPO="http://hg.openjdk.java.net/jdk-updates/jdkXu/"
19+
# patch to apply
20+
#PATCHVER="jdkX"
21+
# path to autogen.sh to regenerate the build system
22+
#AUTOGEN_PATH="./common/autoconf/autogen.sh"
23+
# hotspot variant to use
24+
#HOTSPOT_VARIANT=client
25+
# A comment from OpenJDK build system sums it up pretty well:
26+
## server: normal interpreter, and a tiered C1/C2 compiler
27+
## client: normal interpreter, and C1 (no C2 compiler)
28+
## minimal: reduced form of client with optional features stripped out
29+
## core: normal interpreter only, no compiler
30+
## zero: C++ based interpreter only, no compiler
31+
## custom: baseline JVM with no default features
32+
# 'client' JVM starts fast enough and provides the best performance.
33+
# 'zero' JVM provides us with a fallback when ARMv5 sflt JIT stops working completely.
34+
35+
36+
# OpenJDK 9
1537
if [ "$JDKVER" -eq "9" ]; then
1638
JAVA_REPO="http://hg.openjdk.java.net/jdk-updates/jdk9u/"
1739
PATCHVER="jdk9"
1840
AUTOGEN_PATH="./common/autoconf/autogen.sh"
41+
HOTSPOT_VARIANT=client
42+
43+
# OpenJDK 10
1944
elif [ "$JDKVER" -eq "10" ]; then
2045
JAVA_REPO="http://hg.openjdk.java.net/jdk-updates/jdk10u/"
2146
PATCHVER="jdk10"
2247
AUTOGEN_PATH="./make/autoconf/autogen.sh"
48+
HOTSPOT_VARIANT=client
49+
50+
# invalid or unset version
2351
else
2452
echo "Error! Please specify JDK version to compile via the JDKVER environment variable." >&2
2553
echo "Acceptable values:" >&2

0 commit comments

Comments
 (0)