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

commits at source.squeak.org commits at source.squeak.org
Sun Apr 19 15:38:19 UTC 2015


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

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

Name: CMakeVMMakerSqueak-tty.112
Author: tty
Time: 19 April 2015, 11:40:13.715 am
UUID: 42e4dc48-b405-4aa6-a168-1baf4602e778
Ancestors: CMakeVMMakerSqueak-tty.111

stage save.

squeak.cog.v3 configuration outputs valid CMake for buildType #buildAssert
.

However the gcc 4.x (potential) bug from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15132
blows up the build at the NoDbgRegParms macro expansion.

If one toggles the CMake generated config.h file at the line

/* #undef NoDbgRegParms */
among these 
#define NoDbgRegParms
#define NoDbgRegParms __attribute__((deprecated))
#define NoDbgRegParms __attribute__((regparm(0)))

one triggers the bug with the regparm(0) attribute.
The other two build to completion (but are NOT assert enabled)

So, at least on gcc 4.x this is NOT an assert build.

=============== Diff against CMakeVMMakerSqueak-tty.111 ===============

Item was changed:
  ----- Method: CMakeVMGeneratorForSqueak>>generateByTemplate (in category 'code generation') -----
  generateByTemplate
  	"attempt to move way from string based writing to  template based. Think Seaside renderOn composition"
  	| extPlugins intPlugins |
  	self flag: 'tty'. "refactor so that the cascade reflects CMake terminilogy"
- self break.
  	output := String new writeStream.
  	config templates: OrderedCollection new. 
  	config 
  		setGlobalOptions: self;    
  		cmakePrefixPath;
  		cmakeIncludePath;
  		cmakeLibraryPath;
  		cmakeIncludeModules;
  		cmakeCFlags;          
  		cmakeAddDefinitions;
  		cmakeWriteDirectoriesDotCmake:  self;
  		cmakeIncludeDirectories:  self;   "<---"
  		preferredIncludes;                      "<---why 3  of em?"
  		standardIncludes;                       "<---"
  		setGlobalOptionsAfterDetermineSystem: self;    
  		extraVMSettings: self;                "<--catch-all method. os/platform specific"
+ break;
  		setCoreSources: self;
  		setPlatformSources: self;
  		setCrossSources: self;
  		setExtraSources;
  		cmakeSetSourceFilesProperties;
  		cmakeListAppend:'LINKLIBS' elements: (config externalLibs);
  		cmakeAddExecutableNameOptionSource: self;
  	      setExecutableOutputPath;
  		addVMPlugins: self.
  	config templates do: [:each | self puts: each content].
  	config templates: OrderedCollection new. 
  	extPlugins := self generatePluginConfigs: config internalPlugins internal: true.
  	 intPlugins := self generatePluginConfigs: config externalPlugins internal: false.
  	self processThirdpartyLibraries.                       "<--unused in Pharo code? What exactly does this do?"
  	self processPlugins:  intPlugins, extPlugins.
  	self config templates	addLast:((CMakeCommand new) command:'target_link_libraries' params:(self moduleName , ' ${LINKLIBS}')).
  "	self cmd: 'target_link_libraries'
  		params: self moduleName , ' ${LINKLIBS}'."
  	config postBuildActions: self..
  	config templates do: [:each | self puts: each content].
  	self saveFile.
  	self generateBuildScript!

Item was changed:
  ----- Method: CPlatformConfigForSqueak>>compilerDefinitions (in category 'compiling') -----
  compilerDefinitions
+ 	"-DNDEBUG -DGNU_SOURCE...etc . cmakeAddDefinitions(buildType) replaces this"
+ 	self deprecated: 'Legacy method from pharo approach. We need different definitions for each buildType'.
- 	"-DNDEBUG -DGNU_SOURCE...etc feed these into cmakeAddDefinitions"
  	self	subclassResponsibility!

Item was changed:
  ----- Method: Linux32x86SqueakCogV3Config>>compilerDefinitions (in category 'compiling') -----
  compilerDefinitions
+ 	self deprecated: 'Legacy method from pharo approach. We need different definitions for each buildType'.
  	^#(
  	 '-DNDEBUG'          
   	 '-DDEBUGVM=0'
  	 ' -DLSB_FIRST=1'
  	 '-D_GNU_SOURCE'
   	 '-D_FILE_OFFSET_BITS=64'
  "	  '-DUSE_GLOBAL_STRUCT=0'"
   	 '-DCOGMTVM=0') 
  !

Item was changed:
  ----- Method: Linux64x86w32BitSqueakCogV3Config>>cmakeAddDefinitionsBuild (in category 'cmake buildType redirects') -----
  cmakeAddDefinitionsBuild
+ 	|definitions|
+ 	definitions:=#(
+ 	 '-DNDEBUG'          
+  	 '-DDEBUGVM=0'
+ 	 ' -DLSB_FIRST=1'
+ 	 '-D_GNU_SOURCE'
+  	 '-D_FILE_OFFSET_BITS=64'
+ "	  '-DUSE_GLOBAL_STRUCT=0'"
+  	 '-DCOGMTVM=0') .
+ 
  	(enabledebugmessages)
  		ifTrue:[	templates 
  		addLast:((CMakeMessage new) message: (self class name) , 'cmakeAddDefinitionsBuild')
  	] .
  	templates
