| 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 |