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

updpatch: rust 1:1.82.0-1 #4243

Merged
merged 1 commit into from
Oct 20, 2024
Merged

updpatch: rust 1:1.82.0-1 #4243

merged 1 commit into from
Oct 20, 2024

Conversation

kxxt
Copy link
Contributor

@kxxt kxxt commented Oct 20, 2024

Musl Patch

riscv64gc-unknown-linux-musl gets promoted to tier 2 and crt_static_default is updated to false in rust-lang/rust#122049, which triggers rust-lang/rust#82521 (comment) when building stage2 library artifacts
(riscv64gc-unknown-linux-gnu -> riscv64gc-unknown-linux-musl).

I patched it to re-enable crt_static_default for riscv64gc-unknown-linux-musl to fix the build and align with the behavior on x86 Arch Linux, where rust-musl defaults to statically link musl.

Wasm compiler_builtins bug

Wasm compiler_builtins rlib from built rust-wasm package includes objects for host architecture(riscv64 in our case, and x86_64 for x86 Arch Linux). This is not reproducible for toolchains installed via rustup so I have reported it to Arch Linux:
https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3

Complications when building 1.82.0

rust-lang/rust#125016 landed in 1.82.0, which breaks building rust 1.82.0 using our packaged rust 1.81.0. Compiling the new compiler_builtins component requires a rustc compiler that includes
rust-lang/rust@99e6a28 but unfortunately 1.81.0 does not, leading to the following ICE: https://archriscv.felixc.at/.status/log.htm?url=logs/rust/rust-1:1.82.0-1.log

internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs:126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }

This is mitigated upstream by bumping stage0 to 1.82: rust-lang/rust#129268 (comment)

So we need to first build 1.82.0 rustc once without the f16/f128 handling part in compiler_builtins, to get a compiler that is capable of handling f16/f128. And then we can use this compiler to compile compiler_builtins with f16/f128 handling. It's not easy to do so in one patch. The most easy way is to build and package rust 1.82.0 twice. This PR covers the first part and disable-f16-f128.diff will be removed in the second part.

Musl Patch
==========

riscv64gc-unknown-linux-musl gets promoted to tier 2 and `crt_static_default`
is updated to false in rust-lang/rust#122049,
which triggers rust-lang/rust#82521 (comment)
when building stage2 library artifacts
(riscv64gc-unknown-linux-gnu -> riscv64gc-unknown-linux-musl).

I patched it to re-enable `crt_static_default` for `riscv64gc-unknown-linux-musl`
to fix the build and align with the behavior on x86 Arch Linux, where `rust-musl`
defaults to statically link musl.

Wasm compiler_builtins bug
==========================

Wasm compiler_builtins rlib from built `rust-wasm` package includes objects for
host architecture(riscv64 in our case, and x86_64 for x86 Arch Linux).
This is not reproducible for toolchains installed via rustup so I have reported it
to Arch Linux:
https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3

Complications when building 1.82.0
==================================

rust-lang/rust#125016 landed in 1.82.0, which breaks
building rust 1.82.0 using our packaged rust 1.81.0.
Compiling the new compiler_builtins component requires a rustc compiler that
includes
rust-lang/rust@99e6a28
but unfortunately 1.81.0 does not, leading to the following ICE:
https://archriscv.felixc.at/.status/log.htm?url=logs/rust/rust-1:1.82.0-1.log

    internal compiler error: compiler/rustc_codegen_llvm/src/abi.rs:126:22: unsupported float: Reg { kind: Float, size: Size(2 bytes) }

This is mitigated upstream by bumping stage0 to 1.82:
rust-lang/rust#129268 (comment)

So we need to first build 1.82.0 rustc once without the f16/f128 handling part
in compiler_builtins, to get a compiler that is capable of handling f16/f128.
And then we can use this compiler to compile compiler_builtins with f16/f128 handling.
It's not easy to do so in one patch. The most easy way is to build and package
rust 1.82.0 twice. This PR covers the first part and disable-f16-f128.diff will
be removed in the second part.
@felixonmars felixonmars merged commit 243ff62 into felixonmars:master Oct 20, 2024
1 check passed
kxxt added a commit to kxxt/archriscv-packages that referenced this pull request Oct 21, 2024
- Fix rotten
- Drop disable-f16-f128.diff as the second part of felixonmars#4243
- The compiler_builtins bug I reported to arch has been fixed:
https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3
@kxxt kxxt mentioned this pull request Oct 21, 2024
felixonmars pushed a commit that referenced this pull request Oct 21, 2024
- Fix rotten
- Drop disable-f16-f128.diff as the second part of #4243
- The compiler_builtins bug I reported to arch has been fixed:
https://gitlab.archlinux.org/archlinux/packaging/packages/rust/-/issues/3
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.

2 participants