aboutsummaryrefslogtreecommitdiff
path: root/lang/python/python3/patches/010-do-not-add-rt-lib-dirs-when-cross-compiling.patch
blob: b3da28a69c284803de832b427ec8983396178347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/setup.py
+++ b/setup.py
@@ -631,8 +631,9 @@ class PyBuildExt(build_ext):
         # directly since an inconsistently reproducible issue comes up where
         # the environment variable is not set even though the value were passed
         # into configure and stored in the Makefile (issue found on OS X 10.3).
+        rt_lib_dirs = [] if CROSS_COMPILING else self.compiler.runtime_library_dirs
         for env_var, arg_name, dir_list in (
-                ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
+                ('LDFLAGS', '-R', rt_lib_dirs),
                 ('LDFLAGS', '-L', self.compiler.library_dirs),
                 ('CPPFLAGS', '-I', self.compiler.include_dirs)):
             env_val = sysconfig.get_config_var(env_var)