re PR testsuite/40050 (plugin tests don't work with multilib)
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 6 May 2009 21:31:56 +0000 (21:31 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 6 May 2009 21:31:56 +0000 (14:31 -0700)
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

gcc/testsuite/ChangeLog
gcc/testsuite/lib/plugin-support.exp

index 7ba4910..08c7a9a 100644 (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
index 0a548f7..79ccc93 100644 (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
     }