aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-12-07 17:53:04 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-12-07 17:53:04 +0000
commit741e01282880b5fd10c43ad74445bb5825e95197 (patch)
tree902add2b50483f8bec4e1ab947c6327371c039b7 /ld
parentd52a4dca580e1bacb53409ada3510acd0fd66f02 (diff)
downloadgdb-741e01282880b5fd10c43ad74445bb5825e95197.zip
gdb-741e01282880b5fd10c43ad74445bb5825e95197.tar.gz
gdb-741e01282880b5fd10c43ad74445bb5825e95197.tar.bz2
Properly check linker warnings
* lib/ld-lib.exp (run_cc_link_tests): Properly check linker warnings.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/lib/ld-lib.exp17
2 files changed, 16 insertions, 6 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index c5126c0..15fb595 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -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>
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 4ddb659..f08b9bf 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -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 } {