On Montag, 7. Februar 2022 14:09:00 CET Sven Barth via fpc-devel wrote: > A FPC compiled for 68020 can generate 68000 code just fine and the other way > round (assuming of course that it was compiled without bugs ;) ). It's just > that you need to provide it with the correctly compiled units. You can > supply those in the fpc.cfg and with $fpcsubarch you can get the name of > the currently selected processor to use in a path name (the MS-DOS target > makes use of this for example).
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. 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. Why are those macros still defined? I also noticed that the cross-compiler still tries to locate units in /usr/ lib/fpc/3.3.1/units/atari/rtl That does not cause problems (because the directory does not exists), but doesn't look quite right.
-Tatari #IFDEF ATARI # searchpath for tools -FD$FPCBINDIR/../$FPCTARGET #IFDEF CPUCFV4E -Fu$FPCBINDIR/../../units/$FPCTARGET/cfv4e/* -Fu$FPCBINDIR/../../units/$FPCTARGET/cfv4e/rtl -Fu$FPCBINDIR/../../units/$FPCTARGET/cfv4e/tosunits #else #IFDEF CPU68020 -Fu$FPCBINDIR/../../units/$FPCTARGET/m68020/* -Fu$FPCBINDIR/../../units/$FPCTARGET/m68020/rtl -Fu$FPCBINDIR/../../units/$FPCTARGET/m68020/tosunits #else -Fu$FPCBINDIR/../../units/$FPCTARGET/m68k/* -Fu$FPCBINDIR/../../units/$FPCTARGET/m68k/rtl -Fu$FPCBINDIR/../../units/$FPCTARGET/m68k/tosunits #endif #endif #endif # Display Info, Warnings and Notes -viwnhq
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel