diff --git a/8073139-rh1191652-hotspot-aarch64.patch b/8073139-rh1191652-hotspot-aarch64.patch index 865ecb3..a5afea0 100644 --- a/8073139-rh1191652-hotspot-aarch64.patch +++ b/8073139-rh1191652-hotspot-aarch64.patch @@ -1,25 +1,130 @@ # HG changeset patch -# User andrew -# Date 1424102734 0 -# Mon Feb 16 16:05:34 2015 +0000 -# Node ID 4fdaf786d977aa77afdb68b8829579d31069e39c -# Parent 01a0011cc101f3308c5876db8282c0fc5e3ba2e6 -PR2236: ppc64le should report its os.arch as ppc64le so tools can detect it -Summary: Use ppc64le as the arch directory on that platform and report it in os.arch +# User sgehwolf +# Date 1537885415 -7200 +# Tue Sep 25 16:23:35 2018 +0200 +# Node ID 5044428520866481f438bfd1375da75adbc89243 +# Parent a3df1579a8647b06559f41d345da7bea162b26e9 +8073139: PPC64: User-visible arch directory and os.arch value on ppc64le cause issues with Java tooling +Reviewed-by: erikj, goetz, dholmes ---- openjdk/hotspot/make/defs.make.orig 2015-03-03 17:05:51.000000000 -0500 -+++ openjdk/hotspot/make/defs.make 2015-03-03 19:18:20.000000000 -0500 -@@ -319,6 +319,13 @@ - LIBARCH/ppc64 = ppc64 - LIBARCH/zero = $(ZERO_LIBARCH) +diff --git a/make/defs.make b/make/defs.make +--- openjdk/hotspot/make/defs.make ++++ openjdk/hotspot/make/defs.make +@@ -285,7 +285,7 @@ ifneq ($(OSNAME),windows) -+ # Override LIBARCH for ppc64le -+ ifeq ($(ARCH), ppc64) -+ ifeq ($(OPENJDK_TARGET_CPU_ENDIAN), little) -+ LIBARCH = ppc64le -+ endif + # Use uname output for SRCARCH, but deal with platform differences. If ARCH + # is not explicitly listed below, it is treated as x86. +- SRCARCH ?= $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64 zero aarch64,$(ARCH))) ++ SRCARCH ?= $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64 ppc64le zero aarch64,$(ARCH))) + ARCH/ = x86 + ARCH/sparc = sparc + ARCH/sparc64= sparc +@@ -293,6 +293,7 @@ ifneq ($(OSNAME),windows) + ARCH/amd64 = x86 + ARCH/x86_64 = x86 + ARCH/ppc64 = ppc ++ ARCH/ppc64le= ppc + ARCH/ppc = ppc + ARCH/zero = zero + ARCH/aarch64 = aarch64 +@@ -316,7 +317,12 @@ + endif + endif + +- # LIBARCH is 1:1 mapping from BUILDARCH ++ # LIBARCH is 1:1 mapping from BUILDARCH, except for ARCH=ppc64le ++ ifeq ($(ARCH),ppc64le) ++ LIBARCH ?= ppc64le ++ else ++ LIBARCH ?= $(LIBARCH/$(BUILDARCH)) + endif -+ - LP64_ARCH += sparcv9 amd64 ia64 ppc64 aarch64 zero - endif - + LIBARCH ?= $(LIBARCH/$(BUILDARCH)) + LIBARCH/i486 = i386 + LIBARCH/amd64 = amd64 +diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp +--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -1956,7 +1956,7 @@ + {EM_SPARCV9, EM_SPARCV9, ELFCLASS64, ELFDATA2MSB, (char*)"Sparc v9 64"}, + {EM_PPC, EM_PPC, ELFCLASS32, ELFDATA2MSB, (char*)"Power PC 32"}, + #if defined(VM_LITTLE_ENDIAN) +- {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2LSB, (char*)"Power PC 64"}, ++ {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2LSB, (char*)"Power PC 64 LE"}, + #else + {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"}, + #endif +diff --git a/src/share/tools/hsdis/Makefile b/src/share/tools/hsdis/Makefile +--- openjdk/hotspot/src/share/tools/hsdis/Makefile ++++ openjdk/hotspot/src/share/tools/hsdis/Makefile +@@ -97,6 +97,7 @@ + CFLAGS/sparcv9 += -m64 + CFLAGS/amd64 += -m64 + CFLAGS/ppc64 += -m64 ++CFLAGS/ppc64le += -m64 -DABI_ELFv2 + else + ARCH=$(ARCH1:amd64=i386) + CFLAGS/i386 += -m32 +diff --git a/src/share/tools/hsdis/hsdis-demo.c b/src/share/tools/hsdis/hsdis-demo.c +--- openjdk/hotspot/src/share/tools/hsdis/hsdis-demo.c ++++ openjdk/hotspot/src/share/tools/hsdis/hsdis-demo.c +@@ -88,7 +88,7 @@ + printf("...And now for something completely different:\n"); + void *start = (void*) &main; + void *end = (void*) &end_of_file; +-#if defined(__ia64) || defined(__powerpc__) ++#if defined(__ia64) || (defined(__powerpc__) && !defined(ABI_ELFv2)) + /* On IA64 and PPC function pointers are pointers to function descriptors */ + start = *((void**)start); + end = *((void**)end); +diff --git a/src/share/tools/hsdis/hsdis.c b/src/share/tools/hsdis/hsdis.c +--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c ++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c +@@ -461,7 +461,7 @@ static const char* native_arch_name() { + #ifdef LIBARCH_sparcv9 + res = "sparc:v9b"; + #endif +-#ifdef LIBARCH_ppc64 ++#if defined(LIBARCH_ppc64) || defined(LIBARCH_ppc64le) + res = "powerpc:common64"; + #endif + #else +diff --git a/src/share/vm/runtime/vm_version.cpp b/src/share/vm/runtime/vm_version.cpp +--- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp +@@ -187,11 +187,16 @@ const char* Abstract_VM_Version::jre_release_version() { + #ifndef CPU + #ifdef ZERO + #define CPU ZERO_LIBARCH ++#elif defined(PPC64) ++#if defined(VM_LITTLE_ENDIAN) ++#define CPU "ppc64le" ++#else ++#define CPU "ppc64" ++#endif + #else + #define CPU IA32_ONLY("x86") \ + IA64_ONLY("ia64") \ + AMD64_ONLY("amd64") \ +- PPC64_ONLY("ppc64") \ + AARCH64_ONLY("aarch64") \ + SPARC_ONLY("sparc") + #endif // ZERO +diff --git a/test/test_env.sh b/test/test_env.sh +--- openjdk/hotspot/test/test_env.sh ++++ openjdk/hotspot/test/test_env.sh +@@ -185,6 +185,15 @@ + if [ $? = 0 ] + then + VM_CPU="ppc" ++ if [ $VM_BITS = "64" ] ++ then ++ VM_CPU="ppc64" ++ grep "ppc64le" vm_version.out > ${NULL} ++ if [ $? = 0 ] ++ then ++ VM_CPU="ppc64le" ++ fi ++ fi + fi + grep "ia64" vm_version.out > ${NULL} + if [ $? = 0 ] diff --git a/8073139-rh1191652-jdk.patch b/8073139-rh1191652-jdk.patch index 5157f40..7495c36 100644 --- a/8073139-rh1191652-jdk.patch +++ b/8073139-rh1191652-jdk.patch @@ -1,4 +1,13 @@ -diff -r 1fe56343ecc8 make/lib/SoundLibraries.gmk +# HG changeset patch +# User sgehwolf +# Date 1537884792 -7200 +# Tue Sep 25 16:13:12 2018 +0200 +# Node ID fd140d7550992267e3f0f08a20b461b2ce9fa740 +# Parent 21056af0d1eabbd04d7a223c01a28320c7010bfe +8073139: PPC64: User-visible arch directory and os.arch value on ppc64le cause issues with Java tooling +Reviewed-by: erikj, goetz, dholmes + +diff --git a/make/lib/SoundLibraries.gmk b/make/lib/SoundLibraries.gmk --- openjdk/jdk/make/lib/SoundLibraries.gmk Tue Jan 12 21:01:12 2016 +0000 +++ openjdk/jdk/make/lib/SoundLibraries.gmk Wed Jan 13 00:18:02 2016 +0000 @@ -140,6 +140,10 @@ @@ -24,10 +33,11 @@ diff -r 1fe56343ecc8 src/share/native/com/sun/media/sound/SoundDefs.h // ********************************** // Make sure you set X_PLATFORM and X_ARCH defines correctly. -diff -r 1fe56343ecc8 src/solaris/bin/ppc64le/jvm.cfg ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/jdk/src/solaris/bin/ppc64le/jvm.cfg Wed Jan 13 00:18:02 2016 +0000 -@@ -0,0 +1,33 @@ +diff --git a/src/solaris/bin/ppc64le/jvm.cfg b/src/solaris/bin/ppc64le/jvm.cfg +new file mode 100644 +--- /dev/null ++++ openjdk/jdk/src/solaris/bin/ppc64le/jvm.cfg +@@ -0,0 +1,34 @@ +# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# @@ -61,3 +71,28 @@ diff -r 1fe56343ecc8 src/solaris/bin/ppc64le/jvm.cfg +# and may not be available in a future release. +# +-server KNOWN ++-client IGNORE +diff --git a/test/sun/security/pkcs11/PKCS11Test.java b/test/sun/security/pkcs11/PKCS11Test.java +--- openjdk/jdk/test/sun/security/pkcs11/PKCS11Test.java ++++ openjdk/jdk/test/sun/security/pkcs11/PKCS11Test.java +@@ -505,6 +505,8 @@ + osMap.put("Linux-amd64-64", new String[]{ + "/usr/lib/x86_64-linux-gnu/", "/usr/lib/x86_64-linux-gnu/nss/", + "/usr/lib64/"}); ++ osMap.put("Linux-ppc64-64", new String[]{"/usr/lib64/"}); ++ osMap.put("Linux-ppc64le-64", new String[]{"/usr/lib64/"}); + osMap.put("Windows-x86-32", new String[]{ + PKCS11_BASE + "/nss/lib/windows-i586/".replace('/', SEP)}); + osMap.put("Windows-amd64-64", new String[]{ +diff --git a/test/tools/launcher/Settings.java b/test/tools/launcher/Settings.java +--- openjdk/jdk/test/tools/launcher/Settings.java ++++ openjdk/jdk/test/tools/launcher/Settings.java +@@ -74,7 +74,7 @@ + + static void runTestOptionDefault() throws IOException { + String stackSize = "256"; // in kb +- if (getArch().equals("ppc64")) { ++ if (getArch().equals("ppc64") || getArch().equals("ppc64le")) { + stackSize = "800"; + } + TestResult tr = null; diff --git a/8073139-rh1191652-root.patch b/8073139-rh1191652-root.patch index 46a9c6f..746529a 100644 --- a/8073139-rh1191652-root.patch +++ b/8073139-rh1191652-root.patch @@ -1,20 +1,28 @@ -diff --git a/common/autoconf/hotspot-spec.gmk.in b/common/autoconf/hotspot-spec.gmk.in ---- openjdk///common/autoconf/hotspot-spec.gmk.in -+++ openjdk///common/autoconf/hotspot-spec.gmk.in -@@ -71,6 +71,10 @@ - LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) - # Set the cpu architecture - ARCH=$(OPENJDK_TARGET_CPU_ARCH) -+# ppc64le uses the HotSpot ppc64 build -+ifeq ($(OPENJDK_TARGET_CPU), ppc64le) -+ ARCH=ppc64 -+endif - # Legacy setting for building for a 64 bit machine. - # If yes then this expands to _LP64:=1 - @LP64@ +# HG changeset patch +# User sgehwolf +# Date 1537883922 -7200 +# Tue Sep 25 15:58:42 2018 +0200 +# Node ID 2fabe07c0bd8bf21400313f3bb9b8e80fcb31724 +# Parent 91867683f73de3882ef88981a79995beeeb1e980 +8073139: PPC64: User-visible arch directory and os.arch value on ppc64le cause issues with Java tooling +Reviewed-by: erikj, goetz, dholmes + +diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 +--- openjdk/common/autoconf/toolchain.m4 ++++ openjdk/common/autoconf/toolchain.m4 +@@ -1125,6 +1125,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], + else + COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN" + fi ++ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then ++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DABI_ELFv2" ++ fi + if test "x$OPENJDK_TARGET_OS" = xlinux; then + COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX" + fi diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 ---- openjdk///common/autoconf/jdk-options.m4 -+++ openjdk///common/autoconf/jdk-options.m4 +--- openjdk/common/autoconf/jdk-options.m4 ++++ openjdk/common/autoconf/jdk-options.m4 @@ -158,7 +158,7 @@ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then INCLUDE_SA=false @@ -25,8 +33,8 @@ diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 fi if test "x$OPENJDK_TARGET_CPU" = xaarch64; then diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 ---- openjdk///common/autoconf/platform.m4 -+++ openjdk///common/autoconf/platform.m4 +--- openjdk/common/autoconf/platform.m4 ++++ openjdk/common/autoconf/platform.m4 @@ -67,7 +67,7 @@ VAR_CPU_ENDIAN=big ;; @@ -36,16 +44,3 @@ diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4 VAR_CPU_ARCH=ppc VAR_CPU_BITS=64 VAR_CPU_ENDIAN=little -diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 ---- openjdk///common/autoconf/toolchain.m4 -+++ openjdk///common/autoconf/toolchain.m4 -@@ -1123,6 +1123,9 @@ - else - COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN" - fi -+ if test "x$OPENJDK_TARGET_CPU" = xppc64le; then -+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DABI_ELFv2" -+ fi - if test "x$OPENJDK_TARGET_OS" = xlinux; then - COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX" - fi diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index f44403e..59445d0 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1094,10 +1094,6 @@ Patch106: pr3519.patch # Patches which need backporting to 8u # ############################################# -# S8073139, RH1191652; fix name of ppc64le architecture -Patch601: 8073139-rh1191652-root.patch -Patch602: 8073139-rh1191652-jdk.patch -Patch603: 8073139-rh1191652-hotspot-aarch64.patch # 8044235: src.zip should include all sources Patch7: 8044235-include-all-srcs.patch # S8074839, PR2462: Resolve disabled warnings for libunpack and the unpack200 binary @@ -1193,6 +1189,10 @@ Patch206: 8207057-pr3613-assembler-debuginfo-hotspot.patch Patch207: 8207057-pr3613-assembler-debuginfo-root.patch # 8165852, PR3468: (fs) Mount point not found for a file which is present in overlayfs Patch210: 8165852-pr3468.patch +# S8073139, RH1191652; fix name of ppc64le architecture +Patch601: 8073139-rh1191652-root.patch +Patch602: 8073139-rh1191652-jdk.patch +Patch603: 8073139-rh1191652-hotspot-aarch64.patch ############################################# #