Skip to content

Commit ea29e13

Browse files
committed
Hack for compiling on Snow Leopard.
I don't have access to this OS to fix the issue properly, so for the moment I'm reverting back to 32bit build on Darwin. We changed to native 64bit in 8ddf930. Thanks to Johan Dahlberg and Tim Caswell for reporting and debugging this.
1 parent 485a9c1 commit ea29e13

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

deps/udns/configure

+6
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ else
142142
EOF
143143
fi
144144

145+
# HACK FIXME - use 32bit on Mac
146+
os=`uname -s`;
147+
if [ $os = "Darwin" ]; then
148+
CFLAGS="$CFLAGS -m32"
149+
fi
150+
145151
ac_config_h
146152
ac_output Makefile
147153
ac_msg "creating config.status"

wscript

+24
Original file line numberDiff line numberDiff line change
@@ -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

110122
def 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

Comments
 (0)