GNAT: automatically build source generation tools
Zack Weinberg
zack@codesourcery.com
Thu Oct 4 09:15:00 GMT 2001
On Thu, Oct 04, 2001 at 12:56:58PM +0200, Laurent Guerby wrote:
> > I'm a little confused why the temporary directory is necessary, but
> > I'll take your word for it. [...]
>
> ! # target independant source files. They are built with the gnatmake
> ! # provided by the build compiler, and in a separate directory to avoid
> ! # any interference with the new sources and objects.
>
> I'll expand my comment here. The idea is that if you -I srcdir, you'll
> get in the way runtime sources of the new compiler, and they don't mix
> with those of the build compiler. By using the build dir, you get
> objects and ALI files of the new compiler, bad too. Hence we need a
> clean directory (or may be it can be done with complicated flags, I
> found the tmp-dir just simpler).
I don't see how this is different from (e.g.) genrecog, which shares a
number of object modules with the compiler proper. They are built
with the appropriate compiler for each stage.
Cross compilation does require special glue in the Makefile. See what
is done with rtl.o and $(HOST_PREFIX)rtl.o in the top-level makefile,
for instance (but note that the terminology is wrong - it consistently
refers to the build machine as the host).
It may be safer to avoid the use of gnatmake, especially since that
adds another utility to the required list for a bootstrap.
zw
More information about the Gcc-patches
mailing list