changeset 7906:111ec5a247b5

For ppc ARCH can be both ppc and ppc64. Support both. Submitted by: Curtis Hamilton <hamiltcl@verizon.net>
author Greg Lewis <glewis@eyesbeyond.com>
date Fri, 17 Jun 2016 22:05:42 -0700
parents 7f2fa0446bb7
children 7d6b5e9516c9
files make/bsd/makefiles/defs.make
diffstat 1 files changed, 18 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/defs.make	Fri Jun 17 22:02:38 2016 -0700
+++ b/make/bsd/makefiles/defs.make	Fri Jun 17 22:05:42 2016 -0700
@@ -32,6 +32,11 @@
 # ARCH can be set explicitly in spec.gmk
 ifndef ARCH
   ARCH := $(shell uname -m)
+  # Fold little endian PowerPC64 into big-endian (if ARCH is set in
+  # hotspot-spec.gmk, this will be done by the configure script).
+  ifeq ($(ARCH),ppc64le)
+    ARCH := ppc64
+  endif
 endif
 PATH_SEP = :
 ifeq ($(LP64), 1)
@@ -120,20 +125,19 @@
 endif
 
 # PPC
-ifeq ($(ARCH), ppc)
-  ARCH_DATA_MODEL  = 32
-  PLATFORM         = bsd-ppc
-  VM_PLATFORM      = bsd_ppc
-  HS_ARCH          = ppc
-endif
-
-# PPC64
-ifeq ($(ARCH), ppc64)
-  ARCH_DATA_MODEL  = 64
-  MAKE_ARGS        += LP64=1
-  PLATFORM         = bsd-ppc64
-  VM_PLATFORM      = bsd_ppc64
-  HS_ARCH          = ppc
+# Notice: after 8046471 ARCH will be 'ppc' for top-level ppc64 builds but
+# 'ppc64' for HotSpot-only ppc64 builds. Need to detect both variants here!
+ifneq (,$(findstring $(ARCH), ppc ppc64))
+  ifeq ($(ARCH_DATA_MODEL), 64)
+    MAKE_ARGS        += LP64=1
+    PLATFORM         = bsd-ppc64
+    VM_PLATFORM      = bsd_ppc64
+  else
+    ARCH_DATA_MODEL  = 32
+    PLATFORM         = bsd-ppc
+    VM_PLATFORM      = bsd_ppc
+  endif
+  HS_ARCH = ppc
 endif
 
 # On 32 bit bsd we build server and client, on 64 bit just server.