changeset: 102514:65eb8d0ede75 branch: 2.7 parent: 102496:ba915d561667 user: Stefan Krah date: Wed Aug 03 11:23:31 2016 +0200 files: Lib/distutils/unixccompiler.py description: Issue #20767: Fix -R option for FreeBSD/clang. diff -r ba915d561667 -r 65eb8d0ede75 Lib/distutils/unixccompiler.py --- a/Lib/distutils/unixccompiler.py Sat Jul 30 05:49:53 2016 -0700 +++ b/Lib/distutils/unixccompiler.py Wed Aug 03 11:23:31 2016 +0200 @@ -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]