From 27bd4c1cbd42fd6ba53ef4ac8516cdc910e60b75 Mon Sep 17 00:00:00 2001 From: Eliot Miranda Date: Sun, 16 Dec 2018 16:03:53 -0800 Subject: [PATCH] Add assert and debug builds for the build.linux64ARMv8 squeak.stack.spur build. Upgrade the optimization level for the production build to -O2. Have getGoodSpur[64]VM.sh be more helpful when they can't find a suitable VM. --- .../squeak.stack.spur/build.assert/mvm | 28 +++++++++++++++++++ .../squeak.stack.spur/build.debug/mvm | 28 +++++++++++++++++++ .../squeak.stack.spur/build/mvm | 2 +- image/getGoodSpur64VM.sh | 8 ++++-- image/getGoodSpurVM.sh | 10 +++++-- 5 files changed, 70 insertions(+), 6 deletions(-) create mode 100755 build.linux64ARMv8/squeak.stack.spur/build.assert/mvm create mode 100755 build.linux64ARMv8/squeak.stack.spur/build.debug/mvm diff --git a/build.linux64ARMv8/squeak.stack.spur/build.assert/mvm b/build.linux64ARMv8/squeak.stack.spur/build.assert/mvm new file mode 100755 index 0000000000..3789299bc0 --- /dev/null +++ b/build.linux64ARMv8/squeak.stack.spur/build.assert/mvm @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -e +# assert Stack Spur VM with VM profiler and threaded heartbeat +INSTALLDIR=assert/sqstkspur64linuxhtRPi +OPT="-g3 -O1 -fwrapv -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0" + +if [ $# -ge 1 ]; then + INSTALLDIR="$1"; shift +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=spurstack64src --disable-cogit \ + --without-vm-display-fbdev --without-npsqueak \ + TARGET_ARCH="-march=armv8-a" \ + CFLAGS="$OPT -D__ARM_ARCH_8A__ -D__arm__ -D__arm64__" +rm -f vm/sqUnixMain.o # nuke version info +rm -rf ../../../products/$INSTALLDIR +# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` +# but older linux readlinks lack the -f flag +make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG diff --git a/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm b/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm new file mode 100755 index 0000000000..71446bdd9a --- /dev/null +++ b/build.linux64ARMv8/squeak.stack.spur/build.debug/mvm @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -e +# debug Stack Spur VM with VM profiler and threaded heartbeat +INSTALLDIR=sqstkspur64linuxhtRPi +OPT="-g3 -O0 -fwrapv -DDEBUGVM=1" + +if [ $# -ge 1 ]; then + INSTALLDIR="$1"; shift +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=spurstack64src --disable-cogit \ + --without-vm-display-fbdev --without-npsqueak \ + TARGET_ARCH="-march=armv8-a" \ + CFLAGS="$OPT -D__ARM_ARCH_8A__ -D__arm__ -D__arm64__" +rm -f vm/sqUnixMain.o # nuke version info +rm -rf ../../../products/$INSTALLDIR +# prefer make install prefix=`readlink -f \`pwd\`/../../../products/$INSTALLDIR` +# but older linux readlinks lack the -f flag +make install-squeak install-plugins prefix=`(cd ../../../;pwd)`/products/$INSTALLDIR 2>&1 | tee LOG diff --git a/build.linux64ARMv8/squeak.stack.spur/build/mvm b/build.linux64ARMv8/squeak.stack.spur/build/mvm index a0a7801ebf..b56ddcd705 100755 --- a/build.linux64ARMv8/squeak.stack.spur/build/mvm +++ b/build.linux64ARMv8/squeak.stack.spur/build/mvm @@ -2,7 +2,7 @@ set -e # Stack Spur VM with VM profiler and threaded heartbeat INSTALLDIR=sqstkspur64linuxht -OPT="-g -O1 -fwrapv -DNDEBUG -DDEBUGVM=0" +OPT="-g -O2 -fwrapv -DNDEBUG -DDEBUGVM=0" if [ $# -ge 1 ]; then INSTALLDIR="$1"; shift diff --git a/image/getGoodSpur64VM.sh b/image/getGoodSpur64VM.sh index daf8d35908..fa04e433a4 100755 --- a/image/getGoodSpur64VM.sh +++ b/image/getGoodSpur64VM.sh @@ -12,6 +12,7 @@ else LATESTRELEASE=`curl -s -L "https://bintray.com/opensmalltalk/notifications" | grep 'has released version' | head -1 | sed 's/^.*[0-9]">\([0-9][0-9]*\).*$/\1/'` if [ -z "$LATESTRELEASE" ]; then echo "cannot find latest release on https://bintray.com/opensmalltalk/notifications" 1>&2 + echo "If you've built your own VM you can substitute that using the -vm myvm argument to this script." 1>&2 exit 1 fi case $OS in @@ -38,7 +39,8 @@ else Linux) # This needs to be split by $CPU to work on RPi also case $CPU in x86_64) LATESTVM="squeak.cog.spur_linux64x64_$LATESTRELEASE.tar.gz";; - *) echo "Don't know what kind of 64-bit linux machine you're running. I have $CPU" + *) echo "Don't know what kind of 64-bit linux machine you're running. I have $CPU" 1>&2 + echo "If you've built your own VM you can substitute that using the -vm myvm argument to this script." 1>&2 exit 1 esac VM=sqlinux.$LATESTRELEASE @@ -55,7 +57,9 @@ else rm -f "$LATESTVM" fi VM=$VM/squeak;; - *) echo do not know how to download a VM for your system 1>&2; exit 1 + *) echo do not know how to download a VM for your system 1>&2 + echo "If you've built your own VM you can substitute that using the -vm myvm argument to this script." 1>&2 + exit 1 esac fi echo latest 64-bit VM on $OS is $VM diff --git a/image/getGoodSpurVM.sh b/image/getGoodSpurVM.sh index da8326af49..27516e5136 100755 --- a/image/getGoodSpurVM.sh +++ b/image/getGoodSpurVM.sh @@ -12,6 +12,7 @@ else LATESTRELEASE=`curl -s -L "https://bintray.com/opensmalltalk/notifications" | grep 'has released version' | head -1 | sed 's/^.*[0-9]">\([0-9][0-9]*\).*$/\1/'` if [ -z "$LATESTRELEASE" ]; then echo "cannot find latest release on https://bintray.com/opensmalltalk/notifications" 1>&2 + echo "If you've built your own VM you can substitute that using the -vm myvm argument to this script." 1>&2 exit 1 fi case $OS in @@ -37,8 +38,9 @@ else Linux) # This needs to be split by $CPU to work on RPi also case $CPU in i386|x86_64) LATESTVM="squeak.cog.spur_linux32x86_$LATESTRELEASE.tar.gz";; - arm) LATESTVM="squeak.cog.spur_linux32ARMv6_$LATESTRELEASE.tar.gz";; - *) echo "Don't know what kind of machine you're running. I have $CPU" + arm|armv[56]*) LATESTVM="squeak.cog.spur_linux32ARMv6_$LATESTRELEASE.tar.gz";; + *) echo "Don't know what kind of machine you're running. I have $CPU" 1>&2 + echo "If you've built your own VM you can substitute that using the -vm myvm argument to this script." 1>&2 exit 1 esac VM=sqlinux.$LATESTRELEASE @@ -72,7 +74,9 @@ else rm -f $LATESTVM fi VM=sqwin.$LATESTRELEASE/SqueakConsole.exe;; - *) echo do not know how to download a VM for your system 1>&2; exit 1 + *) echo "do not know how to download a VM for your system" 1>&2 + echo "If you've built your own VM you can substitute that using the -vm myvm argument to this script." 1>&2 + exit 1 esac fi echo latest 32-bit VM on $OS is $VM