This is a regression introduced by
  https://gcc.gnu.org/pipermail/gcc-cvs/2024-July/405522.html
in the form of a spurious relinking of the gnatbind executable for the install 
target of cross Ada compilers.

Tested on x86-64/Linux, applied on the mainline.


2025-01-06  Eric Botcazou  <ebotca...@adacore.com>

        PR ada/118247
        * gcc-interface/Make-lang.in (GNATTOOLS_CROSS_MV): Copy gnatbind
        instead of moving it.

-- 
Eric Botcazou
diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in
index 1d8f0970980..b0c568ad60b 100644
--- a/gcc/ada/gcc-interface/Make-lang.in
+++ b/gcc/ada/gcc-interface/Make-lang.in
@@ -833,10 +833,14 @@ gnatlib gnatlib-sjlj gnatlib-zcx gnatlib-shared: force
 gnattools-cross-mv:
 	$(GNATTOOLS_CROSS_MV)
 
+# gnatbind$(exeext) is a prerequisite of the ada target and
+# thus needs to be copied instead of moved.
 GNATTOOLS_CROSS_MV=\
-  for tool in $(ADA_TOOLS) ; do \
-    if [ -f $$tool$(exeext) ] ; \
-    then \
+  if [ -f gnatbind$(exeext) ] ; then \
+    $(CP) gnatbind$(exeext) gnatbind-cross$(exeext); \
+  fi; \
+  for tool in $(filter-out gnatbind, $(ADA_TOOLS)) ; do \
+    if [ -f $$tool$(exeext) ] ; then \
       $(MV) $$tool$(exeext) $$tool-cross$(exeext); \
     fi; \
   done

Reply via email to