File cc-link-lib-no-static.patch of Package signal-desktop

Do not make cc emit "static" to cargo, that option is broken (does not work with GCC LTO).
Make rustc believe everything foreign is a “dylib”. (It's not, but that makes it pass them to GCC to do the linking)

--- vendor/node_modules/@signalapp/libsignal-client/vendor/cc/src/lib.rs.old	2023-08-01 08:50:09.041289300 +0000
+++ vendor/node_modules/@signalapp/libsignal-client/vendor/cc/src/lib.rs	2023-08-01 16:29:43.978070600 +0000
@@ -1100,11 +1100,11 @@ impl Build {
         }
 
         if self.link_lib_modifiers.is_empty() {
-            self.print(&format_args!("cargo:rustc-link-lib=static={}", lib_name));
+            self.print(&format_args!("cargo:rustc-link-lib={}", lib_name));
         } else {
             let m = self.link_lib_modifiers.join(",");
             self.print(&format_args!(
-                "cargo:rustc-link-lib=static:{}={}",
+                "cargo:rustc-link-lib:{}={}",
                 m, lib_name
             ));
         }
 
openSUSE Build Service is sponsored by