Title: Default CC is "gcc" on Mac, but should be "clang" · Issue #110577 · python/cpython · GitHub
Open Graph Title: Default CC is "gcc" on Mac, but should be "clang" · Issue #110577 · python/cpython
X Title: Default CC is "gcc" on Mac, but should be "clang" · Issue #110577 · python/cpython
Description: Bug report Bug description: configure.ac has some special handling for detecting the default compiler on Apple platforms. Currently the script will check for both "gcc" and "clang". If both are defined, it only selects clang in case gcc ...
Open Graph Description: Bug report Bug description: configure.ac has some special handling for detecting the default compiler on Apple platforms. Currently the script will check for both "gcc" and "clang". If both are def...
X Description: Bug report Bug description: configure.ac has some special handling for detecting the default compiler on Apple platforms. Currently the script will check for both "gcc" and "clang&qu...
Opengraph URL: https://github.com/python/cpython/issues/110577
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Default CC is \"gcc\" on Mac, but should be \"clang\"","articleBody":"# Bug report\n\n### Bug description:\n\n`configure.ac` has some special handling for detecting the default compiler on Apple platforms. Currently the script will check for both \"gcc\" and \"clang\". If both are defined, it only selects clang in case gcc is actually llvm-gcc.\n\nhttps://github.com/python/cpython/blob/ea7b53ff67764a2abf1f27d4c95d032d2dbb02f9/configure.ac#L819-L823\n\nllvm-gcc and hasn't been distributed by Apple since Xcode 5 (2013), so the test will be false in basically all cases (all supported cases?). After this, the decision to set CC is delegated to AC_PROG_CC, which will use \"gcc\" by default.\n\nIf no gcc installed, \"gcc\" is just an alias to clang, and since clang is now fully supported, this will usually compile just fine. The issue is that the configure script itself will inspect CC (e.g. to apply some flags). Sometimes these checks have an additional guard like `cc_is_clang` or `ac_sys_system` = \"Darwin\" but sometimes they don't. E.g. recently I saw warnings about a redundant `-fno-semantic-interposition` being set.\n\nMy very opinionated opinion is that the default CC should always be clang on Apple platforms, just like in the Mac build script. And that some of these CC checks might need to be reviewed. E.g. use `cc_is_clang` whenever is possible, or abstract the actual compiler in a different variable, or possibly—going forward—forget entirely about the \"gcc is actually clang\" case.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS","author":{"url":"https://github.com/sorcio","@type":"Person","name":"sorcio"},"datePublished":"2023-10-09T17:52:35Z","url":"https://github.com/python/cpython/issues/110577"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:45a96f01-b9d6-5d91-48d7-b640545c3c42 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C71C:1325C0:E420BB:12CE3EF:6AFE950B |
| html-safe-nonce | 781cc58a7d695f7f4b13c2b0056a33ff3d390d6ee658049e8adcbd4d4bc09b58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzFDOjEzMjVDMDpFNDIwQkI6MTJDRTNFRjo2QUZFOTUwQiIsInZpc2l0b3JfaWQiOiIzNzE5NjIyMTQ2MDY2OTEyNTIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6188e392351e70f45f6cb3a1d57065dd66df9cbc009ad694a17b7d64c660b55d |
| hovercard-subject-tag | issue:1933535357 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/110577/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c7ec2a5424f002d3878fa913f5d233fb16ff60e604f711feec69aa9c07c4b6af/python/cpython/issues/110577 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c7ec2a5424f002d3878fa913f5d233fb16ff60e604f711feec69aa9c07c4b6af/python/cpython/issues/110577 |
| og:image:alt | Bug report Bug description: configure.ac has some special handling for detecting the default compiler on Apple platforms. Currently the script will check for both "gcc" and "clang". If both are def... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sorcio |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width