# HG changeset patch # User kylev@localhost6.localdomain6 # Date 1276760480 25200 # Node ID 6cc22ee607da43d4537807c52212310721f69b72 # Parent 17062a65fde95a0d01cad535ef0956050441f251 Copy compile -arch args to link args so we work on OS X diff -r 17062a65fde9 -r 6cc22ee607da setup_posix.py --- a/setup_posix.py Mon Feb 22 16:21:05 2010 -0800 +++ b/setup_posix.py Thu Jun 17 00:41:20 2010 -0700 @@ -53,6 +53,13 @@ removable_compile_args = [ compiler_flag(f) for f in "ILl" ] extra_compile_args = [ i.replace("%", "%%") for i in mysql_config("cflags") if i[:2] not in removable_compile_args ] + + # Copy the arch flags for linking as well + extra_link_args = list() + for i in range(len(extra_compile_args)): + if extra_compile_args[i] == '-arch': + extra_link_args += ['-arch', extra_compile_args[i + 1]] + include_dirs = [ dequote(i[2:]) for i in mysql_config('include') if i.startswith(compiler_flag('I')) ] @@ -81,6 +88,7 @@ library_dirs = library_dirs, libraries = libraries, extra_compile_args = extra_compile_args, + extra_link_args = extra_link_args, include_dirs = include_dirs, extra_objects = extra_objects, define_macros = define_macros,