From c4f676b24edc0769c396eea5b98332ca050ab0f3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 16 Jan 2024 20:48:05 +0200 Subject: [PATCH] gnu: rust-1.69: Fix building on powerpc64le-linux. * gnu/packages/rust.scm (rust-1.69)[source]: Adjust snippet to fix building rustix on all architectures. Change-Id: I541767f19740b954e8c0f631bd5e77743ae3fb14 --- gnu/packages/rust.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 3680ab12f1..73c63cf801 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -763,6 +763,15 @@ safety and thread safety guarantees.") '("src/llvm-project" "vendor/openssl-src/openssl" "vendor/tikv-jemalloc-sys/jemalloc")) + ;; Adjust rustix to always build with cc. + (substitute* '("Cargo.lock" + "src/bootstrap/Cargo.lock") + (("\"errno\",") "\"cc\",\n \"errno\",")) + ;; Add a dependency on the the 'cc' feature of rustix. + (substitute* "vendor/fd-lock/Cargo.toml" + (("\"fs\"") "\"fs\", \"cc\"")) + (substitute* "vendor/is-terminal/Cargo.toml" + (("\"termios\"") "\"termios\", \"cc\"")) ;; Also remove the bundled (mostly Windows) libraries. (for-each delete-file (find-files "vendor" "\\.(a|dll|exe|lib)$")))))))))