From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id PIoUFWBNbl8qFgAA0tVLHw (envelope-from ) for ; Fri, 25 Sep 2020 20:04:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kMLJEGBNbl/GWwAA1q6Kng (envelope-from ) for ; Fri, 25 Sep 2020 20:04:48 +0000 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 844369402AC for ; Fri, 25 Sep 2020 20:04:47 +0000 (UTC) Received: from localhost ([::1]:52300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLtxU-0003Cj-Iy for larch@yhetil.org; Fri, 25 Sep 2020 16:04:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLtwp-0003AH-0r for guix-patches@gnu.org; Fri, 25 Sep 2020 16:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33866) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLtwo-0001Az-O7 for guix-patches@gnu.org; Fri, 25 Sep 2020 16:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLtwo-0008SA-Ka for guix-patches@gnu.org; Fri, 25 Sep 2020 16:04:02 -0400 Subject: bug#42888: [PATCH] gnu: rust: Fix install phase for non-x86_64 platforms. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Fri, 25 Sep 2020 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 42888 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Marius Bakke Cc: Pierre Langlois , 42888-done@debbugs.gnu.org Mail-Followup-To: 42888@debbugs.gnu.org, pierre.langlois@gmx.com, pierre.langlois@gmx.com Received: via spool by 42888-done@debbugs.gnu.org id=D42888.160106423032451 (code D ref 42888); Fri, 25 Sep 2020 20:04:02 +0000 Received: (at 42888-done) by debbugs.gnu.org; 25 Sep 2020 20:03:50 +0000 Received: from localhost ([127.0.0.1]:45408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLtwR-0008R6-Ra for submit@debbugs.gnu.org; Fri, 25 Sep 2020 16:03:50 -0400 Received: from mout.gmx.net ([212.227.17.20]:45803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLtwP-0008Qp-Am for 42888-done@debbugs.gnu.org; Fri, 25 Sep 2020 16:03:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1601064210; bh=GQ9eEoFh1pOiBxYZ2H/CtpEyS4iqd/NyshER2whcxoY=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date; b=FLWuTPx6SDOY5VXKQUNksQaHZfPR/X3p0lHbQBF0ntLwoCvzWLwXnMwkYlFfYPXZw C3ofoMn4R45v9S7ZlMYD9282dKOCBCK9vZECiB+r+goIUWn5M1Nbbd6l9n17P93GwT L/mWnKiCXoPMtpcttg4DAUQeAI4/VT3MYVridKSk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MWAOQ-1jx85w0lmU-00XYGV; Fri, 25 Sep 2020 22:03:30 +0200 References: <87d03qptmv.fsf@gmx.com> <875z9ips81.fsf@gmx.com> <20200819215552.stnpvcfaj5xpqkn7@gravity> <874koy47g8.fsf@gmx.com> <87zh5l6g8r.fsf@gmx.com> <87lfgx4rc8.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Pierre Langlois In-reply-to: <87lfgx4rc8.fsf@gnu.org> Date: Fri, 25 Sep 2020 21:03:23 +0100 Message-ID: <87mu1d8vzo.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:ugGRLDe/BMd1ScXeItKT5U0WUn6fR85lA5YHrd3HRD2FV6oqNKJ JG32fyKNalUIvLw/Btonykl2wTvtQ00urWxNzqQxKJtEi0vJuYeedbeK9vofnsZ9B8EJuPJ Q4jMZCzDsSkDEfKVbfjSsvIq/d3GCh9N8LuGzfegg2Jhthc7yV8pPCF8cfcTWBMr/ctQ6Ks NgY8klOV/L7bkDhhpPaIg== X-UI-Out-Filterresults: notjunk:1;V03:K0:XvpGqrAbVPA=:QzGU6SwtZtUxt3H4t8499q ge9MWkS2ecZI148GnprKSA1eUmX8kj23D8qi/j/AWcM7ECKIq8pghbjC6Y9SrHpQoFstsk9Sx f/Ko72/78J+Ma4NZ7kvayU9552yhPJ5c4VI0/kcMxxmEUwqYZD7S2j3rBsDytlqZGHQ/pqDa3 drW48bpyFoN8QleON7xTvSvJ62hw+J2x+a9TA0VL9OsV8CL5HPDytpeHmE9fb8pBmgqRCYf1o iWfMDunhUp53EeeQxvJHjcoZ03g4i1SzqG6KZyqtAAUPcCaLdFH2kDDtcpXL0IRzG4MymQlrh K4qZH9UtsFRJgZENDXRFZdd3OoqEoqB1f39/AfnNf6sw8Cw4CwVUa7zT3Ppl8K06MaS7vQCeE C13GUzAnQpgK8VfJ1lhnsbD9ihrkNObsYwaS0TmTFrYPKCviwhfw2adzud0BUYWWZD+WIaqHf KCtvkDRbTwHpJlgXoEBlGiBx1vWC4Wu2OEU/YnwtgBa9dOLIoY6Tj83uNdzbN70ryhGmvBDNl vjPTrkaxH5HRV/qmVpFLoBRSzFi2eW7ZdgRQzSBnPjPrUPl+g63Qj13DSQwVbqDpis79+WvbA JaNe96YiNHeXdqSCchke8GSUSTLSQlgwEbOq0aj6pir2DQQ9xhXSZHB66WhT84CdomkCo85mD ujN2iq/SI61nw8Z66faRCQWENqMe2hSAuxvfo2nHORwbfDr1OCI9Nt4BF+nGWBKPjm6dvEY8e ZsuHasALhLmZVRhTEzaW7lAVnhOXcrnCBliBqXITTOMLoL4bwpuaw8CM/maVsF2ZbTAWQt5Xk qleMOGprmyHZ9jzzpXTtTFUf5XMzp/A+cG/c+ISuY87rmUv6eh+La1goF9TSDT687SMjG4hYy lsvzFWkvzYe+L76PODXyN7cQ19fhUkn2+TrQwoqFHmvBtrCE3h4W24J///CePwt7UCiwtbr4+ VA+cGQsNG2qneBDrCp7CA8pb88X6IaWv+7TT5DmcbhzvfAYcam7bbrAa5+Vl3AuOawj3dBf8R STFyrPisYDd7y7wF7gFRB7rxddOLA6ATC870jDzpyhCbd8rcQZPOOX7DjtsLocM0WXk6nXbzV 7XpLJMJK3R4DtwiX9nAdNp4/JejR56eqiugkdk/qLgOW+LF7DzGRinDNN/sFpPPPHBq24ue6U ahA3nWQ9OrGhZxOHwlFfeUfveaYtzeinRqJUsESsLhMvuETolfY6x61r6OgygpAI+qOitvpt+ 0AGpSMQtDPiZH1nBGPFzwo6TCMnTlCcGzxNyp1A== X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmx.net header.s=badeba3b8450 header.b=FLWuTPx6; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -2.11 X-TUID: 0rvcfHq51q9H --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Marius Bakke writes: > Pierre Langlois writes: > >> Hello Guix! >> >> Pierre Langlois writes: >> >>> Hi Jakub, >>> >>> Jakub K=C4=85dzio=C5=82ka writes: >>> >> >> (snip) >> >>>> Pierre, >>>> >>>> thanks for your patch! I was working on a similar change before, but >>>> when I tried it, it failed even earlier in the bootstrap chain. It >>>> might've been QEMU weirdness, though, a la #42448. >>>> >>>>> @@ -612,9 +613,10 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.= a" "\" >>>>> (cargo-out (assoc-ref outputs "cargo"))) >>>>> (for-each >>>>> (lambda (file) (delete-manifest-file out file)) >>>>> - '("install.log" >>>>> + `("install.log" >>>>> "manifest-rust-docs" >>>>> - "manifest-rust-std-x86_64-unknown-linux-gnu" >>>>> + ,,(string-append "manifest-rust-std-" >>>>> + (nix-system->gnu-triplet-for= -rust)) >>>>> "manifest-rustc")) >>>>> (for-each >>>>> (lambda (file) (delete-manifest-file cargo-out = file)) >>>> >>>> If I understand the code correctly, this quasiquote is unnecessary, as >>>> the host-side code will evaluate to a string that can be inserted as-i= s, >>>> without another unquote on the build side. >>>> >>>> Fixing this would mean that the patch can go on master, since it would >>>> now only trigger rebuilds on architectures that are already broken. >>> >>> Ooooh yeah, that'll be much better, I've attached a patch that does just >>> that. I can confirm it doesn't trigger a full rebuild, nice! >>> >> >> I've just rebased this patch and fixed a little formatting issue. I've >> made sure, it doesn't trigger any rust rebuilds on x86. >> >> Is this OK to commit? > > LGTM! Thanks a lot for tackling this long-standing issue. Thanks! Pushed as 2bab532fdfaa54a085abc0ac7fc2c859ee31f640. > > Were you able to build all the way to the latest Rust? No not yet :-/, I got it building up to 1.26, having to fix most steps with tests failing here and there. In the end I ran out of steam trying to build 1.27 and thought we'd be better off waiting until we can bootstrap from 1.29. I don't remember exactly what issues I had with 1.27, I've attacked my WIP patch in case somebody is interested actually! After that, I gave the patches on https://issues.guix.gnu.org/38110 a go, however as Danny mentions on the thread, linking consumes too much memory. I'm using a RockPro64 and it only has 4G of RAM. Somebody on github https://github.com/thepowersgang/mrustc/issues/138 mentioned we could try building with LLD so I tried that as well (patch attached) but memory consumption was still too much. That being said, I might not have had any swap file at the time, I'll try again :-). Soooo, yeah I don't know what the best approach is. We can try and get the current chain building and start upstreaming bits of my WIP patch or try and find a solution for the mrustc memory issue. Anyway, I haven't given up! :-) I'd really like to see IceCat on aarch64 eventually for the PineBook Pro. Although there are quite a few other things to fix on that platform first. Thanks, Pierre --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAl9uTQsYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UUOYIAIriGJYjg4nKwdgGfDqHUVwf F8tskPUiHupSZKi8kkx15O5pr9nyWhGOpgh6fkEwG/3QIiYwehLQFzToxbpPzOxz V2ahVLp6+/8kS5yCn02PL6sNLTd//Eru0TUUgZETVA7h1aqzE1vYiLXFYXANVLa5 LEqQY+6/s51teF91XA6bcnMs4sjpOpNV+lVuYTbLIDdkQY3e3s18cKVuyplpExqI kmCjJb/3ThazSqfrM5hxzRdIzU/b0ZcX+l1Oy+B4S7jveGHVNDK4NXuQS9FwHfhv U7zsrCtonhzPziWTnl3qobfPJ4bWXqmgIlFPmz29UymgviK9gBop6zIo1nweuNU= =zWrE -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-wip.patch Content-Transfer-Encoding: quoted-printable =46rom d44837f66c682e7111328adbfa34ea0cd6dfb6f6 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 1 Sep 2020 00:29:38 +0100 Subject: [PATCH] wip =2D-- .../rust-1.26-fix-simd-doctest-non-x86.patch | 25 ++++++++++++++ .../rust-1.27-fix-simd-doctest-non-x86.patch | 31 +++++++++++++++++ gnu/packages/rust.scm | 33 ++++++++++++++++++- 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/rust-1.26-fix-simd-doctest-non-x8= 6.patch create mode 100644 gnu/packages/patches/rust-1.27-fix-simd-doctest-non-x8= 6.patch diff --git a/gnu/packages/patches/rust-1.26-fix-simd-doctest-non-x86.patch= b/gnu/packages/patches/rust-1.26-fix-simd-doctest-non-x86.patch new file mode 100644 index 0000000000..6d11fc9f12 =2D-- /dev/null +++ b/gnu/packages/patches/rust-1.26-fix-simd-doctest-non-x86.patch @@ -0,0 +1,25 @@ +From: QuietMisdreavus +Backported from https://github.com/rust-lang/stdarch/pull/466/commits/072= a51187df3ed7bb9f1f200be65ecef33b88c76 + +diff --git a/src/stdsimd/coresimd/mod.rs b/src/stdsimd/coresimd/mod.rs +index c35eb418..939417ba 100644 +--- a/src/stdsimd/coresimd/mod.rs ++++ b/src/stdsimd/coresimd/mod.rs +@@ -86,13 +86,17 @@ pub mod arch { + mod simd_llvm; + + #[cfg(any(target_arch =3D "x86", target_arch =3D "x86_64", dox))] ++#[doc(cfg(any(target_arch =3D "x86", target_arch =3D "x86_64")))] + mod x86; + #[cfg(any(target_arch =3D "x86_64", dox))] ++#[doc(cfg(target_arch =3D "x86_64"))] + mod x86_64; + + #[cfg(any(target_arch =3D "arm", target_arch =3D "aarch64", dox))] ++#[doc(cfg(any(target_arch =3D "arm", target_arch =3D "aarch64")))] + mod arm; + #[cfg(any(target_arch =3D "aarch64", dox))] ++#[doc(cfg(target_arch =3D "aarch64"))] + mod aarch64; + #[cfg(target_arch =3D "wasm32")] + mod wasm32; diff --git a/gnu/packages/patches/rust-1.27-fix-simd-doctest-non-x86.patch= b/gnu/packages/patches/rust-1.27-fix-simd-doctest-non-x86.patch new file mode 100644 index 0000000000..0f67c3bee6 =2D-- /dev/null +++ b/gnu/packages/patches/rust-1.27-fix-simd-doctest-non-x86.patch @@ -0,0 +1,31 @@ +From: QuietMisdreavus +Backported from https://github.com/rust-lang/stdarch/pull/466/commits/072= a51187df3ed7bb9f1f200be65ecef33b88c76 + +diff --git a/src/stdsimd/coresimd/mod.rs b/src/stdsimd/coresimd/mod.rs +index 9cf63d14..27c91d8b 100644 +--- a/src/stdsimd/coresimd/mod.rs ++++ b/src/stdsimd/coresimd/mod.rs +@@ -121,18 +121,22 @@ pub mod arch { + mod simd_llvm; + + #[cfg(any(target_arch =3D "x86", target_arch =3D "x86_64", dox))] ++#[doc(cfg(any(target_arch =3D "x86", target_arch =3D "x86_64")))] + mod x86; + #[cfg(any(target_arch =3D "x86_64", dox))] ++#[doc(cfg(target_arch =3D "x86_64"))] + mod x86_64; + + #[cfg(any(target_arch =3D "aarch64", dox))] ++#[doc(cfg(target_arch =3D "aarch64"))] + mod aarch64; + #[cfg(any(target_arch =3D "arm", target_arch =3D "aarch64", dox))] ++#[doc(cfg(any(target_arch =3D "arm", target_arch =3D "aarch64")))] + mod arm; + #[cfg(target_arch =3D "wasm32")] + mod wasm32; + +-#[cfg(any(target_arch =3D "mips", target_arch =3D "mips64", dox))] ++#[doc(cfg(any(target_arch =3D "mips", target_arch =3D "mips64")))] + mod mips; + + mod nvptx; diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 05404de1d8..6f4ba0eb18 100644 =2D-- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -682,6 +682,11 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\= " ;; XXX: Revisit this when we use gcc 6. (substitute* "src/binaryen/CMakeLists.txt" (("ADD_COMPILE_FLAG\\(\\\"-march=3Dnative\\\"\\)") "")) + #t)) + (add-after 'unpack 'remove-failing-test-aarch64 + (lambda _ + (if (string-prefix? "aarch64" ,(%current-system)) + (delete-file "src/test/compile-fail/required-lang-item= .rs")) #t))))))))) (define-public rust-1.24 @@ -695,6 +700,11 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\= " ((#:phases phases) `(modify-phases ,phases (delete 'use-readelf-for-tests) + (replace 'remove-failing-test-aarch64 + (lambda* _ + (if (string-prefix? "aarch64" ,(%current-system)) + (delete-file "src/test/run-pass/mir_heavy_promoted.rs"= )) + #t)) (replace 'patch-aarch64-test (lambda* _ (substitute* "src/librustc_metadata/dynamic_lib.rs" @@ -732,6 +742,11 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\= " ;; This test wants to update the crate index. (("fn no_index_update") "#[ignore]\nfn no_index_update= ")) #t)) + (replace 'remove-failing-test-aarch64 + (lambda* _ + (if (string-prefix? "aarch64" ,(%current-system)) + (delete-file "src/test/debuginfo/pretty-uninitialized-= vec.rs")) + #t)) (replace 'patch-aarch64-test (lambda _ (substitute* "src/librustc_metadata/dynamic_lib.rs" @@ -757,7 +772,9 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\" (inherit (package-source base-rust)) (patches (search-patches "rust-coresimd-doctest.patch" - "rust-1.25-accept-more-detailed-gdb-lines.patch")))) + "rust-1.25-accept-more-detailed-gdb-lines.patch" + ;; Fix for https://github.com/rust-lang/rust/issues/= 50988. + "rust-1.26-fix-simd-doctest-non-x86.patch")))) (arguments (substitute-keyword-arguments (package-arguments base-rust) ((#:phases phases) @@ -780,6 +797,14 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\= " ;; (delete-file-recursively "src/test/run-make-fulldeps/lin= ker-output-non-utf8") #t)) + (replace 'remove-failing-test-aarch64 + (lambda* _ + (if (string-prefix? "aarch64" ,(%current-system)) + (begin + (delete-file "src/test/compile-fail/dupe-symbols-7.r= s") + (delete-file "src/test/compile-fail/issue-15919.rs") + (delete-file "src/test/debuginfo/pretty-uninitialize= d-vec.rs"))) + #t)) (replace 'patch-cargo-tests (lambda* _ (substitute* "src/tools/cargo/tests/testsuite/build.rs" @@ -828,6 +853,8 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\" (patches (search-patches "rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-li= nes.patch" + ;; Fix for https://github.com/rust-lan= g/rust/issues/50988. + "rust-1.27-fix-simd-doctest-non-x86.pa= tch" "rust-reproducible-builds.patch")))) (native-inputs ;; FIXME: Rust 1.27 and some later versions require GDB 8.2 specif= ically. @@ -864,6 +891,8 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\" (patches (search-patches "rust-coresimd-doctest.patch" "rust-bootstrap-stage0-test.patch" "rust-1.25-accept-more-detailed-gdb-li= nes.patch" + ;; Fix for https://github.com/rust-lan= g/rust/issues/50988. + "rust-1.27-fix-simd-doctest-non-x86.pa= tch" "rust-reproducible-builds.patch")))) (inputs ;; Use LLVM 6.0 @@ -898,6 +927,8 @@ jemalloc =3D \"" jemalloc "/lib/libjemalloc_pic.a" "\" (origin (inherit (package-source base-rust)) (patches (search-patches "rust-1.25-accept-more-detailed-gdb-li= nes.patch" + ;; Fix for https://github.com/rust-lan= g/rust/issues/50988. + "rust-1.27-fix-simd-doctest-non-x86.pa= tch" "rust-reproducible-builds.patch"))))))= ) (define-public rust-1.30 =2D- 2.28.0 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-mrustc-Use-lld.patch Content-Transfer-Encoding: quoted-printable =46rom 30b2f19fc1edabbcf929d400f289220875440ffe Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 1 Sep 2020 00:46:47 +0100 Subject: [PATCH 1/2] mrustc: Use lld. =2D-- gnu/packages/patches/mrustc-use-lld.patch | 12 ++++++++++++ gnu/packages/rust.scm | 9 +++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/mrustc-use-lld.patch diff --git a/gnu/packages/patches/mrustc-use-lld.patch b/gnu/packages/patc= hes/mrustc-use-lld.patch new file mode 100644 index 0000000000..2df1f6f8f2 =2D-- /dev/null +++ b/gnu/packages/patches/mrustc-use-lld.patch @@ -0,0 +1,12 @@ +diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp +index df0abf6f..7ab8d183 100644 +--- a/src/trans/codegen_c.cpp ++++ b/src/trans/codegen_c.cpp +@@ -953,6 +953,7 @@ namespace { + break; + } + args.push_back(m_outfile_path_c.c_str()); ++ args.push_back("-fuse-ld=3Dlld"); + switch(out_ty) + { + case CodegenOutput::DynamicLibrary: diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 89d0ffee31..97952e8ebe 100644 =2D-- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -128,14 +128,17 @@ (file-name (git-file-name name version)) (sha256 (base32 - "194ny7vsks5ygiw7d8yxjmp1qwigd71ilchis6xjl6bb2sj97rd2")= ))) + "194ny7vsks5ygiw7d8yxjmp1qwigd71ilchis6xjl6bb2sj97rd2")= ) + (patches (search-patches "mrustc-use-lld.patch")))) (outputs '("out" "cargo")) (build-system gnu-build-system) (inputs - `(("zlib" ,zlib))) + `(("lld" ,lld) + ("zlib" ,zlib))) (native-inputs `(("bison" ,bison) ("flex" ,flex) + ("gcc" ,gcc-10) ;; Required for the libstd sources. ("rustc" ,(package-source rust-1.29)))) (arguments @@ -418,6 +421,8 @@ safety and thread safety guarantees.") ("cmake" ,cmake-minimal) ("flex" ,flex) ; For the tests ("gdb" ,gdb) ; For the tests + ("gcc" ,gcc-10) + ("lld" ,lld) ("procps" ,procps) ; For the tests ("python-2" ,python-2) ("rustc-bootstrap" ,mrustc) =2D- 2.28.0 --=-=-=--