[PATCH] PR ada/42254, avoid providing multiple copies of object files to link of GNAT tools

Arnaud Charlet charlet@adacore.com
Tue Jan 26 21:45:00 GMT 2010


> The only part of this patch you may be uncomfortable with is the change 
> to target common-tools, where I delete all the .o files in the RTS directory 
> that are already in libgna*.a before the gnatmake -b step (the problem 
> being that if gnatbind sees a .o file it includes it in the files to be linked, 
> being unaware that the object is already in libgna*.a). The .o files that 
> survive are g-trasym.o and (on powerpc-wrs-vxworks) memtrack.o - but 
> the latter doesn't get installed.

Right, I'm indeed uncomfortable with this part indeed. Would be good
to find a way to avoid this part, removing objects means always forcing
recompilation of these files. Also, you shouldn't need to remove
memtrack.o, it shouldn't conflict with any existing .o, so no need to.

The RM command lines generated by the Makefile may also exceed
command line length limits on some systems (e.g. IRIX).

> 2010-01-26  Simon Wright  <simon@pushface.org>
> 
> 	PR ada/42554
> 	* gcc-interface/Makefile.in (TOOLS_LIBS): remove LIB_GNAT.
> 	* gcc-interface/Makefile.in (GNATLINK_OBJS): remove object files
> 	that are present in the RTS.
> 	* gcc-interface/Makefile.in (GNATMAKE_OBJS): likewise.
> 	* gcc-interface/Makefile.in (common-tools): at the start, delete
> 	all the .o files in the RTS directory that are also in libraries.
> 	* gcc-interface/Makefile.in (../../gnatmake$(exeext)): add LIBGNAT.
> 	* gcc-interface/Makefile.in (../../gnatlink$(exeext)):likewise.

This changelog is also not in the right format, there should be
only one mention of the file name.

The other parts of the patch (removing run-time objects from the explicit
list of gnatmake/gnatlink objects, removing the duplicated libgnat) look
reasonable.

Arno



More information about the Gcc-patches mailing list