python_linux.diff 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. diff --git a/setup.py.orig b/setup.py
  2. index a97a755..07ce853 100644
  3. --- a/setup.py.orig
  4. +++ b/setup.py
  5. @@ -1422,13 +1422,13 @@ class PyBuildExt(build_ext):
  6. version = line.split()[2]
  7. break
  8. if version >= version_req:
  9. - if (self.compiler.find_library_file(lib_dirs, 'z')):
  10. + if (self.compiler.find_library_file(lib_dirs, 'z_pic')):
  11. if host_platform == "darwin":
  12. zlib_extra_link_args = ('-Wl,-search_paths_first',)
  13. else:
  14. zlib_extra_link_args = ()
  15. exts.append( Extension('zlib', ['zlibmodule.c'],
  16. - libraries = ['z'],
  17. + libraries = ['z_pic'],
  18. extra_link_args = zlib_extra_link_args))
  19. have_zlib = True
  20. else:
  21. @@ -1442,7 +1442,7 @@ class PyBuildExt(build_ext):
  22. # crc32 if we have it. Otherwise binascii uses its own.
  23. if have_zlib:
  24. extra_compile_args = ['-DUSE_ZLIB_CRC32']
  25. - libraries = ['z']
  26. + libraries = ['z_pic']
  27. extra_link_args = zlib_extra_link_args
  28. else:
  29. extra_compile_args = []
  30. @@ -1991,7 +1991,7 @@ class PyBuildExt(build_ext):
  31. print('Header file {} does not exist'.format(ffi_h))
  32. ffi_lib = None
  33. if ffi_inc is not None:
  34. - for lib_name in ('ffi', 'ffi_pic'):
  35. + for lib_name in ('ffi_pic', ):
  36. if (self.compiler.find_library_file(lib_dirs, lib_name)):
  37. ffi_lib = lib_name
  38. break