From: H.J. Lu Date: Fri, 23 Apr 2021 19:36:27 +0000 (-0700) Subject: ld: Properly create a symbolic link to tmpdir/ldscripts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69cc19455b61a3ec1e884a165fae69abe726addb;p=binutils-gdb.git ld: Properly create a symbolic link to tmpdir/ldscripts Don't create a symbolic link to tmpdir/ldscripts if it exists. PR ld/27771 * testsuite/ld-bootstrap/bootstrap.exp: Create a symbolic link to tmpdir/ldscripts only if it doesn't exist. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 93afd53bcc9..b736aa805de 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2021-04-23 H.J. Lu + + PR ld/27771 + * testsuite/ld-bootstrap/bootstrap.exp: Create a symbolic link + to tmpdir/ldscripts only if it doesn't exist. + 2021-04-22 Jan Beulich PR ld/26659 diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp index 2e4a09704ab..b21b48ab20e 100644 --- a/ld/testsuite/ld-bootstrap/bootstrap.exp +++ b/ld/testsuite/ld-bootstrap/bootstrap.exp @@ -62,7 +62,9 @@ if { [istarget "powerpc-*-*"] } { set gcc_B_opt_save $gcc_B_opt -catch "exec ln -s ../ldscripts tmpdir/ldscripts" status +if {![file exists tmpdir/ldscripts]} then { + catch "exec ln -s ../ldscripts tmpdir/ldscripts" status +} foreach ldexe {ld1 ld2 ld3} { if {![file isdirectory tmpdir/gcc$ldexe]} then { catch "exec mkdir tmpdir/gcc$ldexe" status