[Pkg-rust-maintainers] Bug#973414: rustc: produces non-baseline opcodes for compiler_builtins::int::udiv::__udivmoddi4 on i386
James Addison
jay at jp-hosting.net
Mon Mar 27 08:52:44 BST 2023
Package: rustc
Followup-For: Bug #973414
> If that's the case, then one question is: why do those existing i386 packages
> contain those opcodes?
When building the Rust compiler, some builtins (intrinsics?) may be compiled
from C source code.
If _those_ aren't targeted to the correct architecture, then -- because they
are part of the stdlib and potentially other binaries in the base Rust
toolchain, and statically linked into downstream Rust binaries -- that
misconfiguration can affect downstream builds.
There's some discussion about this at:
* https://github.com/rust-lang/rust/issues/14441
* https://github.com/rust-lang/rust/pull/31110
Today I plan to rebuild rustc on Debian i386 with RUSTC_FLAGS (different to
RUSTFLAGS) configured for i686 during the build. That's inspired by a comment
here: https://github.com/rust-lang/rust/pull/31110#issuecomment-174327810
To implement that, I've temporarily added RUSTC_FLAGS to the list of
per-architecture buildflags accepted by dpkg-buildflags on my system. I don't
know whether that's the best place to put that configuration, but it would
allow it to be configured on a per-architecture basis in Debian.
More information about the Pkg-rust-maintainers
mailing list