Created originally on Bitbucket by Yusuke Tsutsumi
Was already merged in Bitbucket before import, marked as merged by the import user
Here's a starter PR for a fix around #2809 (closed).
This ensures that sysconfig.get_config_var("CC") returns a proper cc executable, and also does some naive detection of GCC as well.
By doing so, it ensures that the right compiler arguments are chosen on linux architectures.
This is a fairly minimal attempt, and does not solve for other compilers and arguments like g++.
It looks like there is a module that attempts much more extensive population of config vars at:
But I don't have a lot of context on the history.