This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: LDSHARED is not set according when CC is set.
Type: behavior Stage: resolved
Components: Distutils Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, steve.dower, vapier, yunlian
Priority: normal Keywords: patch

Created on 2015-08-25 15:47 by yunlian, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7914 closed marscher, 2018-06-25 20:58
PR 14950 closed Hong Xu, 2019-07-25 17:41
Messages (3)
msg249129 - (view) Author: yunlian (yunlian) Date: 2015-08-25 15:47
On linux, when CC is set, we expect that the LDSHARED is set accordingly.
Currently, only on OS X, the LDSHARED is set properly.

Below is the proposed patch

--- a/Lib/distutils/sysconfig.py        2015-08-24 11:58:37.265683872 -0700
+++ b/Lib/distutils/sysconfig.py        2015-08-24 11:57:29.673945173 -0700
@@ -180,9 +180,9 @@
             if _USE_CLANG:
                 newcc = 'clang'
         if newcc:
-            # On OS X and linux, if CC is overridden, use that as the default
+            # On OS X, if CC is overridden, use that as the default
             #       command for LDSHARED as well
-            if ((sys.platform == 'darwin' or sys.platform.startswith('linux'))
+            if (sys.platform == 'darwin'
                     and 'LDSHARED' not in os.environ
                     and ldshared.startswith(cc)):
                 ldshared = newcc + ldshared[len(cc):]
msg249136 - (view) Author: Mike Frysinger (vapier) Date: 2015-08-25 16:35
looks like the patch was reversed, but otherwise should be clear what we're going for
msg386284 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:10
Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils.

If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69123
2021-02-03 18:10:54steve.dowersetstatus: open -> closed

nosy: + steve.dower
messages: + msg386284

resolution: out of date
stage: patch review -> resolved
2019-07-25 17:41:55Hong Xusetpull_requests: + pull_request14719
2018-06-25 20:58:38marschersetkeywords: + patch
stage: patch review
pull_requests: + pull_request7517
2015-08-25 16:35:15vapiersetmessages: + msg249136
2015-08-25 16:25:54vapiersetnosy: + vapier
2015-08-25 15:47:24yunliancreate