]> granicus.if.org Git - python/commitdiff
MacOSX linker doesn't understand -R flag at all, no matter how you feed it
authorSkip Montanaro <skip@pobox.com>
Wed, 9 Oct 2002 21:37:18 +0000 (21:37 +0000)
committerSkip Montanaro <skip@pobox.com>
Wed, 9 Oct 2002 21:37:18 +0000 (21:37 +0000)
the flag.  Punt and return a -L flag instead (returning "" gums up the
command to be forked).

Lib/distutils/unixccompiler.py

index 831717baca47bb640966f3610468d5e8515c79eb..692e3eb477e229ae788c3c852c9d898a9aa53edd 100644 (file)
@@ -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