public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Georgy Yakovlev" <gyakovlev@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
Date: Sat, 26 Jan 2019 03:50:14 +0000 (UTC)	[thread overview]
Message-ID: <1548471515.34783cfa9869949d36d723bcdf0039f3308abee8.gyakovlev@gentoo> (raw)

commit:     34783cfa9869949d36d723bcdf0039f3308abee8
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 26 01:13:29 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> 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 <gyakovlev <AT> 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 <tom@tromey.com>
+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() {


             reply	other threads:[~2019-01-26  3:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-26  3:50 Georgy Yakovlev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-25 19:29 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ Sam James
2025-02-05 18:33 Arthur Zamarin
2024-12-10  7:22 Joonas Niilola
2024-12-01  8:23 Arthur Zamarin
2024-10-12  4:04 Sam James
2024-02-11  6:01 Sam James
2023-10-02  8:13 WANG Xuerui
2023-08-04 12:30 WANG Xuerui
2023-07-20 18:48 Ionen Wolkens
2023-02-09 20:36 Georgy Yakovlev
2022-11-13 19:14 Georgy Yakovlev
2022-10-20 18:19 Georgy Yakovlev
2022-10-13 17:41 Georgy Yakovlev
2022-09-23 20:06 Georgy Yakovlev
2022-09-16  1:46 Georgy Yakovlev
2022-09-15  3:15 Georgy Yakovlev
2021-12-06 22:42 Georgy Yakovlev
2021-08-09 19:03 Georgy Yakovlev
2021-06-18  9:16 Georgy Yakovlev
2021-06-18  7:46 Georgy Yakovlev
2021-05-02 16:45 Georgy Yakovlev
2021-04-18  1:24 Georgy Yakovlev
2021-04-05  4:27 Georgy Yakovlev
2020-11-24  0:41 Georgy Yakovlev
2020-10-28  1:42 Georgy Yakovlev
2020-06-05  8:53 Stefan Strogin
2020-04-10 11:28 Stefan Strogin
2020-03-28 19:08 Georgy Yakovlev
2019-09-26 22:06 Georgy Yakovlev
2019-06-19  0:35 Georgy Yakovlev
2019-05-26  6:27 Georgy Yakovlev
2019-04-24 16:31 Georgy Yakovlev
2019-04-14  8:03 Georgy Yakovlev
2019-03-07  4:40 Georgy Yakovlev
2018-10-18  9:05 Dirkjan Ochtman
2016-10-24  5:27 Doug Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1548471515.34783cfa9869949d36d723bcdf0039f3308abee8.gyakovlev@gentoo \
    --to=gyakovlev@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox