blob: 81c390e0a0936f33fa1b149a247905d3d2b2e364 [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
@@ -207,10 +207,10 @@ def customize_compiler(compiler):
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