ld: Properly create a symbolic link to tmpdir/ldscripts
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 23 Apr 2021 19:36:27 +0000 (12:36 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 23 Apr 2021 19:36:45 +0000 (12:36 -0700)
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/ChangeLog
ld/testsuite/ld-bootstrap/bootstrap.exp

index 93afd53bcc9f86e2a02752a5c38cd9fef4842f1b..b736aa805debbb1737a419044237aa895692c502 100644 (file)
@@ -1,3 +1,9 @@
+2021-04-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       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  <jbeulich@suse.com>
 
        PR ld/26659
index 2e4a09704ab0961d8979146ba496f0935ac8e283..b21b48ab20ed19307458fdefdf6188076b8ae8c7 100644 (file)
@@ -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
This page took 0.028339 seconds and 4 git commands to generate.