Commit bed26a3c authored by Tarek Ziadé's avatar Tarek Ziadé

Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler

parent 7f6d0834
...@@ -36,7 +36,23 @@ class UnixCCompilerTestCase(unittest.TestCase): ...@@ -36,7 +36,23 @@ class UnixCCompilerTestCase(unittest.TestCase):
# hp-ux # hp-ux
sys.platform = 'hp-ux' sys.platform = 'hp-ux'
self.assertEqual(self.cc.rpath_foo(), '+s -L/foo') old_gcv = sysconfig.get_config_var
def gcv(v):
return 'xxx'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), ['+s', '-L/foo'])
def gcv(v):
return 'gcc'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo'])
def gcv(v):
return 'g++'
sysconfig.get_config_var = gcv
self.assertEqual(self.cc.rpath_foo(), ['-Wl,+s', '-L/foo'])
sysconfig.get_config_var = old_gcv
# irix646 # irix646
sys.platform = 'irix646' sys.platform = 'irix646'
......
...@@ -285,7 +285,9 @@ class UnixCCompiler(CCompiler): ...@@ -285,7 +285,9 @@ class UnixCCompiler(CCompiler):
# MacOSX's linker doesn't understand the -R flag at all # MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir return "-L" + dir
elif sys.platform[:5] == "hp-ux": elif sys.platform[:5] == "hp-ux":
return "+s -L" + dir if "gcc" in compiler or "g++" in compiler:
return ["-Wl,+s", "-L" + dir]
return ["+s", "-L" + dir]
elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5": elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
return ["-rpath", dir] return ["-rpath", dir]
elif compiler[:3] == "gcc" or compiler[:3] == "g++": elif compiler[:3] == "gcc" or compiler[:3] == "g++":
......
...@@ -366,6 +366,10 @@ Core and Builtins ...@@ -366,6 +366,10 @@ Core and Builtins
Library Library
------- -------
- Issue #6163: Fixed HP-UX runtime library dir options in
distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and
Michael Haubenwallner.
- Issue #6857: Default format() alignment should be '>' for Decimal - Issue #6857: Default format() alignment should be '>' for Decimal
instances. instances.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment