From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 16698138334 for ; Sat, 26 Jan 2019 03:50:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC1B2E0B93; Sat, 26 Jan 2019 03:50:20 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 96746E0B9A for ; Sat, 26 Jan 2019 03:50:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9041C335D3E for ; Sat, 26 Jan 2019 03:50:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 78786501 for ; Sat, 26 Jan 2019 03:50:14 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1548471515.34783cfa9869949d36d723bcdf0039f3308abee8.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch dev-lang/rust/rust-1.32.0.ebuild X-VCS-Directories: dev-lang/rust/files/ dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 34783cfa9869949d36d723bcdf0039f3308abee8 X-VCS-Branch: master Date: Sat, 26 Jan 2019 03:50:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1b488074-c634-4a2b-bb9f-3798b13d41cf X-Archives-Hash: 7377d8dd512e8d6270b707651b79c3f5 commit: 34783cfa9869949d36d723bcdf0039f3308abee8 Author: Georgy Yakovlev gentoo org> AuthorDate: Sat Jan 26 01:13:29 2019 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Sat Jan 26 02:58:35 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34783cfa dev-lang/rust: fix segfaults with system llvm:7 Bug: https://bugs.gentoo.org/675752 Package-Manager: Portage-2.3.57, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev gentoo.org> .../rust/files/1.32.0-system-llvm-7-SIGSEGV.patch | 33 ++++++++++++++++++++++ dev-lang/rust/rust-1.32.0.ebuild | 1 + 2 files changed, 34 insertions(+) diff --git a/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch new file mode 100644 index 00000000000..afc2cabde4b --- /dev/null +++ b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch @@ -0,0 +1,33 @@ +From 1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 Mon Sep 17 00:00:00 2001 +From: Tom Tromey +Date: Tue, 22 Jan 2019 11:13:53 -0700 +Subject: [PATCH] Fix issue 57762 + +Issue 57762 points out a compiler crash when the compiler was built +using a stock LLVM 7. LLVM 7 was released without a necessary fix for +a bug in the DWARF discriminant code. + +This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7. + +Closes #57762 +--- + src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs +index 6deedd0b5ea3..a354eef6887a 100644 +--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs ++++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs +@@ -1164,7 +1164,11 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool { + // On MSVC we have to use the fallback mode, because LLVM doesn't + // lower variant parts to PDB. + return cx.sess().target.target.options.is_like_msvc +- || llvm_util::get_major_version() < 7; ++ || llvm_util::get_major_version() < 7 ++ // LLVM version 7 did not release with an important bug fix; ++ // but the required patch is in the equivalent Rust LLVM. ++ // See https://github.com/rust-lang/rust/issues/57762. ++ || (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() }); + } + + // Describes the members of an enum value: An enum is described as a union of diff --git a/dev-lang/rust/rust-1.32.0.ebuild b/dev-lang/rust/rust-1.32.0.ebuild index d7262e896e2..bc2a6106b8a 100644 --- a/dev-lang/rust/rust-1.32.0.ebuild +++ b/dev-lang/rust/rust-1.32.0.ebuild @@ -64,6 +64,7 @@ S="${WORKDIR}/${MY_P}-src" PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch "${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch + "${FILESDIR}"/1.32.0-system-llvm-7-SIGSEGV.patch ) toml_usex() {