changeset 67:360965cbf0ae

Fix building of 64-bit VM on Mac OS X - Enable overriding the default i586/i386 ARCH settings via ARCH_DATA_MODEL=64 - Set -m32 and -m64 for i386/amd64 builds - Removes i586/i686 detection cases in Hotspot's bsd/defs.make that are not necessary on NetBSD, FreeBSD, or OpenBSD
author Landon Fuller <landonf@plausiblelabs.com>
date Sun, 17 May 2009 12:46:35 -0700
parents 946ea29a8f03
children 5523590dcd52
files make/common/Defs-bsd.gmk make/common/shared/Platform.gmk
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-bsd.gmk	Thu Mar 12 12:58:48 2009 -0700
+++ b/make/common/Defs-bsd.gmk	Sun May 17 12:46:35 2009 -0700
@@ -86,8 +86,10 @@
 #    We need this frame pointer to make it easy to walk the stacks.
 #    This should be the default on X86, but ia64 and amd64 may not have this
 #    as the default.
-CFLAGS_REQUIRED_amd64   += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_i586    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_amd64   += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_amd64    += -m64
+CFLAGS_REQUIRED_i586    += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_i586     += -m32
 ifeq ($(OS_VENDOR),Apple)
   # 16-byte stack re-alignment on 32-bit Darwin
   CFLAGS_REQUIRED_i586 += -mstackrealign
--- a/make/common/shared/Platform.gmk	Thu Mar 12 12:58:48 2009 -0700
+++ b/make/common/shared/Platform.gmk	Sun May 17 12:46:35 2009 -0700
@@ -306,6 +306,15 @@
   ARCH        := $(shell $(archExpr) )
   ARCH_FAMILY := $(ARCH)
 
+  # Darwin builds may be 32-bit or 64-bit data model.
+  ifeq ($(SYSTEM_UNAME), Darwin)
+    ifeq ($(ARCH), i586)
+      ifeq ($(ARCH_DATA_MODEL), 64)
+        ARCH=amd64
+      endif
+    endif
+  endif
+
   # i586 and sparc are 32 bit, amd64 and sparc64 are 64
   ifneq (,$(findstring $(ARCH), i586 sparc))
     ARCH_DATA_MODEL=32