Never link pthread for android
authorAnthony Green <green@moxielogic.com>
Mon, 26 Sep 2022 15:41:48 +0000 (11:41 -0400)
committerAnthony Green <green@moxielogic.com>
Mon, 26 Sep 2022 15:42:56 +0000 (11:42 -0400)
testsuite/lib/libffi.exp

index d21e4e54076d8656d669c5d6a1d751caebdabdd5..7457af415f3d04fc14a33ef8a44ad7b469ff15c5 100644 (file)
@@ -397,20 +397,23 @@ proc libffi_target_compile { source dest type options } {
 
     lappend options "libs= -lffi"
 
-    if { [string match "aarch64*-*-linux*" $target_triplet] } {
-       lappend options "libs= -lpthread"
-    }
+    if { ![string match "*android*" $target_triplet] } {
 
-    # this may be required for g++, but just confused clang.
-    if { [string match "*.cc" $source] } {
-        lappend options "c++"
-      if { [string match "*-*-darwin*" $target_triplet] } {
-         lappend options "libs= -lc++"
-      }
-    }
+        if { [string match "aarch64*-*-linux*" $target_triplet] } {
+            lappend options "libs= -lpthread"
+        }
 
-    if { [string match "arc*-*-linux*" $target_triplet] } {
-       lappend options "libs= -lpthread"
+        # this may be required for g++, but just confused clang.
+        if { [string match "*.cc" $source] } {
+            lappend options "c++"
+            if { [string match "*-*-darwin*" $target_triplet] } {
+                lappend options "libs= -lc++"
+            }
+        }
+
+        if { [string match "arc*-*-linux*" $target_triplet] } {
+            lappend options "libs= -lpthread"
+        }
     }
 
     verbose "options: $options"