[Vm-dev] [commit][3187] Oops, the old nscogbuild structure is still used at Cadence.

commits at squeakvm.org commits at squeakvm.org
Tue Dec 16 23:23:31 UTC 2014


Revision: 3187
Author:   eliot
Date:     2014-12-16 15:23:27 -0800 (Tue, 16 Dec 2014)
Log Message:
-----------
Oops, the old nscogbuild structure is still used at Cadence.

Added Paths:
-----------
    branches/Cog/nscogbuild/
    branches/Cog/nscogbuild/unixbuild/
    branches/Cog/nscogbuild/unixbuild/HowToBuild
    branches/Cog/nscogbuild/unixbuild/astbld/
    branches/Cog/nscogbuild/unixbuild/astbld/mvm
    branches/Cog/nscogbuild/unixbuild/astbld/plugins.ext
    branches/Cog/nscogbuild/unixbuild/astbld/plugins.int
    branches/Cog/nscogbuild/unixbuild/astbldt/
    branches/Cog/nscogbuild/unixbuild/astbldt/mvm
    branches/Cog/nscogbuild/unixbuild/astbldt/plugins.ext
    branches/Cog/nscogbuild/unixbuild/astbldt/plugins.int
    branches/Cog/nscogbuild/unixbuild/bld/
    branches/Cog/nscogbuild/unixbuild/bld/mvm
    branches/Cog/nscogbuild/unixbuild/bld/plugins.ext
    branches/Cog/nscogbuild/unixbuild/bld/plugins.int
    branches/Cog/nscogbuild/unixbuild/bldt/
    branches/Cog/nscogbuild/unixbuild/bldt/mvm
    branches/Cog/nscogbuild/unixbuild/bldt/plugins.ext
    branches/Cog/nscogbuild/unixbuild/bldt/plugins.int
    branches/Cog/nscogbuild/unixbuild/dbgbld/
    branches/Cog/nscogbuild/unixbuild/dbgbld/mvm
    branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.ext
    branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.int
    branches/Cog/nscogbuild/unixbuild/dbgbldt/
    branches/Cog/nscogbuild/unixbuild/dbgbldt/mvm
    branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.ext
    branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.int
    branches/Cog/nscogbuild/unixbuild/mkNamedPrims.sh

