Commit 5b10a0198188d43fc07c271bc29ff1033e2ac9d3

Anthony Green 2017-03-15T09:34:01

Work around dejagnu/clang problems

diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp
index 6e5f7a4..1dcbecb 100644
--- a/testsuite/lib/libffi.exp
+++ b/testsuite/lib/libffi.exp
@@ -175,7 +175,7 @@ proc libffi_target_compile { source dest type options } {
     global libffi_link_flags
     global libffi_include
     global target_triplet
-
+    global compiler_vendor
 
     if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
 	lappend options "libs=${gluefile}"
@@ -218,8 +218,11 @@ proc libffi_target_compile { source dest type options } {
 	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 $compiler_vendor "gnu"] }
+	    lappend options "c++"
+        }
     }
 
     if { [string match "arc*-*-linux*" $target_triplet] } {