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

commits at source.squeak.org commits at source.squeak.org
Fri Jun 27 20:36:37 UTC 2014


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

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

Name: CMakeVMMakerSqueak-tty.78
Author: tty
Time: 27 June 2014, 4:36:22.989 pm
UUID: 9acc0adb-c449-428c-ae00-8957fe960f24
Ancestors: CMakeVMMakerSqueak-tty.77

Linux32x86SqueakCogV3NoGLConfig  is ugly, but it compiles.

Next up...replace the compilerFlags/cFlags with cC, cXX,lDFlags and libs such that the process is intuitive, repeatable and correct.

Then, flesh out the various buildTypes build.assert, etc so that they compile exactly as the GNU system does.
coreSources will change based on that, so put in infrastructure to support that.

Then, figure out how to run 'configure' and pipe in the results of config.h used by the configuration.

=============== Diff against CMakeVMMakerSqueak-tty.77 ===============

Item was changed:
  CMakeGeneratorForSqueak subclass: #CMakePluginGeneratorForSqueak
+ 	instanceVariableNames: 'plugin vmGen internal extraRules doNotGenerate externalDependencies'
- 	instanceVariableNames: ''
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'CMakeVMMakerSqueak'!
  
  !CMakePluginGeneratorForSqueak commentStamp: 'tty 5/16/2014 15:52' prior: 0!
  A CMakePluginGeneratorForSqueak overides some CMakeVMPluginGenerator methods for squeak compatibility. 
  
  Instance Variables
  !

Item was added:
+ ----- Method: CMakePluginGeneratorForSqueak>>generate:for:internal:extraRules: (in category 'squeak compatibility') -----
+ generate: aPlugin for: aCMakeVMGenerator internal: aBoolean extraRules: aBlock
+ 
+ 	doNotGenerate := false.
+ 	internal := aBoolean.
+ 	plugin := aPlugin.
+ 	vmGen := aCMakeVMGenerator.
+ 	extraRules := aBlock.
+ 		
+ 	^ self generate!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>append:toAll: (in category 'as yet unclassified') -----
+ append: aString toAll: list
+ 	"flatten the list, adding prefix for each element"
+ 	^ list inject: '' into: [:result :each | result, ' ', aString, each ].!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>buildDir (in category 'as yet unclassified') -----
+ buildDir
+ 	^ config buildDir!

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

Item was changed:
  ----- Method: CMakeVMGeneratorForSqueak>>generate (in category 'code generation') -----
  generate
  	"overriding CMakeVMGenerator to provide additional method calls"
  	| intPlugins extPlugins |
  			
  	output := String new writeStream.
  	config setGlobalOptions: self.
  	
  	self 
  		printHeader;
  		project: config executableName.
  
  	config setGlobalOptionsAfterDetermineSystem: self.
+ 
  	config setupDirectories: self.
  	
  	self message: '${CMAKE_MODULE_PATH}'.
  	self set: 'CMAKE_CONFIGURATION_TYPES' to: 'Release'.
  
  	config preferredIncludes 	do: [ :each | self includeDirectories: each ].
  	self includeDirectories: self includeDirs.	
  	config standardIncludes 	do: [:each | self includeDirectories: each ].
  
  	"tty. 
  	we replace the catchAll compilerFlags with methods that reflect the 'mvm' file used in the gnu-build system
  	i.e. oscogvm/build.linux32x86/squeak.cog.v3/build/mvm
  	My intent is to make setup of a new configuration easier for somebody coming from GNU-land"
  
+ "	self addDefinitions: config compilerFlags.
+ 
- 	"self addDefinitions: config compilerFlags."
  	config configureFlags do:[:each | self configureFlags: each].
  	config cC do:[:each | self cC: each].
  	config cXX do:[:each | self cXX: each].
  	config lDFlags do:[:each | self lDFlags: each].
  	config libs do:[:each | self libs: each].
+ "
  	self flag:'tty'. "This should be replaced with judicious use of above"
