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]

[PATCH, FFI] Support test environments needing testglue


This patch adds support for using the dejagnu testglue wrapper in those
environments that need it (eg the arm simulator).  It's pretty much a
straight cut-and-paste of the same code in libstdc++-v3 with the obvious
name changes.

R.

2004-10-27  Richard Earnshaw  <rearnsha@arm.com>

	* testsuite/lib/libffi-db.exp (load_gcc_lib): New function.
	(libffi_exit): New function.
	(libffi_init): Build the testglue wrapper if needed.


Index: testsuite/lib/libffi-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/libffi/testsuite/lib/libffi-dg.exp,v
retrieving revision 1.9
diff -p -r1.9 libffi-dg.exp
*** testsuite/lib/libffi-dg.exp	25 Oct 2004 09:01:14 -0000	1.9
--- testsuite/lib/libffi-dg.exp	27 Oct 2004 10:53:46 -0000
***************
*** 14,22 ****
  # along with this program; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  
  load_lib dg.exp
  load_lib libgloss.exp
! 
  
  
  # Define libffi callbacks for dg.exp.
--- 14,27 ----
  # along with this program; if not, write to the Free Software
  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  
+ proc load_gcc_lib { filename } {
+     global srcdir
+     load_file $srcdir/../../gcc/testsuite/lib/$filename
+ }
+ 
  load_lib dg.exp
  load_lib libgloss.exp
! load_gcc_lib wrapper.exp
  
  
  # Define libffi callbacks for dg.exp.
*************** proc libffi-init { args } {
*** 71,76 ****
--- 76,82 ----
      global gluefile wrap_flags;
      global srcdir
      global blddirffi
+     global objdir
      global blddircxx
      global TOOL_OPTIONS
      global tool
*************** proc libffi-init { args } {
*** 148,153 ****
--- 154,169 ----
  	    }
  	}
      }
+     libffi_maybe_build_wrapper "${objdir}/testglue.o"
+ }
+ 
+ proc libffi_exit { } {
+     global gluefile;
+ 
+     if [info exists gluefile] {
+ 	file_on_build delete $gluefile;
+ 	unset gluefile;
+     }
  }
  
  proc libffi_target_compile { source dest type options } {

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