aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-bootstrap/bootstrap.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-04-23 12:36:27 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-04-23 12:36:45 -0700
commit69cc19455b61a3ec1e884a165fae69abe726addb (patch)
treeaa38d2a8b05c9ea95afb541fab69e3a041dddf78 /ld/testsuite/ld-bootstrap/bootstrap.exp
parent4d6840c33529db663d7ccc231ba43c0a16320f51 (diff)
downloadgdb-69cc19455b61a3ec1e884a165fae69abe726addb.zip
gdb-69cc19455b61a3ec1e884a165fae69abe726addb.tar.gz
gdb-69cc19455b61a3ec1e884a165fae69abe726addb.tar.bz2
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.
Diffstat (limited to 'ld/testsuite/ld-bootstrap/bootstrap.exp')
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index 2e4a097..b21b48a 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