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