guix_mirror_bot pushed a commit to branch rust-team
in repository guix.
commit 252e2cfb920cba4c056d6d7374f2bfca88fe6506
Author: Efraim Flashner <[email protected]>
AuthorDate: Thu Nov 5 11:19:34 2026 +0200
gnu: Remove rust-bootstrap-1.74.
* gnu/packages/rust.scm (rust-bootstrap-1.74): Remove variable.
* gnu/packages/patches/rust-1.70-fix-rustix-build.patch: Remove file.
---
.../patches/rust-1.70-fix-rustix-build.patch | 21 ---
gnu/packages/rust.scm | 185 ---------------------
2 files changed, 206 deletions(-)
diff --git a/gnu/packages/patches/rust-1.70-fix-rustix-build.patch
b/gnu/packages/patches/rust-1.70-fix-rustix-build.patch
deleted file mode 100644
index d72a8fb07a9..00000000000
--- a/gnu/packages/patches/rust-1.70-fix-rustix-build.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-@@ -0,0 +1,20 @@
---- a/vendor/fd-lock/Cargo.toml 2023-05-31 14:44:48.000000000 -0700
-+++ b/vendor/fd-lock/Cargo.toml 2023-07-14 21:19:34.637702319 -0700
-@@ -45,7 +45,7 @@
-
- [target."cfg(unix)".dependencies.rustix]
- version = "0.37.0"
--features = ["fs"]
-+features = ["fs", "cc"]
-
- [target."cfg(windows)".dependencies.windows-sys]
- version = "0.45.0"
---- a/src/bootstrap/Cargo.lock 2023-07-11 20:32:40.000000000 -0700
-+++ b/src/bootstrap/Cargo.lock 2023-07-14 22:41:53.269284713 -0700
-@@ -618,6 +618,7 @@
- dependencies = [
- "bitflags",
-+ "cc",
- "errno",
- "io-lifetimes",
- "libc",
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index d3aada42934..89cb6e01ee5 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -383,191 +383,6 @@ safety and thread safety guarantees.")
;; Dual licensed.
(license (list license:asl2.0 license:expat))))
-(define-public rust-bootstrap-1.74
- (package
- (name "rust")
- (version "1.74.0")
- (source
- (origin
- (method url-fetch)
- (uri (rust-uri version))
- (sha256 (base32 "0j8hrwjjjjf7spy0hy7gami96swhfzr6kandfzzdri91qd5mhaw8"))
- (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
- ;; Also remove the bundled (mostly Windows) libraries.
- (for-each delete-file
- (find-files "vendor" "\\.(a|dll|exe|lib)$"))
- ;; Adjust vendored dependency to explicitly use rustix with libc
backend.
- (substitute* "vendor/tempfile/Cargo.toml"
- (("features = \\[\"fs\"" all)
- (string-append all ", \"use-libc\"")))))
- ;; Rust 1.70 adds the rustix library which depends on the vendored
- ;; fd-lock crate. The fd-lock crate uses Outline assembly which expects
- ;; a precompiled static library. Enabling the "cc" feature tells the
- ;; build.rs script to compile the assembly files instead of searching
- ;; for a precompiled library.
- (patches (search-patches "rust-1.70-fix-rustix-build.patch"))))
- (outputs '("out" "cargo"))
- (properties '((hidden? . #t)
- (timeout . 129600) ;36 hours
- (max-silent-time . 18000))) ;5 hours (for riscv64)
- (build-system gnu-build-system)
- (inputs
- (list bash-minimal
- llvm-17
- openssl
- zlib))
- (native-inputs
- (list pkg-config %mrustc-source-1.54))
- (arguments
- (list
- #: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 #$(this-package-native-input
- (origin-file-name %mrustc-source-1.54)))))
- (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)
-
- (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"
- ;; The .rmeta files of the bootstrap compiler are not meant
- ;; to be installed.
- (for-each delete-file (find-files "." "\\.rmeta$"))
-
- (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")
-
- ;; List of systems where rust-bootstrap is explicitly known to build:
- (supported-systems '("x86_64-linux"))
-
- ;; Dual licensed.
- (license (list license:asl2.0 license:expat))))
-
(define-public rust-bootstrap-1.90
(package
(name "rust")