changeset 618:409efb956f93

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:47:46 -0700
parents 05f8c84c5daa
children 0e1d1ff8c398
files make/bsd/makefiles/defs.make make/bsd/makefiles/gcc.make
diffstat 2 files changed, 18 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/defs.make	Thu Mar 12 13:01:40 2009 -0700
+++ b/make/bsd/makefiles/defs.make	Sun May 17 12:47:46 2009 -0700
@@ -69,8 +69,8 @@
   HS_ARCH            = sparc
 endif
 
-# x86_64
-ifeq ($(ARCH), x86_64) 
+# amd64
+ifeq ($(ARCH), amd64) 
   ifeq ($(ARCH_DATA_MODEL), 64)
     ARCH_DATA_MODEL = 64
     MAKE_ARGS       += LP64=1
@@ -82,42 +82,27 @@
     PLATFORM        = bsd-i586
     VM_PLATFORM     = bsd_i486
     HS_ARCH         = x86
-    # We have to reset ARCH to i686 since SRCARCH relies on it
-    ARCH            = i686   
+    # We have to reset ARCH to i386 since SRCARCH relies on it
+    ARCH            = i386   
   endif
 endif
 
-# amd64
-ifeq ($(ARCH), amd64)
-  ARCH_DATA_MODEL = 64
-  MAKE_ARGS       += LP64=1
-  PLATFORM        = bsd-amd64
-  VM_PLATFORM     = bsd_amd64
-  HS_ARCH         = x86
-endif
-
 # i386
 ifeq ($(ARCH), i386)
-  ARCH_DATA_MODEL  = 32
-  PLATFORM         = bsd-i586
-  VM_PLATFORM      = bsd_i486
-  HS_ARCH          = x86
-endif
-
-# i486
-ifeq ($(ARCH), i486)
-  ARCH_DATA_MODEL  = 32
-  PLATFORM         = bsd-i586
-  VM_PLATFORM      = bsd_i486
-  HS_ARCH          = x86
-endif
-
-# i686
-ifeq ($(ARCH), i686)
-  ARCH_DATA_MODEL  = 32
-  PLATFORM         = bsd-i586
-  VM_PLATFORM      = bsd_i486
-  HS_ARCH          = x86
+  ifeq ($(ARCH_DATA_MODEL), 64)
+    ARCH_DATA_MODEL = 64
+    MAKE_ARGS       += LP64=1
+    PLATFORM        = bsd-amd64
+    VM_PLATFORM     = bsd_amd64
+    HS_ARCH         = x86
+    # We have to reset ARCH to amd64 since SRCARCH relies on it
+    ARCH            = amd64
+  else
+    ARCH_DATA_MODEL  = 32
+    PLATFORM         = bsd-i586
+    VM_PLATFORM      = bsd_i486
+    HS_ARCH          = x86
+  endif
 endif
 
 JDK_INCLUDE_SUBDIR=bsd
--- a/make/bsd/makefiles/gcc.make	Thu Mar 12 13:01:40 2009 -0700
+++ b/make/bsd/makefiles/gcc.make	Sun May 17 12:47:46 2009 -0700
@@ -72,9 +72,6 @@
 ifeq ($(OS_VENDOR), Darwin)
   # Ineffecient 16-byte stack re-alignment on Darwin/IA32
   ARCHFLAG/i486 += -mstackrealign
-
-  # -arch compiler flag required for x64_64
-  ARCHFLAGS/amd64 += -arch x86_64
 endif
 
 CFLAGS     += $(ARCHFLAG)