Skip to content

Commit efa305e

Browse files
committed
Allow SPARC builds for versions 13 and 14.
1 parent 4f1b738 commit efa305e

28 files changed

+372
-120
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ This project builds all OpenJDK versions from 9 till latest 20 for Solaris 11.4.
55
Note that this was done based on great job of Peter Tribble:
66
https://ptribble.blogspot.com/2021/12/keeping-java-alive-on-illumos.html
77

8-
At this time only amd64 platform is expected to work (not SPARC).
8+
At this time only amd64 platform is expected to work (for SPARC it can build
9+
up to version 14 only).
910

1011
You just need to have:
1112
- Oracle Solaris 11.4 (at least S11.4.24) with installed system header files

jdk-13.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONFIGURE_OPTIONS+=" CXX=$GXX"
1919

2020
git clone ${JDK_GITHUB_REPO}/$SRC_DIR "$BUILD_DIR"/$SRC_DIR
2121
cd "$BUILD_DIR"/$SRC_DIR
22-
git checkout jdk-13.0.11-ga
22+
git checkout jdk-13.0.12-ga
2323

2424
apply_patch_series
2525

patches-13/README.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
This is derived from the pkgsrc-joyent set for openjdk11, building on
22
my openjdk12 set.
33

4-
All patches -p0
4+
13.0.12
55

6-
This current set for 13.0.3+3
6+
Build broken by https://www.illumos.org/issues/14418. That did 2
7+
things - (1) exposed memcntl and meminfo by default, and (2) changed
8+
the signature for memcntl from caddr_t to void so there's a
9+
mismatch. The fix adopted is to modify the internal java signature for
10+
memcntl to the new version, which still allows builds on older
11+
releases as the old definition in sys/mman.h was effectively invisible
12+
there. See illumos-port-7.patch.
13+
14+
13.0.10
15+
16+
fixed up patch-make_lib_Awt2dLibraries.gmk
17+
18+
13.0.9
19+
A reasonable amount of patch noise.
20+
21+
Need to add illumos-port-6.patch
722

823
JDK13:
924
openjdk13 fixes (besides fixing line number noise)

patches-13/Solaris11-gcc10.patch

Lines changed: 0 additions & 84 deletions
This file was deleted.

patches-13/Solaris11-sparc.patch

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Resolves build error with GCC 10.
2+
3+
--- a/src/hotspot/cpu/sparc/nativeInst_sparc.hpp
4+
+++ b/src/hotspot/cpu/sparc/nativeInst_sparc.hpp
5+
@@ -315,7 +315,7 @@
6+
7+
inline NativeCall* nativeCall_at(address instr);
8+
inline NativeCall* nativeCall_overwriting_at(address instr,
9+
- address destination);
10+
+ address destination = NULL);
11+
inline NativeCall* nativeCall_before(address return_address);
12+
class NativeCall: public NativeInstruction {
13+
public:
14+
@@ -344,7 +344,7 @@
15+
16+
// Creation
17+
friend inline NativeCall* nativeCall_at(address instr);
18+
- friend NativeCall* nativeCall_overwriting_at(address instr, address destination = NULL) {
19+
+ friend NativeCall* nativeCall_overwriting_at(address instr, address destination) {
20+
// insert a "blank" call:
21+
NativeCall* call = (NativeCall*)instr;
22+
call->set_long_at(0 * BytesPerInstWord, call_instruction(destination, instr));
23+
@@ -413,7 +413,7 @@
24+
// == sethi %hi54(addr), O7 ; jumpl O7, %lo10(addr), O7 ; <delay>
25+
// That is, it is essentially the same as a NativeJump.
26+
class NativeFarCall;
27+
-inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination);
28+
+inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination = NULL);
29+
inline NativeFarCall* nativeFarCall_at(address instr);
30+
class NativeFarCall: public NativeInstruction {
31+
public:
32+
@@ -452,7 +452,7 @@
33+
return call;
34+
}
35+
36+
- friend inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination = NULL) {
37+
+ friend inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination) {
38+
Unimplemented();
39+
NativeFarCall* call = (NativeFarCall*)instr;
40+
return call;

patches-13/patch-make_GenerateLinkOptData.gmk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Ensure java libraries can be found during build.
1111
+ LD_LIBRARY_PATH=$(INTERIM_IMAGE_DIR)/lib:$(INTERIM_IMAGE_DIR)/lib/jli \
1212
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:[email protected] \
1313
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
14-
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
14+
-Duser.language=en -Duser.country=US \

patches-13/patch-make_autoconf_basics.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Shell portability, and remove annoying warning.
2222
fi
2323
# Try to locate tool using the code snippet
2424
$2
25-
@@ -1172,7 +1172,7 @@ AC_DEFUN([BASIC_CHECK_GREP],
25+
@@ -1173,7 +1173,7 @@ AC_DEFUN([BASIC_CHECK_GREP],
2626
NEEDLE_SPACES='ccc bbb aaa'
2727
NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
2828
RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"

patches-13/patch-make_autoconf_flags-cflags.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Support for SunOS/gcc.
1818

1919
elif test "x$TOOLCHAIN_TYPE" = xclang; then
2020
C_FLAG_REORDER=''
21-
@@ -508,6 +513,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
21+
@@ -503,6 +508,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
2222

2323
if test "x$TOOLCHAIN_TYPE" = xgcc; then
2424
ALWAYS_DEFINES_JVM="-D_GNU_SOURCE -D_REENTRANT"

patches-13/patch-make_autoconf_libraries.m4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ Support SunOS/gcc.
1212
# Find the root of the Solaris Studio installation from the compiler path
1313
SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
1414
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
15-
@@ -213,6 +214,7 @@ AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT
15+
@@ -213,5 +214,6 @@ AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT
1616
AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests])
1717
fi
1818
AC_SUBST(STLPORT_LIB)
1919
+ fi
2020
fi
2121
])
22-

patches-13/patch-make_autoconf_spec.gmk.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Ensure support libraries can be found during build.
44

55
--- make/autoconf/spec.gmk.in.orig 2019-01-08 09:40:27.000000000 +0000
66
+++ make/autoconf/spec.gmk.in
7-
@@ -516,12 +516,12 @@ LD:=@FIXPATH@ @LD@
7+
@@ -520,12 +520,12 @@ LD:=@FIXPATH@ @LD@
88
SDKROOT:=@SDKROOT@
99

1010
# LDFLAGS used to link the jdk native libraries (C-code)
@@ -19,7 +19,7 @@ Ensure support libraries can be found during build.
1919
JDKEXE_LIBS:=@JDKEXE_LIBS@
2020

2121
# LDFLAGS specific to C++ linking.
22-
@@ -636,9 +636,9 @@ JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_
22+
@@ -640,9 +640,9 @@ JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_
2323
JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
2424
JAVAC=@FIXPATH@ $(JAVAC_CMD)
2525
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
@@ -32,7 +32,7 @@ Ensure support libraries can be found during build.
3232
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
3333
# A specific java binary with specific options can be used to run
3434
# the long running background sjavac servers and other long running tasks.
35-
@@ -651,8 +651,8 @@ JAVAC_FLAGS?=@JAVAC_FLAGS@
35+
@@ -655,8 +655,8 @@ JAVAC_FLAGS?=@JAVAC_FLAGS@
3636

3737

3838
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@

0 commit comments

Comments
 (0)