guix_mirror_bot pushed a commit to branch rust-team
in repository guix.
commit ee35ff4196dce22ce27ef4d2c0d7f125fe29d276
Author: Efraim Flashner <[email protected]>
AuthorDate: Thu Nov 5 11:21:14 2026 +0200
gnu: Remove rust-bootstrap-1.54.
* gnu/packages/rust.scm (%mrustc-source-1.54, rust-bootstrap-1.54):
Remove variables.
* gnu/packages/patches/mrustc-patches-1.54.patch: Remove file.
---
gnu/packages/patches/mrustc-patches-1.54.patch | 19 ---
gnu/packages/rust.scm | 213 -------------------------
2 files changed, 232 deletions(-)
diff --git a/gnu/packages/patches/mrustc-patches-1.54.patch
b/gnu/packages/patches/mrustc-patches-1.54.patch
deleted file mode 100644
index 626945e2a12..00000000000
--- a/gnu/packages/patches/mrustc-patches-1.54.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-diff --git a/rustc-1.54.0-src.patch b/rustc-1.54.0-src.patch
-index 088c723a..d322fd0d 100644
---- a/rustc-1.54.0-src.patch
-+++ b/rustc-1.54.0-src.patch
-@@ -302,14 +302,3 @@
- use self::generic as arch;
-
- pub use self::arch::{vec128_storage, vec256_storage, vec512_storage};
--
----- src/llvm-project/llvm/include/llvm/Support/Signals.h
--+++ src/llvm-project/llvm/include/llvm/Support/Signals.h
--@@ -14,6 +14,7 @@
-- #ifndef LLVM_SUPPORT_SIGNALS_H
-- #define LLVM_SUPPORT_SIGNALS_H
--
--+#include <cstdint>
-- #include <string>
--
-- namespace llvm {
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 7ca7b2da841..2864316a522 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -138,35 +138,6 @@
;;; Note: mrustc's only purpose is to be able to bootstrap Rust; it's designed
;;; to be used in source form.
-(define %mrustc-commit-1.54 "06b87d1af49d2db3bd850fdee8888055dd540dd1")
-(define %mrustc-source-1.54
- (let* ((version "0.11.2")
- (commit %mrustc-commit-1.54)
- (revision "1")
- (name "mrustc"))
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/thepowersgang/mrustc")
- (commit %mrustc-commit-1.54)))
- (file-name (git-file-name name (git-version version revision commit)))
- (sha256
- (base32 "1m6ya3d653b5z0ygvr4y8hay1445gww9s8vyk8h0jdi42zkhzqkf"))
- (patches (search-patches "mrustc-patches-1.54.patch"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Drastically reduces memory and build time requirements
- ;; by disabling debug by default.
- (substitute* (find-files "." "Makefile")
- (("LINKFLAGS := -g") "LINKFLAGS :=")
- (("-g ") ""))
- (substitute* "minicargo.mk"
- ;; Don't assume tarball with gzip compression.
- (("-xzf") "-xf")
- ;; Don't use the vendored openssl sources.
- (("--features vendored-openssl") "")))))))
-
(define %mrustc-commit-1.90 "a822472b9ee744e58d8b1a79bdd8080f7a7b008f")
(define %mrustc-source-1.90
(let* ((version "0.12.0")
@@ -198,190 +169,6 @@
;;; The rust-bootstrap packages are special in that they are built with mrustc,
;;; which shortens the bootstrap path.
-(define-public rust-bootstrap-1.54
- (package
- (name "rust")
- (version "1.54.0")
- (source
- (origin
- (method url-fetch)
- (uri (rust-uri version))
- (sha256 (base32 "0xk9dhfff16caambmwij67zgshd8v9djw6ha0fnnanlv7rii31dc"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- (for-each delete-file-recursively
- '("src/llvm-project"
- "vendor/openssl-src/openssl"
- "vendor/tikv-jemalloc-sys/jemalloc"))
- ;; Remove vendored dynamically linked libraries.
- ;; find . -not -type d -executable -exec file {} \+ | grep ELF
- (delete-file "vendor/vte/vim10m_match")
- (delete-file "vendor/vte/vim10m_table")
- ;; Also remove the bundled (mostly Windows) libraries.
- ;; find vendor -not -type d -exec file {} \+ | grep PE32
- (for-each delete-file
- (find-files "vendor" "\\.(a|dll|exe|lib)$"))
- ;; Adjust some sources for llvm-13, see llvm commit
- ;; acce401068e78a8c5dc9e06802111ffad3da763f
- (substitute* (find-files "." "powerpc64le_unknown_linux_gnu.rs")
- (("e-m:e-i64:64-n32:64-v256:256:256-v512:512:512")
- "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"))))))
- (outputs '("out" "cargo"))
- (properties '((hidden? . #t)
- (timeout . 129600) ;36 hours
- (max-silent-time . 18000))) ;5 hours (for armel)
- (build-system gnu-build-system)
- (inputs
- (list bash-minimal
- llvm-13
- openssl-1.1
- zlib))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("mrustc-source" ,%mrustc-source-1.54)))
- (arguments
- `(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums'
- #:modules ((guix build cargo-utils)
- (guix build utils)
- (guix build gnu-build-system))
- #:test-target "test"
- ;; Rust's own .so library files are not found in any RUNPATH, but
- ;; that doesn't seem to cause issues.
- #:validate-runpath? #f
- #:make-flags
- ,#~(let ((source #$(package-source this-package)))
- (list (string-append "RUSTC_TARGET="
- #$(platform-rust-target
- (lookup-platform-by-target-or-system
- (or (%current-target-system)
- (%current-system)))))
- (string-append "RUSTC_VERSION=" #$version)
- (string-append "MRUSTC_TARGET_VER="
- #$(version-major+minor version))
- (string-append "RUSTC_SRC_TARBALL=" source)
- "OUTDIR_SUF=")) ;do not add version suffix to output
dir
- #:phases
- (modify-phases %standard-phases
- (replace 'unpack
- (lambda* (#:key source inputs #:allow-other-keys)
- ((assoc-ref %standard-phases 'unpack)
- #:source (assoc-ref inputs "mrustc-source"))))
- (add-after 'unpack 'patch-makefiles
- ;; This disables building the (unbundled) LLVM.
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* '("minicargo.mk"
- "run_rustc/Makefile")
- ;; Use the system-provided LLVM.
- (("LLVM_CONFIG [:|?]= .*")
- (string-append "LLVM_CONFIG := "
- (search-input-file inputs "/bin/llvm-config")
"\n")))
- (substitute* "Makefile"
- ;; Patch date and git obtained version information.
- ((" -D VERSION_GIT_FULLHASH=.*")
- (string-append
- " -D VERSION_GIT_FULLHASH=\\\"" ,%mrustc-commit-1.54 "\\\""
- " -D VERSION_GIT_BRANCH=\\\"master\\\""
- " -D VERSION_GIT_SHORTHASH=\\\""
- ,(string-take %mrustc-commit-1.54 7) "\\\""
- " -D VERSION_BUILDTIME="
- "\"\\\"Thu, 01 Jan 1970 00:00:01 +0000\\\"\""
- " -D VERSION_GIT_ISDIRTY=0\n")))
- (substitute* '("run_rustc/Makefile"
- "run_rustc/rustc_proxy.sh")
- ;; Patch the shebang of a generated wrapper for rustc
- (("#!/bin/sh")
- (string-append "#!" (which "sh"))))))
- (add-before 'configure 'configure-cargo-home
- (lambda _
- (let ((cargo-home (string-append (getcwd) "/.cargo")))
- (mkdir-p cargo-home)
- (setenv "CARGO_HOME" cargo-home))))
- (replace 'configure
- (lambda _
- (setenv "CC" "gcc")
- (setenv "CXX" "g++")
- ;; The Guix LLVM package installs only shared libraries.
- (setenv "LLVM_LINK_SHARED" "1")
- ;; rustc still insists on having 'cc' on PATH in some places
- ;; (e.g. when building the 'test' library crate).
- (mkdir-p "/tmp/bin")
- (symlink (which "gcc") "/tmp/bin/cc")
- (setenv "PATH" (string-append "/tmp/bin:" (getenv "PATH")))))
- (delete 'patch-generated-file-shebangs)
- (replace 'build
- (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
- (let ((job-count (if parallel-build?
- (parallel-job-count)
- 1)))
- ;; Adapted from:
- ;;
https://github.com/dtolnay/bootstrap/blob/master/build-1.54.0.sh.
- ;; Use PARLEVEL since both minicargo and mrustc use it
- ;; to set the level of parallelism.
- (setenv "PARLEVEL" (number->string job-count))
- (display "Building mrustc...\n")
- (apply invoke "make" make-flags)
-
- ;; This doesn't seem to build anything, but it
- ;; sets additional minicargo flags.
- (display "Building RUSTCSRC...\n")
- (apply invoke "make" "RUSTCSRC" make-flags)
-
- ;; This probably doesn't need to be called explicitly.
- (display "Building LIBS...\n")
- (apply invoke "make" "-f" "minicargo.mk" "LIBS" make-flags)
-
- ;; The psm crate FTBFS on ppc64le with gcc.
- (display "Building rustc...\n")
- (apply invoke "make" "-f" "minicargo.mk" "output/rustc"
- make-flags)
-
- (display "Building cargo...\n")
- (apply invoke "make" "-f" "minicargo.mk" "output/cargo"
- make-flags)
-
- ;; This one isn't listed in the build script.
- (display "Rebuilding stdlib with rustc...\n")
- (apply invoke "make" "-C" "run_rustc" make-flags))))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (cargo (assoc-ref outputs "cargo"))
- (bin (string-append out "/bin"))
- (rustc (string-append bin "/rustc"))
- (cargo-bin (string-append cargo "/bin"))
- (lib (string-append out "/lib"))
- (system-lib-prefix
- (string-append lib "/rustlib/"
- ,(platform-rust-target
- (lookup-platform-by-target-or-system
- (or (%current-target-system)
- (%current-system)))) "/lib")))
- (with-directory-excursion "run_rustc/output/prefix"
- (mkdir-p (dirname rustc))
- (copy-file "bin/rustc_binary" rustc)
-
- (wrap-program rustc
- `("LD_LIBRARY_PATH" = (,system-lib-prefix)))
- (mkdir-p lib)
- (copy-recursively "lib" lib)
- (install-file "bin/cargo" cargo-bin))))))))
- (synopsis "Compiler for the Rust programming language")
- (description "Rust is a systems programming language that provides memory
-safety and thread safety guarantees.")
- (home-page "https://github.com/thepowersgang/mrustc")
-
- ;; 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>.
- ;; List of systems where rust-bootstrap is explicitly known to build:
- (supported-systems '("x86_64-linux" "aarch64-linux"
- "riscv64-linux" "powerpc64le-linux"))
-
- ;; Dual licensed.
- (license (list license:asl2.0 license:expat))))
-
(define-public rust-bootstrap-1.90
(package
(name "rust")