d-0003-cc-psm-rebuild-wasm32
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Sat, 2 Oct 2021 00:08:00 +0000 (01:08 +0100)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Tue, 21 Jan 2025 10:38:15 +0000 (11:38 +0100)
Forwarded: not-needed

Gbp-Pq: Topic vendor
Gbp-Pq: Name d-0003-cc-psm-rebuild-wasm32.patch

vendor/cc-1.1.22/src/lib.rs
vendor/psm-0.1.23/build.rs

index 985569813a8d45b3885ffbc683b9111c9c89f2bb..d2382513cb3a2ab5615772d7879996f6a84699fc 100644 (file)
@@ -2954,7 +2954,7 @@ impl Build {
                     if self.cpp {
                         "clang++".to_string()
                     } else {
-                        "clang".to_string()
+                        "rust-clang".to_string()
                     }
                 } else if target.contains("vxworks") {
                     if self.cpp {
index bc84149f83e0ad44da0ce10c5ed4bce43b3a3839..a299ab5614481112835ad4c63bcc59130c657a5b 100644 (file)
@@ -51,7 +51,7 @@ fn find_assembly(
         ("sparc", _, _, _) => Some(("src/arch/sparc_sysv.s", true)),
         ("riscv32", _, _, _) => Some(("src/arch/riscv.s", true)),
         ("riscv64", _, _, _) => Some(("src/arch/riscv64.s", true)),
-        ("wasm32", _, _, _) => Some(("src/arch/wasm32.o", true)),
+        ("wasm32", _, _, _) => Some(("src/arch/wasm32.s", true)),
         ("loongarch64", _, _, _) => Some(("src/arch/loongarch64.s", true)),
         _ => None,
     }
@@ -99,11 +99,8 @@ fn main() {
         cfg.define(&*format!("CFG_TARGET_ENV_{}", env), None);
     }
 
-    // For wasm targets we ship a precompiled `*.o` file so we just pass that
-    // directly to `ar` to assemble an archive. Otherwise we're actually
-    // compiling the source assembly file.
     if asm.ends_with(".o") {
-        cfg.object(asm);
+        panic!("Debian does not allow embedded object files in source code")
     } else {
         cfg.file(asm);
     }