Added: branches/Cog/nscogbuild/unixbuild/HowToBuild
===================================================================
--- branches/Cog/nscogbuild/unixbuild/HowToBuild	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/HowToBuild	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,104 @@
+How To Build On Linux
+---------------------
+
+Contents:
+	- How to build the Newspeak Cog VM on Unix
+	- Testing an external plugin has completely linked
+	- Compiling in 32-bit mode on a 64-bit linux
+	- Testing an external plugin has completely linked
+	- N.B. Please read: Optimization level and gcc version
+
+How to build the Newspeak VM on Unix
+-------------------------------
+1. Install the tools (gcc, X11-devel, etc (e.g. libpng, libX11 & libxt source))
+2. Check out the following sources from svn (if you haven't already - if you're
+   reading this in unixbuild its likely you've already got the sources)
+     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms
+     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/nscogsrc
+     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/nscogbuild
+3. Open a shell, cd into the nscogbuild/unixbuild/bld directory and execute the
+   mvm script.  This installs a VM in the nsvmlinux  directory alongside
+   nscogsrc et al.  Alternatively you can configure your own VM, e.g. with
+     ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=0" LIBS="-lpthread -luuid" LDFLAGS=-Wl,-z,now
+     make install prefix=WhereYouWantTheVmToGo
+
+	N.B.  On Ubuntu *do not* supply "LIBS="-lpthread -luuid"", i.e. use
+     ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=0" LDFLAGS=-Wl,-z,now
+
+4. At the end of it you'll get a new VM in nsvmlinux, or in the path provided
+   via -prefix
+
+N.B. The plugin set is defined by plugins.ext and plugins.int in the build dir.
+
+
+3a. For an assert-enabled VM use the astbld directory's mvm and find a vm in
+    nsvmlinuxast, or do
+     ../../../platforms/unix/config/configure --with-src=nscogsrc CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" LIBS="-lpthread -luuid" LDFLAGS=-Wl,-z,now
+
+3b. For a full debug VM use the dbgbld's mvm and find a vm in nsvmlinuxdbg,
+    or do
+	CFLAGS="-g -O0 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DMULTIPLEBYTECODESETS=1 -DDEBUGVM=1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" LIBS="-lpthread -luuid" LDFLAGS=-Wl,-z,now
+
+3c. If you're building the VM on a 64-bit OS, you'll need a compiler which can
+compile and link to 32-bit binaries. On most Linuxes the gcc-multilib package
+provides the 32-bit compiler and the ia32-libs provides the 32-bit libraries.
+You'll also have to add the -m32 switch to all gcc & g++ invocations.  The
+easiest way to do this is to add CC="gcc -m32" & CXX="g++ -m32" to the configure
+script:
+     ../../../platforms/unix/config/configure CC="gcc -m32" CXX="g++ -m32" --with-src=nscogsrc CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1" LIBS="-lpthread -luuid"
+To run a 32-bit VM on a 64-bit OS, you'll also need the 32-bit libraries
+provided by the ia32-libs package.
+
+
+3c. (see Compiling in 32-bit mode on a 64-bit linux below)
+If you're building the VM on a 64-bit OS, you'll need a compiler which can
+compile and link to 32-bit binaries. On most Linuxes the gcc-multilib package
+provides the 32-bit compiler and the ia32-libs provides the 32-bit libraries.
+You'll also have to add the -m32 switch to all gcc & g++ invocations.  The
+easiest way to do this is to add CC="gcc -m32" & CXX="g++ -m32" to the configure
+script:
+     ../../platforms/unix/config/configure CC="gcc -m32" CXX="g++ -m32" --without-npsqueak CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
+To run a 32-bit VM on a 64-bit OS, you'll also need the 32-bit libraries
+provided by the ia32-libs package.
+
+Compiling in 32-bit mode on a 64-bit linux
+-------------------------------
+Follow 3c. above.  Also note that according to Paul DeBruicker the following
+packages need to be installed to compile in 32-bt mode on 64-bit ubuntu.  YMMV.
+
+build-essential
+ia32-libs
+gcc-multilib
+g++multilib
+
+In addition phil at highoctane.be installed libc6dev-i386.
+
+This in itself may not be enough, but persistence will pay off.  See for example
+http://permalink.gmane.org/gmane.comp.lang.smalltalk.pharo.devel/75198.
+
+Testing an external plugin has completely linked
+-------------------------------
+You may find that an external plugin compiles and links but does not load.
+This is usually because it contans undefined symbols.  To find undefined
+symbols, remake the plugin, capturing the link step and then supply
+	-Wl,--warn-unresolved-symbols -Wl,--no-allow-shlib-undefined
+when manually repeating the link command
+
+
+Optimization level and gcc version
+----------------------------------
+There are issues with gcc version > 4.2.1.  Any of the following flags may break the build at -O2:
+-ftree-pre
+-fpartial-inlining
+-fcaller-saves
+
+So turn them off.  e.g.
+     ../../platforms/unix/config/configure --without-npsqueak CFLAGS="-g -O2 -msse2 -fno-caller-saves -fno-partial-inlining -fno-tree-pre -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0 -DDEBUGVM=0" LIBS=-lpthread
+See http://smallissimo.blogspot.fr/2013/02/compiling-squeak-cog-virtual-machine-on.html
+
+There appear to be issues with 3.4.x gcc version on RedHat.  In particular
+compiling the Newspeak VM with either of
+	gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)
+	gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)
+using -O2 results in a VM that segfaults early in startup.  For these compilers
+it is probably wise to use -O1, even though -O3 seems to work.

