Blob Blame Raw
# HG changeset patch
# User asmundak
# 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
Contributed-by: Andrew Hughes <gnu.andrew@redhat.com>, Alexander Smundak <asmundak@google.com>

diff --git openjdk.orig///common/autoconf/flags.m4 openjdk///common/autoconf/flags.m4
--- openjdk.orig///common/autoconf/flags.m4
+++ openjdk///common/autoconf/flags.m4
@@ -549,6 +549,9 @@
       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
     fi
   fi
+  if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
+  fi
   
   # Setup target OS define. Use OS target name but in upper case.
   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
diff --git openjdk.orig///common/autoconf/jdk-options.m4 openjdk///common/autoconf/jdk-options.m4
--- openjdk.orig///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
   fi
-  if test "x$VAR_CPU" = xppc64 ; then
+  if test "x$VAR_CPU" = xppc64 -o "x$VAR_CPU" = xppc64le ; then
     INCLUDE_SA=false
   fi
   AC_SUBST(INCLUDE_SA)
diff --git openjdk.orig///common/autoconf/platform.m4 openjdk///common/autoconf/platform.m4
--- openjdk.orig///common/autoconf/platform.m4
+++ openjdk///common/autoconf/platform.m4
@@ -67,7 +67,7 @@
       VAR_CPU_ENDIAN=big
       ;;
     powerpc64le)
-      VAR_CPU=ppc64
+      VAR_CPU=ppc64le
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=little