|
From: Thorsten O. <ad...@th...> - 2018-04-21 15:36:23
|
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. 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. But setting up the Makefile to use something like -mc68020 -DM68020 is imho confusing, and again you will have a mix of tests. |