summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-10-09 21:37:18 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-10-09 21:37:18 (GMT)
commit628e3bf6cff73eb58b752450d89b6c3074369b0e (patch)
treee528c74c5a0b1ca0e60787bb62e0b5365f53eb81
parent60c8a3aba82b83e8da25e614bee2329f7c74509f (diff)
downloadcpython-628e3bf6cff73eb58b752450d89b6c3074369b0e.zip
cpython-628e3bf6cff73eb58b752450d89b6c3074369b0e.tar.gz
cpython-628e3bf6cff73eb58b752450d89b6c3074369b0e.tar.bz2
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).
-rw-r--r--Lib/distutils/unixccompiler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 831717b..692e3eb 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