The size of "hello world" is the first thing I ask.
It tells me mostly if a compiler linker links in more
modules than it needs or on the other side if it
eliminates dead code after it is done.'
The trouble is that no modern system tunes for those magnitudes anymore. Embedded systems go lower, but usually tune OSless, fsless etc.
The most logical solution would be to limit your choice to compilers of the same era as your system dimensions or customize the RTL to your wishes.
Size is very important. I have a complete DOS
8.00 system plus about 60 what I call OS utilities
and it all fits on a floppy with about 30 large apps
on a usb stick which a.bat brings into a ramdisk.
Buy a larger USB stick :_)
I use UPX and APACK and another extensively. APACK
is usually the best but not always. This is why I can
get so much on a floppy.
Strange. Since you deploy to ramdisk anyway, I would guess that properly stripping and then archiving with something that supports solid archives would do better. The advantages of solid archives + the decompression code only once.
Another trick is to find a shell that integrates many commands. (I used 4dos in the previous century. 4dos.com was bigger but had many internal commands and many externals could be replaced by scripts, a netto plus)
Compilers and linkers that only bring in the modules that
are needed have been around at least 1973 when I started
working on mainframes. I think I can still look up some IBM
part numbers if anyone is interested.
Most compilers can. But RTLs are not always architected in a way that you can leave out everything. It is like that when you do printf("A") that routine is bigger than the code to display one char. The compiler is not able to reduce that with dead code optimization.
And such systems are available today. Full functionality
with a good external LIB. Just not FP or FB either.
Old minimalistic systems maybe. Most modern system use some libc somewhere and that greatly inflates (as dkl told you in the FB forum). FPC is an exception there.
And "hello world" is trivial. Let's up things to a GREP utility
for something that has useful functionality. The Borland
GREP utility is 7kb before APACK. Borland Pascal vs FP.
BP is 16-bit, 16-bit code is always tighter than 32-bit and of course there is the extender binary on top of that. TP also supported no exceptions, internationalization, translation, descriptive errormessages etc etc. All that is supported by the FPC RTL, also in the very core of it.