Define POSIX when compiling for any build on linux/mac.
This commit is contained in:
		
							parent
							
								
									b06cfa5414
								
							
						
					
					
						commit
						72e08f7e44
					
				@ -214,6 +214,7 @@ class SM:
 | 
			
		||||
			#Platform-specifics
 | 
			
		||||
			if AMBuild.target['platform'] == 'linux':
 | 
			
		||||
				self.compiler.AddToListVar('CDEFINES', '_LINUX')
 | 
			
		||||
				self.compiler.AddToListVar('CDEFINES', 'POSIX')
 | 
			
		||||
				if self.vendor == 'gcc':
 | 
			
		||||
					self.compiler.AddToListVar('POSTLINKFLAGS', '-static-libgcc')
 | 
			
		||||
				if self.vendor == 'clang':
 | 
			
		||||
@ -221,6 +222,7 @@ class SM:
 | 
			
		||||
			elif AMBuild.target['platform'] == 'darwin':
 | 
			
		||||
				self.compiler.AddToListVar('CDEFINES', 'OSX')
 | 
			
		||||
				self.compiler.AddToListVar('CDEFINES', '_OSX')
 | 
			
		||||
				self.compiler.AddToListVar('CDEFINES', 'POSIX')
 | 
			
		||||
				self.compiler.AddToListVar('POSTLINKFLAGS', '-mmacosx-version-min=10.5')
 | 
			
		||||
				self.compiler.AddToListVar('POSTLINKFLAGS', ['-arch', 'i386'])
 | 
			
		||||
				self.compiler.AddToListVar('POSTLINKFLAGS', '-lstdc++')
 | 
			
		||||
@ -401,7 +403,7 @@ class SM:
 | 
			
		||||
			if AMBuild.target['platform'] == 'windows':
 | 
			
		||||
				compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
 | 
			
		||||
			else:
 | 
			
		||||
				compiler['CDEFINES'].extend(['COMPILER_GCC', 'POSIX'])
 | 
			
		||||
				compiler['CDEFINES'].extend(['COMPILER_GCC'])
 | 
			
		||||
 | 
			
		||||
		if sdk == 'ep1':
 | 
			
		||||
			if AMBuild.target['platform'] == 'linux':
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user