summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2016-08-03 09:18:26 (GMT)
committerStefan Krah <skrah@bytereef.org>2016-08-03 09:18:26 (GMT)
commit9de620e970230a7c4fc933fcdfe292260670eb25 (patch)
treef362500ebcd0ab02cff442353e84af27d87aa6ee /Lib
parent6cafececbf4aaccc2edbefa9298ed54da27dadda (diff)
downloadcpython-9de620e970230a7c4fc933fcdfe292260670eb25.zip
cpython-9de620e970230a7c4fc933fcdfe292260670eb25.tar.gz
cpython-9de620e970230a7c4fc933fcdfe292260670eb25.tar.bz2
Issue #20767: Fix -R option for FreeBSD/clang.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/unixccompiler.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 92d14df..3f321c2 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -227,6 +227,8 @@ class UnixCCompiler(CCompiler):
if sys.platform[:6] == "darwin":
# MacOSX's linker doesn't understand the -R flag at all
return "-L" + dir
+ elif sys.platform[:7] == "freebsd":
+ return "-Wl,-rpath=" + dir
elif sys.platform[:5] == "hp-ux":
if self._is_gcc(compiler):
return ["-Wl,+s", "-L" + dir]