Never link pthread for android
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
diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp
index d21e4e5..7457af4 100644
--- a/testsuite/lib/libffi.exp
+++ b/testsuite/lib/libffi.exp
@@ -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"