+ 	 self addDefinitions: config cFlags.   
- 	 self addDefinitions: config cFlags.   "CFLAGS=$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" 
  	self flag:'tty'. "end this should be replaced"
  
  	config extraVMSettings: self.
  	
  	self puts: 'add_executable(' , config executableName, ' ', config executableType, ' ' , self sources , ')'.
  	
  	intPlugins := self generatePluginConfigs: config internalPlugins internal: true.
  	extPlugins := self generatePluginConfigs: config externalPlugins internal: false.
  
  	self processThirdpartyLibraries.
  	
  	self processPlugins:  intPlugins, extPlugins.
  
  	config setExtraTargetProperties: self.
  	
  	self cmd: 'target_link_libraries'
  		params: self moduleName , ' ${LINKLIBS}'.
  
  	config postBuildActions: self.
+ 
- 	
  	self saveFile.
+ 	self generateBuildScript.
+ 
+ !
- 	self generateBuildScript.!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>generateBuildScript (in category 'as yet unclassified') -----
+ generateBuildScript
+ 
+ 	(FileStream forceNewFileNamed: (self buildDir / 'build.sh') fullName) nextPutAll: (config fixLineEndsOf: config buildScript); close.
+ 	!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>generateExportsH: (in category 'as yet unclassified') -----
+ generateExportsH: libs
+ 	| content |
+ 	content := String streamContents: [:str |
+ 	
+ 		str nextPutAll: '/* This is automatically generated file using CVMMaker on ',
+ 			Date current asString, ' ' , Time current asString , ' */'; cr.
+ 		
+ 		str nextPutAll: 
+ 'extern sqExport vm_exports[];
+ extern sqExport os_exports[];
+ '.
+ 		libs do: [:each | 
+ 			str nextPutAll: 'extern sqExport ', each ,'_exports [];'; cr ].
+ 		
+ 		str cr; nextPutAll: 'sqExport *pluginExports[] = {
+ 	vm_exports,
+ 	os_exports,
+ '.
+ 
+ 		libs do: [:each | 
+ 			str nextPutAll:  each ,'_exports,'; cr ].
+ 	
+ 		str nextPutAll: 'NULL
+ };'
+ 
+ 	].
+ 
+ 	(FileStream forceNewFileNamed: (self buildDir /'sqNamedPrims.h') fullName) nextPutAll: (config fixLineEndsOf: content); close.
+ 	!

Item was changed:
  ----- Method: CMakeVMGeneratorForSqueak>>generatePlugin:internal:extraRules: (in category 'as yet unclassified') -----
  generatePlugin: aPlugin internal: aBoolean extraRules: aBlock
  	" this method called back from plugin"
+ 	^ CMakePluginGenerator new
- 	^ CMakePluginGeneratorForSqueak new
  		generate: aPlugin for: self internal: aBoolean extraRules: aBlock!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>generatePluginConfigs:internal: (in category 'as yet unclassified') -----
+ generatePluginConfigs: plugins internal: bool
+ 	"Answers a collection of CMakePluginGenerator instances"
+ 	
+ 	^ plugins collect: [:each | | plugin |
+ 		plugin := Smalltalk at: each.
+ 		plugin generateFor: self internal: bool.
+ 	].
+ 	
+ !

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>includeDirs (in category 'sources management') -----
+ includeDirs
+ 
+ 	^ '${crossDir}/vm ${srcVMDir} ${targetPlatform}/vm ${buildDir}'.!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>processPlugins: (in category 'as yet unclassified') -----
+ 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.!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>saveFile (in category 'as yet unclassified') -----
+ saveFile
+ 	
+ 	config write: output contents toFile: (self outputFileName).
+ 	!

Item was added:
+ ----- Method: CMakeVMGeneratorForSqueak>>sources (in category 'as yet unclassified') -----
+ sources
+ 
+ 	self set: #coreSources to: 
+ 		(self append: '${srcVMDir}/' toAll: config coreSources).
+ 		
+ 	self set: #platformVMSources to: 
+ 		(self append: '${targetPlatform}/vm/' toAll: config platformSources).
+ 	
+ 	
+ 	self set: #crossVMSources to: 
+ 		(self append: '${crossDir}/vm/' toAll: config crossSources).
+ 		
+ 	self set: #extraSources to: config extraSources.
+ 	
+ 	^ '${coreSources} ${crossVMSources} ${platformVMSources} ${extraSources}'!

Item was changed:
  ----- Method: CMakeVMMakerSqueakBuildersHelp class>>pages (in category 'as yet unclassified') -----
  pages
+ 	^#(builders queryingBuilders buildTypes  scratch)!
- 	^#(builders queryingBuilders buildTypes scratch)!

Item was changed:
  ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>pages (in category 'pages') -----
  pages
