This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Building GENERIC trees cont.
Paul Brook wrote:
Yes. Many target macros, and the garbage collection system is generated at
build time.
By far the best solution is to teach the gcc build system about your frontend,
and let that take care of everything. You should then be able to configure
gcc with --enable-languages=bcpl.
This is [sort of] documented in "Anatomy of a Language Front End" in
sourcebuild.texi. Of course the easiest solution is to cut/paste from the
files in fortran/ or cp/
When I was doing the fortran frontend I created an empty frontend that was
hardcoded to compile "void foo{return 0;}". Once this worked I started
plugging in the actual frontend implementation. I'm afraid I never kept this
skeleton frontend (actually there were several:). It would have bitrotted
beyond usefulness anyway.
Wouldn't it be useful to have some code available for compiler authors
to start
with when building their own front end? Having a fairly complete framework
to start with would make starting a new front end a much lower-cost
(time) project
than it is currently.