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

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