From: Alan Modra <amodra@gmail.com>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: Re: Commit: Avoid linker testsuite warnings about missing compilers
Date: Thu, 11 Aug 2016 14:41:00 -0000 [thread overview]
Message-ID: <20160811144123.GE3677@bubble.grove.modra.org> (raw)
In-Reply-To: <87twer3bbt.fsf@redhat.com>
On Thu, Aug 11, 2016 at 10:27:02AM +0100, Nick Clifton wrote:
> Hi Guys
>
> A lot of errors like this:
>
> LD ERROR: x86_64-solaris2-gcc does not exist
Hi Nick,
Also: ERROR: can't decipher gcc version number, fix the framework!
I hope you don't mind me replacing your fix with one that should work
on remote hosts too. (I had this in my tree before seeing your
patch.) The real problem is that the status of the remote_exec isn't
checked.
PR ld/20436
* testsuite/lib/ld-lib.exp (at_least_gcc_version): Don't ignore
remote_exec status.
(check_gcc_plugin_enabled): Likewise.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 23055be..7b190be 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -35,9 +35,12 @@ proc at_least_gcc_version { major minor } {
set CC [find_gcc]
}
if { $CC == "" } {
- return 0
+ return 0
}
set state [remote_exec host $CC --version]
+ if { [lindex $state 0] != 0 } {
+ return 0;
+ }
set tmp "[lindex $state 1]\n"
# Look for (eg) 4.6.1 in the version output.
set ver_re "\[^\\.0-9\]+(\[1-9\]\[0-9\]*)\\.(\[0-9\]+)(?:\\.\[0-9\]+)?"
@@ -1816,13 +1819,13 @@ proc check_gcc_plugin_enabled { } {
set CC [find_gcc]
}
if { $CC == ""} {
- return 0
- }
- if { ![is_remote host] && [which $CC] == 0 } then {
- return 0
+ return 0
}
set state [remote_exec host $CC -v]
- for { set i 0 } { $i < [llength $state] } { incr i } {
+ if { [lindex $state 0] != 0 } {
+ return 0;
+ }
+ for { set i 1 } { $i < [llength $state] } { incr i } {
set v [lindex $state $i]
if { [ string match "*--disable-plugin*" $v ] } {
verbose "plugin is disabled by $v"
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2016-08-11 14:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 9:27 Nick Clifton
2016-08-11 14:41 ` Alan Modra [this message]
2016-08-11 14:53 ` Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160811144123.GE3677@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).