[PATCH] ld: Properly create a symbolic link to tmpdir/ldscripts
H.J. Lu
hjl.tools@gmail.com
Fri Apr 23 17:55:29 GMT 2021
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.
---
ld/testsuite/ld-bootstrap/bootstrap.exp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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
--
2.30.2
More information about the Binutils
mailing list