← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3065: better way to require i686

 

------------------------------------------------------------
revno: 3065
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Mon 2012-09-24 17:58:29 +0200
message:
  better way to require i686
modified:
  SConstruct


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'SConstruct'
--- SConstruct	2012-09-22 13:34:38 +0000
+++ SConstruct	2012-09-24 15:58:29 +0000
@@ -72,12 +72,8 @@
 	'release' : ['NDEBUG']
 }
 
-# define __i686__ because the default MinGW is for __i386__. we need i686 instructions for
-# atomic<int64_t>, required by boost::lockfree (otherwise lockfree lists won't actually be lock-
-# free).
-# TODO check ramifications / possibly switch to an actual i686 compiler...
 gcc_defs = {
-	'common' : ['__i686__', '_REENTRANT', 'NO_VIZ'],
+	'common' : ['_REENTRANT', 'NO_VIZ'],
 	'debug' : ['_DEBUG'],
 	'release' : ['NDEBUG']
 }
@@ -176,6 +172,11 @@
 	else:
 		env.Append(CCFLAGS = ['-pipe'])
 
+	# require i686 instructions for atomic<int64_t>, used by boost::lockfree (otherwise lockfree
+	# lists won't actually be lock-free).
+	if env['arch'] == 'x86':
+		env.Append(CCFLAGS = ['-march=i686'])
+
 if env['pch']:
 	env.Append(CPPDEFINES = ['HAS_PCH'])