From: H.J. Lu Date: Fri, 7 Dec 2012 17:53:04 +0000 (+0000) Subject: Properly check linker warnings X-Git-Tag: cgen-snapshot-20130101~188 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=741e01282880b5fd10c43ad74445bb5825e95197;p=external%2Fbinutils.git Properly check linker warnings * lib/ld-lib.exp (run_cc_link_tests): Properly check linker warnings. --- 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 + * lib/ld-lib.exp (run_cc_link_tests): Properly check linker + warnings. + +2012-12-07 H.J. Lu + * lib/ld-lib.exp (ar_simple_create): Pass -rc to ar. 2012-12-07 H.J. Lu 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 } {