diff -r ef864175dcc0 -r f7f6bb9b864a SConstruct --- a/SConstruct Thu Mar 14 16:08:55 2013 +0100 +++ b/SConstruct Thu Mar 14 16:18:39 2013 +0100 @@ -839,6 +839,8 @@ # shared library in prefix/lib/. if not py_getvar('Py_ENABLE_SHARED'): py_lib_path.append(py_getvar('LIBPL')) + # Python sometimes needs special flags when linking statically. + main.Append(LINKFLAGS=[py_getvar('LINKFORSHARED').split()]) py_libs = [] for lib in py_getvar('LIBS').split() + py_getvar('SYSLIBS').split():