+ 		addLast:((CMakeAddDefinitions new) definitions: definitions). 
+ 
+ "	templates
+ 		addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)). <--this was the old pharo deprecated legacy code approach that is unsuitable for the multiple buildTypes each Configuration must support"
+ 
- 		addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)). 
  !

Item was added:
+ ----- Method: Linux64x86w32BitSqueakCogV3Config>>cmakeAddDefinitionsBuildAssert (in category 'cmake buildType redirects') -----
+ cmakeAddDefinitionsBuildAssert
+ 	|definitions|
+ "copy-n-paste from /build.linux32x86/squeak.cog.v3/build.assert/mvm  file"
+ 	definitions:=#(
+ 	 '-DDEBUGVM=0'
+        '-D_GNU_SOURCE' 
+        '-D_FILE_OFFSET_BITS=64' 
+         '-DCOGMTVM=0'
+ 	) .
+ 
+ 	(enabledebugmessages)
+ 		ifTrue:[	templates 
+ 		addLast:((CMakeMessage new) message: (self class name) , 'cmakeAddDefinitionsBuildAssert')
+ 	] .
+ 	templates
+ 		addLast:((CMakeAddDefinitions new) definitions: definitions). 
+ 
+ "	templates
+ 		addLast:((CMakeAddDefinitions new) definitions: (self compilerDefinitions asOrderedCollection)). <--this was the old pharo deprecated legacy code approach that is unsuitable for the multiple buildTypes each Configuration must support"
+ 
+ !

Item was changed:
  ----- Method: Linux64x86w32BitSqueakCogV3Config>>compilerDefinitions (in category 'compiling') -----
  compilerDefinitions
+ 	
+ 	self deprecated: 'Legacy method from pharo approach. We need different definitions for each buildType'.
+ 
  	^#(
  	 '-DNDEBUG'          
   	 '-DDEBUGVM=0'
  	 ' -DLSB_FIRST=1'
  	 '-D_GNU_SOURCE'
   	 '-D_FILE_OFFSET_BITS=64'
  "	  '-DUSE_GLOBAL_STRUCT=0'"
   	 '-DCOGMTVM=0') 
  !

Item was changed:
  ----- Method: SqueakMacintoshConfig>>compilerDefinitions (in category 'compiling') -----
  compilerDefinitions
+ 	self deprecated: 'Legacy method from pharo approach. We need different definitions for each buildType'.
+ 
  	self flag:'tty'. "cut-n-paste from representative pharo macOS configs"
  	^ { 
  		'-DCOGMTVM=0'. 
  		'-DUSE_GLOBAL_STRUCT=0'. 
  		'-DTARGET_API_MAC_CARBON'. 
  		'-DBUILD_FOR_OSX'. 
  		'-DHAVE_SYS_TIME_H'}	
  !

Item was changed:
  ----- Method: SqueakUnixConfig>>configIanPiumartasTemplates (in category 'cmake configuration') -----
  configIanPiumartasTemplates
  	|templates|
  	self flag:'tty'. "fix this version stuff. get ostype from elsewhere.  does the without-gl flag need to be here?"
  	templates:= OrderedCollection new.
  	templates 
  		addLast:((CMakeMessage new) message:'DebugTemplate');
  		addLast: (CMakeDebug new);
  		addLast:((CMakeMessage new) message:'Global Configs');
  		addLast: ((CMakeSetConfigDefine new) variable: 'OS_TYPE' value:'\"${platformName}\"');  "defined in INCLUDE(directories.cmake) in CMakeLists.txt"
  		addLast: ((CMakeVersion new) version: '1.2.3.4');
  		addLast: ((CMakeSet new) variable:'without-gl' value: ''); 
+ 		addLast: ((CMakeSetConfigDefine new) variable: 'NoDbgRegParms' value:''); 
  		addLast: ((CMakeCompilerIsGNUCC new));
  		addLast:((CMakeMessage new) message:'Tests');
  		addLast:(CMakeTestBigEndian new);
  		addLast:(CMakeCheckFunctionAtExitOnExit new);
  		addAllLast: self configCheckIncludeFileTemplates;
  		addAllLast: self configCheckLibraryExistsTemplates;
  		addAllLast: self configFindPackageTemplates;
  		addAllLast: self configSqMemoryAccess;
  		addAllLast: self configPlatformSpecific;
  		addAllLast: self configAioC;
  		addAllLast: self configSqUnixCharConv;
  		addAllLast: self configSqExternalPrims;
  		addAllLast: self configSqUnixMainC;
  		addAllLast: self configSqUnixMMemoryC;
  		addAllLast: self configOLPC.
  	^ templates!

Item was changed:
  ----- Method: SqueakWindowsConfig>>compilerDefinitions (in category 'compiling') -----
  compilerDefinitions
+ 	self deprecated: 'Legacy method from pharo approach. We need different definitions for each buildType'.
+ 
  	^ {  
  		'-D_MT'.
  		'-DWIN32'. 
  		'-DWIN32_FILE_SUPPORT'. 
  		'-DNO_ISNAN'.
  		'-DNO_SERVICE'. 
  		'-DNO_STD_FILE_SUPPORT'.
  		'-DLSB_FIRST'. 
  		'-DVM_NAME="', self executableName,'"'.
  		'-DX86 '.
  		'-DSTACK_ALIGN_BYTES=16'. 
  		'-DALLOCA_LIES_SO_USE_GETSP=0'. 
  		'-DENABLE_FAST_BLT ' }!



More information about the Vm-dev mailing list