From 2ff2235ced856640e360705b080bf92c60796fc7 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 6 May 2009 21:31:56 +0000 Subject: [PATCH] re PR testsuite/40050 (plugin tests don't work with multilib) 2009-05-06 H.J. Lu PR testsuite/40050 * lib/plugin-support.exp (plugin-test-execute): Use HOSTCC to build plugin. From-SVN: r147208 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/lib/plugin-support.exp | 11 +++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7ba4910..08c7a9a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-05-06 H.J. Lu + + PR testsuite/40050 + * lib/plugin-support.exp (plugin-test-execute): Use HOSTCC to + build plugin. + 2009-05-06 Janus Weil PR fortran/39630 diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp index 0a548f7..79ccc93 100644 --- a/gcc/testsuite/lib/plugin-support.exp +++ b/gcc/testsuite/lib/plugin-support.exp @@ -63,6 +63,8 @@ proc plugin-test-execute { plugin_src plugin_tests } { global srcdir objdir global verbose global GMPINC + global HOSTCC + global HOSTCFLAGS set basename [file tail $plugin_src] set base [file rootname $basename] @@ -86,8 +88,13 @@ proc plugin-test-execute { plugin_src plugin_tests } { set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared" - set status [target_compile "$optstr $plugin_src" "$plugin_lib" executable ""] - if { "$status" != "" } { + # Temporarily switch to the environment for the host compiler. + restore_ld_library_path_env_vars + set status [remote_exec build "$HOSTCC $HOSTCFLAGS $plugin_src $optstr -o $plugin_lib"] + set status [lindex $status 0] + set_ld_library_path_env_vars + + if { $status != 0 } then { unresolved "$basename compilation, $optstr" return } -- 2.7.4