diff --git a/distutils/unixccompiler.py b/distutils/unixccompiler.py index 4d7a6de7..7fe2eeef 100644 --- a/distutils/unixccompiler.py +++ b/distutils/unixccompiler.py @@ -233,8 +233,7 @@ def runtime_library_dir_option(self, dir): # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) if sys.platform[:6] == "darwin": - # MacOSX's linker doesn't understand the -R flag at all - return "-L" + dir + return "-Wl,-rpath," + dir elif sys.platform[:7] == "freebsd": return "-Wl,-rpath=" + dir elif sys.platform[:5] == "hp-ux":