[Vm-dev] VM Maker: CMakeVMMakerSqueak-tty.107.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Dec 13 20:27:42 UTC 2014
Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.107.mcz
==================== Summary ====================
Name: CMakeVMMakerSqueak-tty.107
Author: tty
Time: 13 December 2014, 3:28:14.016 pm
UUID: cab88c6d-4a10-434c-905b-771a3a182598
Ancestors: CMakeVMMakerSqueak-tty.106
Linux32x86SqueakCogV3Config generates its CMake tree and is ready to be customized on my 32 bit machine.
HelpBrowser openOn: CMakeVMMakerSqueakStepByStepNewConfigurationHelp
gives step-by-step instructions on porting an existing configuration up to the customization step. I will be writing on how to methodologically customize a concrete customization as I do that for this new configuration.
I will do that tomorrow.
Removed an obsolete linkLibs methods as these have been normalized into CFLags, Definitions , external Libraries and linkerFlags methods that mimic the mvm files in the autotools build.
Next up::
Go through each Platform Abstract Base Class and make sure it uses the CMake Templates
Finish the pure 32 bit config
Announce the first release of the tool.
build out the buildTypes after figuring out he noDbgRegParms issue in gcc
=============== Diff against CMakeVMMakerSqueak-tty.106 ===============
Item was changed:
----- Method: CMakeVMMakerSqueakDesignPatternsHelp class>>redirectPatternImplementation (in category 'pages') -----
redirectPatternImplementation
^HelpTopic
title: 'Method Redirect Implementation'
contents:
'Implementation is very straight forward.
+ Pictorially it looks like this:
+ #buildITimerHeartbeat #buildMultiThreaded
+ --are redirected to---> #build
- For ''Release'' type buildTypes the default is to return setGlobalOptionsBuild: aMaker.
+ And this:
+ #buildAssert #buildAssertITimerHeartbeat #buildDebugITimerHeartbeat#buildMultiThreadedAssert #buildMultiThreadedDebug
+ -- are redirected to---> #buldDebug
- Example:
- setGlobalOptionsBuildMultiThreaded: aMaker
- ^self setGlobalOptionsBuild: aMaker
- For "Debug" type buildTypes the default is to return setGlobalOptionsBuild: aMaker
+ In code:
- Example:
+ setGlobalOptionsBuildMultiThreaded: aMaker
+ ^self setGlobalOptionsBuild: aMaker <----redirect to #build
+
+
setGlobalOptionsBuildAssertITimerHeartbeat: aMaker
+ ^self setGlobalOptionsBuildDebug: aMaker <----redirect to #buildDebug
- ^self setGlobalOptionsBuildDebug: aMaker
Any Configuration in the CPlatformConfigForSqueak heirarchy can override any of these Redirect Methods to provide custom results for any build type at any step in the generate process.
+ The Implementation is a bit of over-kill in many instances. However, I find the idea of boiler-plate consistency is easier to code and comprehend for newbie coders.
+ Getting newbie-coders comfortable writing configurations is a goal of this project.
-
'!
Item was changed:
----- Method: CMakeVMMakerSqueakDesignPatternsHelp class>>redirectPatternMotivation (in category 'pages') -----
redirectPatternMotivation
^HelpTopic
title: 'Method Redirect Pattern Motivation'
contents:
'The motivation for the Redirect Pattern is to reduce the number of concrete configurations by encapsulating every possible build type in one concrete configuration
+ If you look at the pharo CMakeVMMaker package, under the CMakeVMMaker-Unix class category, note the existence of StackUnixConfig and its child class StackUnixDebugConfig. It is the "Debug" that is the problem. The pharo team supports two build types: Release and Debug, while the Squeak team supports (currently) 10 build types. By adopting the pharo strategy of creating a new sub-class for each buildType the number of Concrete Configurations becomes--in my view--too many.
- If you look at the pharo CMakeVMMaker package, under the CMakeVMMaker-Unix class category, note the existence of StackUnixDebugConfig. It is the "Debug" that is the problem. The pharo team supports two build types: Release and Debug, while the Squeak team supports (currently) 10 build types. The number of Concrete Configurations becomes--in my view--too many.
Here is the math:
+ A configurations [PLATFORM]x[Language]x[VM]x[Memory Manager]x[buildType] form expands to:
+ [BSD32x64. | .....| SunOS32x86] x [Newspeak | Squeak ]. [Cog | Stack ] [V3 | Spur] [#build | #build.debug| ...| #buildMultiThreadedDebug]
- A configurations [PLATFORM].[Language].[VM].[Memory Manager] [buildType] form expands to:
- [BSD32x64. | .....| SunOS32x86].[Newspeak | Squeak ].Cog | Stack ].[V3 | Spur] [#build | #build.debug| ...| #buildMultiThreadedDebug]
which in combination yeilds (as of today)
[10 platforms] x [2 languages] x [2 VM''s] x [2 Memory Managers] x [10 buildTypes] = 600 concrete configurations.
By implementing the redirect pattern, the buildType is handled within a single concrete implementation. and math becomes a much more manageable
[10 platforms] x [2 languages] x [2 VM''s] x [2 Memory Managers] = 60 concrete configurations.
It is for this reason that I implemented this design pattern.
An explanation of the naming convention is available by evaluating
HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp'!
Item was changed:
----- Method: CMakeVMMakerSqueakDesignPatternsHelp class>>redirectPatternSummary (in category 'pages') -----
redirectPatternSummary
^HelpTopic
title: 'Method Redirect Summary'
contents:
'The motivation for the Redirect Pattern is to reduce the number of concrete configurations by encapsulating every possible build type in one concrete configuration. This is accomplished by redirecting sends to a single method to a method appropriate for that build type.
A fair critique is to ask "Why the overkill with all the methods when you only use a subset and it is doubtful that a particular one will need to be over-ridden?"
The answer is that I find it easier to understand--and I believe easier for newbies to understand--the source code when it is consistently applied.
Secondly, adding new redirect methods is straighforward boilerplate--just a matter of copy-n-paste-rename.
Thirdly it reduces brain-cycles when debugging.
-
-
-
-
-
- I hope this tutorial has made things clear.
-
'
!
Item was removed:
- ----- Method: CMakeVMMakerSqueakRedirectMethodsTest>>testLinkFlags (in category 'as yet unclassified') -----
- testLinkFlags
- #(#SqueakMacintoshConfig #SqueakUnixConfig #SqueakWindowsConfig )
- do:[:each |
- (Smalltalk at:each)
- allSubclassesDo:[:configuration | | o buildTypes|
- o:= configuration basicNew.
- (o excludeFromBuild not) & (configuration isAbstractBaseClass not)
- ifTrue:[
- buildTypes:=o availableBuildTypes copyWithoutAll:#(#buildNone).
- buildTypes do:[:buildType |
- o configureForBuildType: buildType.
- self assert:(o linkFlags isString)]]]].!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>firstCMakeGeneration (in category 'pages') -----
firstCMakeGeneration
^HelpTopic
title:'First CMake Generation'
contents:
'For didactic purposes I am going to do a sanity check and generate CMake code from the configuration for the first time.
If you are not familiar with the CMakeVMMakerSqueak naming conventions, please evaluate:
HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp
On my system the Cog svn tree is located under my Squeak install directory in the folder ''oscogvm".
Opening an X-term and navigating there it looks like this:
bash-4.2$ pwd
/home/tty/usr/src/smalltalk/CMake.oscog/cogVMMaker/oscogvm
The contents of the directory look something like this. Note the subdirectory that starts with ""cmake.""
bash-4.2$ ls --width=1
CHANGES
LICENSE
README
README.old
build
build.linux32ARM
build.linux32x86
build.macos32x86
build.macos64x64
build.win32x86
cmake.build.linux64x86w32BitCompatibility <-----created by CMakeVMMakerSqueak for the Linux64x86w32BitSqueakCogV3Config
history
image
.....
That cmake.build.linux64x86w32BitCompatibility directory was generated by a previous cmake generation for the Linux64X86-32BitCompatibility Platform.
+ For demonstration sake, I remove the directory.
+ bash-4.2$ rm -Rf cmake.*
+
Now, I ask the Builder to configure my new configuration for a buildType and output its contents. I do so by evaluating:
SqueakLinux32x86Builder
configureA: #Linux32x86SqueakCogV3Config forBuildType:#build;
enableMessageTracking: true;
generateByTemplate.
+ (Note: if you get errors during the generatation, shut down squeak and restart. I think it has something to do with open file handles):
+ and look again
- and look again :
bash-4.2$ ls cmake.build.linux64x86w32BitCompatibility/
squeak.cog.v3
bash-4.2$ tree cmake.build.linux64x86w32BitCompatibility/
`-- squeak.cog.v3
`-- build
|-- ADPCMCodecPlugin
| `-- CMakeLists.txt
...etc
We see that the configuration has generated its build heirarchy.
-
Note, however that the cmake.build.linux64x86w32BitCompatibility directory is for a different Platform!! Since we copied an existing Configuration from a different platform, this make sense.
+ To change it, we go to our Abstract Base Class and modify
+ Linux32x86Config>>dirBuildPlatform
+ ^self dirLinux32x86
+ Then regenerate our CMake
+ SqueakLinux32x86Builder
+ configureA: #Linux32x86SqueakCogV3Config forBuildType:#build;
+ enableMessageTracking: true;
+ generateByTemplate.
+ And examine our directory:
- dirBuildPlatform
- "the directory for the platform. example: build.linux32x86"
- ^self dirLinux32x86
+ bash-4.2$ ls cmake.build.linux*
+ cmake.build.linux32x86: <dirLinux32X86
+ squeak.cog.v3
+ and examining the heirarchy we see:
+ bash-4.2$ tree -d cmake.build.linux32x86/
+ cmake.build.linux32x86/
+ `-- squeak.cog.v3
+ `-- build
+ |-- ADPCMCodecPlugin
+ |-- AsynchFilePlugin
+ |-- B2DPlugin
+ |-- BMPReadWriterPlugin
+ |-- BitBltPlugin
+ |-- CroquetPlugin
+ |-- DSAPrims
+ |-- DropPlugin
+ |-- FFTPlugin
+ |-- FileCopyPlugin
+ |-- FilePlugin
+ |-- FloatArrayPlugin
+ |-- FloatMathPlugin
+ |-- JoystickTabletPlugin
+ |-- Klatt
+ |-- LargeIntegers
+ |-- LocalePlugin
+ |-- MIDIPlugin
+ |-- Matrix2x3Plugin
+ |-- MiscPrimitivePlugin
+ |-- Mpeg3Plugin
+ |-- SecurityPlugin
+ |-- SerialPlugin
+ |-- SocketPlugin
+ |-- SoundCodecPrims
+ |-- SoundGenerationPlugin
+ |-- SoundPlugin
+ |-- StarSqueakPlugin
+ |-- SurfacePlugin
+ |-- ZipPlugin
+ |-- vm-display-X11
+ |-- vm-display-null
+ |-- vm-sound-ALSA
+ `-- vm-sound-nul
+
+ Congratulations. You are almost done.
+
+ From here on out your only task is to correctly customize your Concrete Configuration such that it correctly builds for your [platform][language][vm][memorymodel][buildType]
+
+
+
'
!
Item was changed:
----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>pages (in category 'accessing') -----
pages
^#(overview
tests
identifyPlatform
identifyPlatformAbstractBaseClass
identifyBuilder
createTheConfiguration
excludingConfigFromBuilds
setAvailableBuildTypes
firstCMakeGeneration
+ takingStock
setOutputPath
settingPlugins
aNoteOnFoo
)!
Item was added:
+ ----- Method: CMakeVMMakerSqueakStepByStepNewConfigurationHelp class>>takingStock (in category 'pages') -----
+ takingStock
+ ^HelpTopic
+ title:'Where You Are Now'
+ contents:
+ ' If your Concrete Builder has successfully generate the CMake tree in the correct folder structure then you are almost done.
+
+ The rest of the process from here on out is tweaking the Concrete Configuration so that it generates valid CMake for your platform and buildTypes.
+
+ If you have not generated CMake output at this point, go back and try until you can.
+
+ At this point, please evaluate:
+ HelpBrowser openOn: CMakeVMMakerSqueakDesignPatternsHelp
+
+ And read the secion on the Method Redirect Pattern before continuing.
+ '
+
+ !
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlags (in category 'cmake buildType redirects') -----
- linkFlags
- "
- cmake --help-property LINK_FLAGS
- LINK_FLAGS
- ----------
-
- Additional flags to use when linking this target.
-
- The LINK_FLAGS property can be used to add extra flags to the link
- step of a target. LINK_FLAGS_<CONFIG> will add to the configuration
- <CONFIG>, for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO.
-
- '-lSM -lICE -ldl -lGL -lpthread -lm -lnsl -lX11' -L/usr/lib32 etc..."
- |d flags|
- self flag:'tty'. "is a link_flag really something like -lX11 or is it something else?"
- d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
- d
- at: #build put: [self linkFlagsBuild];
- at: #buildAssert put: [self linkFlagsBuildAssert];
- at: #buildAssertITimerHeartbeat put: [self linkFlagsBuildAssertITimerHeartbeat];
- at:#buildDebug put: [self linkFlagsBuildDebug];
- at: #buildDebugITimerHeartbeat put: [self linkFlagsBuildDebugITimerHeartbeat ];
- at: #buildITimerHeartbeat put: [self linkFlagsBuildITimerHeartbeat];
- at: #buildMultiThreaded put: [self linkFlagsBuildMultiThreaded ];
- at: #buildMultiThreadedAssert put: [self linkFlagsBuildMultiThreadedAssert];
- at: #buildMultiThreadedDebug put: [self linkFlagsBuildMultiThreadedDebug ];
- at: #buildNone put:[self linkFlagsNoBuildType].
- flags := String
- streamContents: [:stream | ((d at: buildType) value collect: #withBlanksTrimmed as: Set)
- asStringOn: stream
- delimiter: ' '].
- ^flags.
-
-
- !
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuild (in category 'cmake buildType redirects') -----
- linkFlagsBuild
- "SystemNavigation default browseMethodsWhoseNamesContain: 'linkFlagsBuild'
-
- ^ {
- '-lpthread'
- . '-luuid'
- }
- "
- self subclassResponsibility!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildAssert (in category 'cmake buildType redirects') -----
- linkFlagsBuildAssert
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildAssertITimerHeartbeat (in category 'cmake buildType redirects') -----
- linkFlagsBuildAssertITimerHeartbeat
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildDebug (in category 'cmake buildType redirects') -----
- linkFlagsBuildDebug
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildDebugITimerHeartbeat (in category 'cmake buildType redirects') -----
- linkFlagsBuildDebugITimerHeartbeat
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildITimerHeartbeat (in category 'cmake buildType redirects') -----
- linkFlagsBuildITimerHeartbeat
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildMultiThreaded (in category 'cmake buildType redirects') -----
- linkFlagsBuildMultiThreaded
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildMultiThreadedAssert (in category 'cmake buildType redirects') -----
- linkFlagsBuildMultiThreadedAssert
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsBuildMultiThreadedDebug (in category 'cmake buildType redirects') -----
- linkFlagsBuildMultiThreadedDebug
- "override this if you need to customize for this build type"
- ^ self linkFlagsBuild!
Item was removed:
- ----- Method: CPlatformConfigForSqueak>>linkFlagsNoBuildType (in category 'cmake buildType redirects') -----
- linkFlagsNoBuildType
- "SHOULD NOT GET HERE"
- self shouldNotImplement.
- !
Item was changed:
----- Method: CPlatformConfigForSqueak>>linkerFlags (in category 'compiling') -----
linkerFlags
self flag:'tty'. "Does this need to be ported to the redirect design pattern with linkerFlagsBuild, linkerFlagsDebug etc?"
+ "
+ linkerFlags
+ ^#( '-Wl'
+ '-z'
+ 'now'
+ )
+ "
+
+
- "-Wl -z now define these in your concrete CPlatformConfigForSqueak and feed them to cmakeSharedLinkerFlags"
self subclassResponsibility!
Item was removed:
- ----- Method: Linux32ARMv6Config>>linkFlagsBuild (in category 'cmake buildType redirects') -----
- linkFlagsBuild
- "Answer array of libraries to link to
- SystemNavigation default browseMethodsWhoseNamesContain: 'libsBuild'"
- ^ {
- '-lpthread'
- . '-luuid'
- }!
Item was changed:
SqueakUnixConfig subclass: #Linux32x86Config
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'CMakeVMMakerSqueak-Linux32x86'!
+ !Linux32x86Config commentStamp: '<historical>' prior: 0!
+ A Linux64x86w32BitConfig is an Abstract base class that provides common information for my subclasses.
- !Linux32x86Config commentStamp: 'tty 12/8/2014 11:24' prior: 0!
- A Linux32x86Config is an Abstract base class that provides common information for my subclasses.
I am not meant to be built.
+
I configure a VM according to my name's form: [Operating System] [WordSize] [Processor Language][VM MemoryManager][BuildType]Conf
+ SqueakLinux64x86w32CompatBuilder
- SqueakLinux32x86Builder
configureABuildFor: #ONE OF MY SUBCLASSES NAME HERE withBuildType: #build;
enableMessageTracking: true;
generateByTemplate.
+
HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
+
!
Item was changed:
----- Method: Linux32x86Config>>addVMPluginsBuild: (in category 'cmake buildType redirects') -----
addVMPluginsBuild: aMaker
|temp o|
self flag:'tty'. "I am writing sub-directory CMakeLists.txt here. Should I also write the config.cmake files?"
enabledebugmessages
ifTrue: [templates "this message will go to the top level CMakeLists.txt file"
addLast: (CMakeMessage new message: self class name , 'addVMPluginsBuild: aMaker')].
vmplugins do:[ :vmp |
o := String new writeStream. "each VMPlugin gets its own CMakeLists.txt file in its own directory"
temp := OrderedCollection new.
temp
addAllLast:((CMakePluginVm new) "this is the CMakeCompositTemplate"
config: self
definitions: (vmp compilerdefinitions)
module: (vmp module)
sources: (vmp sources)
includedirectories: (vmp includedirectories)).
temp do: [:each | o nextPutAll: (each content); cr].
((self buildDir) directoryExists: (vmp module))
ifFalse:[ (self buildDir) createDirectory: (vmp module)].
self write: (o contents) toFile: vmp module , FileDirectory slash , aMaker outputFileName.
templates "this will go to the top level CMakeLists.txt file"
addLast: ((CMakeAddSubDirectory new) sourcedir: (vmp module))
].
!
Item was changed:
----- Method: Linux32x86Config>>availableBuildTypes (in category 'cmake') -----
availableBuildTypes
+ ^SqueakCMakeVMMakerAbstractBuilder default noBuildTypes
+ "
- self flag:'tty'. "Should this be pushed up? I am guessing yes"
- ^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes
- " subclasses should use
+ subclasses should use
+
+ ^super allBuildTypes copyWithoutAll: #( #assertWithHeartbeatTimer #debugWithHeartbeatTimer debugMultiThreadedFFI.....etc)) "
- ^super availableBuildTypes copyWithoutAll: #( #assertWithHeartbeatTimer #debugWithHeartbeatTimer debugMultiThreadedFFI.....etc)) "
!
Item was changed:
----- Method: Linux32x86Config>>coreSourcesBuild (in category 'cmake buildType redirects') -----
coreSourcesBuild
"files to include from src/vm dir"
^ #(
'cogit.c'
+ 'gcc3x-cointerp.c'
- 'cointerp.c'
)!
Item was changed:
----- Method: Linux32x86Config>>coreSourcesBuildMultiThreaded (in category 'cmake buildType redirects') -----
coreSourcesBuildMultiThreaded
"files to include from src/vm dir"
^ #(
'cogit.c'
'cointerpmt.c'
)!
Item was changed:
----- Method: Linux32x86Config>>customizeCMakeVMDisplayNull (in category 'plugins') -----
customizeCMakeVMDisplayNull
|module|
module := vmplugins detect: [:vmd | #CMakeVMDisplayNull = ((vmd class name) asSymbol)] ifNone:[nil]. "error handling?"
module
sources: #('${targetPlatform}/vm-display-null/sqUnixDisplayNull') ;
compilerdefinitions:(OrderedCollection with: '-fPIC' with: '-DPIC');
compilerflags: (self compilerFlags);
externallibraries: #();
linkerflags: (self linkerFlags);
includedirectories:(OrderedCollection
with:'${crossDir}/plugins/FilePlugin'
with: '${targetPlatform}/plugins/B3DAcceleratorPlugin'
with: '${crossDir}/plugins/B3DAcceleratorPlugin').
self flag:'tty'. "I don't think includedirectories is correct. revisit"
+
+
+
+
+
!
Item was changed:
----- Method: Linux32x86Config>>customizeCMakeVMDisplayX11 (in category 'plugins') -----
customizeCMakeVMDisplayX11
|module|
module := vmplugins detect: [:vmd | #CMakeVMDisplayX11 = ((vmd class name) asSymbol)] ifNone:[nil]. "error handling?"
module
sources: #( '${targetPlatform}/vm-display-X11/sqUnixX11' '${targetPlatform}/vm-display-X11/sqUnixMozilla' );
compilerdefinitions:(OrderedCollection with: '-fPIC' with: '-DPIC');
compilerflags: (self compilerFlags);
externallibraries: (self externalLibraries);
linkerflags: (self linkerFlags);
includedirectories:(OrderedCollection
with:'${crossDir}/plugins/FilePlugin'
with: '${targetPlatform}/plugins/B3DAcceleratorPlugin'
with: '${crossDir}/plugins/B3DAcceleratorPlugin').
!
Item was changed:
----- Method: Linux32x86Config>>customizeCMakeVMSoundALSA (in category 'plugins') -----
customizeCMakeVMSoundALSA
|module|
module := vmplugins detect: [:vmd | #CMakeVMSoundALSA = ((vmd class name) asSymbol)] ifNone:[nil]. "error handling?"
module
sources: #( '${targetPlatform}/vm-sound-ALSA/sqUnixSoundALSA' );
compilerdefinitions:(OrderedCollection with: '-fPIC' with: '-DPIC');
compilerflags: (self compilerFlags);
externallibraries: (self externalLibraries);
linkerflags: (self linkerFlags);
includedirectories: #().
!
Item was changed:
----- Method: Linux32x86Config>>customizeCMakeVMSoundNull (in category 'plugins') -----
customizeCMakeVMSoundNull
|module|
module := vmplugins detect: [:vmd | #CMakeVMSoundNull = ((vmd class name) asSymbol)] ifNone:[nil]. "error handling?"
module
sources: #( '${targetPlatform}/vm-sound-null/sqUnixSoundNull' );
compilerdefinitions:(OrderedCollection with: '-fPIC' with: '-DPIC');
compilerflags: (self compilerFlags);
externallibraries: (self externalLibraries);
linkerflags: (self linkerFlags);
includedirectories:#()
!
Item was changed:
----- Method: Linux32x86Config>>customizeVMPlugins (in category 'plugins') -----
customizeVMPlugins
|mysubset iwantonly|
"trim the vmdrivers ordered collection of CMakeVMDriver subclasses to only those I want. then customize them for use on this OS/platform"
iwantonly := #(#CMakeVMDisplayNull #CMakeVMDisplayX11 #CMakeVMSoundALSA #CMakeVMSoundNull ).
mysubset := vmplugins select: [:vmd | 0 < (iwantonly occurrencesOf: (vmd class name) asSymbol)].
vmplugins := mysubset.
self
customizeCMakeVMDisplayNull;
customizeCMakeVMDisplayX11;
customizeCMakeVMSoundALSA;
customizeCMakeVMSoundNull.
+
!
Item was changed:
----- Method: Linux32x86Config>>defaultExternalPlugins (in category 'plugins') -----
defaultExternalPlugins
+ ^ #(
+ B3DAcceleratorPlugin
+ ThreadedIA32FFIPlugin "SqueakFFIPrims"
+ "UUIDPlugin"
+ "UnixOSProcessPlugin ?? "
+ JPEGReaderPlugin
+ JPEGReadWriter2Plugin
+ RePlugin
+ InternetConfigPlugin
+ )
- " tty 2014.06.10 cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/plugins.ext"
- ^ #(B3DAcceleratorPlugin
- BochsIA32Plugin
- ThreadedFFIPlugin "moduleName->SqueakFFIPrims "
- "FFIPlugin" "moduleName->SqueakFFIPrims "
- SqueakSSLPlugin "moduleName->SqueakSSL"
- LocalePlugin
- UnixOSProcessPlugin
- UUIDPlugin)
+ "debug"!
-
- "N.B. Regarding ThreadedFFIPlugin and FFIPlugin from eem:
-
- Use ThreadedFFIPlugin. The FFIPlugin is obsolete (it requires assembler support files, and is non-reentrant). This should generate in src/plugins/SqueakFFIPrims/{SqueakFFIPrims.c,ARM32FFIPlugin.c,IA32FFIPlugin.c} and you should compile only src/plugins/SqueakFFIPrims/SqueakFFIPrims.c. src/plugins/SqueakFFIPrims/SqueakFFIPrims.c is a simple wrapper that includes ARM32FFIPlugin.c or IA32FFIPlugin.c as appropriate (and others can be added as they are developed).
-
-
- "!
Item was changed:
----- Method: Linux32x86Config>>defaultInternalPlugins (in category 'plugins') -----
defaultInternalPlugins
+ " took from unixbuild/bld/plugins.int"
- " tty 2014.06.10 cut-n-paste from Cog/build.linux32x86/newspeak.cog.spur/build/plugins.int
- N.B. moduleName->XYZ means XYZ appears in the GNU-Build's plugins.int/ext. However, Smalltalk requires the class name.
- XYZSmalltalkClass moduleName->XYZ as it appears in plugins.int/ext
- "
^ #(
+ ADPCMCodecPlugin
+ AsynchFilePlugin
+ BalloonEnginePlugin "B2DPlugin"
+ BitBltSimulation "BitBltPlugin"
+ BMPReadWriterPlugin
+ CroquetPlugin
+ DeflatePlugin "ZipPlugin"
+ DropPlugin
+ DSAPlugin "DSAPrims"
+ FFTPlugin
+ FileCopyPlugin
+ FilePlugin
+ FloatArrayPlugin
+ FloatMathPlugin
+ JoystickTabletPlugin
+ KlattSynthesizerPlugin "Klatt"
+ LargeIntegersPlugin "LargeIntegers"
+ Matrix2x3Plugin
+ MIDIPlugin
+ MiscPrimitivePlugin
+ Mpeg3Plugin
+ SecurityPlugin
+ SerialPlugin
+ SocketPlugin
+ SoundCodecPlugin "SoundCodecPrims"
+ SoundGenerationPlugin
+ SoundPlugin
+ StarSqueakPlugin
+ SurfacePlugin
+ LocalePlugin
+ )!
- ADPCMCodecPlugin
- AsynchFilePlugin
- BalloonEnginePlugin "moduleName -->B2DPlugin"
- BitBltSimulation "moduleName->BitBltPlugin"
- BMPReadWriterPlugin
- CroquetPlugin
- DeflatePlugin "moduleName->ZipPlugin"
- DropPlugin
- DSAPlugin "moduleName->DSAPrims"
- FFTPlugin
- FileCopyPlugin
- FilePlugin
- FloatArrayPlugin
- FloatMathPlugin
- IA32ABIPlugin "moduleName->IA32ABI"
- " InflatePlugin" "moduleName->ZipPlugin" "already included with the DeflatePlugin"
- JoystickTabletPlugin
- JPEGReaderPlugin
- JPEGReadWriter2Plugin
- KlattSynthesizerPlugin "moduleName->Klatt"
- LargeIntegersPlugin "moduleName->LargeIntegers"
- Matrix2x3Plugin
- MIDIPlugin
- MiscPrimitivePlugin
- Mpeg3Plugin
- RePlugin
- SecurityPlugin
- SerialPlugin
- SocketPlugin
- SoundCodecPlugin "moduleName->SoundCodecPrims"
- SoundGenerationPlugin
- SoundPlugin
- StarSqueakPlugin
- SurfacePlugin
- VMProfileLinuxSupportPlugin)!
Item was changed:
----- Method: Linux32x86Config>>dirBuildPlatform (in category 'cmake') -----
dirBuildPlatform
- "the directory for the platform. example: build.linux32x86"
^self dirLinux32x86!
Item was changed:
----- Method: Linux32x86Config>>excludeFromBuild (in category 'cmake') -----
excludeFromBuild
+ "over-ride to exclude yourself from a build or not"
- "over-ride to exclude yourself from a build"
^true!
Item was changed:
----- Method: Linux32x86Config>>executableName (in category 'cmake') -----
executableName
"AbstractBaseClass configurations are not meant to be executable"
^ self vmIShouldNotBeHereExecutableName!
Item was changed:
----- Method: Linux32x86Config>>externalPluginsBuild (in category 'cmake buildType redirects') -----
externalPluginsBuild
^ externalPlugins ifNil: [ externalPlugins := self defaultExternalPlugins ]!
Item was changed:
----- Method: Linux32x86Config>>extraPluginSettingsBuild: (in category 'cmake buildType redirects') -----
extraPluginSettingsBuild: aMaker
aMaker isExternal
ifTrue:[aMaker templates addLast:((CMakeSet new) variable:'LIBRARY_OUTPUT_PATH' value:'${outputDir}')].
+ aMaker templates addLast:((CMakeSet new) variable:'linkFlags' quotedValue:'${linkFlags} -m32').
+
+ " maker isExternal ifTrue: [
+ maker set: 'LIBRARY_OUTPUT_PATH' to: '${outputDir}'
+ ].
+ maker set: #linkFlags toString: '${linkFlags} -m32'"!
- !
Item was changed:
----- Method: Linux32x86Config>>internalPluginsBuild (in category 'cmake buildType redirects') -----
internalPluginsBuild
^ internalPlugins ifNil: [ internalPlugins := self defaultInternalPlugins ]!
Item was removed:
- ----- Method: Linux32x86Config>>linkFlagsBuild (in category 'cmake buildType redirects') -----
- linkFlagsBuild
- "Answer array of libraries to link to
- SystemNavigation default browseMethodsWhoseNamesContain: 'libsBuild'"
- ^ {
- '-lpthread'
- . '-luuid'
- }!
Item was changed:
----- Method: Linux32x86Config>>postBuildActionsBuild: (in category 'cmake buildType redirects') -----
+ postBuildActionsBuild: aMaker
+ "SystemNavigation default browseMethodsWhoseNamesContain: 'postBuildActionsBuild:'"
+ (aMaker config enabledebugmessages)
+ ifTrue:[
+ aMaker config templates
+ addLast: ((CMakeMessage new) message: (self class name), ' postBuildActionsBuild' )
+ ].
+ aMaker config templates
+ addLast: ((CMakeMessage new) message: 'postBuildActionsBuild: aMaker' );
+ addLast:((CMakeCommand new) command:'include' params:'config.cmake'); "cmake --help-command include "
+ addLast:((CMakeCommand new) command:'LIST' params:'REMOVE_DUPLICATES config_vars'); "cmake --help-command LIST"
+ addLast:((CMakeCommand new) command:'FILE' params:'WRITE ${CMAKE_BINARY_DIR}/config.h.in ""'); "cmake --help-command FILE"
+ addLast:(CMakeAppendConfigHIn new);
+ addLast:((CMakeCommand new) command:'CONFIGURE_FILE' params:'${CMAKE_BINARY_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h');
+ addLast:((CMakeCommand new) command:'GET_CMAKE_PROPERTY' params:'tmp VARIABLES');
+ addLast:((CMakeCommand new) command:'LIST' params:'REMOVE_ITEM tmp tmp');
+ addLast:((CMakeCommand new) command:'LIST' params:'SORT tmp');
+ addLast:((CMakeCommand new) command:'FILE' params:'WRITE ${CMAKE_BINARY_DIR}/config.h.status ""');
+ addLast:(CMakeAppendConfigStatus new).
+
+ !
- postBuildActionsBuild: gen
- "SystemNavigation default browseMethodsWhoseNamesContain: 'postBuildActionsBuild:'"!
Item was changed:
----- Method: Linux32x86Config>>preferredIncludesBuild (in category 'cmake buildType redirects') -----
preferredIncludesBuild
(enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' preferredIncludesBuild' )
].
templates
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${targetPlatform}/plugins/B3DAcceleratorPlugin')).
+ (enabledebugmessages)
- (enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_PATH = ${CMAKE_INCLUDE_PATH}' );
addLast: ((CMakeMessage new) message: 'CMAKE_SYSTEM_INCLUDE_PATH = ${CMAKE_SYSTEM_INCLUDE_PATH}' );
addLast: ((CMakeMessage new) message: 'CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES = ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}' );
addLast: ((CMakeMessage new) message: 'CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES = ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}' );
addLast: ((CMakeMessage new) message: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = ${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE}' );
addLast: ((CMakeMessage new) message: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = ${CMAKE_INCLUDE_CURRENT_DIR}' );
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE = ${CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE}' );
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_DIRECTORIES_BEFORE = ${CMAKE_INCLUDE_DIRECTORIES_BEFORE}' );
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE = ${CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE}' )
+ ].!
- ].
-
-
- !
Item was removed:
- ----- Method: Linux32x86SqueakCogV3Config>>linkFlagsBuild (in category 'cmake buildType redirects') -----
- linkFlagsBuild
- "Answer array of libraries to link to"
- ^ { '-L/usr/lib'
- . '-L/usr/lib/X11'
- . '-luuid'
- . 'lSM'
- . '-lICE'
- . '-ldl'
- . '-lGL'
- . '-lpthread'
- . '-lm'
- . '-lnsl'
- . '-lX11'
- }
- !
Item was changed:
----- Method: Linux64x86w32BitSqueakCogV3Config>>cmakeAddDefinitionsBuild (in category 'cmake buildType redirects') -----
cmakeAddDefinitionsBuild
- |c d o|
(enabledebugmessages)
ifTrue:[ templates
addLast:((CMakeMessage new) message: (self class name) , 'cmakeAddDefinitionsBuild')
] .
- c := self compilerFlags asOrderedCollection.
- d := self compilerDefinitions asOrderedCollection.
- o:= OrderedCollection new.
- o addAllLast: c; addAllLast: d.
templates
+ addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)).
- addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)). "see my self flag below"
!
Item was changed:
----- Method: Linux64x86w32BitSqueakCogV3Config>>externalLibsBuild (in category 'cmake buildType redirects') -----
externalLibsBuild
^self externalLibraries asOrderedCollection.
!
Item was removed:
- ----- Method: Linux64x86w32BitSqueakCogV3Config>>linkFlagsBuild (in category 'cmake buildType redirects') -----
- linkFlagsBuild
- "Answer array of libraries to link to"
- ^ { '-L/usr/lib'
- . '-L/usr/lib/X11'
- . '-luuid'
- . 'lSM'
- . '-lICE'
- . '-ldl'
- . '-lGL'
- . '-lpthread'
- . '-lm'
- . '-lnsl'
- . '-lX11'
- }
- !
More information about the Vm-dev
mailing list