Issue #20767: Fix -R option for FreeBSD/clang.
authorStefan Krah <skrah@bytereef.org>
Wed, 3 Aug 2016 09:18:26 +0000 (11:18 +0200)
committerStefan Krah <skrah@bytereef.org>
Wed, 3 Aug 2016 09:18:26 +0000 (11:18 +0200)
Lib/distutils/unixccompiler.py

index 92d14dfee72de1c6f1b3882ec3f2bd6be3785f7a..3f321c28dc3b41dadebf88d0ab620cf0cdc1624d 100644 (file)
@@ -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]