Bug#1109669: rustc: Please add patch to fix FTBFS on x32
John Paul Adrian Glaubitz <[email protected]> Mon, 21 Jul 2025 16:37:09 +0200
| Newsgroups | gmane.linux.debian.ports.amd64 |
|---|---|
| Message-ID | <175310862942.20822.14836227371899755342.reportbug__39698.6176654295$1753108768$gmane$org@z6> |
Source: rustc Version: 1.86.0+dfsg1-1~exp2 Severity: normal Tags: ftbfs patch X-Debbugs-Cc: [email protected] User: [email protected] Usertags: x32 Hi, I was finally able to bootstrap rustc on x32 again. \o/ However, it needs the following attached patch to fully build. I will open a pull request on Github get it fixed upstream as well. Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
rustc-fix-x32.diff
(text/plain, 884 B)
--- rustc-1.86.0+dfsg1.orig/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
+++ rustc-1.86.0+dfsg1/src/tools/rust-analyzer/crates/hir-def/src/hir/type_ref.rs
@@ -170,7 +170,7 @@ pub enum TypeRef {
Error,
}
-#[cfg(target_arch = "x86_64")]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
const _: () = assert!(size_of::<TypeRef>() == 16);
pub type TypeRefId = Idx<TypeRef>;
--- rustc-1.86.0+dfsg1.orig/src/tools/rust-analyzer/crates/hir-def/src/path.rs
+++ rustc-1.86.0+dfsg1/src/tools/rust-analyzer/crates/hir-def/src/path.rs
@@ -65,7 +65,7 @@ pub enum Path {
}
// This type is being used a lot, make sure it doesn't grow unintentionally.
-#[cfg(target_arch = "x86_64")]
+#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
const _: () = {
assert!(size_of::<Path>() == 16);
assert!(size_of::<Option<Path>>() == 16);