This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Converting the gcc backend to a library?
- To: Per Bothner <per at bothner dot com>
- Subject: Re: Converting the gcc backend to a library?
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 26 Dec 1999 20:23:55 +0100
- Cc: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>, gcc at gcc dot gnu dot org
- Cc: djurfeldt at nada dot kth dot se
- References: <E122InR-0002L9-00@mdj.nada.kth.se> <m2wvq1ldox.fsf@magnus.bothner.com>
Per Bothner <per@bothner.com> writes:
> What you want to do is to write a front-end which transforms the
> source language into *tree nodes*, calls the backend to produce
> object code, and loads it.
Thanks. Yes.
> One complication is that Gcc is chock-full of global variables,
> and thus a hypothetical Gcc library cannot be called re-entrantly.
> If your application has multiple threads, the Gcc back-end
> becomes a single resource suppisbly subject to contention.
I guess one could divide such a development into two phases:
1. Package the backend as a library.
2. Pack global variables into data structures and make the library
re-entrant.
Is the gcc development team interested in one or two of these
developments if they were done right?