Hello! On 9/9/21 17:41, John Paul Adrian Glaubitz wrote: > OK, Rust 1.55.0 was just released without this particular patch. So in order > to > get it to work on x32, we will have to include the patch from [1].
Attaching the patch rebased for 1.55.0. I have bootstrapped rustc 1.55.0 for x32 with this patch and uploaded it to the "unreleased" archive. Thus, it should now be enough to update cargo and rustc to their latest versions as usual and then just include this patch for rustc 1.55.0. Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
From d146bd14dde5af4540ebb8334311a6ed0946cf92 Mon Sep 17 00:00:00 2001 From: Harald van Dijk <har...@gigawatt.nl> Date: Sun, 5 Sep 2021 16:42:36 +0100 Subject: [PATCH] Change more x64 size checks to not apply to x32. Commit 95e096d6 changed a bunch of size checks already, but more have been added, so this fixes the new ones the same way: the various size checks that are conditional on target_arch = "x86_64" were not intended to apply to x86_64-unknown-linux-gnux32, so add target_pointer_width = "64" to the conditions. --- compiler/rustc_middle/src/mir/mod.rs | 8 ++++---- compiler/rustc_parse/src/parser/attr_wrapper.rs | 2 +- src/librustdoc/html/render/context.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index da0d2575dcb..7fd97aa1f23 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -1710,7 +1710,7 @@ pub struct Place<'tcx> { pub projection: &'tcx List<PlaceElem<'tcx>>, } -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] static_assert_size!(Place<'_>, 16); #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -2036,7 +2036,7 @@ pub enum Operand<'tcx> { Constant(Box<Constant<'tcx>>), } -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] static_assert_size!(Operand<'_>, 24); impl<'tcx> Debug for Operand<'tcx> { @@ -2174,7 +2174,7 @@ pub enum Rvalue<'tcx> { Aggregate(Box<AggregateKind<'tcx>>, Vec<Operand<'tcx>>), } -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] static_assert_size!(Rvalue<'_>, 40); #[derive(Clone, Copy, Debug, PartialEq, Eq, TyEncodable, TyDecodable, Hash, HashStable)] @@ -2200,7 +2200,7 @@ pub enum AggregateKind<'tcx> { Generator(DefId, SubstsRef<'tcx>, hir::Movability), } -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] static_assert_size!(AggregateKind<'_>, 48); #[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, TyEncodable, TyDecodable, Hash, HashStable)] diff --git a/compiler/rustc_parse/src/parser/attr_wrapper.rs b/compiler/rustc_parse/src/parser/attr_wrapper.rs index e1d0b84f419..e47799ecba7 100644 --- a/compiler/rustc_parse/src/parser/attr_wrapper.rs +++ b/compiler/rustc_parse/src/parser/attr_wrapper.rs @@ -34,7 +34,7 @@ pub struct AttrWrapper { // This struct is passed around very frequently, // so make sure it doesn't accidentally get larger -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] rustc_data_structures::static_assert_size!(AttrWrapper, 16); impl AttrWrapper { diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index b6c3220901f..6abe980b337 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -72,7 +72,7 @@ } // `Context` is cloned a lot, so we don't want the size to grow unexpectedly. -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] rustc_data_structures::static_assert_size!(Context<'_>, 112); /// Shared mutable state used in [`Context`] and elsewhere. -- 2.26.2