[Vm-dev] [commit] r2614 - support building a VM that runs 64-bit images

commits at squeakvm.org commits at squeakvm.org
Mon Sep 17 00:58:51 UTC 2012


Author: piumarta
Date: 2012-09-16 17:58:51 -0700 (Sun, 16 Sep 2012)
New Revision: 2614

Modified:
   trunk/platforms/unix/CMakeLists.txt
   trunk/platforms/unix/ChangeLog
   trunk/platforms/unix/cmake/configure
   trunk/platforms/unix/cmake/squeak.in
   trunk/platforms/unix/vm/build.cmake
   trunk/platforms/unix/vm/config.cmake
   trunk/platforms/unix/vm/sqUnixMain.c
Log:
support building a VM that runs 64-bit images

Modified: trunk/platforms/unix/CMakeLists.txt
===================================================================
--- trunk/platforms/unix/CMakeLists.txt	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/CMakeLists.txt	2012-09-17 00:58:51 UTC (rev 2614)
@@ -1,6 +1,6 @@
 # Yes, it's true: you can write makefiles in COBOL.
 # 
-# Last edited: 2010-05-13 12:54:20 by piumarta on emilia-2.local
+# Last edited: 2012-09-16 21:19:57 by piumarta on linux64
 
 PROJECT (squeak)
 
@@ -13,13 +13,19 @@
   )
 ENDIF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION)
 
+IF (DEFINED OPT--image64)
+  SET (SQ_VI_BYTES_PER_WORD 8)
+  SET (versionsuffix "_64bit")
+  SET (scriptsuffix "64")
+ENDIF (DEFINED OPT--image64)
+
 SET (prefix  ${CMAKE_INSTALL_PREFIX})
 
 SET (version ${VM_VERSION})
 
 SET (bindir bin)
 SET (imgdir lib/squeak)
-SET (plgdir lib/squeak/${version})
+SET (plgdir lib/squeak/${version}${versionsuffix})
 SET (mandir man/man1)
 SET (docdir share/doc/squeak-${version})
 

Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/ChangeLog	2012-09-17 00:58:51 UTC (rev 2614)
@@ -1,3 +1,25 @@
+2012-09-17  piumarta  <com -dot- gmail -at- piumarta (backwards)>
+
+	* CMakeLists.txt: Add option '--image64'.  With --image64
+	specified: append '_64bit' to plgdir, set scriptsuffix to '64' and
+	versionsuffix to '64_bit'.
+
+	* vm/config.cmake: Configure VM_VERSION_INFO as VM_VERSION with
+	versionsuffix appended.
+
+	* vm/sqUnixMain.c: Use VM_VERSION_INFO in output of '-version'.
+
+	* vm/build.cmake: Append ${scriptsuffix} to squeakvm.
+
+	* cmake/squeak.in: Search plgdir and plgd64 for 'ckformat'
+	program.  Append '64_bit' to plgdir when 64-bit image detected.
+
+	* cmake/configure: Add option '--image64' to help text.
+
+	* plugins/DropPlugin/sqUnixDragDrop.c,
+	plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c: Fix prototypes
+	for 64 bits.
+
 2012-09-14    <piumarta at netbsd32>
 
 	* plugins/UUIDPlugin/sqUnixUUID.c (MakeUUID): Always prefer

Modified: trunk/platforms/unix/cmake/configure
===================================================================
--- trunk/platforms/unix/cmake/configure	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/cmake/configure	2012-09-17 00:58:51 UTC (rev 2614)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Last edited: 2012-09-12 17:16:25 by piumarta on margaux1
+# Last edited: 2012-09-16 21:35:15 by piumarta on linux64
 
 RELEASE_TAG=""
 
@@ -15,6 +15,7 @@
   --without-<plugin>    do not build the named plugin
   --without-gl          disable everything that depends on OpenGL
   --without-SUGAR       disable support for SUGAR environment
+  --image64             build a VM for running 64-bit images
 Notes:
 1. By default the CFLAGS will be set to create optimised binaries.  If you are
    debugging the VM you probably want to use '--CFLAGS=-g' when invoking this

Modified: trunk/platforms/unix/cmake/squeak.in
===================================================================
--- trunk/platforms/unix/cmake/squeak.in	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/cmake/squeak.in	2012-09-17 00:58:51 UTC (rev 2614)
@@ -3,7 +3,7 @@
 # Launch squeakvm from the command line or a menu script, with a good
 # plugin path, text encodings and pulseaudio kludge
 # 
-# Last edited: 2012-09-14 00:56:50 by piumarta on emilia.local
+# Last edited: 2012-09-17 09:06:59 by piumarta on linux64
 
 PATH=/usr/bin:/bin
 
@@ -36,6 +36,7 @@
 ck="ckformat"
 squeakvm="squeakvm"
 squeakvm64="squeakvm64"
+plgd64="${plgdir}_64bit"
 cogvm="cogvm"
 cogvm64="cogvm64"
 vm=""
@@ -70,7 +71,9 @@
 
 # try to find the image file format
 
-if   test -x "${plgdir}/${ck}"; then ck="${plgdir}/${ck}"
+if   test -x "${plgd64}/${ck}"; then ck="${plgd64}/${ck}"
+elif test -x "${plgdir}/${ck}"; then ck="${plgdir}/${ck}"
+elif test -x "${libdir}/${ck}"; then ck="${libdir}/${ck}"
 elif test -x "${bindir}/${ck}"; then ck="${bindir}/${ck}"
 elif test -x "`which ${ck}`";	then ck="`which ${ck}`"
 fi
