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 to testsuite/lib/gcc.exp


I was bitten by a quirk in the testing framework last week.  One might
expect that if the target_info attribute "needs_status_wrapper" is set
to 1 for a particular board, that setting it to "0" would have the
opposite effect.  Not so!

Okay to commit?

2002-02-04  Ben Elliston  <bje@redhat.com>

	* lib/gcc.exp (gcc_init): Check that the need_status_wrapper
	target_info attribute != 0, in addition to the empty string.
	(gcc_target_compile): Likewise.

Index: gcc.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gcc.exp,v
retrieving revision 1.7
diff -u -r1.7 gcc.exp
--- gcc.exp	2001/07/26 21:38:14	1.7
+++ gcc.exp	2002/02/03 22:13:33
@@ -106,7 +106,9 @@
     if ![info exists tmpdir] then {
 	set tmpdir /tmp
     }
-    if { [target_info needs_status_wrapper]!="" && ![info exists gluefile] } {
+    if {[target_info needs_status_wrapper] != "" && \
+	    [target_info needs_status_wrapper] != "0" && \
+	    ![info exists gluefile]} {
 	set gluefile ${tmpdir}/testglue.o;
 	set result [build_wrapper $gluefile];
 	if { $result != "" } {
@@ -127,8 +129,10 @@
     global gluefile wrap_flags;
     global GCC_UNDER_TEST
     global TOOL_OPTIONS
-
-    if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
+	
+    if {[target_info needs_status_wrapper] != "" && \
+	    [target_info needs_status_wrapper] != "0" && \
+	    [info exists gluefile] } {
 	lappend options "libs=${gluefile}"
 	lappend options "ldflags=$wrap_flags"
     }


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