gnu: Add Rust 1.45.

* gnu/packages/rust.scm (rust-1.45): New variable.
* gnu/packages/patches/rust-1.45-linker-locale.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add the patch to the list.
This commit is contained in:
Jakub Kądziołka 2020-07-15 22:02:24 +02:00
parent 7d49e1897c
commit 17666c090b
No known key found for this signature in database
GPG Key ID: E315A75846131564
3 changed files with 51 additions and 1 deletions

View File

@ -1518,6 +1518,7 @@ dist_patch_DATA = \
%D%/packages/patches/runc-CVE-2019-5736.patch \ %D%/packages/patches/runc-CVE-2019-5736.patch \
%D%/packages/patches/rust-1.19-mrustc.patch \ %D%/packages/patches/rust-1.19-mrustc.patch \
%D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \
%D%/packages/patches/rust-1.45-linker-locale.patch \
%D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \
%D%/packages/patches/rust-coresimd-doctest.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \
%D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-disable-vendor.patch \

View File

@ -0,0 +1,14 @@
Patch will be included upstream in 1.47: https://github.com/rust-lang/rust/pull/74416
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs
index e64aafa599f..12575ac4358 100644
--- a/src/librustc_codegen_ssa/back/linker.rs
+++ b/src/librustc_codegen_ssa/back/linker.rs
@@ -28,7 +28,7 @@ use rustc_target::spec::{LinkOutputKind, LinkerFlavor, LldFlavor};
pub fn disable_localization(linker: &mut Command) {
// No harm in setting both env vars simultaneously.
// Unix-style linkers.
- linker.env("LC_ALL", "C");
+ linker.env("LC_ALL", "en_US.UTF-8");
// MSVC's `link.exe`.
linker.env("VSLANG", "1033");
}

View File

@ -1280,7 +1280,42 @@ (define-public rust-1.44
(rust-bootstrapped-package rust-1.43 "1.44.1" (rust-bootstrapped-package rust-1.43 "1.44.1"
"0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky")) "0ww4z2v3gxgn3zddqzwqya1gln04p91ykbrflnpdbmcd575n8bky"))
;; NOTE: An update to LLVM 10 is coming in 1.45, make sure not to miss it. (define-public rust-1.45
(let ((base-rust
(rust-bootstrapped-package rust-1.44 "1.45.0"
"0z6dh0yd3fcm3qh960wi4s6fa6pxz9mh77psycsqfkkx5kqra15s")))
(package
(inherit base-rust)
(source
(origin
(inherit (package-source base-rust))
(patches (search-patches "rust-1.45-linker-locale.patch"))))
(inputs
(alist-replace "llvm" (list llvm-10)
(package-inputs base-rust)))
(arguments
(substitute-keyword-arguments (package-arguments base-rust)
((#:phases phases)
`(modify-phases ,phases
;; These tests make sure that the parser behaves properly when
;; a source file starts with a shebang. Unfortunately,
;; the patch-shebangs phase changes the meaning of these edge-cases.
;; We skip the test since it's drastically unlikely Guix's packaging
;; will introduce a bug here.
(add-after 'patch-tests 'skip-shebang-tests
(lambda _
(with-directory-excursion "src/test/ui/parser/shebang"
(delete-file "shebang-doc-comment.rs")
(delete-file "sneaky-attrib.rs")
#t)))
;; This test case synchronizes itself by starting a localhost TCP
;; server. This doesn't work as networking is not available.
(add-after 'patch-tests 'skip-networking-test
(lambda _
(substitute* "src/tools/cargo/tests/testsuite/freshness.rs"
(("fn linking_interrupted" all)
(string-append "#[ignore] " all)))
#t)))))))))
;; TODO(staging): Bump this variable to the latest packaged rust. ;; TODO(staging): Bump this variable to the latest packaged rust.
(define-public rust rust-1.39) (define-public rust rust-1.39)