+ 	^#(overview prerequisites  terms igorStasenkoDesign  buildersAndConfigs plugins )!
- 	^#(overview prerequisites igorStasenkoDesign  buildersAndConfigs terms )!

Item was added:
+ ----- Method: CMakeVMMakerSqueakDeveloperHelp class>>plugins (in category 'pages') -----
+ plugins
+ 	^HelpTopic
+ 		title:'Plugins'
+ 		contents:'
+ 
+ TODO explain the design and methodology of the ''plugin extra rules'' protocol in
+ 
+ 
+ provide example of mapping from plugins.int to defaultInternalPlugins
+ 
+ |s|
+ Transcript clear.
+ s:=SortedCollection new.
+ InterpreterPlugin allSubclassesDo:[:p|
+ 	p moduleName = ''B2DPlugin''
+ 		ifTrue:[Transcript show:p name].
+ 	s add: (p moduleName)].
+ 
+ Transcript show: s.
+ 
+ SqueakUnixConfig browse
+ '!

Item was added:
+ ----- Method: CMakeVMMakerSqueakRedirectMethodsWithArgTest>>testAddVMDrivers (in category 'as yet unclassified') -----
+ testAddVMDrivers
+ 	self flag:'tty'. "Is the self shouldnt sufficient?"
+ 	#(#SqueakMacintoshConfig #SqueakUnixConfig #SqueakWindowsConfig ) 
+ 		do:[:each | 
+ 			(Smalltalk at:each) 
+ 				allSubclassesDo:[:configuration | | o buildTypes vmGenerator|
+ 					o:= configuration new.
+ 					(o excludeFromBuild not) & (configuration isAbstractBaseClass not)
+ 						ifTrue:[
+ 							buildTypes:=o availableBuildTypes copyWithoutAll:#(#buildNone).
+ 							buildTypes do:[:buildType |
+ 								o configureForBuildType: buildType.
+ 								vmGenerator:=CMakeVMGeneratorForSqueak new.
+ 								vmGenerator config: o.
+ 								vmGenerator output:(String new writeStream).
+ 								self shouldnt: [o addVMDrivers: vmGenerator] raise: Error]]]].
+ !

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDrivers: (in category 'cmake buildType redirects') -----
+ addVMDrivers: aMaker
+ 	"Route this message send to the message appropriate for my buildType "
+ 	|d |
+ 	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
+ 	d 
+ 		at: #build put: [self addVMDriversBuild: aMaker];
+ 		at: #buildAssert  put: [self addVMDriversBuildAssert: aMaker];
+ 		at: #buildAssertITimerHeartbeat  put: [self addVMDriversBuildAssertITimerHeartbeat: aMaker];
+             at:#buildDebug  put: [self addVMDriversBuildDebug: aMaker];   
+ 		at: #buildDebugITimerHeartbeat  put: [self addVMDriversBuildDebugITimerHeartbeat: aMaker ];
+ 		at: #buildITimerHeartbeat  put: [self addVMDriversBuildITimerHeartbeat: aMaker];
+ 		at: #buildMultiThreaded  put: [self addVMDriversBuildMultiThreaded: aMaker ];
+ 		at: #buildMultiThreadedAssert  put: [self addVMDriversBuildMultiThreadedAssert: aMaker];
+ 		at: #buildMultiThreadedDebug   put: [self addVMDriversBuildMultiThreadedDebug: aMaker ];
+ 		at: #buildNone put:[self addVMDriversNoBuildType:  aMaker].
+ 	^(d at: buildType) value
+ !

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuild: (in category 'cmake buildType redirects') -----
+ addVMDriversBuild: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildAssert: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildAssert: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildAssertITimerHeartbeat: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildAssertITimerHeartbeat: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildDebug: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildDebug: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildDebugITimerHeartbeat: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildDebugITimerHeartbeat: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildITimerHeartbeat: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildITimerHeartbeat: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildMultiThreadedAssert: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildMultiThreadedAssert: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversBuildMultiThreadedDebug: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildMultiThreadedDebug: aMaker
+ 	"SqueakUnixConfig browse"
+ 	self subclassResponsibility.!

