aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2020-11-22 06:14:25 +0100
committerGitHub <noreply@github.com>2020-11-22 00:14:25 -0500
commit404a719b5127602c1a948f8e189ab61cd3f147d8 (patch)
tree3c5c46adc53527468927ef6e5cdb43e84a6d6432 /Lib/distutils
parentbpo-42426: IDLE: Fix reporting offset of the RE error in searchengine (GH-23447) (diff)
downloadcpython-404a719b5127602c1a948f8e189ab61cd3f147d8.tar.gz
cpython-404a719b5127602c1a948f8e189ab61cd3f147d8.tar.bz2
cpython-404a719b5127602c1a948f8e189ab61cd3f147d8.zip
bpo-41116: Ensure system supplied libraries are found on macOS 11 (GH-23301)
On macOS system provided libraries are in a shared library cache and not at their usual location. This PR teaches distutils to search in the SDK, even if there was no "-sysroot" argument in the compiler flags.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/unixccompiler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 4d7a6de740a..f0792de74a1 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -290,7 +290,7 @@ class UnixCCompiler(CCompiler):
cflags = sysconfig.get_config_var('CFLAGS')
m = re.search(r'-isysroot\s*(\S+)', cflags)
if m is None:
- sysroot = '/'
+ sysroot = _osx_support._default_sysroot(sysconfig.get_config_var('CC'))
else:
sysroot = m.group(1)