File: d-0003-cc-psm-rebuild-wasm32.patch

package info (click to toggle)
rustc 1.90.0%2Bdfsg1-1~bpo13%2B2
  • links: PTS, VCS
  • area: main
  • in suites: trixie-backports
  • size: 925,944 kB
  • sloc: xml: 158,148; javascript: 19,781; sh: 19,174; python: 15,732; ansic: 13,096; cpp: 7,181; asm: 4,376; makefile: 697; lisp: 176; sql: 15
file content (49 lines) | stat: -rw-r--r-- 1,975 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Date: Sat, 2 Oct 2021 01:08:00 +0100
Subject: d-0003-cc-psm-rebuild-wasm32

Forwarded: not-needed
---
 vendor/cc-1.2.0/src/lib.rs | 2 +-
 vendor/psm-0.1.26/build.rs | 7 ++-----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/vendor/cc-1.2.0/src/lib.rs b/vendor/cc-1.2.0/src/lib.rs
index a0aaa30..202ff17 100644
--- a/vendor/cc-1.2.0/src/lib.rs
+++ b/vendor/cc-1.2.0/src/lib.rs
@@ -2623,7 +2623,7 @@ impl Build {
         let (env, msvc, gnu, traditional, clang) = if self.cpp {
             ("CXX", "cl.exe", "g++", "c++", "clang++")
         } else {
-            ("CC", "cl.exe", "gcc", "cc", "clang")
+            ("CC", "cl.exe", "gcc", "cc", "rust-clang")
         };
 
         // On historical Solaris systems, "cc" may have been Sun Studio, which
diff --git a/vendor/psm-0.1.26/build.rs b/vendor/psm-0.1.26/build.rs
index 1747466..b74e272 100644
--- a/vendor/psm-0.1.26/build.rs
+++ b/vendor/psm-0.1.26/build.rs
@@ -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,
     }
@@ -106,11 +106,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);
     }