-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
python3: backport and fix target musl libc detection #19110
python3: backport and fix target musl libc detection #19110
Conversation
As mentioned in python/cpython#24502 (comment) incorporating this might break loading modules unless they are rebuilt along with the update, therefore this change won't be backported to older versions of upstream cpython. I'm not sure if this is a relevant issue in the context of OpenWrt package. Could somebody more knowledgeable clarify this? |
+ self.assertTrue(suffix.endswith(expected_suffixes), | ||
+ f'unexpected suffix {suffix!r}') |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder. Should be corrected by the fixup. :)
cc: @commodo as well |
this probably means that we should re-visit patch |
(we may have to also re-visit so, to detail my side on this (from memories):
|
Thank you for the comment, @commodo.
I do not think that is necessary, as the change in
It looks like a good idea to stick to upstream Python build process behaviour where possible, although I don't think I have deep enough insight into OpenWrt's Python packages build process to assess the effects removal of patches 14 and 16 will have.
I'm proposing this as a working fix for an existing issue (tested on Turris OS branches based on OpenWrt master and 21.02, Turris 1.x device, as stated in the description). I'm currently in the process of submitting patches allowing OpenWrt to be compiled for mpc85xx targets with Power ISA SPE extension enabled (enables CPU native floating point arithmetic among other things; work already tested and merged in development branches of Turris OS12). Without the backport (plus its fix3), compilation of Python for mpc8548 musl-spe fails. Footnotes |
thanks for the info :) so, from my side these patches are fine if they fix mpc85xx and don't break others (which seems to be the case) i'll let @jefferyto have the last word on this; |
It's been almost 2 weeks since the last update in this thread. Are further adjustments needed? @jefferyto, do you think this can be merged? |
Formalities need to be fixed. |
Patch 030: Backported from Python main branch[^1] for Python to distinguish between glibc and musl libc SOABI. Patch 131: Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch) to be based on the target OS instead of the building OS. See included patches for more detailed descriptions. Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions[^2] enabled. [^1]: merged to python:main as python/cpython#24502 'bpo-43112: detect musl as a separate SOABI' [^2]: https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf Co-authored-by: Pali Rohár <[email protected]> Signed-off-by: Šimon Bořek <[email protected]>
8e4d760
to
79e3a73
Compare
That was a fixup commit left temporarily unsquashed to make the review process cleaner. Has been squashed now and rebased on master. |
Apologies for being absent on this - I would like ask regarding 131-configure_ac-switch-PLATFORM_TRIPLET-suffix-to-musl.patch:
|
Patch 030:
Backported from Python main branch1 for Python to distinguish between glibc and musl libc SOABI.
Patch 131:
Changes PLATFORM_TRIPLET -gnu/-musl suffix detection (performed by the backported patch)
to be based on the target OS instead of the building OS.
See included patches for more detailed descriptions.
Specifically this fixes cross-compilation for mpc8548 CPUs with SPE instructions2 enabled.
Co-authored-by: Pali Rohár [email protected]
Signed-off-by: Šimon Bořek [email protected]
Maintainer: @jefferyto
Compile and run tested: mpc85xx/p2020, Turris 1.x, OpenWrt 21.02 and master
Footnotes
merged to python:main as https://github.com/python/cpython/pull/24502 'bpo-43112: detect musl as a separate SOABI' ↩
https://www.nxp.com/docs/en/reference-manual/SPEPEM.pdf ↩