James A. Morrison wrote:
I've decided I'm going to try to take the time and cleanup and update the Pascal frontend for gcc and try it get it integrated into the upstream source. I'm doing this because I wouldn't like to see GPC work with GCC 4+. I don't care at all at supporting GPC on anything less than GCC 4.1 so I've started by ripping out as much obviously compatibility code as I can and removing any traces of GPC being a separate project.
I don't know if you're familiar with the previous discussions we had on this subject -- if not you may want to find them in the archives (http://gnu-pascal.de/crystal/gpc/en/).
Anyway, please note that some of us are using GPC for productive work, and therefore need a stable compiler. According to our previous experiences, it takes some time until the port to a new backend version becomes stable. That's the main reason why we support different backend versions. We're not doing it for fun,, because maintaining it is work too. (Another reason is that some backend versions have bugs on some platforms, see below, so users of those platforms can use another backend version.)
The following quotes are from a private mail conversion between James A. Morrison and The Chief, with their permission added back to the lists:
"Prof A Olowofoyeku (The African Chief)" chiefsoft@bigfoot.com writes:
On 1 Mar 2005 at 9:16, James A. Morrison wrote:
[lists removed]
I'm perfectly willing to coordinate with anyone in the gpc development team. However, my goals is to get GPC to use the TreeSSA infrastructure (like I did with treelang) and to get GPC integrated into the GCC tree. I believe with GPC into the GCC tree there is no reason to have any compatibility code with previous GCCs so that is why I am ripping out that code. As for other co-ordination, I've posted the code (in in a vcs) to feel free to grab what you can, but so far none of my changes have been useful outside the context of getting GPC reading for inclusion in GCC.
Your goal is precisely the same as that of the GPC team (full integration). Much has been done on this already, so that the current GPC compiler driver (gpc.c (in the gpc-20050217 snapshot)) is very close to the gcc.c of gcc 3.4.3. However, this cannot be done in isolation from the compiler (gpc1) itself, and so the work is progressing slowly but steadily. Much of the integration work is being undertaken by Waldek Hebisch, who (with Frank Heckenbach) is one of the main developers of the compiler (I just work on libraries and am responsible for the Win32 binary releases).
No, the goal of porting to gcc 3.4 is quite different from the goal of porting the gcc 4. The front end interface completely changed (tree still are the main item). So much of the work in the new snapshot will be useful and I will put it in my tree.
So, again, may I suggest that you coordinate your efforts with Waldek and Frank? We can probably achieve full integration much faster working together than as two separate projects.
True, however, gcc pre-4 has to be abandoned to do this successfully.
(The compiler driver is not a big problem.)
I don't know exactly how big the interface changes are -- Waldek probably knows better than me. However, we've had other significant changes before and been able to keep compatibility between versions. Sometimes it didn't require more than a few clever macros or wrappers, sometime we needed some ifdefs, but not such a big deal.
Abandoning previous backend versions now is not an option for me as I wrote above. Neither is stopping all frontend work for several months or longer while changing to gcc-4 and getting it stable, as we're actively working on new features that we want to use.
If you're willing to do the gcc-4 port now and later re-apply all changes made on the frontend side meanwhile, I suppose it's not impossible, but probably a lot of duplicated work all in all.
So, if you want to help porting gpc to new gcc versions, this is appreciated. But removing older backend versions support is not the best way to start IMHO. As I said, Waldek knows better than me the necessary changes for new gcc versions, so you might want to discuss with him what is necessary and whether/how it can be done in a "backward-comptible" way.
Note however, that it is unlikely that they (or even I) will be in favour of abandoning compatibility with older gcc backends, since, under some platforms, gcc is not stable in its up-to-date releases. However, that needn't be a problem, because Frank will most likely provide diffs for older gcc backends.
Then the backends should be fixed. That is something I can probably help with.
Only some of the problems are really backend bugs, to be fair.
We have diffs for the various backend versions in the p/diffs/ directory in our distributions (and I can provide them on request). Some of the fixes have already been included in gcc-3.4 (as can be seen, the size of the 3.4.3 diff is quite a bit smaller).
If you'd like to help with the other diffs, this is also very welcome. Some diffs might be debatable or require additional explanations, but feel free to ask (on the GPC list or Waldek or me personally).
Frank