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

Some initial work on x32 and n32 ABI support #21717

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Oct 16, 2024

First round of patches towards #21711 and #21712.

  • zig cc is now ~fully functional for x86_64-linux-(gnu,musl)x32 and mips64(el)-linux-(gnu,musl)abin32.
  • As part of this, mips64(el)-linux-musl triples have been changed to mips64(el)-linux-muslabi64 to be consistent with the glibc triples.
  • The musl updates here also bring RELR relocation support for PIE (apparently dlstart.c hadn't been updated for 1.2.5?).

Next step is to port the standard library, then get tests passing under QEMU (for n32 anyway; there seems to be no QEMU for x32).

@alexrp alexrp requested a review from andrewrk October 16, 2024 05:58
@alexrp
Copy link
Member Author

alexrp commented Oct 16, 2024

FYI @Vexu @ehaas for Aro changes.

This is needed for muslx32 and muslabin32 support.
Once we upgrade to LLVM 20, these should be lowered verbatim rather than to
simply musl. Similarly, the special case in llvmMachineAbi() should go away.
Adds mips64-linux-muslabin32 and x86_64-linux-muslx32 headers.
Adds mipsn32 and x32 sources.

Also remove some useless .in files.
With this, MIPS triples for musl are in line with glibc triples.
This fixes an X86_64_32 relocation linker error when targeting gnux32.
Also update the syscalls file based on Linux 6.10. No diffs other than x32.
LLVM doesn't even recognize the gnuilp32 spelling as an alternative.
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.

1 participant