d-fix-rustix-outline
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Wed, 21 Feb 2024 00:14:38 +0000 (00:14 +0000)
committerRaspbian forward porter <root@raspbian.org>
Wed, 21 Feb 2024 00:14:38 +0000 (00:14 +0000)
Always enable cc even if the feature is not enabled.

Some Debian architectures need outline asm, and Debian does not ship pre-built
outline asm.

Gbp-Pq: Name d-fix-rustix-outline.patch

vendor/rustix-0.36.5/Cargo.toml
vendor/rustix-0.36.5/build.rs
vendor/rustix/Cargo.toml
vendor/rustix/build.rs

index ed3e5b6234354de889129504e91a2d3021b67c9a..2159a4a5331ab9f22a912e1b8d6310cd1b05c1a8 100644 (file)
@@ -116,9 +116,9 @@ version = "0.6"
 [dev-dependencies.tempfile]
 version = "3.2.0"
 
-[build-dependencies.cc]
+[build-dependencies.cc_dep]
 version = "1.0.68"
-optional = true
+package = "cc"
 
 [features]
 all-apis = [
@@ -231,6 +231,7 @@ features = [
     "Win32_NetworkManagement_IpHelper",
     "Win32_System_Threading",
 ]
+cc = []
 
 [target."cfg(windows)".dev-dependencies.ctor]
 version = "0.1.21"
index 56c6b15570fdcd25286cc15a5b0ff157ff69eb40..5245880a9d5ae846dd64e45bf18e3482efb9a7cc 100644 (file)
@@ -1,5 +1,4 @@
-#[cfg(feature = "cc")]
-use cc::Build;
+use cc_dep::Build;
 use std::env::var;
 use std::io::Write;
 
@@ -118,16 +117,16 @@ fn link_in_librustix_outline(arch: &str, asm_name: &str) {
     println!("cargo:rerun-if-changed={}", to);
 
     // If "cc" is not enabled, use a pre-built library.
-    #[cfg(not(feature = "cc"))]
+    /*#[cfg(not(feature = "cc"))]
     {
         let _ = asm_name;
         println!("cargo:rustc-link-search={}/{}", OUTLINE_PATH, profile);
         println!("cargo:rustc-link-lib=static={}", name);
-    }
+    }*/
 
     // If "cc" is enabled, build the library from source, update the pre-built
     // version, and assert that the pre-built version is checked in.
-    #[cfg(feature = "cc")]
+    //#[cfg(feature = "cc")]
     {
         let out_dir = var("OUT_DIR").unwrap();
         Build::new().file(&asm_name).compile(&name);
index b560499a8cfe61e78e85991a907f72a7704bac3a..85ed6d6abae049fa987ca074a4c909bbb7da1958 100644 (file)
@@ -125,9 +125,9 @@ version = "0.6"
 [dev-dependencies.tempfile]
 version = "3.4.0"
 
-[build-dependencies.cc]
+[build-dependencies.cc_dep]
 version = "1.0.68"
-optional = true
+package = "cc"
 
 [features]
 all-apis = [
@@ -242,6 +242,7 @@ features = [
     "Win32_NetworkManagement_IpHelper",
     "Win32_System_Threading",
 ]
+cc = []
 
 [target."cfg(windows)".dev-dependencies.ctor]
 version = "0.1.21"
index d8d1c8bd6e542c2a82631fba7e9b1471cb9139e9..cbb6e77835ed89c8f27d8921f7d1ced7956e300f 100644 (file)
@@ -1,5 +1,4 @@
-#[cfg(feature = "cc")]
-use cc::Build;
+use cc_dep::Build;
 use std::env::var;
 use std::io::Write;
 
@@ -158,16 +157,16 @@ fn link_in_librustix_outline(arch: &str, asm_name: &str) {
     println!("cargo:rerun-if-changed={}", to);
 
     // If "cc" is not enabled, use a pre-built library.
-    #[cfg(not(feature = "cc"))]
+    /*#[cfg(not(feature = "cc"))]
     {
         let _ = asm_name;
         println!("cargo:rustc-link-search={}/{}", OUTLINE_PATH, profile);
         println!("cargo:rustc-link-lib=static={}", name);
-    }
+    }*/
 
     // If "cc" is enabled, build the library from source, update the pre-built
     // version, and assert that the pre-built version is checked in.
-    #[cfg(feature = "cc")]
+    //#[cfg(feature = "cc")]
     {
         let out_dir = var("OUT_DIR").unwrap();
         // Add `-gdwarf-3` so that we always get the same output, regardless of