http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48835
--- Comment #21 from Mikael Pettersson <mikpe at it dot uu.se> 2011-07-12 15:42:35 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). 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. 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. So I'm now patching s-memory.ad{b,s} instead. Assuming the current bootstrap succeeds (sometime late tomorrow) I'll post my full patch for 4.5.3.