summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/unixccompiler.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-06-28 21:30:52 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-06-28 21:30:52 (GMT)
commit8f480e54016cee1ad30dec42eb1d768523266271 (patch)
tree047ee02298769b3965ab24506465971f5d186375 /Lib/distutils/unixccompiler.py
parentcc9144a9165a84a7f4d3e122096b7763a35b5efa (diff)
downloadcpython-8f480e54016cee1ad30dec42eb1d768523266271.zip
cpython-8f480e54016cee1ad30dec42eb1d768523266271.tar.gz
cpython-8f480e54016cee1ad30dec42eb1d768523266271.tar.bz2
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 'Lib/distutils/unixccompiler.py')
-rw-r--r--Lib/distutils/unixccompiler.py33
1 files changed, 17 insertions, 16 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index c11544d..26d2856 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/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