From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uMSDJ88dP2JtYwEAgWs5BA (envelope-from ) for ; Sat, 26 Mar 2022 15:06:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sBDPJM8dP2KzPwAA9RJhRA (envelope-from ) for ; Sat, 26 Mar 2022 15:06:07 +0100 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 198ABA48F for ; Sat, 26 Mar 2022 15:06:07 +0100 (CET) Received: from localhost ([::1]:59180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nY73N-0004Dc-Tu for larch@yhetil.org; Sat, 26 Mar 2022 10:06:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nY6nr-0008NF-N2 for guix-patches@gnu.org; Sat, 26 Mar 2022 09:50:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nY6nr-0008TC-B9 for guix-patches@gnu.org; Sat, 26 Mar 2022 09:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nY6nr-0005x1-1q for guix-patches@gnu.org; Sat, 26 Mar 2022 09:50:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54439] Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Mar 2022 13:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54439 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: kiasoc5@tutanota.com Cc: 54439@debbugs.gnu.org X-Debbugs-Original-Cc: 54439@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 54439-submit@debbugs.gnu.org id=B54439.164830257922834 (code B ref 54439); Sat, 26 Mar 2022 13:50:02 +0000 Received: (at 54439) by debbugs.gnu.org; 26 Mar 2022 13:49:39 +0000 Received: from localhost ([127.0.0.1]:53288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nY6nH-0005w2-Vi for submit@debbugs.gnu.org; Sat, 26 Mar 2022 09:49:39 -0400 Received: from mout.gmx.net ([212.227.15.18]:48025) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nY6nD-0005vk-J8 for 54439@debbugs.gnu.org; Sat, 26 Mar 2022 09:49:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648302556; bh=Q/H013Q4DhqcrrWkfdEYqMFBbHeCHJDA4F1KhbKAqrk=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=Hc83NlBdKdMd7UhS0q/x5wromst5H/Inm00028UCLmDhNfGn2MfV21JNpi3K0j3yd yd8jChW0ILl4dzEhPbrx9iZO9mRrb0wqC+iFdHkw3/OcntdE4GtK/2JrxTRSjJWYJv BPhTdRrjrQ7oeD1s1rS0jGXSeFKRzAoO8BgC94XQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MIdiZ-1nJYT317bh-00Ea2U; Sat, 26 Mar 2022 14:49:16 +0100 References: User-agent: mu4e 1.6.10; emacs 27.2 From: Pierre Langlois Date: Sat, 26 Mar 2022 13:36:34 +0000 In-reply-to: Message-ID: <87r16oako6.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:3QRZ3RP67Xpm0beJLnHCgVeIlkNcVtnR3V177xnaZcLfHiQzERb MKm2Ohrab2aqZ4yVg7D+VQNH+0ByJ/8oCBOu3j6WLm4SO8mPBhulVqQVG5PoQMSMw1rn97o 9syDMq06bV1FDobXtL10USgGY7/wZJQEFuQsvYsrzRpZ/x2FPbsDiZ2Kf2Xf5AuRj/UUXvQ U8LL60VDX22GOJZ0iprRA== X-UI-Out-Filterresults: notjunk:1;V03:K0:sBgRPjZ8p+Q=:lBnmfNWLbBshH5pqhTNCgC MVN0dBxTMQXKCVcCjChSEpnPjH46ULamR+qSQc+64yJmsRlyb4KEQp91uctAnLfLslVzuc3ay rURSar9HfZHmPx9xd9C2W1B2LJjhMID/keFzYqD1Zi/ASAWu8ap1oBYtoAxtEF8yxK29/4c4t YQktelVX8Y4WPf2onyNDZQnNEzN3Ak9ITXMUBFC7Ciwr78qABQ4eWZrxta/8jYk3cOVpsr1BW wA9LT3SzHFFz+Q5r9Z7ROoNXF3eOL9XwXFytkmcc3lUerfw0JUTG2ZSDViX7FeQJOuXYTyQGy 5cSx4bdZ55cl3zQyabbUvAsaGT1/jgOAywpV6iQ2/TcFR8vpIChzQzerKYbj4exHld7zzo4Os AAHbk2aA24GhUgVs2jIzxVnh7/qeTJNNEp8QWxEneH9gTIVKwi8WCfCsP1D5hhQwqSdk0t59u kXEUiljAEGZzpuZ+EEm4mLzrs7eSKPcwJqz7xH5DIw9wQHIZ7hzWKVs/r+ozwPXVXEEvkRCK3 5nETrvwlbGnf8JVuiLdJ3vm2a5vnp+wPx2qAj6zYnURASM0SjsuN9tpAmxt6Zb1PZx1K9r9gq y2FuIEb4UBDj2M2zEww6XRTOvrT0zKricjj2OozTExqHKkTkqPuGFneHrwV4b/R0VUpRPXesV Glx0CGkBA3FDSMpdbD9oGG2bsLxWIzGQeeGXWplQN7xqaBfpWDz/0up5W6MgLBkKU3ceUfwyD XB0ArS4uaPjF6YlOcwBxwiZubyO7HsLnZ8P7vWp57JDy6IQjH0gIVi1pYcPuBm4B6IBwvkcxc Jv8Ar3pT7MnBV+MpOq3b+qX7a/vqVhWAKh15ri0OlLE0rsVjudsmq7XKoqdVSR+BgG8KyfmXz jqe6K1VQ350oPdS5PmDR33+2DIwMHSp2gbpOR1aTsuMUkObHj7+ZzXO8OlBt1zwVWOs3Y4J0H 7OyEFDITlatjl2MvAv0RUAiPcSC+lJKNPtHZJ7lT/BlZYFx2WcXKE7OGs3PiZXYmiqwtBI5vy Ki8eduKwEbQIGY9WjrhIwfypvK73gFEh0K/uoM2+cGWBZojyPVExJ3D1Fu0MwmlUS3zzMbhT8 Xo3K+zK9XrAgHk= 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648303567; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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=LxdA96tEbPlPBzIqReqV5mqi+FKH3ANzWuUFDxRjc20=; b=Uqi4jqw/o4zuheNzg5bYs8z4T9ibxGmxcMu+fuwXdJhbaZ2Zr15VOuMqamG/7TgrwQGerq 9IjQFUIUktqSQvn/iZ3muLg1rF9rRWmm/Ni8jJOIJA+OAqTxMOYTGb2GASWGqCGNm6Far2 Hz0wZnXdaLf+dFdgl/vINSY9Zcv7gS+CPz8KQS1Po/DVPzlUhEq/MFLvPqMLaj9d7wK83Z C7FcfvD3VKJlRwWIN7AxBoF3iG9ef7pOsAm2cHeUdNFEOJmw8a8DjXFUKsyQOjfzrNxgSy Np9KKsi4ZPICkDWso/hci2QLg3NjTkQtxiL+VAaDQryqrlTTDyyqwwR7ARLRrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648303567; a=rsa-sha256; cv=none; b=ax149kzywDScV45A5Yjo9QTd7iD1aohGgVqu+iZXAAv3KrdCa1b5droo8Ry/MMgjfJgRJ+ ZucwnYdTy48CpDpmhhJSiv8bKK1aQe60YX4RZXoaTRNHEBU12bLa9+BYCQ/9e2gtjwIahE PCYJgsKzPoAidxyhnbsXNkb2rzldGhc5HLlFz+MrMden8cPcsQF8tNyVEigzGICdA2hNMU 6g3bUCgytdiReX55/Ov1QZ9kI/4Zmj22rfjI8Bsub4cG/VL+7O95FiQ7XH6lp1UmoZvVUq 05ZDCHuCGyF5F4/A4STENfMMU9EqLA1c0Y+/O5BecDTF24N8upwuguEypJyV4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=Hc83NlBd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=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" X-Migadu-Spam-Score: 4.22 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b=Hc83NlBd; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=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" X-Migadu-Queue-Id: 198ABA48F X-Spam-Score: 4.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ea07hheiqKe5 --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hi there, kiasoc5--- via Guix-patches via writes: > Is it safe to update mrustc at the same time as the rust version bump? So we can > bootstrap from rust 1.54 to 1.59. Sorry, I don't have the time and hardware to > help out more. Updating mrustc would be great, as an added bonus, the latest version enables aarch64-linux support. I just submitted a patch for it [0], it would be great to pick it up when next updating rust. [0]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54580 I did also play with boostrapping directly from 1.54, instead of just updating mrustc, but it's not building for me yet. I'm attaching my WIP patch in case somebody wants to take a look. Specifically, it's failing during the cargo build phase, so when testing it I recommend to run the cargo build first to reproduce the issue. I can post a log later, I don't seem to find it just now :-). --8<---------------cut here---------------start------------->8--- diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 38ead406d0..21a6fe206f 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -305,12 +305,12 @@ (define rust-1.54 (chdir "../mrustc") (setenv "MINICARGO_FLAGS" job-spec) (setenv "CARGO_BUILD_JOBS" (number->string job-count)) - (display "Building rustc...\n") - (apply invoke "make" "-f" "minicargo.mk" "output/rustc" - job-spec make-flags) (display "Building cargo...\n") (apply invoke "make" "-f" "minicargo.mk" "output/cargo" job-spec make-flags) + (display "Building rustc...\n") + (apply invoke "make" "-f" "minicargo.mk" "output/rustc" + job-spec make-flags) (display "Rebuilding stdlib with rustc...\n") ;; Note: invoking make with -j would cause a compiler error ;; (unexpected panic). --8<---------------cut here---------------end--------------->8--- Thanks, Pierre --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmI/GdkYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UnZQIALEH0hzY4693l1+1v9vQJsy3 Va+vMkIZWKNanMIUKsEG3le6v2hSPMQ/fT0bXfHi7inD4MN/oOXUd/upONOQQRfk lGK8cHH/Vd6eDXTp+2+uETfDk8Ep3YntygZgQWj82RhElApRi8ueg62+5BaWJotf kmJzBBzHPPs1zd6eBBDOkwWqXwhwL8BsFfbfhP0E/JGcToLILgVX/g+4que9xJSk ywjsKvf/DX7Y8k/nWRC/A5hMRf9Huvpui6MUEaUGLencVun7TQL3T46kmEUuE7Gk tVChv6+9h3jH41AgAbLwHHD4NBIDV53WUQHD8BDpCYpPdqpbfabeQ8Bfm8y8tco= =s7dp -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-mrustc-Update-to-0.10.patch Content-Transfer-Encoding: quoted-printable =46rom cdf2c194834ff55428a22988e4d90f0c133e9eb3 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 26 Mar 2022 13:21:17 +0000 Subject: [PATCH 1/2] gnu: mrustc: Update to 0.10. And enable rust for aarch64-linux! * gnu/packages/rust.scm (%mrustc-commit): Update hash. (%mrustc-source): Update to 0.10. (rust-1.39)[arguments]: Move and adapt the substitute* that prevent fetching sources. Patch /bin/sh in run_rustc/rustc_proxy.sh. [supported-systems]: Add aarch64-linux. =2D-- gnu/packages/rust.scm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 26d6df7a94..67dc5cdaf3 100644 =2D-- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -121,12 +121,10 @@ (define* (rust-bootstrapped-package base-rust versio= n checksum) (package-native-inputs base-rust)))))) ;;; Note: mrustc's only purpose is to be able to bootstap Rust; it's desi= gned -;;; to be used in source form. The latest support for bootstrapping from -;;; 1.39.0 is not yet released so use the latest commit (see: -;;; https://github.com/thepowersgang/mrustc/issues/185). -(define %mrustc-commit "c7066542f8e93d320323749216bf3c82aecb67c2") +;;; to be used in source form. +(define %mrustc-commit "b364724f15fd6fce8234ad8add68107c23a22151") (define %mrustc-source - (let* ((version "0.9") + (let* ((version "0.10") (commit %mrustc-commit) (revision "1") (name "mrustc")) @@ -138,7 +136,7 @@ (define %mrustc-source (file-name (git-file-name name (git-version version revision commit= ))) (sha256 (base32 - "0zv1x6601s5fnnkcdlqkc4bknisqz569qb0iyb9rjsmaf1kh0na3"))))) + "0f7kh4n2663sn0z3xib8gzw0s97qpvwag40g2vs3bfjlrbpgi9z0"))))) ;;; Rust 1.39 is special in that it is built with mrustc, which shortens = the ;;; bootstrap path. @@ -237,10 +235,11 @@ (define rust-1.39 ,(string-take %mrustc-commit 7) "\\\"" " -D VERSION_BUILDTIME=3D" "\"\\\"Thu, 01 Jan 1970 00:00:01 +0000\\\"\"" - " -D VERSION_GIT_ISDIRTY=3D0\n")) + " -D VERSION_GIT_ISDIRTY=3D0\n"))) + (substitute* "minicargo.mk" ;; Do not try to fetch sources from the Internet. - ((": \\$\\(RUSTC_SRC_DL\\)") - ":")) + (("\\$\\(MINICARGO\\) \\$\\(RUSTC_SRC_DL\\)") + "$(MINICARGO)")) (substitute* "run_rustc/Makefile" (("[$]Vtime ") "$V ") @@ -248,6 +247,9 @@ (define rust-1.39 (("-j [[:digit:]]+ ") "") ;; Patch the shebang of a generated wrapper for rustc + (("#!/bin/sh") + (string-append "#!" (which "sh")))) + (substitute* "run_rustc/rustc_proxy.sh" (("#!/bin/sh") (string-append "#!" (which "sh")))))))) (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums @@ -322,9 +324,9 @@ (define rust-1.39 safety and thread safety guarantees.") (home-page "https://github.com/thepowersgang/mrustc") - ;; So far mrustc is x86_64-only. It may support i686 soon: + ;; So far mrustc is (x86_64|aarch64)-only. It may support i686 soon: ;; . - (supported-systems '("x86_64-linux")) + (supported-systems '("x86_64-linux" "aarch64-linux")) ;; Dual licensed. (license (list license:asl2.0 license:expat)))) =2D- 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-wip-bootstrap-from-1.54.patch Content-Transfer-Encoding: quoted-printable =46rom b300f3686f490f5dd9aac205387d7af6886b2208 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Mon, 14 Mar 2022 01:18:16 +0000 Subject: [PATCH 2/2] wip bootstrap from 1.54. =2D-- gnu/packages/patches/rustc-1.54.0-src.patch | 117 +++++++++++++ gnu/packages/rust.scm | 181 ++++---------------- 2 files changed, 150 insertions(+), 148 deletions(-) create mode 100644 gnu/packages/patches/rustc-1.54.0-src.patch diff --git a/gnu/packages/patches/rustc-1.54.0-src.patch b/gnu/packages/pa= tches/rustc-1.54.0-src.patch new file mode 100644 index 0000000000..d075dce39b =2D-- /dev/null +++ b/gnu/packages/patches/rustc-1.54.0-src.patch @@ -0,0 +1,117 @@ +# mrustc is much better at enum packing, so causes almost all of these to= be smaller by one pointer +--- compiler/rustc_ast/src/ast.rs ++++ compiler/rustc_ast/src/ast.rs +@@ -1075,7 +1075,7 @@ pub struct Expr { + } + + // `Expr` is used a lot. Make sure it doesn't unintentionally get bigger= . +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler =3D "mrustc"), target_arch =3D "x86_64", tar= get_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(Expr, 104); + + impl Expr { +@@ -2779,7 +2779,7 @@ pub enum AssocItemKind { + MacCall(MacCall), + } + +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler =3D "mrustc"), target_arch =3D "x86_64", tar= get_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(AssocItemKind, 72); + + impl AssocItemKind { +@@ -2831,7 +2831,7 @@ pub enum ForeignItemKind { + MacCall(MacCall), + } + +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler=3D"mrustc"),target_arch =3D "x86_64", target= _pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(ForeignItemKind, 72); + + impl From for ItemKind { +--- compiler/rustc_hir/src/hir.rs ++++ compiler/rustc_hir/src/hir.rs +@@ -3050,3 +3050,3 @@ + // Some nodes are used a lot. Make sure they don't unintentionally get b= igger. +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler=3D"mrustc"),target_arch =3D "x86_64", target= _pointer_width =3D "64"))] + mod size_asserts { +--- compiler/rustc_middle/src/mir/interpret/error.rs ++++ compiler/rustc_middle/src/mir/interpret/error.rs +@@ -452,2 +452,2 @@ +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler=3D"mrustc"), target_arch =3D "x86_64", targe= t_pointer_width =3D "64"))] + static_assert_size!(InterpError<'_>, 64); +--- compiler/rustc_middle/src/mir/mod.rs ++++ compiler/rustc_middle/src/mir/mod.rs +@@ -2203,2 +2203,2 @@ +-#[cfg(target_arch =3D "x86_64")] ++#[cfg(all(not(rust_compiler=3D"mrustc"), target_arch =3D "x86_64"))] + static_assert_size!(AggregateKind<'_>, 48); +--- compiler/rustc_middle/src/thir.rs ++++ compiler/rustc_middle/src/thir.rs +@@ -147,2 +147,2 @@ +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler=3D"mrustc"), target_arch =3D "x86_64", targe= t_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(Expr<'_>, 144); +--- compiler/rustc_mir/src/interpret/place.rs ++++ compiler/rustc_mir/src/interpret/place.rs +@@ -91,2 +91,2 @@ +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler =3D "mrustc"), target_arch =3D "x86_64", tar= get_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(Place, 64); +@@ -100,2 +100,2 @@ +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler =3D "mrustc"), target_arch =3D "x86_64", tar= get_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(PlaceTy<'_>, 80); +--- compiler/rustc_mir/src/interpret/operand.rs ++++ compiler/rustc_mir/src/interpret/operand.rs +@@ -35,2 +35,2 @@ +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler =3D "mrustc"), target_arch =3D "x86_64", tar= get_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(Immediate, 56); +@@ -90,2 +90,2 @@ +-#[cfg(all(target_arch =3D "x86_64", target_pointer_width =3D "64"))] ++#[cfg(all(not(rust_compiler =3D "mrustc"), target_arch =3D "x86_64", tar= get_pointer_width =3D "64"))] + rustc_data_structures::static_assert_size!(ImmTy<'_>, 72); + +# +# Disable crc32fast's use of stdarch +# +--- vendor/crc32fast/src/specialized/mod.rs ++++ vendor/crc32fast/src/specialized/mod.rs +@@ -1,5 +1,6 @@ + cfg_if! { + if #[cfg(all( ++ not(rust_compiler =3D "mrustc"), + crc32fast_stdarchx86, + any(target_arch =3D "x86", target_arch =3D "x86_64") + ))] { + +# +# Disable std_detect's detection logic (use the same logic as miri) +# +--- library/stdarch/crates/std_detect/src/detect/mod.rs ++++ library/stdarch/crates/std_detect/src/detect/mod.rs +@@ -88,2 +88,2 @@ + cfg_if! { +- if #[cfg(miri)] { ++ if #[cfg(any(miri, rust_compiler =3D "mrustc"))] { + +# PPV-Lite also needs to know that we're pretending to be miri +--- vendor/ppv-lite86/src/lib.rs ++++ vendor/ppv-lite86/src/lib.rs +@@ -12,9 +12,9 @@ +-#[cfg(all(feature =3D "simd", target_arch =3D "x86_64", not(miri)))] ++#[cfg(all(feature =3D "simd", target_arch =3D "x86_64", not(miri), not(r= ust_compiler =3D "mrustc")))] + pub mod x86_64; +-#[cfg(all(feature =3D "simd", target_arch =3D "x86_64", not(miri)))] ++#[cfg(all(feature =3D "simd", target_arch =3D "x86_64", not(miri), not(r= ust_compiler =3D "mrustc")))] + use self::x86_64 as arch; + +-#[cfg(any(miri, not(all(feature =3D "simd", any(target_arch =3D "x86_64"= )))))] ++#[cfg(any(miri, rust_compiler =3D "mrustc", not(all(feature =3D "simd", = any(target_arch =3D "x86_64")))))] + pub mod generic; +-#[cfg(any(miri, not(all(feature =3D "simd", any(target_arch =3D "x86_64"= )))))] ++#[cfg(any(miri, rust_compiler =3D "mrustc", not(all(feature =3D "simd", = any(target_arch =3D "x86_64")))))] + use self::generic as arch; + diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 67dc5cdaf3..38ead406d0 100644 =2D-- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -48,6 +48,8 @@ (define-module (gnu packages rust) #:use-module (gnu packages python) #:use-module (gnu packages ssh) #:use-module (gnu packages tls) + #:use-module (gnu packages version-control) + #:use-module (gnu packages web) #:use-module (gnu packages) #:use-module (guix build-system cargo) #:use-module (guix build-system copy) @@ -140,21 +142,27 @@ (define %mrustc-source ;;; Rust 1.39 is special in that it is built with mrustc, which shortens = the ;;; bootstrap path. -(define rust-1.39 +(define rust-1.54 (package (name "rust") - (version "1.39.0") + (version "1.54.0") (source (origin (method url-fetch) (uri (rust-uri version)) - (sha256 (base32 "0mwkc1bnil2cfyf6nglpvbn2y0zfbv44zfhsd5qg4c9rm6vgd= 8dl")) + (sha256 (base32 "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii3= 1dc")) (modules '((guix build utils))) - (snippet '(for-each delete-file-recursively - '("src/llvm-emscripten" - "src/llvm-project" - "vendor/jemalloc-sys/jemalloc"))) - (patches (search-patches "rustc-1.39.0-src.patch")) + (snippet '(begin + (delete-file-recursively "src/llvm-project") + (delete-file-recursively "vendor/libnghttp2-sys/nghttp= 2") + (delete-file "vendor/libnghttp2-sys/build.rs") + (with-output-to-file "vendor/libnghttp2-sys/build.rs" + (lambda _ + (format #t "fn main() {~@ + println!(\"cargo:rustc-link-lib=3Dnghttp2\= ");~@ + }~%"))) + #t)) + (patches (search-patches "rustc-1.54.0-src.patch")) (patch-flags '("-p0")))) ;default is -p1 (outputs '("out" "cargo")) (properties '((timeout . 72000) ;20 hours @@ -163,8 +171,10 @@ (define rust-1.39 (inputs `(("libcurl" ,curl) ("libssh2" ,libssh2) - ("llvm" ,llvm-9) + ("llvm" ,llvm-12) ("openssl" ,openssl) + ("nghttp2" ,nghttp2 "lib") + ("libgit2" ,libgit2) ("zlib" ,zlib))) (native-inputs `(("bison" ,bison) @@ -252,6 +262,11 @@ (define rust-1.39 (substitute* "run_rustc/rustc_proxy.sh" (("#!/bin/sh") (string-append "#!" (which "sh")))))))) + (add-after 'unpack 'set-linker-locale-to-utf8 + (lambda _ + (substitute* (find-files "." "^linker.rs$") + (("linker.env\\(\"LC_ALL\", \"C\"\\);") + "linker.env(\"LC_ALL\", \"en_US.UTF-8\");")))) (add-after 'patch-generated-file-shebangs 'patch-cargo-checksums (lambda* _ (substitute* "Cargo.lock" @@ -331,21 +346,17 @@ (define rust-1.39 ;; Dual licensed. (license (list license:asl2.0 license:expat)))) -(define rust-1.40 +(define rust-1.55 (package (name "rust") - (version "1.40.0") + (version "1.55.0") (source (origin (method url-fetch) (uri (rust-uri version)) - (sha256 (base32 "1ba9llwhqm49w7sz3z0gqscj039m53ky9wxzhaj11z6yg1ah1= 5yx")) + (sha256 (base32 "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rl= dxj")) (modules '((guix build utils))) - ;; llvm-emscripten is no longer bundled, as that codegen backend g= ot - ;; removed. - (snippet '(for-each delete-file-recursively - '("src/llvm-project" - "vendor/jemalloc-sys/jemalloc"))))) + (snippet '(delete-file-recursively "src/llvm-project")))) (outputs '("out" "cargo")) (properties '((timeout . 72000) ;20 hours (max-silent-time . 18000))) ;5 hours (for armel) @@ -361,8 +372,7 @@ (define rust-1.40 ;; putting the codegen backend in a separate library, which makes thi= s ;; workaround only necessary for this release. (arguments - `(#:validate-runpath? #f - ;; Only the final Rust is tested, not the intermediate bootstrap o= nes, + `(;; Only the final Rust is tested, not the intermediate bootstrap o= nes, ;; for performance and simplicity. #:tests? #f #:imported-modules ,%cargo-utils-modules ;for `generate-all-checks= ums' @@ -380,11 +390,6 @@ (define rust-1.40 (setenv "CC" (search-input-file inputs "/bin/gcc")) ;; The Guix LLVM package installs only shared libraries. (setenv "LLVM_LINK_SHARED" "1"))) - (add-after 'unpack 'add-cc-shim-to-path - (lambda _ - (mkdir-p "/tmp/bin") - (symlink (which "gcc") "/tmp/bin/cc") - (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH"))))= ) (add-after 'unpack 'neuter-tidy ;; We often need to patch tests with various Guix-specific pat= hs. ;; This often increases the line length and makes tidy, rustc'= s @@ -449,7 +454,7 @@ (define rust-1.40 (number->string (parallel-job-coun= t)) "1")))) (invoke "./x.py" job-spec "build" "--stage=3D1" - "src/libstd" + "library/std" "src/tools/cargo")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -490,12 +495,12 @@ (define rust-1.40 `(("cmake" ,cmake-minimal) ("pkg-config" ,pkg-config) ; For "cargo" ("python" ,python-wrapper) - ("rustc-bootstrap" ,rust-1.39) - ("cargo-bootstrap" ,rust-1.39 "cargo") + ("rustc-bootstrap" ,rust-1.54) + ("cargo-bootstrap" ,rust-1.54 "cargo") ("which" ,which))) (inputs `(("jemalloc" ,jemalloc) - ("llvm" ,llvm-9) + ("llvm" ,llvm-12) ("openssl" ,openssl) ("libssh2" ,libssh2) ; For "cargo" ("libcurl" ,curl))) ; For "cargo" @@ -519,126 +524,6 @@ (define rust-1.40 ;; Dual licensed. (license (list license:asl2.0 license:expat)))) -(define rust-1.41 - (let ((base-rust (rust-bootstrapped-package - rust-1.40 "1.41.1" - "0ws5x0fxv57fyllsa6025h3q6j9v3m8nb3syl4x0hgkddq0kvj9q= "))) - (package - (inherit base-rust) - (arguments - (substitute-keyword-arguments (package-arguments base-rust) - ((#:validate-runpath? _ #t) - #t) - ((#:phases phases) - `(modify-phases ,phases - (delete 'add-cc-shim-to-path) - (add-after 'patch-generated-file-shebangs 'patch-cargo-check= sums - (lambda* _ - (substitute* "Cargo.lock" - (("(checksum =3D )\".*\"" all name) - (string-append name "\"" ,%cargo-reference-hash "\"")= )) - (generate-all-checksums "vendor")))))))))) - -(define rust-1.42 - (rust-bootstrapped-package - rust-1.41 "1.42.0" "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks= 6j")) - -(define rust-1.43 - (rust-bootstrapped-package - rust-1.42 "1.43.0" "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarx= km")) - -;; This version requires llvm <=3D 11. -(define rust-1.44 - (rust-bootstrapped-package - rust-1.43 "1.44.1" - "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky")) - -(define rust-1.45 - (let ((base-rust (rust-bootstrapped-package - rust-1.44 "1.45.2" - "0273a1g3f59plyi1n0azf21qjzwml1yqdnj5z472crz37qggr8xp= "))) - (package - (inherit base-rust) - (arguments - (substitute-keyword-arguments (package-arguments base-rust) - ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'set-linker-locale-to-utf8 - (lambda _ - (substitute* (find-files "." "^linker.rs$") - (("linker.env\\(\"LC_ALL\", \"C\"\\);") - "linker.env(\"LC_ALL\", \"en_US.UTF-8\");"))))))))))) - -(define rust-1.46 - (rust-bootstrapped-package - rust-1.45 "1.46.0" "0a17jby2pd050s24cy4dfc0gzvgcl585v3vvyfilniyvjrqkns= id")) - -(define rust-1.47 - (let ((base-rust (rust-bootstrapped-package - rust-1.46 "1.47.0" - "07fqd2vp7cf1ka3hr207dnnz93ymxml4935vp74g4is79h3dz19i= "))) - (package/inherit base-rust - (arguments - (substitute-keyword-arguments (package-arguments base-rust) - ((#:phases phases) - `(modify-phases ,phases - (replace 'build - ;; The standard library source location moved in this rele= ase. - (lambda* (#:key parallel-build? #:allow-other-keys) - (let ((job-spec (string-append - "-j" (if parallel-build? - (number->string (parallel-job-= count)) - "1")))) - (invoke "./x.py" job-spec "build" "--stage=3D1" - "library/std" - "src/tools/cargo"))))))))))) - -(define rust-1.48 - (rust-bootstrapped-package - rust-1.47 "1.48.0" "0fz4gbb5hp5qalrl9lcl8yw4kk7ai7wx511jb28nypbxninkwx= hf")) - -(define rust-1.49 - (rust-bootstrapped-package - rust-1.48 "1.49.0" "0yf7kll517398dgqsr7m3gldzj0iwsp3ggzxrayckpqzvylfy2= mm")) - -(define rust-1.50 - (rust-bootstrapped-package - rust-1.49 "1.50.0" "0pjs7j62maiyvkmhp9zrxl528g2n0fphp4rq6ap7aqdv0a6qz5= wm")) - -(define rust-1.51 - (rust-bootstrapped-package - rust-1.50 "1.51.0" "0ixqkqglv3isxbvl4ldr4byrkx692wghsz3fasy1pn5kr2prns= vs")) - -;;; The LLVM requiriment has been bumped to version 10 in Rust 1.52. Use= the -;;; latest available. -(define rust-1.52 - (let ((base-rust (rust-bootstrapped-package - rust-1.51 "1.52.1" - "165zs3xzp9dravybwslqs1qhn35agp6wacmzpymqg3qfdni26vrs= "))) - (package - (inherit base-rust) - (inputs (alist-replace "llvm" (list llvm-12) - (package-inputs base-rust)))))) - -(define rust-1.53 - (rust-bootstrapped-package - rust-1.52 "1.53.0" "1f95p259dfp5ca118bg107rj3rqwlswy65dxn3hg8sqgl4wwmx= sw")) - -(define rust-1.54 - (let ((base-rust - (rust-bootstrapped-package - rust-1.53 - "1.54.0" "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc"= ))) - (package/inherit base-rust - (source - (origin - (inherit (package-source base-rust)) - (snippet '(delete-file-recursively "src/llvm-project"))))))) - -(define rust-1.55 - (rust-bootstrapped-package - rust-1.54 "1.55.0" "07l28f7grdmi65naq71pbmvdd61hwcpi40ry7kp7dy7m233rld= xj")) - (define rust-1.56 (rust-bootstrapped-package rust-1.55 "1.56.1" "04cmqx7nn63hzz7z27b2b0dj2qx18rck9ifvip43s6dampx8v2= f3")) =2D- 2.34.0 --=-=-=--