1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#! /bin/bash
# MLton versions around 20091019 require 650m and 1.35g to build.
# Earlier MLton versions (20070812)require slightly more.
# The heap size needs to leave about 200m of physical RAM free.
# Plan:
# 32-bit builds use 800m or 1.5g (for 1GB and >= 2GB)
# 64-bit builds use 1.7g or 3g (for 2GB and >= 4GB)
# Unfortunately, the debian buildds don't have that much memory
# alpha - 4g (goedel)
# - 8g (goetz)
# amd64 - 1g (nautilus) UNUSABLE / black-listed
# - 2g (excelsior, brahms)
# armel - 64g (sparta)
# hppa - 8g (paer)
# -3.5g (penalosa, peri)
# hurd-i386
# -400m (rossini) UNUSABLE / black-listed
# - 1g- (bach) UNUSABLE / black-listed
# - 1g+ (mozart)
# i386 - 16g (murphy)
# - 4g (puccini)
# ia64 - 12g (mundy)
# - 4g (caballero)
# kfreebsd-amd64 - 2g (himalia2)
# -1.5g (fano) UNUSABLE / black-listed
# kfreebsd-i386 - 2g (himalia1)
# - 1g (finzi) black-listed
# mips - 1g (ball)
# -1.4g (mayr)
# mipsel - 1g (mayer)
# -0.5g (rem) UNUSABLE / black-listed
# powerpc -0.3g (voltaire) UNUSABLE / black-listed
# -0.5g (malo) UNUSABLE / black-listed
# - 3g (praetorius)
# s390 - ??? (31)
# - 1g (lxdebian) ... but fast swap?
# sparc - 2g (schroeder, lebrun, spontini)
if dpkg-architecture -ealpha; then result="fixed-heap 3g"; fi
if dpkg-architecture -eamd64; then result="fixed-heap 1.7g"; fi
if dpkg-architecture -earmel; then result="max-heap 850m"; fi
if dpkg-architecture -ehppa; then result="fixed-heap 1.5g"; fi
if dpkg-architecture -ehurd-i386; then result="fixed-heap 800m"; fi
if dpkg-architecture -ei386; then result="fixed-heap 1.5g"; fi
if dpkg-architecture -eia64; then result="fixed-heap 3g"; fi
if dpkg-architecture -ekfreebsd-amd64; then result="fixed-heap 1.7g"; fi
if dpkg-architecture -ekfreebsd-i386; then result="fixed-heap 1.5g"; fi
if dpkg-architecture -emips; then result="fixed-heap 800m"; fi
if dpkg-architecture -emipsel; then result="fixed-heap 800m"; fi
if dpkg-architecture -epowerpc; then result="fixed-heap 1.5g"; fi
if dpkg-architecture -es390; then result="fixed-heap 850m"; fi
if dpkg-architecture -esparc; then result="fixed-heap 1.5g"; fi
# Warn by default
if test -z "$result"; then echo "Warning: Unknown architecture." >&2; fi
# Allow buildd admin to override heap-size with environment variable
if test -n "$DEB_BUILD_HEAP"; then result="$DEB_BUILD_HEAP"; fi
echo "$result"
|