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

stefan.krah python-checkins at python.org
Wed Aug 3 05:23:53 EDT 2016


https://hg.python.org/cpython/rev/65eb8d0ede75
changeset:   102514:65eb8d0ede75
branch:      2.7
parent:      102496:ba915d561667
user:        Stefan Krah <skrah at bytereef.org>
date:        Wed Aug 03 11:23:31 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
@@ -230,6 +230,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