blob: 443bf65d7b545d5d8558ea21b1a6493a0a53c4d0 [file] [log] [blame]
This fixes the problem that when CC is set, the LDSHAREd is not
set accordingly on linux.
Upstream bug filed at https://bugs.python.org/issue24935
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -180,10 +180,10 @@
if 'CC' in os.environ:
newcc = os.environ['CC']
- if (sys.platform == 'darwin'
+ if ((sys.platform == 'darwin' or sys.platform.startswith('linux'))
and 'LDSHARED' not in os.environ
and ldshared.startswith(cc)):
- # On OS X, if CC is overridden, use that as the default
+ # On OS X and linux, if CC is overridden, use that as the default
# command for LDSHARED as well
ldshared = newcc + ldshared[len(cc):]
cc = newcc