|
From: David G. <dga...@gm...> - 2018-04-21 16:34:06
|
2018-04-21 17:36 GMT+02:00 Thorsten Otto <ad...@th...>: > On Samstag, 21. April 2018 17:15:38 CEST David Gálvez wrote: >> I'm thinking about creating the machine flag "COLDFIRE" in KERNELDEFS, >> add it in the sources wherever the M68040 macro is used and then >> remove the -DM68040 flag when compiling the MINTV4E.PRG. > > It might depend. As Vincent pointed out, if you are using the same compiler > flags for different targets, then you have to use some define in the Makefile > (but i would prefer something else than M68000 since that might clash again). > When it comes to distinguish between whether you can use code for a specific > processor, you are better off using the compiler defined macros like > __mcoldfire__. No need to add a separate define for this in the Makefile, that > will makes things just more complicated than necessary, and again add > confusion which macro to test. > OK I see, then I'll add __mcoldfire__ checks wherever M68040 is used, remove -D68040 flag in MINTV4E.PRG build flags. and I won't create a new COLDFIRE flag if it's not necessary. > I think i already mentioned this, but you just have to keep in mind that - > m68020-60 will define all macros from __mc68020__ upto __mc68060__, while - > m68060 will *only* define __mc68060__, so there might be places that currently > test for __mc68020__ only, where they actually want to know whether 68020 and > above instructions can be used, and thus have to be changed to test for any of > the macros. > Yes I think you did but I got confused by the old __M680x0__ macro behavior. Fortunately there aren't to many instances where __mc68020__ is used, the ones that I swapped in the commit and I've seen one in the ext2 code that should be corrected for sure. > But setting up the Makefile to use something like -mc68020 -DM68020 is imho > confusing, and again you will have a mix of tests. At the end creating the M68020 machine flag isn't necessary but I think that the -D68000 when compiling MINT020.PRG should be removed, I've searched for the commit where this was added and there is no explanation about why -D68000 is needed in the 68020 kernels. |