===================================================================
@@ -11,7 +11,7 @@ RUNTEST = `if [ -f $(top_srcdir)/../deja
echo $(top_srcdir)/../dejagnu/runtest ; \
else echo runtest; fi`
-AM_RUNTESTFLAGS =
+AM_RUNTESTFLAGS = --tool_exec "$(CC)"
CLEANFILES = *.exe core* *.log *.sum
===================================================================
@@ -134,7 +134,7 @@ ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_LTLDFLAGS = @AM_LTLDFLAGS@
-AM_RUNTESTFLAGS =
+AM_RUNTESTFLAGS = --tool_exec "$(CC)"
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
===================================================================
@@ -99,7 +99,8 @@ proc libffi-init { args } {
global blddirffi
global objdir
global blddircxx
- global TOOL_OPTIONS
+ global TOOL_EXECUTABLE
+ global GCC_UNDER_TEST
global tool
global libffi_include
global libffi_link_flags
@@ -123,7 +124,15 @@ proc libffi-init { args } {
set ld_library_path "."
append ld_library_path ":${gccdir}"
- set compiler "${gccdir}/xgcc"
+ if ![info exists GCC_UNDER_TEST] then {
+ if [info exists TOOL_EXECUTABLE] {
+ set GCC_UNDER_TEST $TOOL_EXECUTABLE
+ } else {
+ set GCC_UNDER_TEST "[find_gcc]"
+ }
+ }
+
+ set compiler [lindex $GCC_UNDER_TEST 0]
if { [is_remote host] == 0 && [which $compiler] != 0 } {
foreach i "[exec $compiler --print-multi-lib]" {
set mldir ""
@@ -175,11 +184,14 @@ proc libffi_target_compile { source dest
global srcdir
global blddirffi
global TOOL_OPTIONS
+ global GCC_UNDER_TEST
global libffi_link_flags
global libffi_include
global target_triplet
+ lappend options "compiler=$GCC_UNDER_TEST"
+
if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
lappend options "libs=${gluefile}"
lappend options "ldflags=$wrap_flags"