From: Skip Montanaro Date: Wed, 9 Oct 2002 21:37:18 +0000 (+0000) Subject: MacOSX linker doesn't understand -R flag at all, no matter how you feed it X-Git-Tag: v2.3c1~3843 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=628e3bf6cff73eb58b752450d89b6c3074369b0e;p=thirdparty%2FPython%2Fcpython.git MacOSX linker doesn't understand -R flag at all, no matter how you feed it the flag. Punt and return a -L flag instead (returning "" gums up the command to be forked). --- diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 831717baca47..692e3eb477e2 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -196,7 +196,10 @@ class UnixCCompiler(CCompiler): # the configuration data stored in the Python installation, so # we use this hack. compiler = os.path.basename(sysconfig.get_config_var("CC")) - if compiler == "gcc" or compiler == "g++": + if sys.platform[:6] == "darwin": + # MacOSX's linker doesn't understand the -R flag at all + return "-L" + dir + elif compiler == "gcc" or compiler == "g++": return "-Wl,-R" + dir else: return "-R" + dir