d-fix-rustix-outline
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Tue, 27 Jun 2023 15:12:20 +0000 (16:12 +0100)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Tue, 27 Jun 2023 15:12:20 +0000 (16:12 +0100)
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/Cargo.toml
vendor/rustix/build.rs

index 95221b2ddb579aa3ca17423b82e18300672eba49..89990f837b64fd1bef374814882f6a1c309c4a99 100644 (file)
@@ -103,9 +103,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 = [
@@ -168,6 +168,7 @@ use-libc = [
     "libc_errno",
     "libc",
 ]
+cc = []
 
 [target."cfg(all(any(target_os = \"android\", target_os = \"linux\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"), all(target_endian = \"little\", any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"powerpc64\", target_arch = \"riscv64\", target_arch = \"mips\", target_arch = \"mips64\"))))))))".dependencies.linux-raw-sys]
 version = "0.0.46"
index f6fa64579f9ce55ea03ed2f1cd86b36e1978f927..3721b16191e111a914d5b5139d8bba36bc5f63cc 100644 (file)
@@ -1,5 +1,4 @@
-#[cfg(feature = "cc")]
-use cc::Build;
+use cc_dep::Build;
 use std::env::var;
 use std::io::Write;
 
@@ -113,16 +112,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);