@@ -97,9 +100,9 @@
 	6502)	vms="${squeakvm}";;
 	6504)	vms="${cogvm} ${squeakvm}";;
 	6505)	vms="${cogvm} ${squeakvm}";;
-	68000)	vms="${squeakvm64}";;
-	68002)	vms="${squeakvm64}";;
-	68003)	vms="${squeakvm64}";;
+	68000)	vms="${squeakvm64}"; plgdir="${plgd64}";;
+	68002)	vms="${squeakvm64}"; plgdir="${plgd64}";;
+	68003)	vms="${squeakvm64}"; plgdir="${plgd64}";;
 	*)	vms="${squeakvm}";;
     esac
 fi

Modified: trunk/platforms/unix/vm/build.cmake
===================================================================
--- trunk/platforms/unix/vm/build.cmake	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/vm/build.cmake	2012-09-17 00:58:51 UTC (rev 2614)
@@ -1,6 +1,6 @@
 LINK_DIRECTORIES (${vm_link_directories})
 
-ADD_EXECUTABLE (squeakvm
+ADD_EXECUTABLE (squeakvm${scriptsuffix}
   ${bld}/${interp}.c
   ${unix}/vm/aio.c
   ${unix}/vm/debug.c
@@ -43,11 +43,11 @@
   ${vm_include_directories}
 )
 
-SET_TARGET_PROPERTIES (squeakvm PROPERTIES LINK_FLAGS "${CMAKE_EXE_EXPORTS_C_FLAG}")
+SET_TARGET_PROPERTIES (squeakvm${scriptsuffix} PROPERTIES LINK_FLAGS "${CMAKE_EXE_EXPORTS_C_FLAG}")
 
-TARGET_LINK_LIBRARIES (squeakvm m ${squeak_libs} ${vm_link_libraries})
+TARGET_LINK_LIBRARIES (squeakvm${scriptsuffix} m ${squeak_libs} ${vm_link_libraries})
 
-INSTALL (PROGRAMS ${bld}/squeakvm DESTINATION ${plgdir})
+INSTALL (PROGRAMS ${bld}/squeakvm${scriptsuffix} DESTINATION ${plgdir})
 
 IF (vm-sound-OSS_disabled)
   SET (useoss "false")
@@ -81,7 +81,7 @@
 
 INSTALL (PROGRAMS ${bld}/ckformat DESTINATION ${plgdir})
 
-ADD_DEPENDENCIES (squeakvm squeak squeak.sh ckformat)
+ADD_DEPENDENCIES (squeakvm${scriptsuffix} squeak squeak.sh ckformat)
 
 # manual page
 
@@ -89,5 +89,5 @@
   DEPENDS ${unix}/doc/squeak.1
   COMMAND sh ${bld}/config ${unix}/doc/squeak.1 ${bld}/squeak.1
 )
-ADD_DEPENDENCIES (squeakvm squeak.1)
+ADD_DEPENDENCIES (squeakvm${scriptsuffix} squeak.1)
 INSTALL (FILES ${bld}/squeak.1 DESTINATION share/man/man1)

Modified: trunk/platforms/unix/vm/config.cmake
===================================================================
--- trunk/platforms/unix/vm/config.cmake	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/vm/config.cmake	2012-09-17 00:58:51 UTC (rev 2614)
@@ -220,10 +220,12 @@
 CONFIG_DEFINE (VM_HOST_VENDOR)
 CONFIG_DEFINE (VM_HOST_OS)
 
+SET (VM_VERSION_INFO \"${VM_VERSION}${versionsuffix}\")
 SET (VM_VERSION \"${VM_VERSION}\")
 SET (PLATFORM_SOURCE_VERSION \"${PLATFORM_SOURCE_VERSION}\")
 
 CONFIG_DEFINE (VM_VERSION)
+CONFIG_DEFINE (VM_VERSION_INFO)
 CONFIG_DEFINE (PLATFORM_SOURCE_VERSION)
 CONFIG_DEFINE (SQ_VERSION)
 
@@ -250,3 +252,7 @@
 ENDIF ()
 
 CONFIG_DEFINE (SUGAR)
+
+IF (DEFINED SQ_VI_BYTES_PER_WORD)
+  CONFIG_DEFINE (SQ_VI_BYTES_PER_WORD)
+ENDIF (DEFINED SQ_VI_BYTES_PER_WORD)

Modified: trunk/platforms/unix/vm/sqUnixMain.c
===================================================================
--- trunk/platforms/unix/vm/sqUnixMain.c	2012-09-17 00:45:13 UTC (rev 2613)
+++ trunk/platforms/unix/vm/sqUnixMain.c	2012-09-17 00:58:51 UTC (rev 2614)
@@ -27,7 +27,7 @@
 
 /* Author: Ian Piumarta <ian.piumarta at squeakland.org>
  *
- * Last edited: 2012-09-14 05:15:14 by piumarta on solaris11x86
+ * Last edited: 2012-09-16 21:47:24 by piumarta on linux64
  */
 
 #include "sq.h"
@@ -1184,7 +1184,7 @@
 
   if (verbose)
     sprintf(info+strlen(info), "Squeak VM version: ");
-  sprintf(info+strlen(info), "%s #%d", VM_VERSION, vm_serial);
+  sprintf(info+strlen(info), "%s #%d", VM_VERSION_INFO, vm_serial);
 #if defined(USE_XSHM)
   sprintf(info+strlen(info), " XShm");
 #endif



More information about the Vm-dev mailing list