* Commit: Avoid linker testsuite warnings about missing compilers
@ 2016-08-11 9:27 Nick Clifton
2016-08-11 14:41 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2016-08-11 9:27 UTC (permalink / raw)
To: binutils
Hi Guys
A lot of errors like this:
LD ERROR: x86_64-solaris2-gcc does not exist
have just started showing up in the linker testsuite when a target is
tested on a host that does not have the appropriate compiler
installed. I am checking in the patch below as a simple fix for this
problem.
Cheers
Nick
2016-08-11 Nick Clifton <nickc@redhat.com>
PR ld/20436
* testsuite/lib/ld-lib.exp (check_gcc_plugin_enabled): When not
testing remotely, check to see if target compiler is installed
before trying to run it.
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index b3cdb70..23055be 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1815,7 +1815,10 @@ proc check_gcc_plugin_enabled { } {
if { $CC == "" } {
return 0
}
+ if { ![is_remote host] && [which $CC] == 0 } then {
+ return 0
+ }
set state [remote_exec host $CC -v]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Commit: Avoid linker testsuite warnings about missing compilers
2016-08-11 9:27 Commit: Avoid linker testsuite warnings about missing compilers Nick Clifton
@ 2016-08-11 14:41 ` Alan Modra
2016-08-11 14:53 ` Nick Clifton
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2016-08-11 14:41 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Commit: Avoid linker testsuite warnings about missing compilers
2016-08-11 14:41 ` Alan Modra
@ 2016-08-11 14:53 ` Nick Clifton
0 siblings, 0 replies; 3+ messages in thread
From: Nick Clifton @ 2016-08-11 14:53 UTC (permalink / raw)
To: Alan Modra; +Cc: binutils
Hi Alan,
> 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.
Of course not - better patches are always appreciated.
Cheers
Nick
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-11 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 9:27 Commit: Avoid linker testsuite warnings about missing compilers Nick Clifton
2016-08-11 14:41 ` Alan Modra
2016-08-11 14:53 ` Nick Clifton
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).