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

gh-95855: Better platform triplet detection code #96001

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Aug 15, 2022

@tiran tiran force-pushed the platform-triplet branch from 44bccee to 629b5a7 Compare August 15, 2022 17:49
@arhadthedev
Copy link
Member

@tiran It would be great to see it merged.

Comment on lines +34 to +40
# if _MIPS_SIM == _ABIO32
define LIBC_MIPS_SIM gnu
# elif _MIPS_SIM == _ABIN32
define LIBC_MIPS_SIM gnuabin32
# elif _MIPS_SIM == _ABI64
define LIBC_MIPS_SIM gnuabi64
# endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# if _MIPS_SIM == _ABIO32
define LIBC_MIPS_SIM gnu
# elif _MIPS_SIM == _ABIN32
define LIBC_MIPS_SIM gnuabin32
# elif _MIPS_SIM == _ABI64
define LIBC_MIPS_SIM gnuabi64
# endif
# if _MIPS_SIM == _ABIO32
# define LIBC_MIPS_SIM gnu
# elif _MIPS_SIM == _ABIN32
# define LIBC_MIPS_SIM gnuabin32
# elif _MIPS_SIM == _ABI64
# define LIBC_MIPS_SIM gnuabi64
# endif

@jefferyto
Copy link
Contributor

I'm working on fixing/improving the platform triplet for Python on OpenWrt, and I think it would be better to build on this rather than the existing code in configure.ac.

jefferyto added a commit to jefferyto/openwrt-packages that referenced this pull request Jul 13, 2023
Currently, configure does not find the correct platform triplet for musl
as the default build/host values passed by OpenWrt buildroot does not
contain the text "linux-musl".

This uses python/cpython#96001 (currently in
draft status) as a base (patch retains changes to configure.ac but
removes changes to configure), and fixes/expands the detection for mips
soft float and mips musl.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
jefferyto added a commit to jefferyto/openwrt-packages that referenced this pull request Jul 15, 2023
Currently, configure does not find the correct platform triplet for musl
as the default build/host values passed by OpenWrt buildroot does not
contain the text "linux-musl".

This uses python/cpython#96001 (currently in
draft status) as a base (patch retains changes to configure.ac but
removes changes to configure), and fixes/expands the detection for mips
soft float and mips musl.

The various libc values for musl (muslsf, musln32, etc.) are from
make-cross-make[1].

[1]: https://github.com/richfelker/musl-cross-make/blob/fe915821b652a7fa37b34a596f47d8e20bc72338/README.md#supported-targets

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
@jefferyto
Copy link
Contributor

@tiran is there anything blocking this PR? I have some updates to this change (in openwrt/packages#21552, specifically in this commit) that I'd like to submit upstream.

jefferyto added a commit to jefferyto/openwrt-packages that referenced this pull request Jul 19, 2023
Currently, configure does not find the correct platform triplet for musl
as the default build/host values passed by OpenWrt buildroot does not
contain the text "linux-musl".

This uses python/cpython#96001 (currently in
draft status) as a base (patch retains changes to configure.ac but
removes changes to configure), and fixes/expands the detection for mips
soft float and mips musl.

The various libc values for musl (muslsf, musln32, etc.) are from
make-cross-make[1].

[1]: https://github.com/richfelker/musl-cross-make/blob/fe915821b652a7fa37b34a596f47d8e20bc72338/README.md#supported-targets

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
@erlend-aasland
Copy link
Contributor

Superseded by #107221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants