public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] ld/testsuite: don't output to /dev/null
@ 2023-02-21  8:08 Cl?ment Chigot
  0 siblings, 0 replies; only message in thread
From: Cl?ment Chigot @ 2023-02-21  8:08 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fd7f7424f5f68ad5cb16a5319f60ba15a7d23107

commit fd7f7424f5f68ad5cb16a5319f60ba15a7d23107
Author: Clément Chigot <chigot@adacore.com>
Date:   Fri Jan 13 10:21:07 2023 +0100

    ld/testsuite: don't output to /dev/null
    
    Mingw doesn't have /dev/null and thus "-o /dev/null" will fail.
    Currently, all the options are checked using this "-o /dev/null",
    resulting in them being disabled on mingw hosts.
    Fix that by outputting to a real file for all targets.
    
    ld/ChangeLog:
    
            * testsuite/config/default.exp: Replace "-o /dev/null" by a
            file.

Diff:
---
 ld/testsuite/config/default.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 59a45e34d1d..5c925476e23 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -383,6 +383,7 @@ proc compiler_supports { flag args } {
 	    append flags " [board_info [target_info name] ldflags]"
 	}
 	set fn "cs[pid].c"
+	set rfno "cs[pid].exe"
 	set f [open $fn "w"]
 	if { [llength $args] > 0 } {
 	    puts $f [lindex $args 0]
@@ -391,7 +392,8 @@ proc compiler_supports { flag args } {
 	}
 	close $f
 	set rfn [remote_download host $fn]
-	set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o /dev/null"]
+	set avail [run_host_cmd_yesno "$CC_FOR_TARGET" "$flags $flag $rfn -o $rfno"]
+	remote_file host delete $rfno
 	remote_file host delete $rfn
 	file delete $fn
 	return $avail

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-21  8:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21  8:08 [binutils-gdb] ld/testsuite: don't output to /dev/null Cl?ment Chigot

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).