I posted the source of my compiler but I was told to setup the makefiles first. OK, I'll try (need help).
I'm no fan of Git, and when I was looking at MIPS some years ago I was doing so in the context of either a downloaded archive (fpcbuild?) or Subversion. However my recollection is that the fundamental makefiles etc. came with it, and basically "all" I had to do was follow the standard build instructions: I've previously given you a link to the notes that I put in the wiki.
These days, that is obviously documented at
https://www.freepascal.org/docs-html/current/prog/progsu218.html#x331-347000F.3.1 etc., which then goes on to cross-builds. I must stress that the manual contains (or at least is supposed to contain) definitive information, and that details might have changed since I was involved in this stuff.
As I've previously said, I got things to the state where the compiler (and RTL?) would build, but it failed some of the test programs... in order to be confident in your build /all/ of these must pass. At that point, I basically ran out of time even though we (as a company) were generally interested in non-PC platforms, in addition to which development hardware promised by the Chinese manufacturer failed to arrive so I lost a lot of time due to relatively-slow target emulation.
Its from my build of the crosscompiler I'm porting.
I think there's two questions to ask at this point. (a) Does your test code work in the context of an unmodified compiler? (I'm concerned, in retrospect, about those printf()s etc.) and (b) Does your compiler pass all the test cases before you apply it to your own code?
Heap is initialized in the initialization part of the system unit and getmem works correctly.
I think there is some flags to set to allow dynlibs, but I'm just guessing.
Again, do the test cases pass? Is this a modified compiler/RTL you're building, since I'd not expect dynamic libraries to be relevant until both were completed.
I would stress that the above is my own personal position. If you were talking directly to the core compiler maintainers you might do better, and to do that you really should be on the fpc-devel mailing list: but expect them to have their own agenda, and to be even less tolerant of e.g. incomplete examples than the forum :-)
MarkMLl