Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.2KB

  1. diff --git a/configure.ac b/configure.ac
  2. index 6210e41..51432a8 100644
  3. --- a/configure.ac
  4. +++ b/configure.ac
  5. @@ -1297,7 +1297,7 @@ if test $enable_shared = "yes"; then
  6. *-*-mingw*)
  7. LDLIBRARY='libpython$(LDVERSION).dll.a'
  8. DLLLIBRARY='libpython$(LDVERSION).dll'
  9. - BLDLIBRARY='-L. -lpython$(LDVERSION)'
  10. + BLDLIBRARY='-L. -Wl,-Bdynamic -lpython$(LDVERSION) -Wl,-Bstatic'
  11. ;;
  12. esac
  13. else # shared is disabled
  14. diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
  15. index 0ea9cfe..1a24d5b 100644
  16. --- a/Lib/distutils/ccompiler.py
  17. +++ b/Lib/distutils/ccompiler.py
  18. @@ -1098,6 +1098,8 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries):
  19. else:
  20. lib_opts.append(opt)
  21. + lib_opts.append("-Wl,-Bdynamic")
  22. +
  23. # XXX it's important that we *not* remove redundant library mentions!
  24. # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
  25. # resolve all symbols. I just hope we never have to say "-lfoo obj.o
  26. @@ -1115,4 +1117,6 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries):
  27. "'%s' found (skipping)" % lib)
  28. else:
  29. lib_opts.append(compiler.library_option (lib))
  30. +
  31. + lib_opts.append("-Wl,-Bstatic")
  32. return lib_opts
  33. diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
  34. index dddf412..b0a18a7 100644
  35. --- a/Lib/distutils/cygwinccompiler.py
  36. +++ b/Lib/distutils/cygwinccompiler.py
  37. @@ -413,6 +415,7 @@ def _find_exe_version(cmd):
  38. out_string = out.read()
  39. finally:
  40. out.close()
  41. + out_string = out_string.split(b'\n',1)[0].replace(b'-win32',b'')
  42. result = RE_VERSION.search(out_string)
  43. if result is None:
  44. return None
  45. diff --git a/Misc/python.pc.in b/Misc/python.pc.in
  46. index 3900190..8bdd635 100644
  47. --- a/Misc/python.pc.in
  48. +++ b/Misc/python.pc.in
  49. @@ -9,5 +9,5 @@ Description: Build a C extension for Python
  50. Requires:
  51. Version: @VERSION@
  52. Libs.private: @LIBS@
  53. -Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@
  54. +Libs: -L${libdir} -L${prefix}/bin -Wl,-Bdynamic -lpython@VERSION@@ABIFLAGS@ -Wl,-Bstatic
  55. Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@