summaryrefslogtreecommitdiff
path: root/debian/patches/ppc64le-8036767.diff
blob: 3a89293fcc4551c56f992e75b9d433717a3224d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# DP: Common bits to configure ppc64le support.

Index: b/common/autoconf/hotspot-spec.gmk.in
===================================================================
--- a/common/autoconf/hotspot-spec.gmk.in
+++ b/common/autoconf/hotspot-spec.gmk.in
@@ -71,6 +71,10 @@ ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR)
 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@
Index: b/common/autoconf/jdk-options.m4
===================================================================
--- a/common/autoconf/jdk-options.m4
+++ b/common/autoconf/jdk-options.m4
@@ -158,7 +158,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS
   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
   if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
Index: b/common/autoconf/platform.m4
===================================================================
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -128,7 +128,7 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
       VAR_CPU_ENDIAN=big
       ;;
     powerpc64le)
-      VAR_CPU=ppc64
+      VAR_CPU=ppc64le
       VAR_CPU_ARCH=ppc
       VAR_CPU_BITS=64
       VAR_CPU_ENDIAN=little
Index: b/common/autoconf/toolchain.m4
===================================================================
--- a/common/autoconf/toolchain.m4
+++ b/common/autoconf/toolchain.m4
@@ -1125,6 +1125,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_
   else
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
   fi
+  if test "x$OPENJDK_TARGET_CPU" = xppc64le; then
+    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DABI_ELFv2"
+  fi
   if test "x$OPENJDK_TARGET_OS" = xlinux; then
     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DLINUX"
   fi
Index: b/jdk/make/lib/SoundLibraries.gmk
===================================================================
--- a/jdk/make/lib/SoundLibraries.gmk
+++ b/jdk/make/lib/SoundLibraries.gmk
@@ -143,6 +143,10 @@ else
   ifeq ($(OPENJDK_TARGET_CPU), aarch64)
 	LIBJSOUND_CFLAGS += -DX_ARCH=X_AARCH64
   endif
+
+  ifeq ($(OPENJDK_TARGET_CPU), ppc64le)
+       LIBJSOUND_CFLAGS += -DX_ARCH=X_PPC64LE
+  endif
 endif
 
 LIBJSOUND_CFLAGS += -DEXTRA_SOUND_JNI_LIBS='"$(EXTRA_SOUND_JNI_LIBS)"'
Index: b/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
===================================================================
--- a/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+++ b/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
@@ -43,7 +43,9 @@
 #define X_ZERO          6
 #define X_ARM           7
 #define X_PPC           8
-#define X_AARCH64	9
+#define X_PPC64         9
+#define X_PPC64LE      10
+#define X_AARCH64      11
 
 // **********************************
 // Make sure you set X_PLATFORM and X_ARCH defines correctly.
Index: b/jdk/src/solaris/bin/ppc64le/jvm.cfg
===================================================================
--- /dev/null
+++ b/jdk/src/solaris/bin/ppc64le/jvm.cfg
@@ -0,0 +1,33 @@
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+# List of JVMs that can be used as an option to java, javac, etc.
+# Order is important -- first in this list is the default JVM.
+# NOTE that this both this file and its format are UNSUPPORTED and
+# WILL GO AWAY in a future release.
+#
+# You may also select a JVM in an arbitrary location with the
+# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
+# and may not be available in a future release.
+#
+-server KNOWN
Index: b/hotspot/make/defs.make
===================================================================
--- a/hotspot/make/defs.make
+++ b/hotspot/make/defs.make
@@ -326,6 +326,13 @@ ifneq ($(OSNAME),windows)
   LIBARCH/ppc64   = ppc64
   LIBARCH/zero    = $(ZERO_LIBARCH)
 
+  # Override LIBARCH for ppc64le
+  ifeq ($(ARCH), ppc64)
+    ifeq ($(OPENJDK_TARGET_CPU_ENDIAN), little)
+      LIBARCH = ppc64le
+    endif
+  endif
+
   LP64_ARCH += sparcv9 amd64 ia64 ppc64 zero
 endif