changeset 152:5e7357a31ab7

. Merge in changes from BSD repository.
author glewis@misty.eyesbeyond.com
date Sun, 18 Oct 2009 09:58:07 -0700
parents 912b1896711d f44f72302bd6
children d08a9e6b5186
files make/common/shared/Platform.gmk
diffstat 1 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/shared/Platform.gmk	Tue Oct 06 06:59:10 2009 -0700
+++ b/make/common/shared/Platform.gmk	Sun Oct 18 09:58:07 2009 -0700
@@ -465,14 +465,7 @@
 #    build machines and adjustments will be made to prevent excessing
 #    system swapping during the build.
 #    If we don't know, assume 512. Subtract 128 from MB for VM MAX.
-#    Don't set VM max over 1024-128=896, except on OpenBSD where
-#    736 is the max.
-ifeq ($(OS_VENDOR), OpenBSD)
-  ABS_MAX_MEMORY := "736"
-else
-  ABS_MAX_MEMORY := "896"
-endif
-
+#    Don't set VM max over 1024-128=896.
 ifndef MAX_VM_MEMORY
   ifneq ($(MB_OF_MEMORY),)
     LOW_MEMORY_MACHINE := $(shell \
@@ -485,7 +478,7 @@
       if [ $(MB_OF_MEMORY) -le 1024 ] ; then \
         expr $(MB_OF_MEMORY) '-' 128 ; \
       else \
-        echo $(ABS_MAX_MEMORY); \
+        echo "896"; \
       fi)
     MIN_VM_MEMORY := $(shell \
       if [ $(MAX_VM_MEMORY) -le 128 ] ; then \
@@ -505,6 +498,18 @@
   export MAX_VM_MEMORY
 endif
 
+# for OpenBSD/i386 limit to 736 max
+ifeq ($(OS_VENDOR), OpenBSD)
+  ifeq ($(ARCH_DATA_MODEL), 32)
+    MAX_VM_MEMORY := $(shell \
+      if [ $(MAX_VM_MEMORY) -gt 736 ] ; then \
+        echo "736"; \
+      else \
+        echo "$(MAX_VM_MEMORY)" ; \
+      fi)
+  endif
+endif
+
 REQUIRED_ZIP_VER = 2.2
 REQUIRED_UNZIP_VER = 5.12
 REQUIRED_MAKE_VER = 3.78