On Fri, 2009-06-26 at 14:07 -0400, Robert Dewar wrote:
> Ian Lance Taylor wrote:
> 
> > gnatbind -C appears to be used when bootstrapping gcc to generate .c
> > files.  With --enable-build-with-cxx, those .c files will be compiled
> > with a C++ compiler.  The symbols emitted by that compilation need to be
> > linkable with the symbols emitted when compiling Ada code, so the .c
> > files need extern "C" to avoid C++ mangling.
> > 
> > Or at least so it seems to me.  I may be missing some key step.
> 
> No, I think that analysis is correct. I agree that if we can make
> the gnatbind output C++ compatible (remembering that it must be
> strictly standard, you cannot assume that gcc will be used to
> compile it!) easily, we may as well do so.
> 
> I am not clear why we have to use gnatbind -C in the build context,
> but in any case, let's fix this if it is easy to do so.

Switching gnatbind to generate Ada if there's nothing against
it might be a better solution since stage1 uses the system gnatbind, so
a patch to current gnatbind will not help (unless we push it to branches
and tell user to install a fairly recent gnatbind first).

Laurent



Reply via email to