Added: branches/Cog/nscogbuild/unixbuild/astbld/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/astbld/mvm	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/astbld/mvm	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,50 @@
+#!/bin/bash
+INSTALLDIR=nsvmlinuxast
+if [ $# -ge 1 ]; then
+	case "$1" in
+	-*)	;;
+	*)	INSTALLDIR="$1"; shift
+	esac
+fi
+OPT=-O1
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			rm config.h; test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc \
+	--without-vm-display-fbdev --without-npsqueak \
+	CC="gcc -m32" \
+	CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DDEBUGVM=0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+../../../scripts/nukeversion
+rm -rf ../../../$INSTALLDIR
+# would prefer make install prefix=`readlink -f \`pwd\`/../../../$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install prefix=`(cd ../../../;pwd)`/$INSTALLDIR
+(cd ../../../$INSTALLDIR
+ if [ -f squeak ]; then
+        mv squeak nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q nsvm
+  fi
+  if [ -f bin/squeak ]; then
+        mv bin/squeak bin/nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q bin/nsvm
+  fi
+  rm -rf man doc
+  LIBDIR="`echo lib/squeak/[0-9.-]*`"
+  test -f $LIBDIR/squeak && mv $LIBDIR/squeak $LIBDIR/nsvm
+  test -d lib/squeak && mv lib/squeak lib/nsvm
+  LIBDIR="`echo lib/nsvm/[0-9.-]*`"
+  if [ "$1" = -copysource ]; then
+	cp ~/Squeak/SqueakV41.sources $LIBDIR
+  elif [ -h ~/Squeak/SqueakV41.sources ]; then
+	ln "`readlink ~/Squeak/SqueakV41.sources`" $LIBDIR
+  elif [ -f ~/Squeak/SqueakV41.sources ]; then
+	ln ~/Squeak/SqueakV41.sources $LIBDIR
+  else
+	echo "can't find SqueakV41.sources" 1>&2
+  fi)


Property changes on: branches/Cog/nscogbuild/unixbuild/astbld/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogbuild/unixbuild/astbld/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/astbld/plugins.ext	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/astbld/plugins.ext	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,3 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nscogbuild/unixbuild/astbld/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/astbld/plugins.int	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/astbld/plugins.int	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,26 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/nscogbuild/unixbuild/astbldt/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/astbldt/mvm	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/astbldt/mvm	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,51 @@
+#!/bin/bash
+# VM with VM profiler and threaded heartbeat assuming multiple thread priorities
+INSTALLDIR=nsvmlinuxastht
+if [ $# -ge 1 ]; then
+	case "$1" in
+	-*)	;;
+	*)	INSTALLDIR="$1"; shift
+	esac
+fi
+OPT=-O1
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			rm config.h; test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc \
+	--without-vm-display-fbdev --without-npsqueak \
+	CC="gcc -m32" \
+	CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUGVM=0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+../../../scripts/nukeversion
+rm -rf ../../../$INSTALLDIR
+# would prefer make install prefix=`readlink -f \`pwd\`/../../../$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install prefix=`(cd ../../../;pwd)`/$INSTALLDIR
+(cd ../../../$INSTALLDIR
+ if [ -f squeak ]; then
+        mv squeak nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q nsvm
+  fi
+  if [ -f bin/squeak ]; then
+        mv bin/squeak bin/nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q bin/nsvm
+  fi
+  rm -rf man doc
+  LIBDIR="`echo lib/squeak/[0-9.-]*`"
+  test -f $LIBDIR/squeak && mv $LIBDIR/squeak $LIBDIR/nsvm
+  test -d lib/squeak && mv lib/squeak lib/nsvm
+  LIBDIR="`echo lib/nsvm/[0-9.-]*`"
+  if [ "$1" = -copysource ]; then
+	cp ~/Squeak/SqueakV41.sources $LIBDIR
+  elif [ -h ~/Squeak/SqueakV41.sources ]; then
+	ln "`readlink ~/Squeak/SqueakV41.sources`" $LIBDIR
+  elif [ -f ~/Squeak/SqueakV41.sources ]; then
+	ln ~/Squeak/SqueakV41.sources $LIBDIR
+  else
+	echo "can't find SqueakV41.sources" 1>&2
+  fi)


