010-do-not-add-rt-lib-dirs-when-cross-compiling.patch 821 B

123456789101112131415
  1. diff --git a/setup.py b/setup.py
  2. index 7868b7b..544fa7e 100644
  3. --- a/setup.py
  4. +++ b/setup.py
  5. @@ -452,8 +452,9 @@ class PyBuildExt(build_ext):
  6. # directly since an inconsistently reproducible issue comes up where
  7. # the environment variable is not set even though the value were passed
  8. # into configure and stored in the Makefile (issue found on OS X 10.3).
  9. + rt_lib_dirs = [] if cross_compiling else self.compiler.runtime_library_dirs
  10. for env_var, arg_name, dir_list in (
  11. - ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
  12. + ('LDFLAGS', '-R', rt_lib_dirs),
  13. ('LDFLAGS', '-L', self.compiler.library_dirs),
  14. ('CPPFLAGS', '-I', self.compiler.include_dirs)):
  15. env_val = sysconfig.get_config_var(env_var)