diff --git a/SConstruct b/SConstruct index c0a32ddc3..c937b17f8 100755 --- a/SConstruct +++ b/SConstruct @@ -839,6 +839,8 @@ py_lib_path = [ py_getvar('LIBDIR') ] # 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():