1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-16 03:50:45 +02:00

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.
This commit is contained in:
Efraim Flashner 2022-07-10 20:18:05 +03:00
parent 8af3a97b9e
commit ca4bfb0f2d
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351
3 changed files with 59 additions and 3 deletions

View file

@ -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))))