]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: fix spurious relinking of gnatbind for cross compilers
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 6 Jan 2025 11:20:00 +0000 (12:20 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 6 Jan 2025 11:22:41 +0000 (12:22 +0100)
The problem has been introduced by r15-1881.

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

gcc/ada/gcc-interface/Make-lang.in

index 1d8f09709806686a612f82a239c0a5d9bc90b9d8..b0c568ad60bacd831fe364e55e82fe3d13cdd4ba 100644 (file)
@@ -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