RFC/Ada: removal of $(ADAC) support
Zack Weinberg
zack@codesourcery.com
Mon May 12 21:41:00 GMT 2003
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> No. There is only one C source file that needs to be compiled
> with the compiler that is used for the Ada source code: the one that
> defines __gnat_raise_exception. Which is what the patch you rejected
> did.
>
> It's certainly true that that file does need to be compiled with the same
> compiler as the Ada files, but it's not at all clear why it isn't simpler to
> compile *all* of them with that same compiler? What's the problem with
> simply setting CC to be "gnatgcc" for such systems? This is what I never
> understood.
The systems under discussion ship a "gnatgcc" based on GCC 2.8, but a
"gcc" based on GCC 2.9x. This was done for very good reason, that GCC
2.8 worked fine for Ada but silently miscompiled C source code on at
least one architecture that that system supports. Second-guessing the
system integrator in that scenario, by forcing CC to gnatgcc, would
raise the risk of bootstrap failure due to a bug in the host compiler.
It is safer to compile only the Ada source code with gnatgcc, plus
whatever C modules absolutely have to be compiled with that compiler
for ABI compatibility.
There is only one known C-and-Ada ABI incompatibility issue between
2.8 and 2.9x. It affects __gnat_raise_exception, so that one file
needs to be compiled with gnatgcc. But none of the others do.
zw
More information about the Gcc
mailing list