From: Stefan Krah Date: Wed, 3 Aug 2016 09:18:26 +0000 (+0200) Subject: Issue #20767: Fix -R option for FreeBSD/clang. X-Git-Tag: v3.6.0a4~80^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9de620e970230a7c4fc933fcdfe292260670eb25;p=python Issue #20767: Fix -R option for FreeBSD/clang. --- diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 92d14dfee7..3f321c28dc 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]