Item was added:
+ ----- Method: CPlatformConfigForSqueak>>addVMDriversNoBuildType: (in category 'cmake buildType redirects') -----
+ addVMDriversNoBuildType: aMaker
+ 	"SHOULD NOT GET HERE"
+ 	self shouldNotImplement.
+ !

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>compilerFlags (in category 'cmake buildType redirects') -----
  compilerFlags
  	"compilerFlags routes to cFlagsXYZ in Squeak implementation.  
  	This represents the CFLAGS line in the GNU system's mvm file that reads like CFLAGS=''$OPT -msse2 -D_GNU_SOURCE..'' "
  	|d |
  	self flag:'tty'. "figure out what from cC, cXX, lDFlags, libs to pipe into here once system is functioning"
  	d:= SqueakCMakeVMMakerAbstractBuilder default buildTypeAndDirectoryInfo copy.
  	d 		
  		at: #build put: [self cFlagsBuild];
  		at: #buildAssert  put: [self cFlagsBuildAssert];
  		at: #buildAssertITimerHeartbeat  put: [self cFlagsBuildAssertITimerHeartbeat];
              at:#buildDebug  put: [self cFlagsBuildDebug];   
  		at: #buildDebugITimerHeartbeat  put: [self cFlagsBuildDebugITimerHeartbeat ];
  		at: #buildITimerHeartbeat  put: [self cFlagsBuildITimerHeartbeat];
  		at: #buildMultiThreaded  put: [self cFlagsBuildMultiThreaded];
  		at: #buildMultiThreadedAssert  put: [self cFlagsBuildMultiThreadedAssert];
  		at: #buildMultiThreadedDebug   put: [self cFlagsBuildMultiThreadedDebug ];
  		at: #buildNone put:[self cFlagsNoBuildType].
  	^(d at: buildType) value
  !

Item was removed:
- ----- Method: Linux32x86Config>>cFlagsBuildDebug (in category 'cmake buildType redirects') -----
- cFlagsBuildDebug
- 	^ self configHBuild!

Item was changed:
  ----- Method: Linux32x86Config>>commonCompilerFlags (in category 'compiler flags') -----
  commonCompilerFlags
  	"avoid premature optimization. push this decision down lower if it is needed at all"
+ 	^{	'-DLSB_FIRST=1'. 
+ 		'-DUSE_GLOBAL_STRUCT=0'. 
+ 		'-DCOGMTVM=1'. 
+ 		'-m32'}
- 	^{'-m32'}
  !

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"
      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>>preferredIncludesBuild (in category 'source files') -----
  preferredIncludesBuild
  	self flag:'tty'. "pharo does not support newspeak or sista., yet sets this in CogUnixConfig. Is this appropriate here? Revisit when coding newspeak etc"
+ 	^ #( '${targetPlatform}/plugins/B3DAcceleratorPlugin')
- 	^ #(  '${targetPlatform}/plugins/AioPlugin'
-  '${targetPlatform}/plugins/B3DAcceleratorPlugin'
-  '${targetPlatform}/plugins/DropPlugin'
-  '${targetPlatform}/plugins/FilePlugin'
-  '${targetPlatform}/plugins/HostWindowPlugin'
-  '${targetPlatform}/plugins/JPEGReadWriter2Plugin'
-  '${targetPlatform}/plugins/LocalePlugin'
-  '${targetPlatform}/plugins/Mpeg3Plugin'
-  '${targetPlatform}/plugins/PseudoTTYPlugin'
-  '${targetPlatform}/plugins/SerialPlugin'
-  '${targetPlatform}/plugins/SoundPlugin'
-  '${crossDir}/plugins/SoundGenerationPlugin'
-  '${targetPlatform}/plugins/SqueakSSL'
-  '${targetPlatform}/plugins/UnixOSProcessPlugin'
-  '${targetPlatform}/plugins/AsynchFilePlugin'
-  '${targetPlatform}/plugins/BochsIA32Plugin'
-  '${targetPlatform}/plugins/FileCopyPlugin'
-  '${targetPlatform}/plugins/FloatMathPlugin'
-  '${targetPlatform}/plugins/InternetConfigPlugin'
-  '${targetPlatform}/plugins/JoystickTabletPlugin'
-  '${targetPlatform}/plugins/MIDIPlugin'
-  '${targetPlatform}/plugins/PrintJobPlugin'
-  '${targetPlatform}/plugins/SecurityPlugin'
-  '${targetPlatform}/plugins/SocketPlugin'
-  '${targetPlatform}/plugins/SqueakFFIPrims'
-  '${targetPlatform}/plugins/UUIDPlugin'    
-  '${targetPlatform}/plugins/XDisplayControlPlugin'
  
