diff options
author | Stuart Monteith <stuart.monteith@linaro.org> | 2016-05-16 16:39:02 +0100 |
---|---|---|
committer | Stuart Monteith <stuart.monteith@linaro.org> | 2016-05-16 16:39:02 +0100 |
commit | 8bef73f129434533212e315abc342b9e5e9c7da3 (patch) | |
tree | 4251f7fa55290f18271523660c2208ff11e879c0 | |
parent | f9c5f1c4bcc0001121c0b664e4a0b796335788d5 (diff) |
Patches for jdk8u client build
Patches from Ed to allow client builds to build.
-rw-r--r-- | build_client.patch | 40 | ||||
-rw-r--r-- | hotspot/hotspot_client.patch | 51 | ||||
-rw-r--r-- | jdk/jdk_client.patch | 71 |
3 files changed, 162 insertions, 0 deletions
diff --git a/build_client.patch b/build_client.patch new file mode 100644 index 0000000..db7c7d7 --- /dev/null +++ b/build_client.patch @@ -0,0 +1,40 @@ +diff -r ed73b014b78b common/autoconf/generated-configure.sh +--- a/common/autoconf/generated-configure.sh Wed Mar 23 17:20:03 2016 +0000 ++++ b/common/autoconf/generated-configure.sh Wed May 11 09:36:27 2016 +0000 +@@ -7943,11 +7943,11 @@ + JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` + JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` + +- if test "x$JVM_VARIANT_CLIENT" = xtrue; then +- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then +- as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 +- fi +- fi ++# if test "x$JVM_VARIANT_CLIENT" = xtrue; then ++# if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then ++# as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5 ++# fi ++# fi + if test "x$JVM_VARIANT_KERNEL" = xtrue; then + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5 +diff -r ed73b014b78b common/autoconf/jdk-options.m4 +--- a/common/autoconf/jdk-options.m4 Wed Mar 23 17:20:03 2016 +0000 ++++ b/common/autoconf/jdk-options.m4 Wed May 11 09:36:27 2016 +0000 +@@ -117,11 +117,11 @@ + JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` + JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'` + +- if test "x$JVM_VARIANT_CLIENT" = xtrue; then +- if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then +- AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) +- fi +- fi ++# if test "x$JVM_VARIANT_CLIENT" = xtrue; then ++# if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then ++# AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) ++# fi ++# fi + if test "x$JVM_VARIANT_KERNEL" = xtrue; then + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then + AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) diff --git a/hotspot/hotspot_client.patch b/hotspot/hotspot_client.patch new file mode 100644 index 0000000..a0e48ea --- /dev/null +++ b/hotspot/hotspot_client.patch @@ -0,0 +1,51 @@ +diff -r 1610e00126d5 make/Makefile +--- a/make/Makefile Wed Apr 06 19:33:23 2016 +0000 ++++ b/make/Makefile Wed May 11 10:33:51 2016 +0000 +@@ -216,13 +216,13 @@ + @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" + endif + else +- ifeq ($(ARCH_DATA_MODEL), 32) ++# ifeq ($(ARCH_DATA_MODEL), 32) + $(CD) $(OUTPUTDIR); \ + $(MAKE) -f $(ABS_OS_MAKEFILE) \ + $(MAKE_ARGS) $(VM_TARGET) +- else +- @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" +- endif ++# else ++# @$(ECHO) "No compiler1 ($(VM_TARGET)) for ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ++# endif + endif + + # Build compiler2 (server) rule, different for platforms +diff -r 1610e00126d5 src/cpu/aarch64/vm/stubGenerator_aarch64.cpp +--- a/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp Wed Apr 06 19:33:23 2016 +0000 ++++ b/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp Wed May 11 10:33:51 2016 +0000 +@@ -2943,9 +2943,11 @@ + // arraycopy stubs used by compilers + generate_arraycopy_stubs(); + ++#ifdef COMPILER2 + if (UseMultiplyToLenIntrinsic) { + StubRoutines::_multiplyToLen = generate_multiplyToLen(); + } ++#endif + + #ifndef BUILTIN_SIM + if (UseAESIntrinsics) { +diff -r 1610e00126d5 src/cpu/aarch64/vm/vm_version_aarch64.cpp +--- a/src/cpu/aarch64/vm/vm_version_aarch64.cpp Wed Apr 06 19:33:23 2016 +0000 ++++ b/src/cpu/aarch64/vm/vm_version_aarch64.cpp Wed May 11 10:33:51 2016 +0000 +@@ -266,9 +266,11 @@ + FLAG_SET_DEFAULT(UseBlockZeroing, false); + } + ++#ifdef COMPILER2 + if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { + UseMultiplyToLenIntrinsic = true; + } ++#endif + + if (FLAG_IS_DEFAULT(UseBarriersForVolatile)) { + UseBarriersForVolatile = (_cpuFeatures & CPU_DMB_ATOMICS) != 0; diff --git a/jdk/jdk_client.patch b/jdk/jdk_client.patch new file mode 100644 index 0000000..f1a3ff5 --- /dev/null +++ b/jdk/jdk_client.patch @@ -0,0 +1,71 @@ +diff -r ebcbf5b820e8 src/share/bin/java.c +--- a/src/share/bin/java.c Wed Mar 23 17:20:09 2016 +0000 ++++ b/src/share/bin/java.c Wed May 11 13:34:15 2016 +0000 +@@ -699,6 +699,22 @@ + } + } + ++/* ++ * This is called if the jvmtype returned by CheckJvmType above ++ * didn't exist. In this case if it was the default VM and we ++ * selected the server vm we will allow it to use the client vm ++ * instead. ++ */ ++char * ++GetAltJvmType(char *jvmtype) ++{ ++ if ((knownVMs[0].flag == VM_IF_SERVER_CLASS) && ++ (jvmtype == knownVMs[0].server_class+1)) { ++ return knownVMs[0].name+1; ++ } ++ return NULL; ++} ++ + /* copied from HotSpot function "atomll()" */ + static int + parse_size(const char *s, jlong *result) { +diff -r ebcbf5b820e8 src/share/bin/java.h +--- a/src/share/bin/java.h Wed Mar 23 17:20:09 2016 +0000 ++++ b/src/share/bin/java.h Wed May 11 13:34:15 2016 +0000 +@@ -164,6 +164,7 @@ + */ + jint ReadKnownVMs(const char *jvmcfg, jboolean speculative); + char *CheckJvmType(int *argc, char ***argv, jboolean speculative); ++char *GetAltJvmType(char *jvmtype); + void AddOption(char *str, void *info); + + enum ergo_policy { +diff -r ebcbf5b820e8 src/solaris/bin/aarch64/jvm.cfg +--- a/src/solaris/bin/aarch64/jvm.cfg Wed Mar 23 17:20:09 2016 +0000 ++++ b/src/solaris/bin/aarch64/jvm.cfg Wed May 11 13:34:15 2016 +0000 +@@ -31,5 +31,6 @@ + # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported + # and may not be available in a future release. + # ++-client IF_SERVER_CLASS -server + -server KNOWN +--client IGNORE ++-minimal KNOWN +diff -r ebcbf5b820e8 src/solaris/bin/java_md_solinux.c +--- a/src/solaris/bin/java_md_solinux.c Wed Mar 23 17:20:09 2016 +0000 ++++ b/src/solaris/bin/java_md_solinux.c Wed May 11 13:34:15 2016 +0000 +@@ -474,8 +474,17 @@ + } + + if (!GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, arch, 0 )) { +- JLI_ReportErrorMessage(CFG_ERROR8, jvmtype, jvmpath); +- exit(4); ++ char *altjvmtype = GetAltJvmType(jvmtype); ++ jboolean found = JNI_FALSE; ++ if (altjvmtype) { ++ jvmtype = altjvmtype; ++ jvmpath[0] = '\0'; ++ found = GetJVMPath(jrepath, jvmtype, jvmpath, so_jvmpath, arch, 0) != NULL; ++ } ++ if (!found) { ++ JLI_ReportErrorMessage(CFG_ERROR8, jvmtype, jvmpath); ++ exit(4); ++ } + } + /* + * we seem to have everything we need, so without further ado |