From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7863) id B0EE33858D20; Thu, 6 Jul 2023 01:05:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0EE33858D20 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: YunQiang Su To: bfd-cvs@sourceware.org Subject: [binutils-gdb] ld: Use run_host_cmd_yesno in indirect.exp instead of catch exec X-Act-Checkin: binutils-gdb X-Git-Author: YunQiang Su X-Git-Refname: refs/heads/master X-Git-Oldrev: 96a73f2cb2a1b4c47e49ff194a94f7394308956b X-Git-Newrev: 0f5cb49f68ae1be4b9702e71c3a9b80ee46b310a Message-Id: <20230706010544.B0EE33858D20@sourceware.org> Date: Thu, 6 Jul 2023 01:05:44 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2023 01:05:44 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0f5cb49f68ae= 1be4b9702e71c3a9b80ee46b310a commit 0f5cb49f68ae1be4b9702e71c3a9b80ee46b310a Author: YunQiang Su Date: Fri Jun 30 14:07:57 2023 +0800 ld: Use run_host_cmd_yesno in indirect.exp instead of catch exec =20 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. =20 ld/ChangeLog: =20 * 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/indirec= t.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 indir= ect6b] { } } =20 -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 }