- )
- 
- 
  	
  
  "SystemNavigation default browseMethodsWhoseNamesContain: 'preferredIncludes'"
  	
  !

Item was changed:
  ----- Method: Linux32x86Config>>setExtraTargetPropertiesBuild: (in category 'utils') -----
  setExtraTargetPropertiesBuild: aMaker
  	self flag:'tty'. "I am nervous about this method up here in this class, but pharo has it in CogUnixConfig, so using as is for now"
  
  	aMaker setTargetProperties: 'LINK_FLAGS "-m32"'.
  		
  	aMaker puts: 'set_source_files_properties( ${srcVMDir}/cogit.c PROPERTIES 
  		COMPILE_FLAGS "-O1 -fno-omit-frame-pointer -momit-leaf-frame-pointer -mno-rtd -mno-accumulate-outgoing-args")'.
  		
  	
  	aMaker 
  		cmd: 'set_source_files_properties'
  		params: ' ${targetPlatform}/vm/sqUnixHeartbeat.c PROPERTIES 
  		COMPILE_FLAGS "-O1 -fno-omit-frame-pointer -mno-rtd -mno-accumulate-outgoing-args"'.
  	
  	aMaker addExternalLibraries: 
  		#(
  			'uuid'  ""
  			'ssl'  ""
  			'crypto' ""
+ 			'm'  "math lib"
+ 			'dl'  "dynamic loader"
+ 			'pthread' "posix threads" 
  		).
  					
+ 	aMaker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir fullName.
+ 	self addVMDrivers: aMaker.!
- !

Item was changed:
  ----- Method: Linux32x86Config>>setGlobalOptionsAfterDetermineSystemBuild: (in category 'utils') -----
  setGlobalOptionsAfterDetermineSystemBuild: aMaker
+ 	"SystemNavigation default browseMethodsWhoseNamesContain: 'setGlobalOptionsAfterDetermineSystemBuild:'"
+ "
+ 	aMaker set: 'CMAKE_C_COMPILER' to: '/usr/bin/gcc'.
+ 	aMaker set: 'CMAKE_CXX_COMPILER' to: '/usr/bin/g++'.
+ "!
- 	"do nothing (so far) on Unix.
- 	
- 	SystemNavigation default browseMethodsWhoseNamesContain: 'setGlobalOptionsAfterDetermineSystemBuild:'
- 	"!

Item was changed:
  ----- Method: Linux32x86Config>>setGlobalOptionsBuild: (in category 'utils') -----
  setGlobalOptionsBuild: aMaker
+ 	"do nothing (so far) on Unix.
+ 	
+ 	SystemNavigation default browseMethodsWhoseNamesContain: 'setGlobalOptionsBuild:'
+ 	"
- 
- 	aMaker set: 'CMAKE_C_COMPILER' to: '/usr/bin/gcc'.
- 	aMaker set: 'CMAKE_CXX_COMPILER' to: '/usr/bin/g++'.
  !

Item was changed:
  ----- Method: Linux32x86SqueakCogV3Config>>cFlagsBuild (in category 'cmake buildType redirects') -----
  cFlagsBuild
  	"Some gcc versions (3.4*) create a broken VM using -O2, so try -O1 if you have problems"
+ 	^'-g -O2  -m32   -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG -DLSB_FIRST=1
+ 		-DUSE_GLOBAL_STRUCT=0  -DDEBUGVM=0  
+ 		-DCOGMTVM=0'!
- 	^'-g -O2 -DDEBUGVM=0   -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG '!

Item was changed:
  ----- Method: Linux32x86SqueakCogV3Config>>cFlagsBuildAssertITimerHeartbeat (in category 'cmake buildType redirects') -----
  cFlagsBuildAssertITimerHeartbeat
+ 	^'-g3 -O1 -m32 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -msse2 
+          -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0  -DITIMER_HEARTBEAT=1  -DLSB_FIRST=1 -DUSE_GLOBAL_STRUCT=0  -DDEBUGVM=0 '!
- 	^'-g3 -O1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DDEBUGVM=0 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1'!

