diff options
-rw-r--r-- | Lib/distutils/ccompiler.py | 6 | ||||
-rw-r--r-- | Lib/distutils/unixccompiler.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py index a3b1ffa..e5b9d7c 100644 --- a/Lib/distutils/ccompiler.py +++ b/Lib/distutils/ccompiler.py @@ -1241,7 +1241,11 @@ def gen_lib_options (compiler, library_dirs, runtime_library_dirs, libraries): lib_opts.append (compiler.library_dir_option (dir)) for dir in runtime_library_dirs: - lib_opts.append (compiler.runtime_library_dir_option (dir)) + opt = compiler.runtime_library_dir_option (dir) + if type(opt) is ListType: + lib_opts = lib_opts + opt + else: + lib_opts.append (opt) # XXX it's important that we *not* remove redundant library mentions! # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 24cbcb5..56998c3 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -205,6 +205,8 @@ class UnixCCompiler(CCompiler): return "-L" + dir elif sys.platform[:5] == "hp-ux": return "+s -L" + dir + elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": + return ["-rpath", dir] elif compiler[:3] == "gcc" or compiler[:3] == "g++": return "-Wl,-R" + dir else: |