Ada: fix spurious relinking of gnatbind for cross compilers

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.
This commit is contained in:
Eric Botcazou 2025-01-06 12:20:00 +01:00
parent 72b273152f
commit 144ddb0cdf

View 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