http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48835
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.07.12 17:05:07 Ever Confirmed|0 |1 --- Comment #22 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-12 17:05:07 UTC --- > The problem is that LIBGNAT_TARGET_PAIRS is applied too late, and stage 1, 2, > and 3 gnat1 etc are built out of a fixed set of source files that your target > fragment in gcc/ada/gcc-interface/Makefile.in cannot influence (AFAIK). Yes, the full run-time is built only after the compiler is built. > You can observe this easily with a bootstrap on e.g. i686-linux. On that > platform system.ads should be replaced by system-linux-x86.ads, but the build > log clearly shows stage 1, 2, 3 compiling the default gcc/ada/system.ads from > the gcc source dir and linking that .o file into gnat1 etc. It's not until > some time after stage 3 that the build directory's gcc/ada/rts/ is populated > according to LIBGNAT_TARGET_PAIRS, allowing system-linux-x86.ads to get used. It is populated only at the beginning of the build of the full run-time. So, in particular, system.ads is indeed used for the compiler proper in all stages. > But that's too late for m68k, since the type-incorrect s-memory.ad{b,s} have > already been compiled and linked into the intermediate gnat1 etc, which then > crash in stage 2. OK, this is more involved than envisioned initially. I can propose a slight variant of my earlier proposal: still the attribute, but gigi (interface between front-end and middle-end) would be responsible for setting it on the malloc-like functions used in Ada.