[Vm-dev] VM Maker: CMakeVMMakerSqueak-tty.51.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 13 20:47:08 UTC 2014


Timothy M uploaded a new version of CMakeVMMakerSqueak to project VM Maker:
http://source.squeak.org/VMMaker/CMakeVMMakerSqueak-tty.51.mcz

==================== Summary ====================

Name: CMakeVMMakerSqueak-tty.51
Author: tty
Time: 13 June 2014, 4:47:11.431 pm
UUID: 2e594cfa-491d-4006-a8fb-99b46d6fb121
Ancestors: CMakeVMMakerSqueak-tty.49

Somehow, I managed to do this work on tty.49 with tty.50 sitting in the repository untouched. oh well.

started implementing concrete configuration.

added some pages to help. It needs organizing.

Added some methods to Trait TCPlatformConfigForSqueak to force implementation by concrete configs.

Cmake runs for Linux32x86SqueakCogV3Config for #build configuration. in cmake.build.linux32/squeak.cog.v3/build

However the compile errors out--and not in the same place as the corresponding GNU code in build.linux32/squeak.cog.v3/build

I am in process of figuring out the CMAKE equivalents
of CC="gcc -m32"
CXX="...."
CFLAGS="...."
LIBS="...."
LDFLAGS="...."

=============== Diff against CMakeVMMakerSqueak-tty.49 ===============

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>availableBuilds (in category 'pages') -----
+ availableBuilds
+ 	^HelpTopic
+ 		title:'configuring available build types'
+ 		contents:
+ 'The purpose of this method is to present the end user with the avaiable buildTypes for a configuration category. when they invoke a Builder like so:
+ 
+ 	SqueakLinux32X86Builder availableBuildTypesFor: #Linux32x86SqueakStackV3Config
+ 
+ Since builds are sometimes not available and/or under development  a developer may wish to restrict what build types are avaiable for a configurations Builder by modifying the configuration''s "availableBuilds" method.
+ 
+ The default is all buildTypes: 
+ 	^SqueakCMakeVMMakerAbstractBuilder  default  allBuildConfigurations
+ 
+ You can display no buildTypes with:
+ 	^SqueakCMakeVMMakerAbstractBuilder  default  noBuildConfigurations.
+ 
+ or you can customize it like so:
+ 	^(SqueakCMakeVMMakerAbstractBuilder  default  allBuildConfigurations 
+ 			copyWithoutAll: #( #assertWithHeartbeatTimer #debugWithHeartbeatTimer debugMultiThreadedFFI.....etc))  
+ 
+ 
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>excludeFromBuild (in category 'pages') -----
+ excludeFromBuild
+ 	^HelpTopic
+ 		title:'Excluding a Configuration From Builds'
+ 		contents:
+ ' The "excludeFromBuild" method in a concrete configuration can be manually toggled to exclude or include a configuration from being built by a builder.
+ 
+ 	excludeFromBuild
+ 		"over-ride to exclude yourself from a build"
+ 		^false
+ 
+ 
+   Be careful witht he logic. True excludes the configuration. False includes the configuration
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>executableName (in category 'pages') -----
+ executableName
+ 	^HelpTopic
+ 		title:'set executable name'
+ 		contents:
+ '
+ In your concrete configuration, set the exectuable name in method "executableName"
+ 
+ SystemNavigation default browseMethodsWhoseNamesContain: ''executableName''
+ 
+ 
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>extraPluginSettings (in category 'pages') -----
+ extraPluginSettings
+ 	^HelpTopic
+ 		title:'set extra plugin settings'
+ 		contents:
+ 'In your concrete configuration configure "extraPluginSettings"
+ 
+ SystemNavigation default browseMethodsWhoseNamesContain: ''extraPluginSettings''
+ 
+ 
+ look at the differences in the concrete implementations, especially by platform type.	
+ 
+ '!

Item was changed:
  ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>pages (in category 'pages') -----
  pages
+ 	^#(overview prerequisites igorStasenkoDesign plugins availableBuilds excludeFromBuild executableName extraPluginSettings preferredIncludes setExtraTargetProperties scratch)!
- 	^#(overview prerequisites igorStasenkoDesign)!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>plugins (in category 'pages') -----
+ plugins
+ 	^HelpTopic
+ 		title:'setting up defaultInternalPlugins and defaultExternalPlugins'
+ 		contents:
+ '
+ bad mojo with plugins.int plugins.ext in GNU and plugin names in CMakeVMMaker(Squeak)
+ 
+ |s|
+ Transcript clear.
+ s:=SortedCollection new.
+ InterpreterPlugin allSubclassesDo:[:p|
+ 	p moduleName = ''SqueakSSL''                    "<-------Text from plugins.int or plugins.ext"
+ 		ifTrue:[Transcript show:p name;cr].
+ 	s add: (p moduleName)].
+ 
+ 
+ '
+ 
+ !

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>preferredIncludes (in category 'pages') -----
+ preferredIncludes
+ 	^HelpTopic
+ 		title:'configuring preferred includes'
+ 		contents:
+ '
+ SystemNavigation default browseMethodsWhoseNamesContain: ''preferredIncludes'' 
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>scratch (in category 'pages') -----
+ scratch
+ 	^HelpTopic
+ 		title:'Program Flow'
+ 		contents:
+ '
+ Create a new configuration
+ add external/internal plugins
+ generateSources
+ 	verifies Sources file in place
+ 	prepares CogRTLOpcodes/CogIA32Compiler/StackInterpreter depending on configuration used
+ 	initializes/prepares VMMaker
+ 	asks VMMaker to generateEntire while intercepting notifications and deprecation warnings.
+ 
+ generate 
+ 	a Configuration passes itself to a CMakeVMGeneratorForSqueak
+ 	an output  writeStream is opened
+ 	ask the config to set global options on the Generator. Stuff like (maker set: ''CMAKE_C_COMPILER'' to: ''/usr/bin/gcc'')
+ 	"We are setting up a file here"
+ 	print the header
+ 	set project name
+ 	set system specific global options after system is known (all existing implementations are XCode CMAKE_OSX_SYSROOT etc)
+         set up  directories.cmake  content with all the topDir,srcDir etc in the Generator
+ 	9. is troubling. set''s CMAKECONFIGURATIONTYPES to Release
+ 	set up preferedIncludes. This one is important as it is config specific
+ 	set up standardIncludes. This one is important as it is config specific
+ 	add CompilerFlag Definitions. This is where customization among release, debug, assert flags are set.
+ 	extraVMSettings             . more custom stuff for the VM. The generateConfigH issue resides here
+         put this string  ''add_executable(Squeak  ${coreSources} ${crossVMSources} ${platformVMSources} ${extraSources})''
+ 	generate and store internally  the internal/external plugin CMakePluginGeneratorForSqueak . Each of these has its own Stream etc.for CMake
+         processThirdPartyLibraries This loops through the CMakeVMMaker-Libs that are associated with this config. these libs generate their own spiel
+ 	                           libraries can be downloaded here?
+ 	processPlugins   pretty complicated as well.
+ 	setExtraTargetProperties   <---this is important. It is used by "most" configs and sets compile flags, etc. This will be messed up for cut-n-paste I did .
+ 	self cmd: ''target_link_libraries'' params: self moduleName , '' ${LINKLIBS}''.  just puts in doc
+         postBuildActions  <--used by Mac configs need to clean this up.
+ 	saveFile  "Writes CMakeLists.txt"
+ 	generateBuildScript "this is config specific"
+ 	
+ 
+ ----------------------------------------------------------------------------------
+ SqeuakCogMTBuilder buildUnix32
+ 		self new buildUnix32
+ >>>		     SqueakCogMTUnixConfig new.   (CPlatformConfig initialize
+ 		     			   	  		   super initialize
+ 								   generateForRelease = true.
+ 				addExternalPlugins#();
+ 				addInternalPlugins#();
+ 1.				generateSources;
+ 2. 				generate.
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 1 SqueakCogMTUnixConfig generateSources
+  CPlatformConfig generateSources
+ 	"Generate whole VM + plugins sources"
+ 	| maker |
+ 
+ 	self validateSourcesPresent.  
+ 	self prepareForGeneration.
+ 	
+ 	"suppress questions and deprecation warnings during generation "
+ 	[[
+ 		
+ 		maker := self prepareVMMaker.
+ 	
+ 		maker interpreterClass: self interpreterClass.
+ 		self cogitClass ifNotNil: [:cg | 
+ 			maker cogitClass: cg.
+ 			cg initializeWithOptions: (maker instVarNamed: ''optionsDictionary'')
+ 		].
+ 		
+ 		maker generateEntire
+ 
+ 	] on: ProvideAnswerNotification do: [:ex | ex resume: true ]]
+ 	on: Deprecation do: [:ex | ex resume ].
+ 	
+ 	
+ 
+ 2. generate 
+ 	self generatePluginsList. writes PLUGINS.txt file from pluginsTemplate
+ 	self generateLicense.     writes LICENSE.txt file from licenseTemplate
+ 3.->	^CMakeVMGeneratorForSqueak generate:self    pass myself (a config) to a VMGenerator
+ 
+ CMakeVMGenerator generate
+ 3. generate
+ 	| intPlugins extPlugins |
+ 			
+ 	output := String new writeStream.
+ 	
+ 4.	config setGlobalOptions: self.
+ 	
+ 	self 
+ 5		printHeader;
+ 6		project: config executableName.
+ 
+ 7.	config setGlobalOptionsAfterDetermineSystem: self.
+ 
+ 8.	config setupDirectories: self.
+ 	
+ 9.	self message: ''${CMAKE_MODULE_PATH}''.
+ 	self set: ''CMAKE_CONFIGURATION_TYPES'' to: ''Release''.
+ 
+ 10.	config preferredIncludes 
+ 		do: [ :each | self includeDirectories: each ].
+ 	self includeDirectories: self includeDirs.	
+ 11	config standardIncludes 
+ 		do: [:each | self includeDirectories: each ].
+ 
+ 12	self addDefinitions: config compilerFlags.
+ 
+ 13.	config extraVMSettings: self.
+ 	
+ 14	self puts: ''add_executable('' , config executableName, '' '', config executableType, '' '' , self sources , '')''.
+ 	
+ 15	intPlugins := self generatePluginConfigs: config internalPlugins internal: true.  <---this area is complicated, but it generates Plugin files
+ 	extPlugins := self generatePluginConfigs: config externalPlugins internal: false.
+ 
+ 16	self processThirdpartyLibraries.
+ 	
+ 17	self processPlugins:  intPlugins, extPlugins.
+ 
+ 18.	config setExtraTargetProperties: self.    <---this is very important
+ 	
+ 	self cmd: ''target_link_libraries''
+ 		params: self moduleName , '' ${LINKLIBS}''.
+ 
+ 19.	config postBuildActions: self.
+ 	
+ 20	self saveFile.
+ 	self generateBuildScript. build.sh
+ 
+ 
+ 
+ 
+ 4. setGlobalOptions: maker
+ 
+ 	"set any CMake global options, before declaring a project in cmake file"
+ 	
+ 	maker set: ''CMAKE_C_COMPILER'' to: ''/usr/bin/gcc''.
+ 	maker set: ''CMAKE_CXX_COMPILER'' to: ''/usr/bin/g++''.
+ 
+ 5. printHeader
+ 	
+ 	self puts: ''# This is automatically generated file using '', self configurationName, '' on '',
+ 		Date current asString, '' '' , Time current asString;
+ 		puts: ''cmake_minimum_required(VERSION 2.6.2)''
+ 
+ 
+ 
+ 6 project: aProjectName
+ 	self cmd: ''project'' qparams: aProjectName{
+ 
+ 	     cmd: cmdName qparams: aString
+ 	     	"quoted params"
+ 		output nextPutAll: cmdName;
+ 		nextPutAll: ''("'';
+ 		nextPutAll: aString;
+ 		nextPutAll: ''")'';
+ 		cr
+         }
+ 
+ 7.SqueakIPhoneSqueakStackV3Config setGlobalOptionsAfterDetermineSystem: maker   <---here is a representative example
+ 	self setGlobalOptions: maker.	
+ 	maker 
+ 		set: ''CMAKE_OSX_SYSROOT'' 
+ 		to: (''/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer/SDKs/{1}{2}.sdk''
+ 			format: { self targetDevice. self sdkVersion })
+ 
+ 8. config setupDirectories:self
+    this creates directories.cmake with all the top/build/etc directories
+ 
+ 9. this is troubling, sets CMAKE_CONFIGURATION_TYPES to ''Release''.
+ 
+ 
+ 
+ 10. preferredIncludes
+ 	^ #(
+ 	''${buildDir}/''
+ 	''${platformsDir}/iOS/vm/iPhone'' "config.h is here. Why???"
+ 	)
+ 
+ 	this gets put int CMakeGenerator{
+ 
+ 	     includeDirectories: aString
+ 	     	 ^self cmd: ''include_directories'' params: aString
+ 
+ 
+ 11. standardIncludes <---this one is important
+ 
+ 
+ 12. addDefinitions:config compilerFlags
+     compilerFlags 
+ 	| releaseFlags |
+ 	
+ 	releaseFlags := self isGenerateForRelease 
+ 		ifTrue: [ self compilerFlagsRelease ]
+ 		ifFalse: [ self compilerFlagsDebug ].
+ 		
+ 	^ String streamContents: [ :stream |
+ 		((self commonCompilerFlags, releaseFlags)
+ 			asStringOn: stream 
+ 			delimiter: '' '' )]
+ 
+ 
+ 13. extraVMSettings: maker    very customizable method. 
+ 	| versionC |
+ 	self generateConfigH.  <---the issue Eliot raised. 
+ 	
+ 	
+ 	"output a fake version.c file"
+ 	
+ 	self write:
+ ''int vm_serial= 1;
+ char *vm_date= "<HERE IS SUPPOSED TO BE THE DATE>";
+ char *cc_version= "<HERE IS SUPPOSED TO BE gcc VERSION>";
+ char *ux_version= "<FAKE FROZEN VERSION FOR DEBUGGING PURPOSES>";
+ ''
+ 	toFile: ''version.c''.
+ 
+ 
+ 14.  ''add_executable(Squeak  ${coreSources} ${crossVMSources} ${platformVMSources} ${extraSources})''
+ 
+ 
+ 
+ 15. generatePluginConfigs: plugins internal: bool
+ 	"Answers a collection of CMakePluginGenerator instances"
+ 	
+ 	^ plugins collect: [:each | | plugin |
+ 		plugin := Smalltalk at: each.
+ 		plugin generateFor: self internal: bool.   <---InterpreterPlugin method added by CMakeVMMaker 
+ 	].
+ 
+ 	generateFor: aCMakeVMGenerator internal: aBoolean 
+ 		^ aCMakeVMGenerator 
+ 			generatePlugin: self 
+ 			internal: aBoolean
+ 			extraRules: nil
+ 	
+ 	so, for each plugin in the generator, invoke my generator method generatePlugin: internal:extraRules:
+ 	    THIS invokes CMakePluginGeneratorForSqueak new
+ 	     	    generate: aPlugin for: aCMakeVMGenerator internal: aBoolean extraRules: aBlock
+ 		    	    doNotGenerate := false.
+ 			    internal := aBoolean.
+ 			    plugin := aPlugin.
+ 			    vmGen := aCMakeVMGenerator.
+ 			    extraRules := aBlock.
+ 		            ^ self generate{
+ 
+ 						| name |
+ 						output := String new writeStream.
+ 
+ 						name := plugin moduleName.
+ 					#(	vmGen config setGlobalOptions: self.
+ 
+ 						self 
+ 							printHeader;
+ 							project: name;
+ 							"include directories generated for build"
+ 							include: ''../directories.cmake''.
+ 
+ 						self set: ''CMAKE_CONFIGURATION_TYPES'' to: ''Release''.
+ 					).
+ 
+ 						self message: (internal ifTrue: [ ''Adding internal plugin: ''] ifFalse: [''Adding external plugin: ''])  , name.
+ 
+ 						self 
+ 							set: #pluginName toString: name;
+ 							set: #pluginSrc toString: ''${srcPluginsDir}/'', name;
+ 							set: #pluginCross toString: ''${crossDir}/plugins/'', name;
+ 							set: #pluginPlatform toString: ''${targetPlatform}/plugins/'', name.
+ 
+ 						"clear LINKLIBS variable"
+ 						self set: #LINKLIBS to: ''.		
+ 
+ 						internal 
+ 							ifTrue: [ self puts: ''add_definitions(-DSQUEAK_BUILTIN_PLUGIN)''].
+ 
+ 						self addSources: { name , ''.c'' } prefixed: ''${pluginSrc}/''.
+ 
+ 						" default include directories for plugin "
+ 						self includeDirectories: ''${pluginSrc} ${pluginCross} ${targetPlatform}/plugins/${pluginName}''.
+ 
+ 						"Not needed because there are already there (inherited from main configuration)"
+ 						"self addDefinitions: vmGen config compilerFlags."
+ 
+ 						" perform config''s configureXYZ: message to apply per-plugin custom rules, if any "
+ 
+ 						vmGen config configurePlugin: plugin with: self.
+ 
+ 						extraRules ifNotNil: [ extraRules value: self ].
+ 
+ 						" generate a static lib for internal plugin, or shared for external"
+ 						internal ifTrue: [
+ 							self cmd: ''add_library'' params:  name , '' STATIC ${sources}''.
+ 						] ifFalse: [
+ 							self cmd: ''add_library'' params: name , '' SHARED ${sources}''.
+ 
+ 						"	self cmd: ''set_property'' params: ''TARGET '' , name , ''PROPERTY LINK_FLAGS -bundle''"
+ 						].
+ 
+ 						vmGen config extraPluginSettings: self.
+ 
+ 						self isExternal ifTrue: [
+ 							self cmd: ''target_link_libraries''
+ 								params: self moduleName , ''${LINKLIBS}''.
+ 							].
+ 
+ 						" see senders of #linkFlags "
+ 						self 
+ 							cmd: ''set_property'' 
+ 							params: ''TARGET'', name, ''PROPERTY LINK_FLAGS "${linkFlags}''.
+ 
+ 						"set dependencies"
+ 						self puts: ''IF ('',self moduleName , ''_dependencies)''.
+ 
+ 						self cmd: ''add_dependencies''
+ 							params: name , ''${'', self moduleName , ''_dependencies}''.
+ 
+ 						self puts: ''ENDIF ('',self moduleName , ''_dependencies)''.
+ 						self saveFile.
+ 
+ 
+ }
+ 		 	    
+ 
+ 
+ 
+ 
+ 
+ 16. processThirdpartyLibraries
+ 
+ 	config thirdpartyLibs do: [:each |
+ 		each generateFor: self ]{
+ 			      generateFor: aVMGenerator
+ 
+ 				      | libDir stream contents |
+ 
+ 				      vmGen := aVMGenerator.
+ 
+ 				      gen := CMakeGenerator new
+ 					      output: (String new writeStream).
+ 
+ 				      libDir := (aVMGenerator thirdpartyDir / self canonicalName) ensureDirectory.
+ 
+ 				      stream := String new writeStream.
+ 
+ 				      self generate.
+ 
+ 				      stream nextPutAll: (vmGen config fixLineEndsOf: gen output contents).
+ 
+ 				      contents := stream contents. 
+ 
+ 				      (self isFile: (libDir asFileReference / gen outputFileName) fullName hasContents: contents) ifFalse: [
+ 					      "contents changed, update the file. Because fucking cmake will force rebuild everything if we change its modification date
+ 					      without changing its contents"
+ 					      (FileStream forceNewFileNamed: (libDir asFileReference / gen outputFileName)) nextPutAll: contents; close.
+ 					      ].
+ 
+ 
+ 				      vmGen addSubdirectory:  vmGen thirdpartyDirName , ''/'' , self canonicalName.
+ 				      self defineGlobalTargets.
+ 
+ 
+ 			      }
+ 
+ 
+ 
+ 17 processPlugins: pluginGenerators
+ 	| libs libDeps |
+ 
+ 	libs := OrderedCollection new.
+ 	libDeps := Dictionary new.
+ 	pluginGenerators do: [:gen |
+ 		gen doNotGenerate ifFalse: [
+ 			gen isInternal 
+ 				ifTrue: [
+ 					libs add: gen plugin moduleName ]
+ 				ifFalse: [
+ 					"make main module to depend on external plugin, just to make sure it is built 
+ 					 before main module built"
+ 					self 
+ 						cmd: ''add_dependencies'' 
+ 						params: config executableName, '' '' , gen plugin moduleName ].
+ 				gen externalDependencies 
+ 					ifNotEmpty: [ :deps |
+ 						libDeps 
+ 							at: gen plugin moduleName
+ 							put: (deps fold: [ :a :b | a, '' '', b ]) ].
+ 			self addSubdirectory: gen plugin moduleName ] ].
+ 
+ 	self cmd: ''target_link_libraries'' params:  config executableName , '' '' ,
+ 		(libs inject: '' into: [:res :ea | res, '' '' , ea ]).
+ 
+ 	libDeps keysAndValuesDo: [ :moduleName :dependencies |
+ 		self 
+ 			cmd: ''add_dependencies'' 
+ 			params: moduleName, '' '', dependencies ].  
+ 
+ 	self generateExportsH: libs.
+ 
+ 
+ 18 setExtraTargetProperties: maker
+ 
+ 	"maker setTargetProperties: ''LINK_FLAGS ""''."
+ 		
+ 	maker puts: ''set_source_files_properties( ${srcVMDir}/cogit.c PROPERTIES 
+ 		COMPILE_FLAGS "-O1 -fno-omit-frame-pointer -momit-leaf-frame-pointer")''.
+ 		
+ 		
+ 	maker 
+ 		cmd: ''set_source_files_properties''
+ 		params: ''${targetPlatform}/vm/sqUnixHeartbeat.c PROPERTIES 
+ 		COMPILE_FLAGS "-O1 -fno-omit-frame-pointer"''.
+ 						
+ 	maker linkDirectories: ''${CMAKE_FIND_ROOT_PATH}/usr/lib/arm-linux-gnueabihf/''.
+ 	
+ 	maker addExternalLibraries: 
+ 		#(
+ 			''m''  "math lib"
+ 			''dl''  "dynamic loader"
+ 			''pthread'' "posix threads" 
+ 		).
+ 		
+ 	maker set: ''EXECUTABLE_OUTPUT_PATH'' toString: self outputDir fullName.
+ 	self addVMDrivers: maker.
+ 
+ 
+ 19. postBuildActions: gen
+ 
+ 	" override to add custom rules after all targets is defined "
+ 	
+ 	self write: self fixLibsTemplate toFile: ''fix_libs.cmake''.
+ 	
+ 	
+ 	gen
+ 		set: #bundlePath toString: ''${outputDir}/'', self executableName, ''.app'';
+ 		set: #pluginsRelPath toString: ''@executable_path/Plugins''.
+ 
+ 	gen
+ 		puts: ''
+ 		INSTALL(CODE "
+ 			set(externalModulesDir \"${externalModulesDir}\")
+ 			set(bundlePath \"${bundlePath}\")
+ 			set(pluginsRelPath \"${pluginsRelPath}\")
+ 			
+ 			include(fix_libs.cmake)
+ 		")''
+ 			
+ "					FILE(GLOB_RECURSE bLibs /${externalModulesDir}/*.*)
+ "
+ 
+ 
+ 
+ 
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>setExtraTargetProperties (in category 'pages') -----
+ setExtraTargetProperties
+ 	^HelpTopic
+ 		title:'set extra target properties'
+ 		contents:
+ '
+ SystemNavigation default browseMethodsWhoseNamesContain: ''setExtraTargetProperties'' 
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>settingCompilerFlags (in category 'pages') -----
+ settingCompilerFlags
+ 	^HelpTopic
+ 		title:'Setting Compiler Flags for a build'
+ 		contents:
+ 'Each buildType (SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo) may require custom compiler flags.
+ 
+ Trait TCPlatformConfigForSqueak compilerFlags method provides a method lookup that is invoked for a specific buildType.
+ These methods are named compilerFlagsXYZ corresponding to the buildTypes displayed above.
+ 
+ In the compilerFlagsXYZ method for your concrete configuration, you set the internal state of your configuration.
+ 
+ Note: there are two legacy internal states from CPlatformConfig in CMakeVMMaker for pharo "compilerFlagsDebug" and "compilerFlagsRelease" that are invoked
+ for backwards compatibility.
+ 
+ '!

Item was removed:
- ----- Method: CMakeVMakerConfigurationInfo>>buildDirectoriesForTarget (in category 'accessing') -----
- buildDirectoriesForTarget
- 
- 	^ buildDirectoriesForTarget!

Item was changed:
+ ----- Method: Linux32x86Config>>cogitClass (in category 'source generation') -----
- ----- Method: Linux32x86Config>>cogitClass (in category 'squeak compatibility') -----
  cogitClass
- 	"answer a class for machine code generation or nil"
- 	
  	^ StackToRegisterMappingCogit !

Item was changed:
+ ----- Method: Linux32x86Config>>commonCompilerFlags (in category 'compiler flags') -----
- ----- Method: Linux32x86Config>>commonCompilerFlags (in category 'squeak compatibility') -----
  commonCompilerFlags
+ 	self flag: 'tty'. "pull up common flags from subclasses on a refactoring pass."
+ 	^#()!
- 
- 	"Common compiler flags
- 	
- 	
- 	LSB_FIRST=1 means that target platform is little endian. 
- 	set it to 0 for big-endian platforms
- 	
- 	"
- 	
- 	^ {
- 		'-DLSB_FIRST=1'. 
- 		'-DUSE_GLOBAL_STRUCT=0'. 
- 		'-DCOGMTVM=0'. 
- 		'-m32'.
- 		'-DENABLE_FAST_BLT ' } 	
- 	!

Item was changed:
+ ----- Method: Linux32x86Config>>compilerFlags (in category 'compiler flags') -----
+ compilerFlags
+ 	|d |
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at:  buildType) value.
+ 
- ----- Method: Linux32x86Config>>compilerFlags (in category 'squeak compatibility') -----
- compilerFlags 
- 	| releaseFlags |
- 	
- 	releaseFlags := self isGenerateForRelease 
- 		ifTrue: [ self compilerFlagsRelease ]
- 		ifFalse: [ self compilerFlagsDebug ].
- 		
  	^ String streamContents: [ :stream |
+ 		((self commonCompilerFlags) collect: #withBlanksTrimmed as: Set)
- 		((self commonCompilerFlags, releaseFlags)
  			asStringOn: stream 
+ 			delimiter: ' ' ]!
- 			delimiter: ' ' )]!

Item was added:
+ ----- Method: Linux32x86Config>>compilerFlagsDebug (in category 'cmake') -----
+ compilerFlagsDebug
+ 
+ 	^ {
+ 		'-g3'. 
+ 		'-O0'. 
+ 		'-msse2'. 
+ 		'-D_GNU_SOURCE'. 
+ 		'-DITIMER_HEARTBEAT=1'. 
+ 		'-DNO_VM_PROFILE=1'. 
+ 		'-DDEBUGVM=1' }!

Item was added:
+ ----- Method: Linux32x86Config>>coreSources (in category 'sources') -----
+ coreSources
+ 	"files to include from src/vm dir"
+ 	^ #(
+ 		'cogit.c'
+ 		'gcc3x-cointerp.c'
+ 		)!

Item was changed:
  ----- Method: Linux32x86Config>>defaultInternalPlugins (in category 'plugins') -----
  defaultInternalPlugins
  " 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 "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"
-     InflatePlugin               "moduleName->ZipPlugin"
      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 added:
+ ----- Method: Linux32x86Config>>executableName (in category 'accessing') -----
+ executableName
+ 	self required!

Item was added:
+ ----- Method: Linux32x86Config>>extraPluginSettings: (in category 'plugin extra rules') -----
+ extraPluginSettings: maker
+ 	super extraPluginSettings: maker.  
+ 	maker set: #linkFlags toString: '${linkFlags} -m32'!

Item was added:
+ ----- Method: Linux32x86Config>>extraSources (in category 'sources') -----
+ extraSources
+ 	self flag: 'tty'. "what is this?"
+ 	^ 'version.c'!

Item was changed:
  ----- Method: Linux32x86Config>>generate (in category 'squeak compatibility') -----
  generate
+ 	self generatePluginsList. 
+ 	self generateLicense. 
  	^ CMakeVMGeneratorForSqueak generate: self !

Item was added:
+ ----- Method: Linux32x86Config>>linkFlags (in category 'accessing') -----
+ linkFlags
+ 	^ super linkFlags , ' -m32'
+ 
+ !

Item was added:
+ ----- Method: Linux32x86Config>>platformSources (in category 'sources') -----
+ 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'
+ 	'sqUnixThreads.c'
+ 	'sqUnixVMProfile.c'
+ 	)!

Item was added:
+ ----- Method: Linux32x86NewspeakCogSpurConfig>>prepareForGeneration (in category 'source generation') -----
+ prepareForGeneration
+ 	^ self prepareForCogGeneration
+ !

Item was added:
+ ----- Method: Linux32x86NewspeakCogV3Config>>prepareForGeneration (in category 'source generation') -----
+ prepareForGeneration
+ 	^ self prepareForCogGeneration
+ !

Item was added:
+ ----- Method: Linux32x86SqueakCogSpurConfig>>prepareForGeneration (in category 'source generation') -----
+ prepareForGeneration
+ 	^ self prepareForCogGeneration
+ !

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>cogitClass (in category 'source generation') -----
+ cogitClass
+ 	"answer a class for machine code generation or nil"
+ 	
+ 	^ StackToRegisterMappingCogit !

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>commonCompilerFlags (in category 'compiler flags') -----
+ commonCompilerFlags
+ 	^ {
+ 		'-DLSB_FIRST=1'. 
+ 	      '-m32' .
+ 	 } 	
+ 	!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>compilerFlagsRelease (in category 'cmake') -----
+ compilerFlagsRelease
+ "tty. cut-n-paste from Igor's CogUnixConfig
+ THIS FLAGS ARE CRASHING COMPILER 
+ -fschedule-insns2 
+ -fschedule-insns 
+ 
+ THIS FLAGS ARE CRASHING VM
+ -ftree-pre  
+ -fcaller-saves 
+ 
+ THIS FLAGS ARE WORKING 
+ -O1 -fthread-jumps -falign-functions -falign-jumps -falign-loops -falign-labels -fcrossjumping -fcse-follow-jumps -fcse-skip-blocks -fdelete-null-pointer-checks -fdevirtualize -fexpensive-optimizations -fgcse -fgcse-lm -finline-small-functions -findirect-inlining -fipa-sra -foptimize-sibling-calls -fpeephole2 -fregmove -freorder-blocks -frerun-cse-after-loop -freorder-functions  -fsched-interblock -fsched-spec -fstrict-aliasing -fstrict-overflow  -ftree-switch-conversion -ftree-vrp
+ 
+ THIS IS LIKE: -O2 -fno-tree-pre -fno-caller-saves 
+ 
+ "
+ 
+ 	^ {
+ 		'-g0'. 
+ 		'-O2'. 
+ 		'-fno-tree-pre'. 
+ 		'-fno-caller-saves'. 
+ 		'-msse2'. 
+ 		'-D_GNU_SOURCE'. 
+ 		'-DNDEBUG'. 
+ 		'-DITIMER_HEARTBEAT=1'. 
+ 		'-DNO_VM_PROFILE=1'. 
+ 		'-DDEBUGVM=0' }!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>coreSources (in category 'sources') -----
+ coreSources
+ 	"files to include from src/vm dir"
+ 	^ #(
+ 		'cogit.c'
+ 		'cointerp.c'
+ 		)!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>defaultExternalPlugins (in category 'plugins') -----
+ defaultExternalPlugins
+ 	""
+ 	self flag:'tty'. "UUIDPlugin does not build on my linux system. fix this"
+ 	^ (super defaultExternalPlugins copyWithoutAll: #(#UUIDPlugin #UnixOSProcessPlugin))!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>defaultInternalPlugins (in category 'plugins') -----
+ defaultInternalPlugins
+ 	""
+ 	self flag:'tty'. "UUIDPlugin does not build on my linux system. fix this"
+ 	^ (super defaultInternalPlugins copyWithoutAll: #(#VMProfileLinuxSupportPlugin))!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>executableName (in category 'accessing') -----
+ executableName
+ 	^ 'CogVM'!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3Config>>setExtraTargetProperties: (in category 'utils') -----
+ setExtraTargetProperties: maker
+ 
+ 	maker setTargetProperties: 'LIBS "-lptrhead -luuid"'.
+ 	maker setTargetProperties: 'LDFLAGS "-Wl -z now"'.
+ 
+ 	super setExtraTargetProperties: maker.
+ !

Item was changed:
  ----- Method: Linux64Config>>compilerFlags (in category 'squeak compatibility') -----
+ compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
- compilerFlags 
- 	| releaseFlags |
- 	
- 	releaseFlags := self isGenerateForRelease 
- 		ifTrue: [ self compilerFlagsRelease ]
- 		ifFalse: [ self compilerFlagsDebug ].
- 		
  	^ String streamContents: [ :stream |
  		((self commonCompilerFlags, releaseFlags)
  			asStringOn: stream 
  			delimiter: ' ' )]!

Item was changed:
  ----- Method: SqueakBSDConfig>>compilerFlags (in category 'squeak compatibility') -----
+ compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
- compilerFlags 
- 	| releaseFlags |
- 	
- 	releaseFlags := self isGenerateForRelease 
- 		ifTrue: [ self compilerFlagsRelease ]
- 		ifFalse: [ self compilerFlagsDebug ].
- 		
  	^ String streamContents: [ :stream |
  		((self commonCompilerFlags, releaseFlags)
  			asStringOn: stream 
  			delimiter: ' ' )]!

Item was changed:
  ----- Method: SqueakCMakeVMMakerAbstractBuilder>>initializeBuildTypeAndDirectoryInfo (in category 'initialization') -----
  initializeBuildTypeAndDirectoryInfo
  	"A dictionary of build types and the name of the directory they are stored in"
  	buildTypeAndDirectoryInfo := Dictionary new.
  	buildTypeAndDirectoryInfo 
  			at: #build put: 'build';
  			at: #buildAssert put:'build.assert';
  		      at: #buildAssertITimerHeartbeat put: 'build.assert.itimerheartbeat';
                    at: #buildDebug put: 'build.debug';                                                                     
  			at: #buildDebugITimerHeartbeat put: 'build.debug.itimerheartbeat';
  			at: #buildDebugMultiThreaded put: 'build.debug.multithreaded';
  			at: #buildITimerHeartbeat put: 'build.itimerheartbeat';
  			at: #buildMultiThreaded put: 'build.multithreaded';
  			at: #buildMultiThreadedAssert put: 'build.multithreaded.assert';
+ 			at: #buildMultiThreadedDebug put: 'build.multithreaded.debug';
+ 			at: #buildNone put: 'build.should.not.happen'.
- 			at: #buildMultiThreadedDebug put: 'build.multithreaded.debug'.
  !

Item was changed:
  ----- Method: SqueakMacOSCogV3DebugConfig>>compilerFlags (in category 'accessing') -----
  compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
+ 	^ String streamContents: [ :stream |
+ 		((self commonCompilerFlags, releaseFlags)
+ 			asStringOn: stream 
+ 			delimiter: ' ' )]!
-     ^ String streamContents:  [ :stream |
- 	self commonCompilerFlags asStringOn: stream delimiter: ' '. 
- 	self compilerFlagsDebug asStringOn: stream delimiter: ' ' ]!

Item was changed:
  ----- Method: SqueakMacOSStackV3DebugConfig>>compilerFlags (in category 'accessing') -----
  compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
+ 	^ String streamContents: [ :stream |
+ 		((self commonCompilerFlags, releaseFlags)
+ 			asStringOn: stream 
+ 			delimiter: ' ' )]!
-     ^ String streamContents:  [ :stream |
- 	self commonCompilerFlags asStringOn: stream delimiter: ' '. 
- 	self compilerFlagsDebug asStringOn: stream delimiter: ' ' ]!

Item was changed:
  ----- Method: SqueakMacOSX32x86Config>>compilerFlags (in category 'accessing') -----
+ compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
- compilerFlags 
- 	| releaseFlags |
- 	
- 	releaseFlags := self isGenerateForRelease 
- 		ifTrue: [ self compilerFlagsRelease ]
- 		ifFalse: [ self compilerFlagsDebug ].
- 		
  	^ String streamContents: [ :stream |
  		((self commonCompilerFlags, releaseFlags)
  			asStringOn: stream 
  			delimiter: ' ' )]!

Item was changed:
  ----- Method: SqueakMacOSXPowerPCConfig>>compilerFlags (in category 'accessing') -----
+ compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
- compilerFlags 
- 	| releaseFlags |
- 	
- 	releaseFlags := self isGenerateForRelease 
- 		ifTrue: [ self compilerFlagsRelease ]
- 		ifFalse: [ self compilerFlagsDebug ].
- 		
  	^ String streamContents: [ :stream |
  		((self commonCompilerFlags, releaseFlags)
  			asStringOn: stream 
  			delimiter: ' ' )]!

Item was changed:
  ----- Method: SqueakWin32x86CogFamilyConfig>>compilerFlags (in category 'directories') -----
+ compilerFlags
+ 	|d releaseFlags|
+ 	self break.
+ 	releaseFlags := self isGenerateForRelease .
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self compilerFlagsBuild];
+ 		at: #buildAssert  put: [self compilerFlagsAssert];
+ 		at: #buildAssertITimerHeartbeat  put: [self compilerFlagsAssertITimerHeartbeat];
+             at:#buildDebug  put: [self compilerFlagsDebug];   "located in CMakeVMMaker CPlatformConfig"
+ 		at: #buildDebugITimerHeartbeat  put: [self compilerFlagsDebugITimerHeartbeat ];
+ 		at: #buildDebugMultiThreaded  put: [self compilerFlagsDebugMultiThreaded];
+ 		at: #buildITimerHeartbeat  put: [self compilerFlagsIHeartbeatTimer];
+ 		at: #buildMultiThreaded  put: [self compilerFlagsMultiThreaded ];
+ 		at: #buildMultiThreadedAssert  put: [self compilerFlagsMultiThreadedAssert];
+ 		at: #buildMultiThreadedDebug   put: [self compilerFlagsMultiThreadedDebug ];
+ 		at: #buildNone put:[self compilerFlagsNoBuildType].
+      (d at: self buildType) value.
+ 
- compilerFlags 
- 	| releaseFlags |
- 	
- 	releaseFlags := self isGenerateForRelease 
- 		ifTrue: [ self compilerFlagsRelease ]
- 		ifFalse: [ self compilerFlagsDebug ].
- 		
  	^ String streamContents: [ :stream |
  		((self commonCompilerFlags, releaseFlags)
  			asStringOn: stream 
  			delimiter: ' ' )]!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>cogitClass (in category 'source generation') -----
+ cogitClass
+ 	"answer a class for machine code generation or nil"
+ 	^ StackToRegisterMappingCogit 
+ 
+ 
+ !

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>commonCompilerFlags (in category 'compiler flags') -----
+ commonCompilerFlags
+ 	^#()!

Item was changed:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlags (in category 'compiler flags') -----
- ----- Method: TCPlatformConfigForSqueak>>compilerFlags (in category 'squeak compatibility') -----
  compilerFlags
  	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsAssert (in category 'compiler flags') -----
+ compilerFlagsAssert
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsAssertITimerHeartbeat (in category 'compiler flags') -----
+ compilerFlagsAssertITimerHeartbeat
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsBuild (in category 'compiler flags') -----
+ compilerFlagsBuild
+ 	"backwards compatability with pharo. If adding, override compilerFlagsRelease in your configuration."
+ 	^self compilerFlagsRelease.!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsDebug (in category 'compiler flags') -----
+ compilerFlagsDebug
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsDebugITimerHeartbeat (in category 'compiler flags') -----
+ compilerFlagsDebugITimerHeartbeat
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsDebugMultiThreaded (in category 'compiler flags') -----
+ compilerFlagsDebugMultiThreaded
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsIHeartbeatTimer (in category 'compiler flags') -----
+ compilerFlagsIHeartbeatTimer
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsMultiThreaded (in category 'compiler flags') -----
+ compilerFlagsMultiThreaded
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsMultiThreadedAssert (in category 'compiler flags') -----
+ compilerFlagsMultiThreadedAssert
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsMultiThreadedDebug (in category 'compiler flags') -----
+ compilerFlagsMultiThreadedDebug
+ 	self required!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>compilerFlagsNoBuildType (in category 'compiler flags') -----
+ compilerFlagsNoBuildType
+ 	self shouldNotImplement.!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>configH (in category 'headers generation') -----
+ configH
+ 	" right now its like  that "
+ 	^ '
+ #ifndef __sq_config_h
+ #define __sq_config_h
+ 
+ /* explicit image width */
+ 
+ #define HAVE_INTERP_H 1
+ 
+ /* package options */
+ 
+ #define USE_X11 1
+ #define USE_X11_GLX 1
+ /* #undef       USE_QUARTZ */
+ /* #undef       USE_QUARTZ_CGL */
+ /* #undef       USE_RFB */
+ 
+ /* libraries */
+ 
+ /* #undef       HAVE_LIBX11 */
+ #define HAVE_LIBXEXT 1
+ #define HAVE_LIBDL 1
+ /* #undef       HAVE_DYLD */
+ /* #undef       HAVE_LIBFFI */
+ /* #undef       HAVE_ICONV */
+ 
+ /* #undef       USE_AUDIO_NONE */
+ /* #undef       USE_AUDIO_SUN */
+ /* #undef       USE_AUDIO_NAS */
+ /* #undef       USE_AUDIO_OSS */
+ /* #undef       USE_AUDIO_MACOSX */
+ /* #undef       OSS_DEVICE */
+ 
+ /* header files */
+ 
+ #define HAVE_UNISTD_H 1
+ /* #undef       NEED_GETHOSTNAME_P */
+ 
+ #define HAVE_DIRENT_H 1
+ /* #undef       HAVE_SYS_NDIR_H */
+ /* #undef       HAVE_SYS_DIR_H */
+ /* #undef       HAVE_NDIR_H */
+ #define HAVE_DLFCN_H 1
+ /* #undef       HAVE_ICONV_H */
+ 
+ #define HAVE_SYS_TIME_H 1
+ #define TIME_WITH_SYS_TIME 1
+ 
+ #define HAVE_SYS_FILIO_H 1
+ 
+ /* #undef       HAVE_SYS_AUDIOIO_H */
+ /* #undef       HAVE_SUN_AUDIOIO_H */
+ 
+ /* #undef       HAVE_PTY_H */
+ /* #undef       HAVE_UTIL_H */
+ #define HAVE_LIBUTIL_H 1
+ /* #undef       HAVE_STROPTS_H */
+ 
+ #define HAVE_GL_GL_H 1
+ /* #undef       HAVE_OPENGL_GL_H */
+ 
+ /* #undef       NEED_SUNOS_H */
+ 
+ 
+ #define HAVE_UUID_H
+ /* system calls/library functions */
+ 
+ #define AT_EXIT atexit
+ 
+ #define HAVE_TZSET 1
+ 
+ #define HAVE_OPENPTY 1
+ /* #undef       HAVE_UNIX98_PTYS */
+ 
+ #define HAVE_SNPRINTF 1
+ /* #undef       HAVE___SNPRINTF */
+ 
+ #define HAVE_MMAP 1
+ 
+ /* #undef       HAVE_DYLD */
+ 
+ #define HAVE_LANGINFO_CODESET 1
+ 
+ #define HAVE_ALLOCA 1
+ /* #undef       HAVE_ALLOCA_H */
+ 
+ #define HAVE_UNSETENV 1
+ 
+ #define HAVE_NANOSLEEP 1
+ 
+ /* widths of primitive types */
+ 
+ #define SIZEOF_INT 4
+ #define SIZEOF_LONG 4
+ #define SIZEOF_LONG_LONG 8
+ #define SIZEOF_VOID_P 4
+ 
+ /* structures */
+ 
+ #define HAVE_TM_GMTOFF 1
+ #define HAVE_TIMEZONE 1
+ 
+ /* typedefs */
+ 
+ /* #undef       size_t */
+ /* #undef       socklen_t */
+ 
+ #define squeakInt64 long long
+ 
+ /* architecture */
+ 
+ #define OS_TYPE "unix"
+ 
+ #define VM_HOST "i386-freebsd8.2"
+ #define VM_HOST_CPU "i386"
+ /* #undef       VM_HOST_VENDOR */
+ #define VM_HOST_OS "freebsd8.2"
+ #define VM_BUILD_STRING "Unix built on "__DATE__ " "__TIME__" Compiler: "__VERSION__
+ 
+ /* #undef       WORDS_BIGENDIAN */
+ /* #undef       DOUBLE_WORD_ALIGNMENT */
+ 
+ /* damage containment */
+ 
+ /* #undef       DARWIN */
+ 
+ #ifdef NEED_SUNOS_H
+ # include "sunos.h"
+ #endif
+ 
+ /* other configured variables */
+ 
+ #define SQ_VERSION "3.9a-7024"
+ #define VM_VERSION "3.9-7"
+ #define VM_MODULE_PREFIX ""
+ /* #undef VM_DLSYM_PREFIX */
+ #define VM_X11DIR "/usr/X11R6/lib"
+ 
+ /* avoid dependencies on glibc2.3 */
+ 
+ /* #undef HAVE_FEATURES_H */
+ 
+ #if defined(HAVE_FEATURES_H)
+ # include "glibc.h"
+ #endif
+ 
+ #endif /* __sq_config_h */
+ 																																																																					
+ 																																																																				'!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>executableName (in category 'accessing') -----
+ executableName
+ 	self required.
+ 
+ "browse subclasses of CPLatformConfig for context
+ ^'CogVM'
+ ^ 'CogMTVM'
+ ^ 'EventVM'.
+ ^'iStackVMSimulator'
+ ^ 'iStackVM'
+ ^'Squeak'
+ ^ 'StackVM'
+ 
+ 
+ 
+ "!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>extraPluginSettings: (in category 'plugin extra rules') -----
+ extraPluginSettings: maker
+ 	super extraPluginSettings: maker.  
+ "	This is a very active method depending on Platform 
+ 
+ 	CPlatformConfig browse.
+ 	
+ "!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>generate (in category 'accessing') -----
+ generate
+ 	self generatePluginsList. 
+ 	self generateLicense. 
+ 	^ CMakeVMGeneratorForSqueak generate: self !

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>generateConfigH (in category 'headers generation') -----
+ generateConfigH
+ 	"will fix that later"
+ 	self write: self configH toFile: 'config.h'!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>generateLicense (in category 'accessing') -----
+ generateLicense 
+ 	self 
+ 		write:  (self class licenseTemplate 
+ 			format: { self version })
+ 		toFile: 'LICENSE.txt'
+ 	!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>generatePluginsList (in category 'accessing') -----
+ 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 added:
+ ----- Method: TCPlatformConfigForSqueak>>interpreterClass (in category 'source generation') -----
+ interpreterClass
+ 	self required.
+ 	"
+ 	^ CoInterpreter
+ 	^ CoInterpreterMT
+ 	^ StackInterpreter
+ 	^ StackEvtAndroidInterpreter
+ 	??other
+ 	"!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>linkFlags (in category 'accessing') -----
+ linkFlags
+ 	self required
+ 
+ "example:
+ 	^ super linkFlags , ' -m32'
+ "!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>preferredIncludes (in category 'source files') -----
+ preferredIncludes
+ 	^ #()
+ 
+ "SystemNavigation default browseMethodsWhoseNamesContain: 'preferredIncludes'"
+ 	!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>prepareForGeneration (in category 'source generation') -----
+ prepareForGeneration
+ 	self required
+ 
+ 	"^self prepareForCogGeneration
+ 	  ^self prepareForStackVMGeneration
+ 		
+ 	  CPlatformConfig browse"
+ !

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>setExtraTargetProperties: (in category 'utils') -----
+ setExtraTargetProperties: maker
+ 	"override me if needed. Super call is to CPlatformConfig which does nothing"
+ 	super setExtraTargetProperties: maker.
+ "
+ SystemNavigation default browseMethodsWhoseNamesContain: 'setExtraTargetProperties:' 
+ 
+ "!

Item was added:
+ ----- Method: TCPlatformConfigForSqueak>>version (in category 'accessing') -----
+ version
+ 	^ ''!



More information about the Vm-dev mailing list