Property changes on: branches/Cog/nscogbuild/unixbuild/astbldt/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogbuild/unixbuild/astbldt/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/astbldt/plugins.ext	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/astbldt/plugins.ext	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,3 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nscogbuild/unixbuild/astbldt/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/astbldt/plugins.int	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/astbldt/plugins.int	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,26 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/nscogbuild/unixbuild/bld/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bld/mvm	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/bld/mvm	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,54 @@
+#!/bin/bash
+INSTALLDIR=nsvmlinux
+if [ $# -ge 1 ]; then
+	case "$1" in
+	-*)	;;
+	*)	INSTALLDIR="$1"; shift
+	esac
+fi
+# Some gcc versions create a broken VM using -O2
+case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
+3.4.*)	OPT=-O1;;
+*)		OPT=-O2;;
+esac
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			rm config.h; test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc \
+	--without-vm-display-fbdev --without-npsqueak \
+	CC="gcc -m32" \
+	CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DITIMER_HEARTBEAT=1 -DDEBUGVM=0" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+../../../scripts/nukeversion
+rm -rf ../../../$INSTALLDIR
+# would prefer make install prefix=`readlink -f \`pwd\`/../../../$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install prefix=`(cd ../../../;pwd)`/$INSTALLDIR
+(cd ../../../$INSTALLDIR
+ if [ -f squeak ]; then
+        mv squeak nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q nsvm
+  fi
+  if [ -f bin/squeak ]; then
+        mv bin/squeak bin/nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q bin/nsvm
+  fi
+  rm -rf man doc
+  LIBDIR="`echo lib/squeak/[0-9.-]*`"
+  test -f $LIBDIR/squeak && mv $LIBDIR/squeak $LIBDIR/nsvm
+  test -d lib/squeak && mv lib/squeak lib/nsvm
+  LIBDIR="`echo lib/nsvm/[0-9.-]*`"
+  if [ "$1" = -copysource ]; then
+	cp ~/Squeak/SqueakV41.sources $LIBDIR
+  elif [ -h ~/Squeak/SqueakV41.sources ]; then
+	ln "`readlink ~/Squeak/SqueakV41.sources`" $LIBDIR
+  elif [ -f ~/Squeak/SqueakV41.sources ]; then
+	ln ~/Squeak/SqueakV41.sources $LIBDIR
+  else
+	echo "can't find SqueakV41.sources" 1>&2
+  fi)


Property changes on: branches/Cog/nscogbuild/unixbuild/bld/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogbuild/unixbuild/bld/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bld/plugins.ext	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/bld/plugins.ext	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,3 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nscogbuild/unixbuild/bld/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bld/plugins.int	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/bld/plugins.int	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,26 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/nscogbuild/unixbuild/bldt/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bldt/mvm	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/bldt/mvm	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,55 @@
+#!/bin/bash
+# VM with VM profiler and threaded heartbeat assuming multiple thread priorities
+INSTALLDIR=nsvmlinuxht
+if [ $# -ge 1 ]; then
+	case "$1" in
+	-*)	;;
+	*)	INSTALLDIR="$1"; shift
+	esac
+fi
+# Some gcc versions create a broken VM using -O2
+case `gcc -v 2>&1 | grep version | sed 's/gcc version *//'` in
+3.4.*)	OPT=-O1;;
+*)		OPT=-O2;;
+esac
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			rm config.h; test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc \
+	--without-vm-display-fbdev --without-npsqueak \
+	CC="gcc -m32" \
+	CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DDEBUGVM=0" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+../../../scripts/nukeversion
+rm -rf ../../../$INSTALLDIR
+# would prefer make install prefix=`readlink -f \`pwd\`/../../../$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install prefix=`(cd ../../../;pwd)`/$INSTALLDIR
+(cd ../../../$INSTALLDIR
+ if [ -f squeak ]; then
+        mv squeak nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q nsvm
+  fi
+  if [ -f bin/squeak ]; then
+        mv bin/squeak bin/nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q bin/nsvm
+  fi
+  rm -rf man doc
+  LIBDIR="`echo lib/squeak/[0-9.-]*`"
+  test -f $LIBDIR/squeak && mv $LIBDIR/squeak $LIBDIR/nsvm
+  test -d lib/squeak && mv lib/squeak lib/nsvm
+  LIBDIR="`echo lib/nsvm/[0-9.-]*`"
+  if [ "$1" = -copysource ]; then
+	cp ~/Squeak/SqueakV41.sources $LIBDIR
+  elif [ -h ~/Squeak/SqueakV41.sources ]; then
+	ln "`readlink ~/Squeak/SqueakV41.sources`" $LIBDIR
+  elif [ -f ~/Squeak/SqueakV41.sources ]; then
+	ln ~/Squeak/SqueakV41.sources $LIBDIR
+  else
+	echo "can't find SqueakV41.sources" 1>&2
+  fi)


