Source: rustc Version: 1.34.2+dfsg1-1 Severity: normal Tags: patch User: debian-sp...@lists.debian.org Usertags: sparc64
Hi! Rust 1.34.0 introduced a regression which broke the compiler on sparc64 [1]. There is now an upstream patch which has already been acked by upstream and should therefore be backported to all Debian versions of rustc >= 1.34.0. Thanks, Adrian > [1] https://github.com/rust-lang/rust/issues/61306 > [2] https://github.com/rust-lang/rust/pull/61881 -- .''`. 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 3fa7411050e5f712c28b6e97346e9da3833407bb Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> Date: Sun, 16 Jun 2019 02:53:33 +0200 Subject: [PATCH] librustc_codegen_llvm: Use repr(transparent) for bitflags over repr(C) (#61306) In order to make sure that Rust's bitflags types are passed the same way in the Rust ABI as they are in the C ABI, we need to use the attribute repr(transparent) over the repr(C) attribute for the single-field bitflags structs in in order to prevent ABI mismatches. Thanks to Michael Karcher for finding this bug. --- src/librustc_codegen_llvm/llvm/ffi.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index a71243c7c8..a5c295cd45 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -564,7 +564,7 @@ pub mod debuginfo { // These values **must** match with LLVMRustDIFlags!! bitflags! { - #[repr(C)] + #[repr(transparent)] #[derive(Default)] pub struct DIFlags: ::libc::uint32_t { const FlagZero = 0; @@ -593,7 +593,7 @@ pub mod debuginfo { // These values **must** match with LLVMRustDISPFlags!! bitflags! { - #[repr(C)] + #[repr(transparent)] #[derive(Default)] pub struct DISPFlags: ::libc::uint32_t { const SPFlagZero = 0; -- 2.20.1