| 1 |
From: Stefano Rivera <[email protected]> |
| 2 |
Date: Sat, 7 Oct 2017 09:38:58 +0200 |
| 3 |
Subject: Stdlib: Don't add standard library dirs to library_dirs and |
| 4 |
runtime_library_dirs. |
| 5 |
|
| 6 |
Origin: Debian cpython packaging |
| 7 |
Author: Matthias Klose <[email protected]> |
| 8 |
Last-Update: 2011-12-19 |
| 9 |
--- |
| 10 |
lib-python/3/distutils/unixccompiler.py | 7 ++++++- |
| 11 |
1 file changed, 6 insertions(+), 1 deletion(-) |
| 12 |
|
| 13 |
diff --git a/lib-python/3/distutils/unixccompiler.py b/lib-python/3/distutils/unixccompiler.py |
| 14 |
index 469a6dd..d5d5347 100644 |
| 15 |
--- a/lib-python/3/distutils/unixccompiler.py |
| 16 |
+++ b/lib-python/3/distutils/unixccompiler.py |
| 17 |
@@ -154,7 +154,12 @@ class UnixCCompiler(CCompiler): |
| 18 |
fixed_args = self._fix_lib_args(libraries, library_dirs, |
| 19 |
runtime_library_dirs) |
| 20 |
libraries, library_dirs, runtime_library_dirs = fixed_args |
| 21 |
|
| 22 |
+ # filter out standard library paths, which are not explicitely needed |
| 23 |
+ # for linking |
| 24 |
+ library_dirs = [dir for dir in library_dirs |
| 25 |
+ if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')] |
| 26 |
+ runtime_library_dirs = [dir for dir in runtime_library_dirs |
| 27 |
+ if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')] |
| 28 |
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, |
| 29 |
libraries) |
| 30 |
if not isinstance(output_dir, (str, type(None))): |