Blame SOURCES/0002-java-dir-for-powepc64-and-powepc64le-can-differ.patch

ebc4bd
From 337e7e62285ff90978438173a2ba8899eabc3955 Mon Sep 17 00:00:00 2001
ebc4bd
From: David Tardon <dtardon@redhat.com>
ebc4bd
Date: Tue, 12 May 2015 12:10:16 +0200
ebc4bd
Subject: [PATCH] java dir for powepc64 and powepc64le can differ
ebc4bd
ebc4bd
E.g., RHEL >= 7.1 uses ppc64le for reasons listed in
ebc4bd
https://bugs.openjdk.java.net/browse/JDK-8073139 .
ebc4bd
ebc4bd
This is a follow-up to commit 7a66dbe982623be620ad6ac426fe689a434e5f51.
ebc4bd
ebc4bd
Change-Id: I685f76d51e9775788a7fb225c6a5e2309a45ceb7
ebc4bd
---
ebc4bd
 config_host/config_java.h.in                     | 6 ++++++
ebc4bd
 configure.ac                                     | 3 +++
ebc4bd
 jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx | 6 +++++-
ebc4bd
 3 files changed, 14 insertions(+), 1 deletion(-)
ebc4bd
 create mode 100644 config_host/config_java.h.in
ebc4bd
ebc4bd
diff --git a/config_host/config_java.h.in b/config_host/config_java.h.in
ebc4bd
new file mode 100644
ebc4bd
index 0000000..8b23de9
ebc4bd
--- /dev/null
ebc4bd
+++ b/config_host/config_java.h.in
ebc4bd
@@ -0,0 +1,6 @@
ebc4bd
+#ifndef CONFIG_JAVA_H
ebc4bd
+#define CONFIG_JAVA_H
ebc4bd
+
ebc4bd
+#undef JAVA_ARCH
ebc4bd
+
ebc4bd
+#endif
ebc4bd
diff --git a/configure.ac b/configure.ac
ebc4bd
index d8266b4..d764c33 100644
ebc4bd
--- a/configure.ac
ebc4bd
+++ b/configure.ac
ebc4bd
@@ -7259,6 +7259,7 @@ then
ebc4bd
             ;;
ebc4bd
         powerpc64le)
ebc4bd
             AS_IF([test -d "$JAVA_HOME/jre/lib/ppc64le"], [my_java_arch=ppc64le], [my_java_arch=ppc64])
ebc4bd
+            JAVA_ARCH=$my_java_arch
ebc4bd
             ;;
ebc4bd
         x86_64)
ebc4bd
             my_java_arch=amd64
ebc4bd
@@ -7268,6 +7269,7 @@ then
ebc4bd
             ;;
ebc4bd
         esac
ebc4bd
         JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
ebc4bd
+        AS_IF([test "$JAVA_ARCH" != ""], [AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$JAVA_ARCH"])])
ebc4bd
     fi
ebc4bd
     AC_MSG_RESULT([$JAWTLIB])
ebc4bd
 fi
ebc4bd
@@ -13042,6 +13044,7 @@ AC_CONFIG_HEADERS([config_host/config_folders.h])
ebc4bd
 AC_CONFIG_HEADERS([config_host/config_gcc.h])
ebc4bd
 AC_CONFIG_HEADERS([config_host/config_global.h])
ebc4bd
 AC_CONFIG_HEADERS([config_host/config_graphite.h])
ebc4bd
+AC_CONFIG_HEADERS([config_host/config_java.h])
ebc4bd
 AC_CONFIG_HEADERS([config_host/config_lgpl.h])
ebc4bd
 AC_CONFIG_HEADERS([config_host/config_locales.h])
ebc4bd
 AC_CONFIG_HEADERS([config_host/config_mpl.h])
ebc4bd
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
ebc4bd
index 29f2641..ffc05c1 100644
ebc4bd
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
ebc4bd
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
ebc4bd
@@ -20,6 +20,8 @@
ebc4bd
 #ifndef INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_VENDORBASE_HXX
ebc4bd
 #define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_VENDORBASE_HXX
ebc4bd
 
ebc4bd
+#include "config_java.h"
ebc4bd
+
ebc4bd
 #include "rtl/ustring.hxx"
ebc4bd
 #include "rtl/ref.hxx"
ebc4bd
 #include "osl/endian.h"
ebc4bd
@@ -31,7 +33,9 @@ namespace jfw_plugin
ebc4bd
 
ebc4bd
 
ebc4bd
 //Used by subclasses of VendorBase to build paths to Java runtime
ebc4bd
-#if defined(__sparcv9)
ebc4bd
+#if defined(JAVA_ARCH)
ebc4bd
+#define JFW_PLUGIN_ARCH JAVA_ARCH
ebc4bd
+#elif defined(__sparcv9)
ebc4bd
 #define JFW_PLUGIN_ARCH "sparcv9"
ebc4bd
 #elif defined SPARC
ebc4bd
 #define JFW_PLUGIN_ARCH "sparc"
ebc4bd
-- 
ebc4bd
2.4.0
ebc4bd