[Python-checkins] cpython (3.5): Issue #20767: Fix -R option for FreeBSD/clang.

stefan.krah python-checkins at python.org
Wed Aug 3 05:19:35 EDT 2016


https://hg.python.org/cpython/rev/441bbf4cc914
changeset:   102512:441bbf4cc914
branch:      3.5
parent:      102510:e0f9f8be7963
user:        Stefan Krah <skrah at bytereef.org>
date:        Wed Aug 03 11:18:26 2016 +0200
summary:
  Issue #20767: Fix -R option for FreeBSD/clang.

files:
  Lib/distutils/unixccompiler.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -227,6 +227,8 @@
         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]

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list