[fpc-devel] Questions regarding m68k-atari target

Florian Klämpfl florian at freepascal.org
Sat Feb 12 11:16:39 CET 2022

Am 12.02.2022 um 10:54 schrieb Karoly Balogh via fpc-devel:
> Hi,
> On Sat, 12 Feb 2022, Thorsten Otto via fpc-devel wrote:
>> I'm currently trying to set this up and have a problem with the
>> cross-compiler. Although that was configured for atari and 68000, it
>> still has LINUX and CPU68020 defined while processing the config file.
> That probably can't be helped, because LINUX and 68020 is always the
> default for the m68k crosscompiler. The crosscompiler for the given CPU
> target will be the same, regardless of the OS target. So technically it is
> possible to release a 68k crosscompiler package that could target both
> Atari and Amiga (sic!), because the only difference is the units. :)
>> My config file has -Tatari set, so the LINUX define is no issue. But if
>> i invoke the compiler without excplicit -Cp<x>, it will generate code
>> for 68000, but take the libraries from the 68020 directory. It works as
>> intended if i explictly specify -Cp68000.
> Yes, and I agree this is a valid issue, because apparently it only sets
> the target CPU subarch and target FPU settings after the entire config
> file was processed. We probably have to set these when the -T argument is
> first encountered.

Note that this should work if the target is passed on the command line because the command line is parsed twice to avoid 
exactly this. If you need to set the target in the config, just set the target cpu and target fpu (-Cp and -Cf) as well. 
As the workings of the switches is interwinded there is unfortunatly no good other solution.

More information about the fpc-devel mailing list