Property changes on: branches/Cog/nscogbuild/unixbuild/bldt/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogbuild/unixbuild/bldt/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bldt/plugins.ext	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/bldt/plugins.ext	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,3 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nscogbuild/unixbuild/bldt/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/bldt/plugins.int	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/bldt/plugins.int	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,26 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/nscogbuild/unixbuild/dbgbld/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/dbgbld/mvm	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/dbgbld/mvm	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,50 @@
+#!/bin/bash
+INSTALLDIR=nsvmlinuxdbg
+if [ $# -ge 1 ]; then
+	case "$1" in
+	-*)	;;
+	*)	INSTALLDIR="$1"; shift
+	esac
+fi
+OPT=-O0
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			rm config.h; test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc \
+	--without-vm-display-fbdev --without-npsqueak \
+	CC="gcc -m32" \
+	CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DITIMER_HEARTBEAT=1 -DDEBUGVM=1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+../../../scripts/nukeversion
+rm -rf ../../../$INSTALLDIR
+# would prefer make install prefix=`readlink -f \`pwd\`/../../../$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install prefix=`(cd ../../../;pwd)`/$INSTALLDIR
+(cd ../../../$INSTALLDIR
+ if [ -f squeak ]; then
+        mv squeak nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q nsvm
+  fi
+  if [ -f bin/squeak ]; then
+        mv bin/squeak bin/nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q bin/nsvm
+  fi
+  rm -rf man doc
+  LIBDIR="`echo lib/squeak/[0-9.-]*`"
+  test -f $LIBDIR/squeak && mv $LIBDIR/squeak $LIBDIR/nsvm
+  test -d lib/squeak && mv lib/squeak lib/nsvm
+  LIBDIR="`echo lib/nsvm/[0-9.-]*`"
+  if [ "$1" = -copysource ]; then
+	cp ~/Squeak/SqueakV41.sources $LIBDIR
+  elif [ -h ~/Squeak/SqueakV41.sources ]; then
+	ln "`readlink ~/Squeak/SqueakV41.sources`" $LIBDIR
+  elif [ -f ~/Squeak/SqueakV41.sources ]; then
+	ln ~/Squeak/SqueakV41.sources $LIBDIR
+  else
+	echo "can't find SqueakV41.sources" 1>&2
+  fi)


