From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WPyQAZe+zGZePwEA62LTzQ:P1 (envelope-from ) for ; Mon, 26 Aug 2024 17:42:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WPyQAZe+zGZePwEA62LTzQ (envelope-from ) for ; Mon, 26 Aug 2024 19:42:47 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="X5euqm/k"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1724694166; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2OXH66NVw3pHpwUcsM1vDaedshkcAVwMeNyRUHW+3Qo=; b=d2k6OfDjkPFQ/vzrtFmkagNsHLzbRsCfHtLCQjeiJzWoiilm/cnZ99g++TEy1JQBdVJCy7 fLZ9ugO8UbSJi+kPYtL+E14Qq9Zbq0xzrbBNoE044peexM4tvz/CXxdrk4feAB0EFtO/we ueIs0LCj4dR+uGocbISir3TodShb5rie6KiwFG2FtZplD+FnIcBa9ZL9+ASl3mv/Ra68I+ w4LPL2riuYDvsIz8r8vksJrEggDMh/MTr8xZAgfB9mxmBkH4R3nuUViMqsPiMrVCJHCVwJ ZiYPcXfF0q1erJ86zWJK5TOjGBami3YwdkWClH09yVsiWiCM02275/NNm5ybBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1724694166; a=rsa-sha256; cv=none; b=BY9wQJuFFT3fY22YlRPWdnNU793ewFN4M9h0NZW8tQFGIHqwEbrLhk80WSlk3iqZvWkwqW emEP3h3JR7/9ie1qCVX4HzOOQxmurWjQs3AeJdABgCJ7rxOA/uJ/7Pj2+avgTLm9VLmqCA vOR3PK54GZgV9St/c6WHpVQRDaJYJOgn6qpRbU8L4IsN4zDq/KvzhA7eADlhVjXL8IQEQq tR3z5k/voWO399ChvclAIknzXu63XGNKjH9PThDwSyrjbPSODQhvFp42iGZ50IDphTYt5a pJeeYvb8ucWu+4+j0VCiip21tCgh+njKMpZzHbvokrU9ZPlIpQVvBiTbSctNsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="X5euqm/k"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C40CB71BC5 for ; Mon, 26 Aug 2024 19:42:46 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sidjI-0006Bs-OK; Mon, 26 Aug 2024 13:42:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sidjG-0006Ap-OG for guix-patches@gnu.org; Mon, 26 Aug 2024 13:42:10 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sidjG-0002n7-FC for guix-patches@gnu.org; Mon, 26 Aug 2024 13:42:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=2OXH66NVw3pHpwUcsM1vDaedshkcAVwMeNyRUHW+3Qo=; b=X5euqm/k0iHQ/VQaC5Qq2YhcBoW94Jpsu6ixRsSZTBtFZq3gqRhvO2QvekpeCzhhwnTUqTPeNUo7/ffZditVYDgZiU+dRuepLSt7g29QhUQzYoWvMgb9q/tXjyQqTExR3qu7Vp5cX5kFDOOh2zVT0FBRNfPMbzgd8maHkCvQLrmt69SPcyLoAa9F/kJqRkNzbE+cNeIMDp6yovBqxpEmiXRG/b3UvF8RZaiAj0FeM58L2mGGbOOD+tvxIaKefD2F7Zj+uYbMXd580Ri17ij+xlI8ZP8zK1X+5AmZ+f6RWsBftDWI4oroWo+71OhTa9kZnYcPmOCe4lxAz5uEzAImmQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sidk5-0004Yy-Uu for guix-patches@gnu.org; Mon, 26 Aug 2024 13:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72821] [PATCH 1/4] gnu: rust: Update to 1.78 References: <20240826173836.1285159-1-brennan@umanwizard.com> In-Reply-To: <20240826173836.1285159-1-brennan@umanwizard.com> Resent-From: brennan@umanwizard.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 26 Aug 2024 17:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72821 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72821@debbugs.gnu.org Cc: Brennan Vincent , efraim@flashner.co.il Received: via spool by 72821-submit@debbugs.gnu.org id=B72821.172469412917434 (code B ref 72821); Mon, 26 Aug 2024 17:43:01 +0000 Received: (at 72821) by debbugs.gnu.org; 26 Aug 2024 17:42:09 +0000 Received: from localhost ([127.0.0.1]:45151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sidjF-0004X7-8Z for submit@debbugs.gnu.org; Mon, 26 Aug 2024 13:42:09 -0400 Received: from smtp.umanwizard.com ([54.203.248.109]:42952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sidjA-0004WT-4P for 72821@debbugs.gnu.org; Mon, 26 Aug 2024 13:42:08 -0400 Received: from localhost ([184.75.93.166]) by smtp.umanwizard.com ; 26 Aug 2024 17:41:06 +0000 X-Fes-Received-For: 72821@debbugs.gnu.org X-Fes-Received-From: From: brennan@umanwizard.com Date: Mon, 26 Aug 2024 13:40:54 -0400 Message-ID: <20240826174057.1285361-1-brennan@umanwizard.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Fes-Encrypted: true X-Fes-Ehlo-Domain: localhost X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: C40CB71BC5 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.01 X-Spam-Score: -9.01 X-TUID: nJ0ZWAbuW0WG From: Brennan Vincent * gnu/packages/rust.scm (rust): Update to 1.78 Change-Id: I7bf37a9321447ac21644af0e2d023b8bc556da59 --- .../patches/rustc-unwinding-fix.patch | 29 +++++++++++++++++++ gnu/packages/rust.scm | 23 +++++++++++---- 2 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/rustc-unwinding-fix.patch diff --git a/gnu/packages/patches/rustc-unwinding-fix.patch b/gnu/packages/patches/rustc-unwinding-fix.patch new file mode 100644 index 0000000000..8e98d6d7d9 --- /dev/null +++ b/gnu/packages/patches/rustc-unwinding-fix.patch @@ -0,0 +1,29 @@ +From ce49a9d9e52ca6062fe0894e72d954511fa8820f Mon Sep 17 00:00:00 2001 +From: Shmuel Hazan +Date: Sat, 1 Jun 2024 08:49:44 +0300 +Subject: [PATCH] Add UWTable attr to functions with a personality function + +Adding a personality function forces LLVM to generate unwinding info that might be incorrect. +To solve it, always apply the UWTable attribute when setting a personality function. + +Fixes #123733 +--- + compiler/rustc_codegen_llvm/src/builder.rs | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs +index 72ff9ea118e28..668f0a33a4e80 100644 +--- a/compiler/rustc_codegen_llvm/src/builder.rs ++++ b/compiler/rustc_codegen_llvm/src/builder.rs +@@ -1029,6 +1029,11 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { + } + + fn set_personality_fn(&mut self, personality: &'ll Value) { ++ // Work around for https://github.com/rust-lang/rust/issues/123733 ++ // add the UWTable attribute to every function with a personality function. ++ let uwtable = attributes::uwtable_attr(self.llcx, None); ++ attributes::apply_to_llfn(self.llfn(), llvm::AttributePlace::Function, &[uwtable]); ++ + unsafe { + llvm::LLVMSetPersonalityFn(self.llfn(), personality); + } diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 465899fe9d..9987d5569f 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -984,8 +984,15 @@ (define-public rust-1.77 "[build]\noptimized-compiler-builtins = false"))))))))))) (define-public rust-1.78 - (rust-bootstrapped-package - rust-1.77 "1.78.0" "1afmj5g3bz7439w4i8zjhd68zvh0gqg7ymr8h5rz49ybllilhm7z")) + (let ((base-rust (rust-bootstrapped-package rust-1.77 "1.78.0" + "1afmj5g3bz7439w4i8zjhd68zvh0gqg7ymr8h5rz49ybllilhm7z"))) + (package + (inherit base-rust) + (source + (origin + (inherit (package-source base-rust)) + ;; see https://github.com/rust-lang/rust/pull/125844 + (patches (search-patches "rustc-unwinding-fix.patch"))))))) (define-public rust-1.79 (let ((base-rust (rust-bootstrapped-package rust-1.78 "1.79.0" @@ -1027,7 +1034,7 @@ (define (make-ignore-test-list strs) ;;; Here we take the latest included Rust, make it public, and re-enable tests ;;; and extra components such as rustfmt. (define-public rust - (let ((base-rust rust-1.77)) + (let ((base-rust rust-1.78)) (package (inherit base-rust) (properties (append @@ -1047,11 +1054,10 @@ (define-public rust ;; These are referenced by the cargo output ;; so we unbundle them. "vendor/curl-sys/curl" - "vendor/curl-sys-0.4.63+curl-8.1.2/curl" "vendor/libffi-sys/libffi" "vendor/libnghttp2-sys/nghttp2" "vendor/libz-sys/src/zlib" - "vendor/libz-sys-1.1.9/src/zlib")) + "vendor/libz-sys-1.1.12/src/zlib")) ;; Use the packaged nghttp2 (delete-file "vendor/libnghttp2-sys/build.rs") (with-output-to-file "vendor/libnghttp2-sys/build.rs" @@ -1167,6 +1173,11 @@ (define-public rust (substitute* "features2.rs" ,@(make-ignore-test-list '("fn dep_with_optional_host_deps_activated")))))) + (add-after 'unpack 'disable-tests-requiring-crates.io + (lambda _ + (substitute* "src/tools/cargo/tests/testsuite/install.rs" + ,@(make-ignore-test-list + '("fn install_global_cargo_config"))))) (add-after 'unpack 'patch-command-exec-tests ;; This test suite includes some tests that the stdlib's ;; `Command` execution properly handles in situations where @@ -1225,7 +1236,7 @@ (define-public rust ((" = rpath.*" all) (string-append all " " - "rustflags.arg(\"-Clink-args=-Wl,-rpath=" + "self.rustflags.arg(\"-Clink-args=-Wl,-rpath=" out "/lib\");\n")))))) (add-after 'configure 'add-gdb-to-config (lambda* (#:key inputs #:allow-other-keys) -- 2.45.2