re PR testsuite/40050 (plugin tests don't work with multilib)

2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/40050
	* lib/plugin-support.exp (plugin-test-execute): Use HOSTCC to
	build plugin.

From-SVN: r147208
This commit is contained in:
H.J. Lu 2009-05-06 21:31:56 +00:00 committed by H.J. Lu
parent e84efdce90
commit 2ff2235ced
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2009-05-06 H.J. Lu <hongjiu.lu@intel.com>
PR testsuite/40050
* lib/plugin-support.exp (plugin-test-execute): Use HOSTCC to
build plugin.
2009-05-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/39630

View file

@ -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
}