$NetBSD$

--- hotspot/make/bsd/makefiles/defs.make.orig 2012-01-23 06:33:55.369099000 +0000
+++ hotspot/make/bsd/makefiles/defs.make
@@ -90,6 +90,24 @@ ifeq ($(ARCH), amd64)
   endif
 endif
 
+# x86_64
+ifeq ($(ARCH), x86_64) 
+  ifeq ($(ARCH_DATA_MODEL), 64)
+    ARCH_DATA_MODEL = 64
+    MAKE_ARGS       += LP64=1
+    PLATFORM        = bsd-amd64
+    VM_PLATFORM     = bsd_amd64
+    HS_ARCH         = x86
+  else
+    ARCH_DATA_MODEL = 32
+    PLATFORM        = bsd-i586
+    VM_PLATFORM     = bsd_i486
+    HS_ARCH         = x86
+    # We have to reset ARCH to i386 since SRCARCH relies on it
+    ARCH            = i386   
+  endif
+endif
+
 # i386
 ifeq ($(ARCH), i386)
   ifeq ($(ARCH_DATA_MODEL), 64)
