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

Please recommend i386-* as multiarch tuple for IA32 #341

Closed
smcv opened this issue Jul 26, 2021 · 4 comments
Closed

Please recommend i386-* as multiarch tuple for IA32 #341

smcv opened this issue Jul 26, 2021 · 4 comments

Comments

@smcv
Copy link
Contributor

smcv commented Jul 26, 2021

data/platforms.yml uses x86 as the preferred spelling for the shared ABI of all 32-bit x86 CPUs, and i386 as a compatibility alias.

This makes Appstream almost, but not quite, compatible with the multiarch tuples used in Debian, the freedesktop.org SDK and systemd, which seems unfortunate.

The "big idea" of the Debian multiarch tuples was that they are GNU Autotools tuples, with two changes that were necessary in order to flatten all cross-compatible tuples into a single tuple per ABI:

  • the vendor part of cpu-vendor-kernel[-abi] is omitted, similar to cross-compiler tool prefixes, so it's x86_64-linux-gnu rather than x86_64-pc-linux-gnu or x86_64-unknown-linux-gnu;
  • the cpu part is defined to be normalized to the oldest or most generic CPU in a family of compatible ABIs, so it's i386-linux-gnu or arm-linux-gnueabi, not i686-linux-gnu or armv5tel-linux-gnueabi (in practice the only architectures affected by this seem to be the 32-bit x86 and ARM families).

If Appstream treated x86-linux-gnu as a compatibility alias for i386-linux-gnu instead of the other way round, then I think its tuples would exactly match multiarch tuples, with the possible exception of x32 (which has GNU and multiarch tuples x86_64-linux-gnux32, whereas Appstream currently only recognises the gnu_ilp32 used for the equivalent ILP32 ABI on ARM - but x32 is basically dead so this maybe isn't a big problem).

@ximion
Copy link
Owner

ximion commented Jul 26, 2021

Makes complete sense to me, and this divergence was probably an oversight from the start. I didn't know the freedesktop SDK also uses the same schema, that's very nice! :-)

@ximion ximion self-assigned this Jul 26, 2021
@smcv
Copy link
Contributor Author

smcv commented Jul 26, 2021

As far as I know, the freedesktop SDK is the second independent use of Debian-style multiarch (libdir = /usr/lib/MULTIARCH), after Debian and its derivatives.

@ximion
Copy link
Owner

ximion commented Jul 26, 2021

It's a sensible design for this purpose :-) Which is probably why there were no objections when I asked for feedback about adopting it for AppStream (either that, or nobody else cared that much :-P).
I'm currently traveling, so it might take a bit of time for me to actually make this change, but this issue is tagged, so I won't forget.

@ximion
Copy link
Owner

ximion commented Aug 25, 2021

Looks like ia32 was the actual expected name for this... A bit of a mess, thank you for raising this, as apparently AppStream itself was confused about how to call this.

@ximion ximion closed this as completed in dc2d22e Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants