]> granicus.if.org Git - python/commitdiff
Issue #20767: Fix -R option for FreeBSD/clang.
authorStefan Krah <skrah@bytereef.org>
Wed, 3 Aug 2016 09:23:31 +0000 (11:23 +0200)
committerStefan Krah <skrah@bytereef.org>
Wed, 3 Aug 2016 09:23:31 +0000 (11:23 +0200)
Lib/distutils/unixccompiler.py

index 4c35676130e585f78253a21a3db3366361c2f69c..3af540e58132fc2a8ce0a0ff55784231cec5fff6 100644 (file)
@@ -230,6 +230,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]