This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix struct-layout tests remote host issue


The struct layout tests presently build the generator programs using
$HOSTCC on the host system.  However, if the host and build systems
differ there is no particular reason for the host to have a native
compiler at all (only a compiler for the target), and site.exp as
created by "make check" gives a value of HOSTCC that is a compiler
that runs on the build system, not the host.

Thus, it's appropriate to compile the generator programs on the build
system, not the host, when the two differ, which this patch does.  OK
to commit?

2008-07-02  Joseph Myers  <joseph@codesourcery.com>

	* g++.dg/compat/struct-layout-1.exp: Compile generator on build
	system.
	* gcc.dg/compat/struct-layout-1.exp: Likewise.

Index: gcc.dg/compat/struct-layout-1.exp
===================================================================
--- gcc.dg/compat/struct-layout-1.exp	(revision 137393)
+++ gcc.dg/compat/struct-layout-1.exp	(working copy)
@@ -98,7 +98,7 @@
      set orig_gcc_exec_prefix_saved 1
      unsetenv GCC_EXEC_PREFIX
 }
-set status [remote_exec host "$HOSTCC $HOSTCFLAGS $generator_cmd"]
+set status [remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"]
 set status [lindex $status 0]
 if { $orig_gcc_exec_prefix_saved } {
      set orig_gcc_exec_prefix_saved 0
Index: g++.dg/compat/struct-layout-1.exp
===================================================================
--- g++.dg/compat/struct-layout-1.exp	(revision 137393)
+++ g++.dg/compat/struct-layout-1.exp	(working copy)
@@ -136,7 +136,7 @@
      set orig_gcc_exec_prefix_saved 1
      unsetenv GCC_EXEC_PREFIX
 }
-set status [remote_exec host "$HOSTCC $HOSTCFLAGS $generator_cmd"]
+set status [remote_exec build "$HOSTCC $HOSTCFLAGS $generator_cmd"]
 set status [lindex $status 0]
 if { $orig_gcc_exec_prefix_saved } {
      set orig_gcc_exec_prefix_saved 0

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]