Item was changed:
  ----- Method: Linux32x86SqueakCogV3Config>>compilerFlagsBuild (in category 'cmake buildType redirects') -----
  compilerFlagsBuild
  	^{}!

Item was added:
+ Linux32x86SqueakCogV3Config subclass: #Linux32x86SqueakCogV3NoGLConfig
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'CMakeVMMakerSqueak-Linux32x86'!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3NoGLConfig>>configHBuild (in category 'as yet unclassified') -----
+ configHBuild
+ 	" right now its like  that "
+ 	^ '/* config.h.  Generated by configure.  */
+ /* config.h.in -- template for config.h			-*- C -*-
+  *
+  *   Copyright (C) 1996-2007 by Ian Piumarta and other authors/contributors
+  *                              listed elsewhere in this file.
+  *   All rights reserved.
+  *
+  *   This file is part of Unix Squeak.
+  *
+  *   Permission is hereby granted, free of charge, to any person obtaining a copy
+  *   of this software and associated documentation files (the "Software"), to deal
+  *   in the Software without restriction, including without limitation the rights
+  *   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+  *   copies of the Software, and to permit persons to whom the Software is
+  *   furnished to do so, subject to the following conditions:
+  *
+  *   The above copyright notice and this permission notice shall be included in
+  *   all copies or substantial portions of the Software.
+  *
+  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+  *   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+  *   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+  *   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+  *   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+  *   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+  *   SOFTWARE.
+  */
+ 
+ /* Author: Ian.Piumarta at squeakland.org
+  *
+  * Last edited: 2006-04-23 12:34:41 by piumarta on emilia.local
+  */
+ 
+ #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 0
+ /* #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
+ #define	HAVE_ICONV_H 1
+ 
+ #define	HAVE_SYS_TIME_H 1
+ #define	TIME_WITH_SYS_TIME 1
+ 
+ /* #undef	HAVE_SYS_FILIO_H */
+ 
+ /* #undef	HAVE_SYS_AUDIOIO_H */
+ /* #undef	HAVE_SUN_AUDIOIO_H */
+ 
+ #define	HAVE_PTY_H 1
+ /* #undef	HAVE_UTIL_H */
+ /* #undef	HAVE_LIBUTIL_H */
+ #define	HAVE_STROPTS_H 1
+ 
+ /* #undef	HAVE_GL_GL_H */
+ /* #undef	HAVE_OPENGL_GL_H */
+ 
+ /* #undef	NEED_SUNOS_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
+ #define	HAVE_ALLOCA_H 1
+ 
+ #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 "x86_64-linux-gnu"
+ #define	VM_HOST_CPU "x86_64"
+ /* #undef	VM_HOST_VENDOR */
+ #define	VM_HOST_OS "linux-gnu"
+ #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 "4.2-0"
+ #define VM_VERSION "4.0-3020"
+ #define VM_MODULE_PREFIX ""
+ /* #undef VM_DLSYM_PREFIX */
+ #define VM_X11DIR "/usr/lib"
+ 
+ /* avoid dependencies on glibc2.3 */
+ 
+ #define HAVE_FEATURES_H 1
+ 
+ #if defined(HAVE_FEATURES_H)
+ # include "glibc.h"
+ #endif
+ 
+ #endif /* __sq_config_h */
+ 
+ 																																																																					
+ 																																																																				'!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3NoGLConfig>>defaultExternalPlugins (in category 'as yet unclassified') -----
+ defaultExternalPlugins
+ 	"Removed the B3DAcceleratorPlugin since we don't have OpenGL bindings here"
+ 	^ (super defaultExternalPlugins copyWithoutAll: #(#B3DAcceleratorPlugin #ThreadedIA32FFIPlugin #InternetConfigPlugin #FT2Plugin #UUIDPlugin))!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3NoGLConfig>>defaultInternalPlugins (in category 'as yet unclassified') -----
+ defaultInternalPlugins
+ 	"Removed the B3DAcceleratorPlugin since we don't have OpenGL bindings here"
+ 	^ (super defaultInternalPlugins copyWithoutAll: #(#IA32ABIPlugin #BitBltSimulation #JoystickTabletPlugin #StarSqueakPlugin #SurfacePlugin #SqueakFFIPrims #ThreadedIA32FFIPlugin ))!

Item was added:
+ ----- Method: Linux32x86SqueakCogV3NoGLConfig>>libsBuild (in category 'as yet unclassified') -----
+ libsBuild
+ 	 ^ '-lSM -lICE -ldl  -lpthread -lm -lnsl -lX11'!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuild: (in category 'cmake buildType redirects') -----
+ addVMDriversBuild: aMaker
+ "
+ libICE
+ ICE is the Inter Client Exchange protocol, part of X11
+ 
+ libSM
+ session management library for X11
+ 
+ "
+ 	 self 
+ 		addDriver: 'vm-display-null' 
+ 		sources: #( 
+ 			'${targetPlatform}/vm-display-null/sqUnixDisplayNull' )
+ 		generator: aMaker
+ 		externalLibs: #();
+ 		
+ 		
+ 		addDriver: 'vm-display-X11' 
+ 		sources: #( 
+ 			'${targetPlatform}/vm-display-X11/sqUnixX11'
+ 			'${targetPlatform}/vm-display-X11/sqUnixMozilla' )
+ 		generator: aMaker
+ 		
+ 		"-lSM -lICE -ldl -lGL -lpthread -lm -lnsl -lX11'"
+ 		externalLibs: #( SM ICE GL X11 nsl dl);
+ 		
+ 
+ 		addDriver: 'vm-sound-ALSA' 
+ 		sources: #( 
+ 			'${targetPlatform}/vm-sound-ALSA/sqUnixSoundALSA' )
+ 		generator: aMaker
+ 		externalLibs: #();
+ 
+ 		addDriver: 'vm-sound-null' 
+ 		sources: #( 
+ 			'${targetPlatform}/vm-sound-null/sqUnixSoundNull' )
+ 		generator: aMaker
+ 		externalLibs: #().
+ 	
+ "
+ vm-display-null
+ 	vm-display-X11
+ 	vm-sound-ALSA
+ 	vm-sound-null"!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildAssert: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildAssert: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildAssertITimerHeartbeat: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildAssertITimerHeartbeat: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildDebug: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildDebug: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildDebugITimerHeartbeat: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildDebugITimerHeartbeat: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildITimerHeartbeat: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildITimerHeartbeat: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildMultiThreaded: (in category 'utils') -----
+ addVMDriversBuildMultiThreaded: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildMultiThreadedAssert: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildMultiThreadedAssert: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>addVMDriversBuildMultiThreadedDebug: (in category 'cmake buildType redirects') -----
+ addVMDriversBuildMultiThreadedDebug: aMaker
+ 	^self addVMDriversBuild: aMaker!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureAsynchFilePlugin: (in category 'plugin extra rules') -----
+ configureAsynchFilePlugin: maker
+ 
+ 	maker addPlatformSources:
+ 	#( 
+ 		'sqUnixAsynchFile.c'
+ 	)
+ 
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>configureB3DAcceleratorPlugin: (in category 'plugin extra rules') -----
+ configureB3DAcceleratorPlugin: maker
+ 	"extra rules for B3DAcceleratorPlugin"
+ 	
+ 	super configureB3DAcceleratorPlugin: maker.
+ 	
+ 	maker 
+ 		addPlatformSources: #( 'sqUnixOpenGL.c' ) 
+ 		
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>configureDropPlugin: (in category 'plugin extra rules') -----
+ configureDropPlugin: maker
+ 	"extra rules for DropPlugin"
+ 	super configureDropPlugin: maker.  
+ 	maker includeDirectories: '${crossDir}/plugins/FilePlugin'. 
+ 	maker addPlatformSources: #( 'sqUnixDragDrop')
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>configureFT2Plugin: (in category 'plugin extra rules') -----
+ configureFT2Plugin: maker 
+ 
+ 	"extra rules for FT2Plugin" 
+ 	
+ 	maker addExternalLibraries: #('freetype' ).
+ 	
+ 	"
+ 	ft2build.h. says: 
+ 	<prefix>/include/freetype2' must be in your current inclusion path "
+ 	self flag:'tty'. "is this generic?"
+ 	maker includeDirectories:  '/usr/include/freetype2'!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureFileCopyPlugin: (in category 'plugin extra rules') -----
+ configureFileCopyPlugin: maker
+ 	"extra rules for DropPlugin"
+ 
+ 	maker addPlatformSources: #( 'sqUnixFileCopyPlugin')
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>configureFilePlugin: (in category 'plugin extra rules') -----
+ configureFilePlugin: maker
+ 	"extra rules for FilePlugin"
+ 
+ 	super configureFilePlugin: maker.  
+ 	
+ 	maker addPlatformSources: #( 'sqUnixFile')!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureInternetConfigPlugin: (in category 'plugin extra rules') -----
+ configureInternetConfigPlugin: maker
+ 	super configureInternetConfigPlugin: maker.
+ 	maker addPlatformSources: #( 'sqUnixInternetConfiguration' )!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureJoystickTabletPlugin: (in category 'plugin extra rules') -----
+ configureJoystickTabletPlugin: maker 
+ 	"extra rules for JoystickTabletPlugin"
+ 	
+ 	super configureJoystickTabletPlugin: maker.  
+ 	maker addPlatformSources:
+ 		#( 'sqUnixJoystickTablet' )
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>configureLocalePlugin: (in category 'plugin extra rules') -----
+ configureLocalePlugin: maker 
+ 	"extra rules for LocalePlugin"
+ 
+ 	super configureLocalePlugin:  maker.
+ 	
+ 	maker addPlatformSources: #( 'sqUnixLocale.c')
+ 	!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureMIDIPlugin: (in category 'plugin extra rules') -----
+ configureMIDIPlugin: maker 
+ 	"extra rules for MIDIPlugin"
+ 
+ 	super configureMIDIPlugin: maker.  
+ 
+ 	"requires ALSA"
+ 
+ 	maker addPlatformSources: #( 'sqUnixMIDI')!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureSecurityPlugin: (in category 'plugin extra rules') -----
+ configureSecurityPlugin: maker 
+ 	"extra rules for MIDIPlugin"
+ 
+ 	super configureSecurityPlugin: maker.
+ 	
+ 	maker addPlatformSources: #( 'sqUnixSecurity')!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureSerialPlugin: (in category 'plugin extra rules') -----
+ configureSerialPlugin: maker 
+ 	"extra rules for SerialPlugin"
+ 	
+ 	maker addPlatformSources: #( 'sqUnixSerial')!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureSocketPlugin: (in category 'plugin extra rules') -----
+ configureSocketPlugin: maker 
+ 	"extra rules for SocketPlugin"
+ 	
+ 	maker addPlatformSources: #( 'sqUnixSocket')!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureSoundPlugin: (in category 'plugin extra rules') -----
+ configureSoundPlugin: maker 
+ 	"extra rules for SoundPlugin"
+ 	
+ 	maker addPlatformSources: #( 'sqUnixSound').
+ 	maker addExternalLibraries: #( 'asound' )!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureSqueakSSLPlugin: (in category 'plugin extra rules') -----
+ configureSqueakSSLPlugin: maker 
+ 	"extra rules for SqueakSSLPlugin"
+ 	
+ 	maker addPlatformSources: #( 'sqUnixOpenSSL.c').
+ 	
+ 	maker addExternalLibraries: #('ssl' ).
+ 	!

