summaryrefslogtreecommitdiff
path: root/unixccompiler.py
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-10-09 21:37:18 +0000
committerSkip Montanaro <skip@pobox.com>2002-10-09 21:37:18 +0000
commit6ed654260a646f4c8823e335597316c2a29038e5 (patch)
treeabe13ccbe94c0e6f7cda8a2a22c58a774524e761 /unixccompiler.py
parent679296fdf3e45a05a0d7ec86ab291b8d871ff598 (diff)
downloadpython-setuptools-git-6ed654260a646f4c8823e335597316c2a29038e5.tar.gz
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).
Diffstat (limited to 'unixccompiler.py')
-rw-r--r--unixccompiler.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/unixccompiler.py b/unixccompiler.py
index 831717ba..692e3eb4 100644
--- a/unixccompiler.py
+++ b/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