Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _is_gcc() for cross-compiler prefixes and handle cland and clang++ #3326

Closed
wants to merge 2 commits into from

Conversation

zboszor
Copy link

@zboszor zboszor commented May 18, 2022

Summary of changes

This patch fixes building python modules using cython for their build in the Yocto cross-compiler framework.
Compilers are not just called gcc, g++ or clang, they may have a <machine-triplet>- prefix in the executable name.
Therefore, use a regex match instead of the string equality check.
Also, handle clang and clang++ along the same lines. The same unixccompiler.py file in the Python core already handles clang, although it doesn't handle the machine triplet prefix.

Pull Request Checklist

@abravalheri
Copy link
Contributor

Thank you very much @zboszor.

Would you consider submitting the change to https://github.com/pypa/distutils?

The setuptools/_distutils folder is periodically synchronized with that repository, so any change merged into setuptools can potentially be overwritten in one of these periodic pulls or cause merge conflicts...

@zboszor
Copy link
Author

zboszor commented May 18, 2022

Thank you very much @zboszor.

Would you consider submitting the change to https://github.com/pypa/distutils?

The setuptools/_distutils folder is periodically synchronized with that repository, so any change merged into setuptools can potentially be overwritten in one of these periodic pulls or cause merge conflicts...

Sure, thanks for the pointer.

@zboszor
Copy link
Author

zboszor commented May 18, 2022

pypa/distutils#143

@abravalheri
Copy link
Contributor

@zboszor I can see that the PR in distutils was closed because apparently it is not needed.

I understand that there might be a problem with the python3-setuptools package in Yocto releases. But I suppose that the solution for that would be having an up-to-date release of the python3-setuptools package on that platform...

Given this scenario, I will go ahead and close this PR. But please feel free to follow up the last comment from Jason in the pypa/distutils thread, if you feel that something is missing.

Thank you again for the contribution and the investigation.

@abravalheri abravalheri closed this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants