[Vm-dev] VM Maker: CMakeVMMakerSqueak-tty.120.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 29 12:51:43 UTC 2016
Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.120.mcz
==================== Summary ====================
Name: CMakeVMMakerSqueak-tty.120
Author: tty
Time: 28 May 2016, 6:08:43.532617 pm
UUID: 5fc6ab13-f0cb-4611-8132-f903d7168fd1
Ancestors: CMakeVMMakerSqueak-tty.119
squeak.cog.spur compiles
cog -version reports:
./cog -version
-3732 Sat May 28 18:02:46 EDT 2016 gcc 4.8.2 [Production Spur VM]
CoInterpreter VMMaker.oscog-eem.1872 uuid: 6db6d610-b1a5-4f4d-978d-22c917bdb3e4 May 28 2016
StackToRegisterMappingCogit VMMaker.oscog-eem.1860 uuid: 4d58d995-ee0c-4330-9190-adfa038e8f24 May 28 2016
VM: r3732 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2016-05-26 16:01:37 -0400
Plugins: r3730 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
Linux flipper 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux
plugin path: ....etc
woot!
Learned that a Configs platformSources must be customized depending on build type, so need to refactor that.
added notes to Help customizable methods I missed on initial pass.
=============== Diff against CMakeVMMakerSqueak-tty.119 ===============
Item was changed:
----- Method: CMakeVMGeneratorForSqueak>>generateByTemplate (in category 'code generation') -----
generateByTemplate
"attempt to move way from string based writing to template based. Think Seaside renderOn composition"
| extPlugins intPlugins |
self flag: 'tty'. "refactor so that the cascade reflects CMake terminilogy"
output := String new writeStream.
config templates: OrderedCollection new.
config
setGlobalOptions: self;
cmakePrefixPath;
cmakeIncludePath;
cmakeLibraryPath;
cmakeIncludeModules;
cmakeCFlags;
cmakeAddDefinitions;
cmakeWriteDirectoriesDotCmake: self;
cmakeIncludeDirectories: self; "<---"
preferredIncludes; "<---why 3 of em?"
standardIncludes; "<---"
setGlobalOptionsAfterDetermineSystem: self;
extraVMSettings: self; "<--catch-all method. os/platform specific"
setCoreSources: self;
setPlatformSources: self;
setCrossSources: self;
setExtraSources;
cmakeSetSourceFilesProperties;
cmakeListAppend:'LINKLIBS' elements: (config externalLibs);
cmakeAddExecutableNameOptionSource: self;
setExecutableOutputPath;
addVMPlugins: self.
config templates do: [:each | self puts: each content].
config templates: OrderedCollection new.
extPlugins := self generatePluginConfigs: config internalPlugins internal: true.
intPlugins := self generatePluginConfigs: config externalPlugins internal: false.
self processThirdpartyLibraries. "<--unused in Pharo code? What exactly does this do?"
self processPlugins: intPlugins, extPlugins.
self config templates addLast:((CMakeCommand new) command:'target_link_libraries' params:(self moduleName , ' ${LINKLIBS}')).
" self cmd: 'target_link_libraries'
params: self moduleName , ' ${LINKLIBS}'."
config postBuildActions: self..
config templates do: [:each | self puts: each content].
self saveFile.
self generateBuildScript!
Item was added:
+ ----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>cogitClass (in category 'pages') -----
+ cogitClass
+ ^HelpTopic
+ title:'cogitClass'
+ contents:
+ '
+ write me.
+ '!
Item was added:
+ ----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>configGenerateByTemplate (in category 'pages') -----
+ configGenerateByTemplate
+ ^HelpTopic
+ title:'config generate by template'
+ contents:
+ '
+ write me: generate by template is in several places. including the unix config and the vm and plugin generators
+ '!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>pages (in category 'accessing') -----
pages
+
+ "platformSources...cogitClass...src vs vmsrc"
+ ^#(
+ platformSources
+ cogitClass
+ vmsrc
+ configGenerateByTemplate
+ overview
- "I need the srcDir"
- ^#(overview
tests
identifyPlatform
identifyPlatformAbstractBaseClass
identifyBuilder
createTheConfiguration
excludingConfigFromBuilds
setAvailableBuildTypes
firstCMakeGeneration
tackingStockOne
cPlatformConfigForSqueak
methodRedirectPattern
theVMGenerator
tackingStockTwo
forTheImpatient
specifyDirectories
setGlobalOptions
cmakePrefixPath
cmakeIncludePath
cmakeLibraryPath
cmakeIncludeModules
cmakeCFlags
cmakeAddDefinitions
cmakeWriteDirectoriesDotCmake
cmakeIncludeDirectories
preferredIncludes
standardIncludes
setGlobalOptionsAfterDetermineSystem
extraVMSettings
setCoreSources
setPlatformSources
setCrossSources
setExtraSources
cmakeSetSourceFilesProperties
cmakeListAppendLINKLIBSelements
cmakeAddExecutableNameOptionSource
setExecutableOutputPath
addVMPlugins
generatePluginConfigs
specifyPlugins
processThirdpartyLibraries
processPlugins
postBuildActions
setConfigurationDirectory
compilingLinkingSetup
customizeVMDrivers
aNoteOnFoo
)
!
Item was added:
+ ----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>platformSources (in category 'pages') -----
+ platformSources
+ ^HelpTopic
+ title:'platformSources'
+ contents:
+ 'write me
+ '!
Item was added:
+ ----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>vmsrc (in category 'pages') -----
+ vmsrc
+ ^HelpTopic
+ title:'vmsrc'
+ contents:
+ '
+ write me.
+ '!
Item was changed:
----- Method: CPlatformConfigForSqueak class>>vmBuildCmake (in category 'as yet unclassified') -----
vmBuildCmake
self flag: 'tty'. "I probably do not want this as this is what we currently do in Squeak. Ian appears to have farmed it out to its own file"
^'
LINK_DIRECTORIES (${vm_link_directories})
ADD_EXECUTABLE (squeakvm${scriptsuffix}
${bld}/${interp}.c
${unix}/vm/aio.c
${unix}/vm/debug.c
${unix}/vm/osExports.c
${unix}/vm/sqUnixCharConv.c
${unix}/vm/sqUnixExternalPrims.c
${unix}/vm/sqUnixMain.c
${unix}/vm/sqUnixMemory.c
+ ${unix}/vm/sqUnixSpurMemory.c
${cross}/vm/sqNamedPrims.c
${cross}/vm/sqVirtualMachine.c
${bld}/version.c
)
ADD_CUSTOM_COMMAND (
OUTPUT version.c
COMMAND ${config}/verstamp ${bld}/version.c ${CMAKE_C_COMPILER}
)
ADD_CUSTOM_COMMAND (
DEPENDS ${src}/vm/interp.c
OUTPUT ${bld}/interp.c
COMMAND tr ''\\015'' ''\\012'' < ${src}/vm/interp.c > ${bld}/interp.c
)
ADD_CUSTOM_COMMAND (
DEPENDS ${bld}/interp.c
OUTPUT ${bld}/gnu-interp.c
COMMAND ${config}/gnuify ${config}/gnuify.awk ${bld}/interp.c ${bld}/gnu-interp.c
)
INCLUDE_DIRECTORIES (
${bld}
# ${src}/vm # files are now copied/generated in ${bld}
${unix}/vm
${cross}/vm
${unix}/plugins/B3DAcceleratorPlugin # for sqUnixOpenGL.h
${X11_INCLUDE_DIR}
${OPENGL_INCLUDE_DIR}
${vm_include_directories}
)
SET_TARGET_PROPERTIES (squeakvm${scriptsuffix} PROPERTIES LINK_FLAGS "${CMAKE_EXE_EXPORTS_C_FLAG}")
TARGET_LINK_LIBRARIES (squeakvm${scriptsuffix} m ${squeak_libs} ${vm_link_libraries})
INSTALL (PROGRAMS ${bld}/squeakvm${scriptsuffix} DESTINATION ${plgdir})
IF (vm-sound-OSS_disabled)
SET (useoss "false")
ELSE ()
SET (useoss "true")
ENDIF ()
CONFIGURE_FILE (${config}/config.in ${bld}/config @ONLY)
# launcher scripts
ADD_CUSTOM_TARGET (squeak
DEPENDS ${config}/squeak.in
COMMAND sh ${bld}/config ${config}/squeak.in ${bld}/squeak
COMMAND chmod +x ${bld}/squeak
)
INSTALL (PROGRAMS ${bld}/squeak DESTINATION bin)
ADD_CUSTOM_TARGET (squeak.sh
DEPENDS ${config}/squeak.sh.in
COMMAND sh ${bld}/config ${config}/squeak.sh.in ${bld}/squeak.sh
COMMAND chmod +x ${bld}/squeak.sh
)
INSTALL (PROGRAMS ${bld}/squeak.sh DESTINATION bin)
ADD_EXECUTABLE (ckformat
${src}/ckformat.c
)
INSTALL (PROGRAMS ${bld}/ckformat DESTINATION ${plgdir})
ADD_DEPENDENCIES (squeakvm${scriptsuffix} squeak squeak.sh ckformat)
# manual page
ADD_CUSTOM_TARGET (squeak.1
DEPENDS ${unix}/doc/squeak.1
COMMAND sh ${bld}/config ${unix}/doc/squeak.1 ${bld}/squeak.1
)
ADD_DEPENDENCIES (squeakvm${scriptsuffix} squeak.1)
INSTALL (FILES ${bld}/squeak.1 DESTINATION share/man/man1)
'!
Item was changed:
----- Method: CPlatformConfigForSqueak>>dirBuildLanguageVMMM (in category 'cmake directory') -----
dirBuildLanguageVMMM
+ "the directory under buildPlatformDir example: newspeak.cog.spur. "
- "the directory under buildPlatformDir example: newspeak.cog.spur. use squeak.cog.v3 as default"
self subclassResponsibility!
Item was changed:
----- Method: CPlatformConfigForSqueak>>generatePluginsList (in category 'source generation') -----
generatePluginsList
self
write: (self class pluginsTemplate
format: {
self version.
String streamContents: [ :stream | self internalPlugins asStringOn: stream delimiter: String cr ].
String streamContents: [ :stream | self externalPlugins asStringOn: stream delimiter: String cr ].
self executableName })
toFile: 'PLUGINS.txt'
!
Item was changed:
Linux64x86w32BitConfigUsrLib subclass: #Linux64x86w32BitSqueakCogSpurConfig
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'CMakeVMMakerSqueak-Linux64X86-32BitCompatibility'!
+ !Linux64x86w32BitSqueakCogSpurConfig commentStamp: 'tty 5/28/2016 16:21' prior: 0!
- !Linux64x86w32BitSqueakCogSpurConfig commentStamp: '<historical>' prior: 0!
I am a configuration for 64 bit Linux with 32 Bit compatability libraries.
I have been tested with Slackware64 14.1 which uses /usr/lib for 32 bit compatability libs and /usr/lib64 for normal libs.
If you have a machine which uses /usr/lib for 64 bit libs and /usr/lib32 for 32 bit compat libs then subclass me and modify (at least) the following methods:
compilerFlags
externalLibraries
linkFlagsBuild
linkerFlags
SqueakLinux64x86w32CompatBuilder
+ configureABuildFor: #Linux64x86w32BitSqueakCogSpurConfig withBuildType: #build;
- configureABuildFor: #Linux64x86w32BitSqueakCogV3Config withBuildType: #build;
enableMessageTracking: true;
generateByTemplate.
HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
Getting the UUIDPlugin to compile (not work, unfortunately, but compile) required modifying oscogvm/platforms/unix/plugins/acinclude.m4.
to read: (my Slackware system has <uuid> and uuidgen. then setting the
# -*- sh -*-
AC_MSG_CHECKING([for UUID support])
AC_TRY_COMPILE([#include <sys/uuid.h>],[uuid_generatorxyz;],[
AC_MSG_RESULT(yes)
AC_CHECK_LIB(uuid, uuid_generator_xyz,LIB_UUID="-luuid" )
],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING([for UUID support uuid/uuid.h] and uuid_generate)
AC_TRY_COMPILE([#include <uuid/uuid.h>],[uuid_generate;],[
AC_MSG_RESULT(yes)
AC_CHECK_LIB(uuid, uuid_generate, LIB_UUID="-luuid")],[
AC_MSG_RESULT(no)
AC_MSG_CHECKING([for UUID support uuid and uuidgen] )
AC_TRY_COMPILE([#include <uuid.h>],[uuidgen;],[
AC_MSG_RESULT(yes)
AC_CHECK_LIB(uuid, uuidgen, LIB_UUID="-luuid" )],[
AC_MSG_RESULT(no)
AC_PLUGIN_DISABLE
])
])
])
#define HAVE_UUID_H 1
#define HAVE_UUIDGEN 1
+ flags in my configH method
- fl;ags in my configH method
!
Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogSpurConfig>>defaultInternalPlugins (in category 'plugins') -----
+ defaultInternalPlugins
+ ""
+ ^#()!
Item was changed:
----- Method: SqueakIA32BochsLinuxConfig>>dirBuildLanguageVMMM (in category 'cmake') -----
dirBuildLanguageVMMM
+ "the directory under buildPlatformDir example: newspeak.cog.spur."
- "the directory under buildPlatformDir example: newspeak.cog.spur. use squeak.cog.v3 as default"
^self squeakCogSpur!
Item was changed:
----- Method: SqueakIA32BochsMacOSConfig>>dirBuildLanguageVMMM (in category 'cmake') -----
dirBuildLanguageVMMM
+ "the directory under buildPlatformDir example: newspeak.cog.spur. "
- "the directory under buildPlatformDir example: newspeak.cog.spur. use squeak.cog.v3 as default"
^self squeakCogSpur!
Item was changed:
----- Method: SqueakIA32BochsWin32Config>>dirBuildLanguageVMMM (in category 'cmake') -----
dirBuildLanguageVMMM
+ "the directory under buildPlatformDir example: newspeak.cog.spur. "
- "the directory under buildPlatformDir example: newspeak.cog.spur. use squeak.cog.v3 as default"
^self squeakCogSpur!
Item was changed:
----- Method: SqueakUnixConfig>>platformSources (in category 'source files') -----
platformSources
"files added from platform/unix/vm dir "
^ #(
'aio.c'
'debug.c'
- " 'dlfcn-dyld.c'
- 'mac-alias.c' "
'osExports.c'
'sqUnixCharConv.c'
+
- " 'sqUnixEvent.c' "
'sqUnixExternalPrims.c'
'sqUnixHeartbeat.c'
'sqUnixMain.c'
'sqUnixMemory.c'
+ 'sqUnixSpurMemory.c'
'sqUnixThreads.c'
'sqUnixVMProfile.c'
+ )
+
+ "
+ 'dlfcn-dyld.c'
+ 'mac-alias.c'
+ 'sqUnixEvent.c'
+
+ 'sqUnixITimerHeartbeat.c'
+ 'sqUnixITimerTickerHeartbeat.c'
+
+ "
+ !
- )!
More information about the Vm-dev
mailing list