]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: move symlink-ing of ldscripts a little earlier
authorJan Beulich <jbeulich@suse.com>
Fri, 13 Feb 2026 09:19:23 +0000 (10:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 13 Feb 2026 09:19:23 +0000 (10:19 +0100)
Following up commit a29a6230b820 "PR 33629 ldscripts symlink in .libs/
created too late", move the symlink-ing ahead of the linking of the final
binary, to eliminate the slim chance of the build being interrupted (or
failing) at that (so far) final step. If that happened, a subsequent make
invocation with no other changes made would then not re-attempt this step.

Necessarily with this the test for the existence of the binary needs to be
removed. Perhaps that shouldn't have been there anyway, the more that the
check was lacking $(EXEEXT).

ld/Makefile.am
ld/Makefile.in

index a81cb4578bc40395450675c5366c440b80741984..20d17c23f3327cd34c0267614b47d9299e40b76b 100644 (file)
@@ -661,8 +661,8 @@ EXTRA_ld_new_SOURCES += $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
 # The standard rule plus set up a symlink when --enable-shared for "make check"
 ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) $(EXTRA_ld_new_DEPENDENCIES)
        @rm -f ld-new$(EXEEXT)
+       $(AM_V_at)cd .libs; test -e ldscripts || $(LN_S) ../ldscripts .
        $(AM_V_CCLD)$(LINK) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-       $(AM_V_at)cd .libs; test ! -e ld-new || test -e ldscripts || $(LN_S) ../ldscripts .
 
 # This is the real libbfd.a and libctf.a created by libtool.
 TESTBFDLIB = @TESTBFDLIB@
index 9de1ec5f676e080177b29b04dfdb54450f4b786d..ddc2732a03ff46644f050a5345ab858622a926e4 100644 (file)
@@ -2370,8 +2370,8 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
 # The standard rule plus set up a symlink when --enable-shared for "make check"
 ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) $(EXTRA_ld_new_DEPENDENCIES)
        @rm -f ld-new$(EXEEXT)
+       $(AM_V_at)cd .libs; test -e ldscripts || $(LN_S) ../ldscripts .
        $(AM_V_CCLD)$(LINK) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
-       $(AM_V_at)cd .libs; test ! -e ld-new || test -e ldscripts || $(LN_S) ../ldscripts .
 
 check-DEJAGNU: site.exp
        srcroot=`cd $(srcdir) && pwd`; export srcroot; \