[Vm-dev] [commit] r2427 - initial checkin for Newspeak linux build

commits at squeakvm.org commits at squeakvm.org
Wed Jun 15 20:55:32 UTC 2011


Author: eliot
Date: 2011-06-15 13:55:32 -0700 (Wed, 15 Jun 2011)
New Revision: 2427

Added:
   branches/Cog/nsbuild/unixbuild/
   branches/Cog/nsbuild/unixbuild/HowToBuild
   branches/Cog/nsbuild/unixbuild/bld/
   branches/Cog/nsbuild/unixbuild/bld/plugins.ext
   branches/Cog/nsbuild/unixbuild/bld/plugins.int
   branches/Cog/nsbuild/unixbuild/mkNamedPrims.sh
Log:
initial checkin for Newspeak linux build


Added: branches/Cog/nsbuild/unixbuild/HowToBuild
===================================================================
--- branches/Cog/nsbuild/unixbuild/HowToBuild	                        (rev 0)
+++ branches/Cog/nsbuild/unixbuild/HowToBuild	2011-06-15 20:55:32 UTC (rev 2427)
@@ -0,0 +1,61 @@
+How To Build On Linux
+---------------------
+
+Contents:
+	- How to build the Newspeak VM on Unix
+	- Testing an external plugin has completely linked
+	- Compiling in 32-bit mode on a 64-bit linux
+
+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/src
+     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/nsbuild
+3. Open a shell, cd into the unixbuild/bld directory and execute
+     ../../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS=-lpthread
+     make install prefix=WhereYouWantTheVmToGo
+
+	N.B.  On Ubuntu *do not* supply "LIBS=-lpthread", i.e. use
+     ../../../platforms/unix/config/configure CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DNO_VM_PROFILE=1 -DDEBUGVM=0"
+
+4. At the end of it you'll get a new VM in the path provided via -prefix
+
+
+3a. For an assert-enabled VM do
+     ../../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak CFLAGS="-g -O1 -msse2 -D_GNU_SOURCE -DNO_VM_PROFILE=1 -DDEBUGVM=0" LIBS=-lpthread
+
+3b. For a full debug VM do
+     ../../../platforms/unix/config/configure --without-vm-display-fbdev --without-npsqueak CFLAGS="-g3 -msse2 -D_GNU_SOURCE -DNO_VM_PROFILE=1 -DDEBUGVM=1" LIBS=-lpthread
+
+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" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DNO_VM_PROFILE=1" 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 3d. 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
+
+
+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

Added: branches/Cog/nsbuild/unixbuild/bld/plugins.ext
===================================================================
--- branches/Cog/nsbuild/unixbuild/bld/plugins.ext	                        (rev 0)
+++ branches/Cog/nsbuild/unixbuild/bld/plugins.ext	2011-06-15 20:55:32 UTC (rev 2427)
@@ -0,0 +1,2 @@
+# List of external plugins.
+EXTERNAL_PLUGINS =

Added: branches/Cog/nsbuild/unixbuild/bld/plugins.int
===================================================================
--- branches/Cog/nsbuild/unixbuild/bld/plugins.int	                        (rev 0)
+++ branches/Cog/nsbuild/unixbuild/bld/plugins.int	2011-06-15 20:55:32 UTC (rev 2427)
@@ -0,0 +1,26 @@
+# Automatically generated makefile include for external plugins
+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 \
+VMProfileMacSupportPlugin

Added: branches/Cog/nsbuild/unixbuild/mkNamedPrims.sh
===================================================================
--- branches/Cog/nsbuild/unixbuild/mkNamedPrims.sh	                        (rev 0)
+++ branches/Cog/nsbuild/unixbuild/mkNamedPrims.sh	2011-06-15 20:55:32 UTC (rev 2427)
@@ -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/nsbuild/unixbuild/mkNamedPrims.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the Vm-dev mailing list