Hi, I would like to banish bits and pieces of the compiler from ever appearing again in places where they do not belong. That would be step one towards modularization: impose boundaries of some kind. As it is, we can't really make separate modules of parts of gcc yet, but at least I would like to impose some kind of rules to avoid re-introducing the dependencies that I'm trying to break.
The first thing I'd like to do now, is banish RTL from the front end. The plan I had for this was: 1) Group front end objects in Makefile.in under e.g. ALL_HOST_FRONTEND_OBJS 2) Add a new build rule that adds an extra define -DIN_GCC_FRONTEND 3) Conditionally poison symbols in system.h For the last step, that would be e.g.: #ifdef IN_GCC_FRONTEND #pragma GCC poison GCC_RTL_H GCC_REGS_H ... #endif Unfortunately, my Makefile-fu is insufficient to do step 2. There is an implicit rule ".c.o:" that triggers no matter what I try, and I don't want to add explicit $(COMPILER) rules for all the front end objects. So this is a call for help. First, is the plan I had a good plan? If so, can someone give me a little hint/help implementing that? And if the plan isn't good, what would be other ways to achieve the same effect? Thanks, Ciao! Steven