userland@localhost:~$ gnatmake diranexa.adb
aarch64-linux-gnu-gcc-10 -c diranexa.adb
diranexa.adb:4:11: warning: file name does not match unit name, should be “discrete_random_example.adb”
aarch64-linux-gnu-gnatbind-10 -x diranexa.ali
aarch64-linux-gnu-gnatlink-10 diranexa.ali
userland@localhost:~$
So gnatmake isn’t behaving as it should (gnat krunch should enable portability to old systems with 8.3 name convention, such as IBM 3090 with Ada 83 compiler, or MSDOS with its Ada 83/95 compilers such as DJGPP or Janus Ada) or I have antiquated toolchain.
I cannot fully answer your question about krunch, but you do indeed have a pretty old and no-longer-supported toolchain. You seem to be using GCC/GNAT 10, but the newest is v15 (with v16 most likely coming next month). I do not know how newer toolchains would behave in this case, but from what I have seen, they do expect the longer names for files.
gnatkrunch is intended to be used for runtime files only. For all other units long file names or specific features (mapping pragmas file, naming conventions, etc.) should be used.
It is recommended to use Alire and latest toolchain. GCC10 is very old, and gnatmake utility is obsolete.
Thanks for your reply! Unfortunately I don’t have a computer at the moment, but I’m coding on my Android phone with Debian 9 installed on it. I have to figure out how to setup QEMU on it, and download newer Linux distribution for it. I really don’t appreciate modern smartphones and tablets they are good for coding in terms of performance, but manufacturers don’t want compiler such as gcc/gnat installed on them.
I just checked and Termux sadly does not have GNAT support… Mmmmm… I see no reason why that should not be the case… maybe someone could add support to it And I fully agree with your take of Android phones capabilities and the artificial limitations that manufacturer’s are imposing on them…