summaryrefslogtreecommitdiff
path: root/recipes/build-tools/cargo-c/0001-Fix-linking-with-Android-NDK-linker.patch
blob: 8cdcf1f358cd90f0d690a8071833f27b8cd38279 (plain)
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
From 67a5aa982df5bdc9bd73d0e465ef141895e7575f Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Thu, 1 Sep 2022 21:33:29 +0530
Subject: [PATCH] Fix linking with Android NDK linker

Android ld.gold cannot handle -Wl, and it's incorrect anyway since all
the other linker arguments passed by cargo do not have a -Wl prefix.
---
 src/target.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/target.rs b/src/target.rs
index 975fde5..e1d5a58 100644
--- a/src/target.rs
+++ b/src/target.rs
@@ -76,7 +76,7 @@ impl Target {
         };
 
         if os == "android" {
-            lines.push(format!("-Wl,-soname,lib{lib_name}.so"));
+            lines.push(format!("-soname,lib{lib_name}.so"));
         } else if os == "linux"
             || os == "freebsd"
             || os == "dragonfly"
-- 
2.41.0