[fpc-devel] Questions regarding m68k-atari target

Thorsten Otto admin at tho-otto.de
Tue Jan 25 14:45:07 CET 2022

On Dienstag, 25. Januar 2022 14:07:52 CET Sven Barth via fpc-devel wrote:
> Can it be that you forgot to write some reply here, Thorsten?

Hmpf, dunno what happened, so once again.

>If I'm not mistaken, GCC for
>Atari used to have some tool like this? Brownout, maybe?

Yes, but i never used that "brown" tool. For one, i don't like its confusing 
naming convention (depending on gcc version, it is "brown", "extrabrown", 
"superbrown" etc). But more importantly, it needs an extra tool to be run 
after linking, which requires Makefiles to be changed for all projects that 
use it. That rules out most unix packages, where the Makefiles are generated 
by autoconf, Cmake or similar. Also the whole toolchain requires a script to 
be run on the mintlib (atari c-library) headers, which fails almost everytime 
something in mintlib changes. And they did not even manage to provide a gem 
library, or even a math library.

An alternative could be to use my mintelf toolchain, which is also available 
on my site. This is based on the same sources as the normal toolchain, but can 
be used as dropin replacement (just using a different target, or 
BINUTILSPREFIX in our case). It will generate working executables in the same 
way, but uses elf object format for compiling and linking, thus making all the 
features of that format available. For fpc that would mean however you have to 
tell it somehow that it can use elf features like sections, even when using 
gas. I will give it a try at the weekend, i think fpc can be tricked by using 
-Avasm, but then replacing the symlinks to the assembler.

If all else fails, i'm of course also ok with using vasm/vlink. There is only 
the problem of the too long filename of the assembler executable. That should 
be fixed i think, because it is also needed when running the *.ttp on TOS. And 
of course i have to find out what causes vlink to put that strange program 
flags in the header.

In any case, i agree that a hello world exe of 400k is not the best solution.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20220125/57089dc1/attachment.htm>

More information about the fpc-devel mailing list