94bfe39
diff -up Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath Python-2.6.4/Lib/distutils/unixccompiler.py
94bfe39
--- Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath	2009-09-09 04:34:06.000000000 -0400
94bfe39
+++ Python-2.6.4/Lib/distutils/unixccompiler.py	2010-03-15 21:33:25.000000000 -0400
94bfe39
@@ -142,6 +142,16 @@ class UnixCCompiler(CCompiler):
94bfe39
     if sys.platform == "cygwin":
94bfe39
         exe_extension = ".exe"
94bfe39
 
94bfe39
+    def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
94bfe39
+        """Remove standard library path from rpath"""
94bfe39
+        libraries, library_dirs, runtime_library_dirs = \
94bfe39
+            CCompiler._fix_lib_args(self, libraries, library_dirs,
94bfe39
+                                    runtime_library_dirs)
94bfe39
+        libdir = sysconfig.get_config_var('LIBDIR')
94bfe39
+        if runtime_library_dirs and (libdir in runtime_library_dirs):
94bfe39
+            runtime_library_dirs.remove(libdir)
94bfe39
+        return libraries, library_dirs, runtime_library_dirs
94bfe39
+
94bfe39
     def preprocess(self, source,
94bfe39
                    output_file=None, macros=None, include_dirs=None,
94bfe39
                    extra_preargs=None, extra_postargs=None):