Checks
Commit Message
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 <ebotcazou@adacore.com>
PR ada/118247
* gcc-interface/Make-lang.in (GNATTOOLS_CROSS_MV): Copy gnatbind
instead of moving it.
Comments
On Mon, 6 Jan 2025, Eric Botcazou wrote:
> 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.
The fix feels hackish and I wonder how other frontends handle this, but
overall thank you for taking care of this peculiarity.
Maciej
> The fix feels hackish and I wonder how other frontends handle this, but
> overall thank you for taking care of this peculiarity.
You're welcome. The main Makefile does the same for xgcc -> gcc-cross and,
as this example shows, every change is this area is almost guaranteed to break
something, so the simpler, the better.
On Tue, 7 Jan 2025, Eric Botcazou wrote:
> > The fix feels hackish and I wonder how other frontends handle this, but
> > overall thank you for taking care of this peculiarity.
>
> You're welcome. The main Makefile does the same for xgcc -> gcc-cross and,
> as this example shows, every change is this area is almost guaranteed to break
> something, so the simpler, the better.
Thank you for the clarification, I can see the Makefile fragment now and
I agree it was the right choice to follow it. I think such explanatory
notes are best placed in the change description though, for the benefit of
people coming across it in the future.
Maciej
@@ -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