public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] ld: Use run_host_cmd_yesno in indirect.exp instead of catch exec
@ 2023-07-06  1:05 YunQiang Su
  0 siblings, 0 replies; only message in thread
From: YunQiang Su @ 2023-07-06  1:05 UTC (permalink / raw)
  To: bfd-cvs

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

commit 0f5cb49f68ae1be4b9702e71c3a9b80ee46b310a
Author: YunQiang Su <yunqiang.su@cipunited.com>
Date:   Fri Jun 30 14:07:57 2023 +0800

    ld: Use run_host_cmd_yesno in indirect.exp instead of catch exec
    
    Catch "exec $CC_FOR_TARGET" won't use the gas/ld that we just build,
    and in fact run_host_cmd_yesno is a better choice for it.
    
    ld/ChangeLog:
    
            * testsuite/ld-elf/indirect.exp: use run_host_cmd_yesno
            instead of handwrite catch exec $CC_FOR_TARGET.

Diff:
---
 ld/testsuite/ld-elf/indirect.exp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ld/testsuite/ld-elf/indirect.exp b/ld/testsuite/ld-elf/indirect.exp
index eda48d30949..de5d9714e19 100644
--- a/ld/testsuite/ld-elf/indirect.exp
+++ b/ld/testsuite/ld-elf/indirect.exp
@@ -226,10 +226,7 @@ foreach t [list indirect5a indirect5b indirect6a indirect6b] {
     }
 }
 
-send_log "$CC_FOR_TARGET -fPIE -pie $srcdir/$subdir/main.c -o tmpdir/pie"
-catch "exec $CC_FOR_TARGET -fPIE -pie $srcdir/$subdir/main.c -o tmpdir/pie" exec_output
-send_log "$exec_output"
-if { ! [string match "" $exec_output] } {
+if { ![run_host_cmd_yesno $CC_FOR_TARGET "-fPIC -pie $srcdir/$subdir/main.c -o tmpdir/pie"] } {
     return
 }

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

only message in thread, other threads:[~2023-07-06  1:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06  1:05 [binutils-gdb] ld: Use run_host_cmd_yesno in indirect.exp instead of catch exec YunQiang Su

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