2021-11-13 10:52:43 +08:00
|
|
|
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
|
|
|
|
|
index f0792de..4d83793 100644
|
|
|
|
|
--- a/Lib/distutils/unixccompiler.py
|
|
|
|
|
+++ b/Lib/distutils/unixccompiler.py
|
|
|
|
|
@@ -82,6 +82,15 @@ class UnixCCompiler(CCompiler):
|
2019-09-30 11:14:35 -04:00
|
|
|
if sys.platform == "cygwin":
|
|
|
|
|
exe_extension = ".exe"
|
|
|
|
|
|
|
|
|
|
+ def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
|
|
|
|
|
+ """Remove standard library path from rpath"""
|
|
|
|
|
+ libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args(
|
|
|
|
|
+ libraries, library_dirs, runtime_library_dirs)
|
|
|
|
|
+ libdir = sysconfig.get_config_var('LIBDIR')
|
|
|
|
|
+ if runtime_library_dirs and (libdir in runtime_library_dirs):
|
|
|
|
|
+ runtime_library_dirs.remove(libdir)
|
|
|
|
|
+ return libraries, library_dirs, runtime_library_dirs
|
|
|
|
|
+
|
|
|
|
|
def preprocess(self, source, output_file=None, macros=None,
|
|
|
|
|
include_dirs=None, extra_preargs=None, extra_postargs=None):
|
|
|
|
|
fixed_args = self._fix_compile_args(None, macros, include_dirs)
|
2021-11-13 10:52:43 +08:00
|
|
|
--
|
|
|
|
|
1.8.3.1
|
|
|
|
|
|