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:
@@ -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]
|
||||
}
|
||||
|
||||
@@ -19,10 +19,7 @@ libffi-init
|
||||
|
||||
global srcdir subdir
|
||||
|
||||
run-many-tests [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] ""
|
||||
if { [string match $using_gcc "yes"] } {
|
||||
run-many-tests [lsort [glob -nocomplain $srcdir/$subdir/*.cc]] "-shared-libgcc -lstdc++"
|
||||
}
|
||||
run-many-tests [lsort [glob -nocomplain -- $srcdir/$subdir/*.{c,cc}]] ""
|
||||
|
||||
dg-finish
|
||||
|
||||
|
||||
Reference in New Issue
Block a user