Hi,
I've uploaded a new alpha (gpc-20021111) to http://gnu-pascal.de/alpha/
It contains large changes compared to the previous version, as can be seen from the size of the diff file (if you've always fetched the diffs and were going to sometime get a fresh tarball in order to have a "reference point", now might be a good time ;-).
The most important change is that GPC now works with gcc-3.1.1 (i.e., with the backend sources of gcc-3.1.1; the version of GCC used to compile GPC itself should not matter), thanks to Waldek Hebisch's patches. However, please note that this port is very new, and has not been tested as much as the gcc-2.x based GPC's.
Thw two code generation bugs I mentioned in a recent mail have been fixed. There's only one new known bug with gcc-3.1.1 (fjf341b.pas), but it is a compile-time problem and only occurs in a very special situation. I'll try to fix it soon, but I didn't want to furter delay this release because of it.
Debug info generation with gcc-3.1.1 is partially broken. The dwarf debug info format doesn't work yet. Since it's now the default under, e.g., Linux, you might want to try `-gstabs' (use the stabs format which was the default with gcc-2.x). Debug info for object methods also doesn't work yet, so if you use objects, you'll probably have to compile without debug info for now.
If you need GPC in a production environment, we recommend not to use GPC based on gcc-3.1.1 yet. But we'd welcome if you like to help testing with gcc-3.1.1. In this case, please don't report any bugs related to debug info (for now). In particular, if you run the test suite, add `EXTRA_TEST_PFLAGS=-g0' on the test make command line (because otherwise, debug info is turned on by default when testing).
I expect that most new bugs will be compiler crashes on wrong input programs (instead of in in addition to proper error messages). Please report them (as well as any other bugs, of course).
You might want to try configuring GPC with `--enable-checking' (both for gcc-2.95.x and gcc-3.1.1). This will enable additional internal checks which make the compiler (not the generated code) a little slower, but may detect possible problems earlier and better. The compiler will abort with internal errors (usually tree check errors) then. Please also report such cases.
The rest of the changes of this GPC release are mostly internal cleanups, in connection with the gcc-3 port and to generally make the compiler more robust -- though they might cause a few minor new problems in the short term, but that's what alphas are for. If you can, please test it with your code and report any new problems so we can fix them soon.
There are also some changes in the automake mechanism again (thanks to Marten Jan de Ruiter for analysis and code). They should make it substantially faster in situations with many units where most of them are already up to date. I hope the changes don't break anything, but those who use automake in complex projects might want to test it carefully.
As announced, I dropped the syntax `type foo = procedure (Integer, Real)' (i.e., without parameter names). If anyone had used it and gets errors now, just add the parameter names, and put a `;' in place of the `,'.
Also, many obsolete and C-ish features from the preprocessor have been dropped. I suppose most of them were unknown to almost all GPC users, anyway, and I hope the change won't affect anyone. Those interested can find the details in the ChangeLog (entry of 2002-09-29 under gpcpp.c).
Another possibly incompatible change is that GPC will now reject duplicate variable declarations (not yet for routines; I'll also do this, but it will be more complicated due to interfaces, `forward' declarations etc.). Of course, the new behaviour is according to (and even demanded by) the standard. It should only affect those who used "header files" in a C-ish way by which every "module" gets "external" declarations of its own variables. But since GPC has been supporting two real mechanisms for modularization (EP modules and BP units) for a long time, this should be no big issue, I hope.
For a long time, it was not possible to build GPC when the `p' directory is a symlink in the gcc directory. This is now possible. Furthermore, GPC no more modifies the Makefiles depending on the GCC version. So it is now possible to use the same GPC source tree for building with several GCC versions at the same time (provided you use a separate build directory which is strongly recommended, anyway).
Frank
Cool. Does this mean that Mac OS X 10.2.x users can try this? (GCC 3.1?)
If so: Would someone please make an appropriate binary available? Would someone please make clear instructions for installation, instructions that a typical non-guru non-Unix-expert Mac programmer can understand?
Am I correct to believe that a Mac installation that includes the developer tools is adequate to make this compiler work?
Thanks (_really_), Jerry
Tempe, AZ, USA
On Tuesday, Nov 12, 2002, at 12:25 America/Phoenix, Frank Heckenbach wrote:
Hi,
I've uploaded a new alpha (gpc-20021111) to http://gnu-pascal.de/alpha/
Frank Heckenbach a écrit:
I've uploaded a new alpha (gpc-20021111) to http://gnu-pascal.de/alpha/
I have now tried to build gpc with gcc-3.1.1 under djgpp
The build dies at the beginning of the rts compilation with the following message
------------------------------------------------------------
../.././xgpc -B../.././ -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 --unit-path=/dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts --automake --print-needed-options "/dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts/endian.pas" 2> "needed-options" || true if grep -v '^--' "needed-options" > /dev/null; then echo "needed-options: `cat "needed-options"`"
&2; rm -f "needed-options"; false; else true; fi
needed-options: xgpc.exe: installation problem, cannot exec `gpcpp': No such file or directory (ENOENT) make.exe[3]: *** [needed-options] Error 1 make.exe[3]: Leaving directory `c:/djgpp/gnu/gcc311s2/gnu/gcc-3.11/build.djg/gcc/p/rts' make.exe[2]: *** [pascal.rts] Error 2 make.exe[2]: Leaving directory `c:/djgpp/gnu/gcc311s2/gnu/gcc-3.11/build.djg/gcc' make.exe[1]: *** [stage2_build] Error 2 make.exe[1]: Leaving directory `c:/djgpp/gnu/gcc311s2/gnu/gcc-3.11/build.djg/gcc' make.exe: *** [bootstrap] Error 2
--------------------------------------------------------------
If I relaunch the offending instruction with adding -v I obtain
-------------------------------------------------------------------------------
Reading specs from ../.././specs Configured with: ../configure i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disab le-nls --enable-languages=pascal Thread model: single gpc version 20021111, based on gcc-3.1.1 gpcpp -v -I. -iprefix ../.././../lib/gcc-lib/djgpp/3.11/ -isystem ../.././inclu de -famtmpfile=c:\djgpp\tmp/ccglUE0I.gpa -funit-path=/dev/c/djgpp/gnu/gcc311s2/g nu/gcc-3.11/gcc/p/rts -fautomake -fprint-needed-options -fdelphi-comments -D__GN U_PASCAL__ -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GPC__=2 -D__GPC_MINOR__=1 -D__GPC _VERSION__=2.1 -D__GPC_RELEASE__=20021111 -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_L ITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -D__NEED_NO_ALIGNMENT__=1 -D__MSDOS __ -D__GO32__ -D__DJGPP__=2 -D__unix__ -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__ unix__ -Asystem=msdos -Asystem=unix -D__OPTIMIZE__ -W -Wall -Wpointer-arith -Wwr ite-strings -Wmissing-prototypes -Wmissing-declarations -Acpu=i386 -Amachine=i38 6 -Di386 -D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -DMSDOS -DGO32 - DDJGPP=2 -Dunix -remap -imacros ../.././djgpp.ver /dev/c/djgpp/gnu/gcc311s2/gnu/ gcc-3.11/gcc/p/rts/endian.pas c:\djgpp\tmp/ccmwE9Qh.i xgpc.exe: installation problem, cannot exec `gpcpp': No such file or directory ( ENOENT) [exited with 1]
--------------------------------------------------------------------------------
apparently the directory ../../ is not prepended to gpcpp (as it should due to -B../.././ and it is when compiled with gcc-2.95.3)
gpcpp.exe and gpc.exe are in this directory. If I copy them in the rts directory the build goes successfully. But if I install the newly builts gpc (and gcc) and I try to compile a small pascal program of mine, I obtain exactly the same problem. gcc itself has no problem.
Any hint ?
Maurice
Maurice Lombardi wrote:
I have now tried to build gpc with gcc-3.1.1 under djgpp
The build dies at the beginning of the rts compilation with the following message
../.././xgpc -B../.././ -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 --unit-path=/dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts --automake --print-needed-options "/dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts/endian.pas" 2> "needed-options" || true if grep -v '^--' "needed-options" > /dev/null; then echo "needed-options: `cat "needed-options"`"
&2; rm -f "needed-options"; false; else true; fi
needed-options: xgpc.exe: installation problem, cannot exec `gpcpp': No such file or directory (ENOENT)
If I relaunch the offending instruction with adding -v I obtain
Reading specs from ../.././specs Configured with: ../configure i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disab le-nls --enable-languages=pascal Thread model: single gpc version 20021111, based on gcc-3.1.1 gpcpp -v -I. -iprefix ../.././../lib/gcc-lib/djgpp/3.11/ -isystem ../.././inclu de -famtmpfile=c:\djgpp\tmp/ccglUE0I.gpa -funit-path=/dev/c/djgpp/gnu/gcc311s2/g nu/gcc-3.11/gcc/p/rts -fautomake -fprint-needed-options -fdelphi-comments -D__GN U_PASCAL__ -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GPC__=2 -D__GPC_MINOR__=1 -D__GPC _VERSION__=2.1 -D__GPC_RELEASE__=20021111 -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_L ITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -D__NEED_NO_ALIGNMENT__=1 -D__MSDOS __ -D__GO32__ -D__DJGPP__=2 -D__unix__ -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__ unix__ -Asystem=msdos -Asystem=unix -D__OPTIMIZE__ -W -Wall -Wpointer-arith -Wwr ite-strings -Wmissing-prototypes -Wmissing-declarations -Acpu=i386 -Amachine=i38 6 -Di386 -D__i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -DMSDOS -DGO32 - DDJGPP=2 -Dunix -remap -imacros ../.././djgpp.ver /dev/c/djgpp/gnu/gcc311s2/gnu/ gcc-3.11/gcc/p/rts/endian.pas c:\djgpp\tmp/ccmwE9Qh.i xgpc.exe: installation problem, cannot exec `gpcpp': No such file or directory ( ENOENT) [exited with 1]
apparently the directory ../../ is not prepended to gpcpp (as it should due to -B../.././ and it is when compiled with gcc-2.95.3)
gpcpp.exe and gpc.exe are in this directory. If I copy them in the rts directory the build goes successfully. But if I install the newly builts gpc (and gcc) and I try to compile a small pascal program of mine, I obtain exactly the same problem. gcc itself has no problem.
Any hint ?
It might be a problem with the executable suffix. I hope the following patch with the corresponding code from 3.1.1's gcc.c will fix it.
Frank
Frank Heckenbach a écrit:
Maurice Lombardi wrote:
I have now tried to build gpc with gcc-3.1.1 under djgpp
It might be a problem with the executable suffix. I hope the following patch with the corresponding code from 3.1.1's gcc.c will fix it.
That was part of the solution. With this patch it goes up to the compilation of strings.pas. It dies with
------------------------------------------------------------------
../.././xgpc -B../.././ -c -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 --unit-path=/dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts --automake `cat needed-options` -DRTS_RELEASE_STRING="'`cat /dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts/rts-version`'" -DGCC_VERSION="'3.11'" /dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts/string.pas gpc1.exe: internal error: Segmentation violation Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions. make.exe[3]: *** [string.o] Error 1 make.exe[3]: Leaving directory `c:/djgpp/gnu/gcc311s2/gnu/gcc-3.11/build.djg/gcc/p/rts' make.exe[2]: *** [pascal.rts] Error 2 make.exe[2]: Leaving directory `c:/djgpp/gnu/gcc311s2/gnu/gcc-3.11/build.djg/gcc' make.exe[1]: *** [stage2_build] Error 2 make.exe[1]: Leaving directory `c:/djgpp/gnu/gcc311s2/gnu/gcc-3.11/build.djg/gcc' make.exe: *** [bootstrap] Error 2
--------------------------------------------------------------------------------
rerunning this with -v gives a more explicit message:
-------------------------------------------------------------------------------
Reading specs from ../.././specs Configured with: ../configure i586-pc-msdosdjgpp --prefix=/dev/env/DJDIR --disab le-nls --enable-languages=pascal --enable-checking Thread model: single gpc version 20021111, based on gcc-3.1.1 ../.././gpcpp.exe -v -I. -iprefix ../.././../lib/gcc-lib/djgpp/3.11/ -isystem . ./.././include -famtmpfile=c:\djgpp\tmp/ccCEMbWl.gpa -funit-path=/dev/c/djgpp/gn u/gcc311s2/gnu/gcc-3.11/gcc/p/rts -fautomake -fdelphi-comments -D__GNU_PASCAL__ -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GPC__=2 -D__GPC_MINOR__=1 -D__GPC_VERSION__= 2.1 -D__GPC_RELEASE__=20021111 -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDIA N__=1 -D__WORDS_LITTLE_ENDIAN__=1 -D__NEED_NO_ALIGNMENT__=1 -D__MSDOS__ -D__GO32 __ -D__DJGPP__=2 -D__unix__ -D__MSDOS__ -D__GO32__ -D__DJGPP__=2 -D__unix__ -Asy stem=msdos -Asystem=unix -D__OPTIMIZE__ -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Acpu=i386 -Amachine=i386 -Di386 -D __i386 -D__i386__ -D__tune_i586__ -D__tune_pentium__ -DMSDOS -DGO32 -DDJGPP=2 -D unix -remap -imacros ../.././djgpp.ver -DRTS_RELEASE_STRING='20021111' -DGCC_VER SION='3.11' /dev/c/djgpp/gnu/gcc311s2/gnu/gcc-3.11/gcc/p/rts/string.pas c:\djgpp \tmp/cc48odIx.i GNU Pascal Compiler PreProcessor version 20021111, based on gcc-3.1.1 (80386, BS D syntax) {$include "..."} search starts here: {$include <...>} search starts here: . End of search list. ../.././gpc1.exe c:\djgpp\tmp/cc48odIx.i -quiet -dumpbase string.pas -g -O2 -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declaration s -version -famtmpfile=c:\djgpp\tmp/ccCEMbWl.gpa -funit-path=/dev/c/djgpp/gnu/gc c311s2/gnu/gcc-3.11/gcc/p/rts -fautomake -o c:\djgpp\tmp/ccKEoOhP.s GNU Pascal version 3.1.1 (djgpp) compiled by GNU C version 3.1.1. GNU Pascal version is actually 20021111, based on gcc-3.1.1 gpc1.exe: tree check: expected class 't', have '<' (unlt_expr) in pushdecl, at p /gpc-decl.c:2800 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions. [exited with 1]
----------------------------------------------------------------------------------
Maurice