This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Properly check linker warnings


Hi,

I checked in this patch to properly check linker warnings.


H.J.
---
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ChangeLog,v
retrieving revision 1.1636
diff -u -p -r1.1636 ChangeLog
--- ChangeLog	7 Dec 2012 17:51:34 -0000	1.1636
+++ ChangeLog	7 Dec 2012 17:52:39 -0000
@@ -1,5 +1,10 @@
 2012-12-07  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* lib/ld-lib.exp (run_cc_link_tests): Properly check linker
+	warnings.
+
+2012-12-07  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* lib/ld-lib.exp (ar_simple_create): Pass -rc to ar.
 
 2012-12-07  H.J. Lu  <hongjiu.lu@intel.com>
Index: lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.98
diff -u -p -r1.98 ld-lib.exp
--- lib/ld-lib.exp	7 Dec 2012 17:51:35 -0000	1.98
+++ lib/ld-lib.exp	7 Dec 2012 17:52:40 -0000
@@ -1407,21 +1407,26 @@ proc run_cc_link_tests { ldtests } {
 	    } else {
 		set failed 0
 	    }
-	} elseif { ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] } {
+	} else {
+	    if { ![ld_simple_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"] } {
+		set failed 1
+	    } else {
+		set failed 0
+	    }
+
 	    # Check if exec_output is expected.
 	    if { $warnings != "" } then {
 		verbose -log "returned with: <$exec_output>, expected: <$warnings>"
 		if { [regexp $warnings $exec_output] } then {
-		    set failed 0
+		    set failed 2
 		} else {
 		    set failed 1
 		}
-	    } else {
+	    }
+
+	    if { $failed == 1 } {
 		fail $testname
-		set failed 1
 	    }
-	} else {
-	    set failed 0
 	}
 
 	if { $failed == 0 } {


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