Dear GCC Developers/Users, I am trying to port a backend from GCC version 2.7.2.3 to version 4.1.1. As far as I have seen, a lot of new relevant files were introduced to build a good structure for new backends.
I am wondering where to define the prototypes for functions in <machine>.c Shall the prototypes be defined in <machine>-protos.h or in <machine>.h or in <machine>.c. As far as I understand the prototypes should be defined in <machine>-protos.h, right? But if I do so several errors/warnings arise because of undeclared prototypes. Another question is where target macros should be defined. As far as I can see <machine>.c has something like such a structure: ---snip--- #define <SOME_MACRO> #define <SOME_MACRO> #define <SOME_MACRO> #define <SOME_MACRO> struct gcc_target targetm = TARGET_INITIALIZER; ---snap--- But there are also a lot of macros defined in <machine>.h. What kind of macros should be defined in <machine>.h and which macros should be defined in <machine>.c? I try to write good and standardised code in order to contribute my development. I would appreciate any help. By the way, I already had a look in the GCC Internals manual but I am still a bit confused. Thanks in advance and regards, Markus Franke