aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-07-10 20:18:05 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-07-10 20:38:59 +0300
commitca4bfb0f2de7a2c9997f92574be65fcba4e86d64 (patch)
treeb7e7ee1e76ae5cdfc49347fc32ddbbe8224737d6 /gnu/packages/rust.scm
parent8af3a97b9e6e8961c2c2ecc5f3ba223932af00f1 (diff)
downloadguix-ca4bfb0f2de7a2c9997f92574be65fcba4e86d64.tar.gz
guix-ca4bfb0f2de7a2c9997f92574be65fcba4e86d64.zip
gnu: rust-bootstrap: Add support for riscv64-linux.
* gnu/packages/rust.scm (%mrustc-source): Add patch. (rust-bootstrap)[native-inputs]: On riscv64-linux add gcc@9:lib. [supported-systems]: Add riscv64-linux. Adjust comment. * gnu/packages/patches/mrustc-riscv64-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/rust.scm')
-rw-r--r--gnu/packages/rust.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 38ed83f6bc..2942c5cb1f 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -137,7 +137,8 @@
(file-name (git-file-name name (git-version version revision commit)))
(sha256
(base32
- "0f7kh4n2663sn0z3xib8gzw0s97qpvwag40g2vs3bfjlrbpgi9z0")))))
+ "0f7kh4n2663sn0z3xib8gzw0s97qpvwag40g2vs3bfjlrbpgi9z0"))
+ (patches (search-patches "mrustc-riscv64-support.patch")))))
;;; Rust 1.54 is special in that it is built with mrustc, which shortens the
;;; bootstrap path.
@@ -172,6 +173,10 @@
;; https://github.com/thepowersgang/mrustc/issues/266
;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105860
("gcc" ,gcc-9)
+ ;; TODO: STARTFILE_PREFIX_SPEC is fixed on gcc<10 on core-updates.
+ ,@(if (target-riscv64?)
+ `(("gcc:lib" ,gcc-9 "lib"))
+ '())
("flex" ,flex)
("pkg-config" ,pkg-config)
;; Required for the libstd sources.
@@ -338,9 +343,11 @@
safety and thread safety guarantees.")
(home-page "https://github.com/thepowersgang/mrustc")
- ;; So far mrustc is (x86_64|aarch64)-only. It may support i686 soon:
+ ;; The intermediate generated code is known to be inefficient and
+ ;; therefore the build process needs 8GB of RAM while building.
+ ;; It may support i686 soon:
;; <https://github.com/thepowersgang/mrustc/issues/78>.
- (supported-systems '("x86_64-linux" "aarch64-linux"))
+ (supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux"))
;; Dual licensed.
(license (list license:asl2.0 license:expat))))