diff options
| author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-06-28 21:30:52 +0000 |
|---|---|---|
| committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-06-28 21:30:52 +0000 |
| commit | d500c02486a30fad1e49244afd7cca46009d0c07 (patch) | |
| tree | b6cebc9e729a1bc9a583e8e357437c00ad79fa86 /unixccompiler.py | |
| parent | 05df8a008c0f8fdf36a253a815390886eed089e3 (diff) | |
| download | python-setuptools-git-d500c02486a30fad1e49244afd7cca46009d0c07.tar.gz | |
Merged revisions 73490 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73490 | tarek.ziade | 2009-06-20 15:57:20 +0200 (Sat, 20 Jun 2009) | 1 line
Fixed #6164 AIX specific linker argument in Distutils unixcompiler
........
Diffstat (limited to 'unixccompiler.py')
| -rw-r--r-- | unixccompiler.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/unixccompiler.py b/unixccompiler.py index c11544d8..26d2856a 100644 --- a/unixccompiler.py +++ b/unixccompiler.py @@ -286,23 +286,24 @@ class UnixCCompiler(CCompiler): return "+s -L" + dir elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": return ["-rpath", dir] - else: - if compiler[:3] == "gcc" or compiler[:3] == "g++": - # gcc on non-GNU systems does not need -Wl, but can - # use it anyway. Since distutils has always passed in - # -Wl whenever gcc was used in the past it is probably - # safest to keep doing so. - if sysconfig.get_config_var("GNULD") == "yes": - # GNU ld needs an extra option to get a RUNPATH - # instead of just an RPATH. - return "-Wl,--enable-new-dtags,-R" + dir - else: - return "-Wl,-R" + dir + elif compiler[:3] == "gcc" or compiler[:3] == "g++": + # gcc on non-GNU systems does not need -Wl, but can + # use it anyway. Since distutils has always passed in + # -Wl whenever gcc was used in the past it is probably + # safest to keep doing so. + if sysconfig.get_config_var("GNULD") == "yes": + # GNU ld needs an extra option to get a RUNPATH + # instead of just an RPATH. + return "-Wl,--enable-new-dtags,-R" + dir else: - # No idea how --enable-new-dtags would be passed on to - # ld if this system was using GNU ld. Don't know if a - # system like this even exists. - return "-R" + dir + return "-Wl,-R" + dir + elif sys.platform[:3] == "aix": + return "-blibpath:" + dir + else: + # No idea how --enable-new-dtags would be passed on to + # ld if this system was using GNU ld. Don't know if a + # system like this even exists. + return "-R" + dir def library_option(self, lib): return "-l" + lib |
