@@ -99,12 +99,24 @@ def configure(conf):
9999 debug_env .set_variant ('debug' )
100100 debug_env .append_value ('CCFLAGS' , ['-DDEBUG' , '-g' , '-O0' , '-Wall' , '-Wextra' ])
101101 debug_env .append_value ('CXXFLAGS' , ['-DDEBUG' , '-g' , '-O0' , '-Wall' , '-Wextra' ])
102+
103+ # HACK FIXME - use 32bit on Mac
104+ if platform .system () == "Darwin" :
105+ debug_env .append_value ('CCFLAGS' , '-m32' )
106+ debug_env .append_value ('CXXFLAGS' , '-m32' )
107+
102108 conf .write_config_header ("config.h" )
103109
104110 # Configure default variant
105111 conf .setenv ('default' )
106112 conf .env .append_value ('CCFLAGS' , ['-DNDEBUG' , '-O3' ])
107113 conf .env .append_value ('CXXFLAGS' , ['-DNDEBUG' , '-O3' ])
114+
115+ # HACK FIXME - use 32bit on Mac
116+ if platform .system () == "Darwin" :
117+ conf .env .append_value ('CCFLAGS' , '-m32' )
118+ conf .env .append_value ('CXXFLAGS' , '-m32' )
119+
108120 conf .write_config_header ("config.h" )
109121
110122def build_udns (bld ):
@@ -166,6 +178,9 @@ def build_v8(bld):
166178 if GuessArchitecture () == "x64" :
167179 arch = "arch=x64"
168180
181+ # HACK FIXME - use 32bit on Mac
182+ if platform .system () == "Darwin" : arch = "arch=ia32" ;
183+
169184 v8 = bld .new_task_gen (
170185 target = join ("deps/v8" , bld .env ["staticlib_PATTERN" ] % "v8" ),
171186 rule = v8rule % (v8dir_tgt , scons , "release" , arch ),
@@ -177,6 +192,10 @@ def build_v8(bld):
177192 bld .env_of_name ('default' )["LIBPATH_V8" ] = v8dir_tgt
178193 bld .env_of_name ('default' )["LINKFLAGS_V8" ] = ["-pthread" ]
179194
195+ # HACK FIXME - use 32bit on Mac
196+ if platform .system () == "Darwin" :
197+ bld .env_of_name ('default' )["LINKFLAGS_V8" ] = ["-pthread" , "-m32" ]
198+
180199 ### v8 debug
181200 if bld .env ["USE_DEBUG" ]:
182201 deps_tgt = join (bld .srcnode .abspath (bld .env_of_name ("debug" )),"deps" )
@@ -186,6 +205,11 @@ def build_v8(bld):
186205 bld .env_of_name ('debug' )["STATICLIB_V8" ] = "v8_g"
187206 bld .env_of_name ('debug' )["LIBPATH_V8" ] = v8dir_tgt
188207 bld .env_of_name ('debug' )["LINKFLAGS_V8" ] = ["-pthread" ]
208+
209+ # HACK FIXME - use 32bit on Mac
210+ if platform .system () == "Darwin" :
211+ bld .env_of_name ('debug' )["LINKFLAGS_V8" ] = ["-pthread" , "-m32" ]
212+
189213 v8_debug .rule = v8rule % (v8dir_tgt , scons , "debug" , arch )
190214 v8_debug .target = join ("deps/v8" , bld .env ["staticlib_PATTERN" ] % "v8_g" )
191215
0 commit comments