blob: 443bf65d7b545d5d8558ea21b1a6493a0a53c4d0 [file] [log] [blame]
Mike Frysinger51f0d522015-11-21 00:11:17 +00001This fixes the problem that when CC is set, the LDSHAREd is not
2set accordingly on linux.
3Upstream bug filed at https://bugs.python.org/issue24935
4
5--- a/Lib/distutils/sysconfig.py
6+++ b/Lib/distutils/sysconfig.py
7@@ -180,10 +180,10 @@
8
9 if 'CC' in os.environ:
10 newcc = os.environ['CC']
11- if (sys.platform == 'darwin'
12+ if ((sys.platform == 'darwin' or sys.platform.startswith('linux'))
13 and 'LDSHARED' not in os.environ
14 and ldshared.startswith(cc)):
15- # On OS X, if CC is overridden, use that as the default
16+ # On OS X and linux, if CC is overridden, use that as the default
17 # command for LDSHARED as well
18 ldshared = newcc + ldshared[len(cc):]
19 cc = newcc