Use the proper C++ compiler to run C++ tests

Running the C compiler with -shared-libgcc -lstdc++ does not work on
non-GCC compilers.
This commit is contained in:
Josh Triplett
2014-03-26 23:17:56 -07:00
parent fa5e88f170
commit 7d698125b1
4 changed files with 9 additions and 6 deletions

View File

@@ -222,6 +222,10 @@ proc libffi_target_compile { source dest type options } {
lappend options "libs= -lpthread"
}
if { [string match "*.cc" $source] } {
lappend options "c++"
}
verbose "options: $options"
return [target_compile $source $dest $type $options]
}