Item was added:
+ ----- Method: SqueakUnixConfig>>configureUUIDPlugin: (in category 'plugin extra rules') -----
+ configureUUIDPlugin: maker 
+ 	"extra rules for UUIDPlugin"
+ 
+ 	super configureUUIDPlugin: maker.    
+ 	
+ 	maker includeDirectories: '/usr/include/uuid'.
+ 	
+ 	maker addPlatformSources:
+ 		#( 'sqUnixUUID.c')
+ 
+ 
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>configureUnixOSProcessPlugin: (in category 'plugin extra rules') -----
+ configureUnixOSProcessPlugin: maker 
+ 	"extra rules for UnixOSProcessPlugin"
+ 
+ 	maker includeDirectories: '${crossDir}/plugins/FilePlugin'.
+ 	maker includeDirectories: '${crossDir}/plugins/SocketPlugin'.
+ 	
+ 	maker addDefinitions: '-DSQAIO_H=\"sqaio.h\"'
+ !

Item was added:
+ ----- Method: SqueakUnixConfig>>extraPluginSettings: (in category 'plugin extra rules') -----
+ extraPluginSettings: maker
+ 
+ 	maker isExternal ifTrue: [
+ 		"copy lib to results dir "
+ 		maker set: 'LIBRARY_OUTPUT_PATH' to: '${outputDir}' 
+ 	].
+ !



More information about the Vm-dev mailing list