Property changes on: branches/Cog/nscogbuild/unixbuild/dbgbld/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.ext	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.ext	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,3 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.int	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/dbgbld/plugins.int	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,26 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/nscogbuild/unixbuild/dbgbldt/mvm
===================================================================
--- branches/Cog/nscogbuild/unixbuild/dbgbldt/mvm	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/dbgbldt/mvm	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,51 @@
+#!/bin/bash
+# VM with VM profiler and threaded heartbeat assuming multiple thread priorities
+INSTALLDIR=nsvmlinuxdbght
+if [ $# -ge 1 ]; then
+	case "$1" in
+	-*)	;;
+	*)	INSTALLDIR="$1"; shift
+	esac
+fi
+OPT=-O0
+
+echo -n "clean? "
+read a
+case $a in
+n|no|N|NO)	echo "ok but this isn't safe!!";;
+*)			rm config.h; test -f Makefile && make reallyclean
+esac
+test -f config.h || ../../../platforms/unix/config/configure --with-src=nscogsrc \
+	--without-vm-display-fbdev --without-npsqueak \
+	CC="gcc -m32" \
+	CFLAGS="-g $OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DDEBUGVM=1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" \
+	LIBS="-lpthread -luuid" \
+	LDFLAGS=-Wl,-z,now
+../../../scripts/nukeversion
+rm -rf ../../../$INSTALLDIR
+# would prefer make install prefix=`readlink -f \`pwd\`/../../../$INSTALLDIR`
+# but older linux readlinks lack the -f flag
+make install prefix=`(cd ../../../;pwd)`/$INSTALLDIR
+(cd ../../../$INSTALLDIR
+ if [ -f squeak ]; then
+        mv squeak nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q nsvm
+  fi
+  if [ -f bin/squeak ]; then
+        mv bin/squeak bin/nsvm
+        ex -u NONE "+g/squeak/s/squeak/nsvm/g" +w +q bin/nsvm
+  fi
+  rm -rf man doc
+  LIBDIR="`echo lib/squeak/[0-9.-]*`"
+  test -f $LIBDIR/squeak && mv $LIBDIR/squeak $LIBDIR/nsvm
+  test -d lib/squeak && mv lib/squeak lib/nsvm
+  LIBDIR="`echo lib/nsvm/[0-9.-]*`"
+  if [ "$1" = -copysource ]; then
+	cp ~/Squeak/SqueakV41.sources $LIBDIR
+  elif [ -h ~/Squeak/SqueakV41.sources ]; then
+	ln "`readlink ~/Squeak/SqueakV41.sources`" $LIBDIR
+  elif [ -f ~/Squeak/SqueakV41.sources ]; then
+	ln ~/Squeak/SqueakV41.sources $LIBDIR
+  else
+	echo "can't find SqueakV41.sources" 1>&2
+  fi)


Property changes on: branches/Cog/nscogbuild/unixbuild/dbgbldt/mvm
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.ext
===================================================================
--- branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.ext	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.ext	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,3 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.ext
+EXTERNAL_PLUGINS = \
+SqueakSSL

Added: branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.int
===================================================================
--- branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.int	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/dbgbldt/plugins.int	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,26 @@
+# Copied, perhaps edited, from ../../../nscogsrc/examplePlugins.int
+INTERNAL_PLUGINS = \
+AsynchFilePlugin \
+BMPReadWriterPlugin \
+B2DPlugin \
+BitBltPlugin \
+DSAPrims \
+DropPlugin \
+FileCopyPlugin \
+FilePlugin \
+FloatArrayPlugin \
+FloatMathPlugin \
+ZipPlugin \
+JPEGReadWriter2Plugin \
+JPEGReaderPlugin \
+LargeIntegers \
+Matrix2x3Plugin \
+MiscPrimitivePlugin \
+IA32ABI \
+RePlugin \
+SecurityPlugin \
+SocketPlugin \
+SurfacePlugin \
+UUIDPlugin \
+UnixOSProcessPlugin \
+VMProfileLinuxSupportPlugin

Added: branches/Cog/nscogbuild/unixbuild/mkNamedPrims.sh
===================================================================
--- branches/Cog/nscogbuild/unixbuild/mkNamedPrims.sh	                        (rev 0)
+++ branches/Cog/nscogbuild/unixbuild/mkNamedPrims.sh	2014-12-16 23:23:27 UTC (rev 3187)
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Generate a sqNamedPrims.h file from plugins.int.  The plugins.int used should
+# be the one and only argument.
+if [ $# != 1 -o ! -f "$1" ]; then
+	echo usage $0 plugins.int ">sqNamedPrims.h" 1>&2
+	exit 1
+fi
+echo "/* Automatically generated on "`date`" */"
+echo "extern sqExport vm_exports[];";
+echo "extern sqExport os_exports[];";
+for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'`
+do
+	echo "extern sqExport "$p"_exports[];"
+done
+echo
+echo "sqExport *pluginExports[] = {"
+echo "	vm_exports,"
+echo "	os_exports,"
+for p in `grep -v '^#' "$1" | sed 's/INTERNAL_PLUGINS = //' | tr -d '\\\\\\012'`
+do
+	echo "	"$p"_exports,"
+done
+echo "	NULL"
+echo "};"


Property changes on: branches/Cog/nscogbuild/unixbuild/mkNamedPrims.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the Vm-dev mailing list