mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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).
This commit is contained in:
parent
60c8a3aba8
commit
628e3bf6cf
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue