/
mvm
executable file
·44 lines (42 loc) · 1.45 KB
/
mvm
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
#!/bin/bash -e
case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
*) if type i386 2>&1 >/dev/null; then
echo "Re-exec as x86"
exec i386 "$0" "$@"
fi ;;
esac
# Spur VM with VM profiler and itimer heartbeat
INSTALLDIR=nsnaccogspurlinux
# Some gcc versions create a broken VM using -O2
case $(c99 -dumpversion) in
3.4.*) OPT="-g -O1 -fwrapv -DNDEBUG -DDEBUGVM=0";;
*) OPT="-g -O2 -DNDEBUG -DDEBUGVM=0";;
esac
if [ $# -ge 1 ]; then
case "$1" in
-*) ;;
*) INSTALLDIR="$1"; shift
esac
fi
echo -n "clean? "
read a
case $a in
n|no|N|NO) echo "ok but this isn't safe!!";;
*) rm -f config.h; test -f Makefile && make reallyclean
esac
test -f plugins.int || (test -f ../plugins.int && cp -p ../plugins.int . || cp -p ../../plugins.int .)
test -f plugins.ext || (test -f ../plugins.ext && cp -p ../plugins.ext . || cp -p ../../plugins.ext .)
test -f config.h || ../../../platforms/unix/config/configure \
--with-vmversion=5.0 \
--with-src=nsspursrc \
--without-vm-display-fbdev --without-npsqueak \
CC="c99 -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -DEnforceAccessControl=0 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG
../../editnewspeakinstall.sh ../../../products/$INSTALLDIR -source SqueakV41 "$@"