George Shapovalov wrote:
Well, almost ;)
I have created an ebuild for gpc-20021111 that builds against default-x86-1.4 profile of Gentoo Linux. This is a profile for gcc-3.2/glibc-2.3.1 based system (this profile is officially supported for a few month now).
gpc builds fine, running tests I get the following statistics:
[clean-up headers skipped] Testing gpc 20021111, based on gcc-3.2 (i686-pc-linux-gnu) (groug.home.net) [lots of error messages skipped] # of GPC tests 2828 # of GPC tests passed 2645 # of GPC tests skipped 4 # of GPC tests failed 179
Which is probably not bad, considering significant version change. Most of errors are "internal compiler error".
Not to disturbe your euphoria, but IMHO that's quite bad. Consider that most of the tests test only one specific feature, so if one out of 16 tests fails, any program that uses 16 features would not work (well, a very rough estimate ;-), which includes basically all real-world programs ...
But wait, you did not by any chance run the test with debug info left enabled? As I wrote in my announcement, debug info generation with a gcc-3 backend *is* broken, and such a large number of failures is expected. I hope that's the case and you get a better result without debug info, but then still you might want to warn users of the ebuild about this problem, and to provide a 2.x based version for "production use".
The build procedure follows the lines of 2.1 release. Only the gpc front-end gets installed, relying on the same version of gcc being already on the system (its presence and version correspondence are garanteed by the design of portage (package manager for Gentoo)). Frank: is this still appropriate? Or does this version introduce some non-trivial changes into the gcc-3 backend?
All the changes made to the backend are conditionalized for GPC, and not used by other compilers (they are essential for GPC, of course). So the C compiler (cc1), libgcc.a and all the other files of the gcc installation need no change, and the Pascal compiler (gpc1) includes its modified backend files, so it should be alright.
I would really appreciate if you could glance at the src_install function in the ebuild and confirm that I am not missing any important files.
I'm not online while I'm writing this, but here's a list of files that should be installed, provided gcc is already installed:
<prefix>/bin/gpc <prefix>/bin/gpc-run <prefix>/lib/gcc-lib/<target>/<version>/units/rts-config.inc <prefix>/lib/gcc-lib/<target>/<version>/units/gpc.pas <prefix>/lib/gcc-lib/<target>/<version>/units/* (see source p/units dir except gpc-in-c.h) <prefix>/lib/gcc-lib/<target>/<version>/include/gpc-in-c.h <prefix>/lib/gcc-lib/<target>/<version>/gpc1 <prefix>/lib/gcc-lib/<target>/<version>/gpcpp <prefix>/lib/gcc-lib/<target>/<version>/libgpc.a <prefix>/info/gpc.info* <prefix>/info/gpcs-de.info <prefix>/info/gpcs-hr.info <prefix>/info/gpcs.info <prefix>/doc/gpc/demos/* (see source p/demos dir) <prefix>/doc/gpc/docdemos/* (run extract-doc-demos to get list of files) <prefix>/doc/gpc/README <prefix>/doc/gpc/NEWS <prefix>/doc/gpc/INSTALL <prefix>/doc/gpc/FAQ <prefix>/doc/gpc/AUTHORS <prefix>/doc/gpc/COPYING <prefix>/doc/gpc/COPYING.LIB <prefix>/doc/gpc/BUGS <prefix>/man/man1/gpc.1 <prefix>/man/man1/gpc-run.1
Frank