Notes from building gpc-20021128 with gcc-3.2.1 configured for i486-pc-mingw32:
* GPC will not build with the version of os-hacks.h on the GPC Web site; a patched version is required.
* GPC will build with the FSF gcc-3.2.1 sources, but compiled programs that use files will fault in _p_bind (bad pointer). Building with the FSF sources + the Mingw-specific patches from the mingw.org Web site works.
* GPC will not run on Win9x/WinME systems, due to a Mingw-specific change in gcc/config/i386/xm-mingw32.h. Patching gpc.c is required.
* Test suite results are:
agettext2test.pas: SKIPPED: libintl not installed crttest.pas: SKIPPED: no curses library found environo.pas: SKIPPED: setenv not present in libc fjf480a.pas: SKIPPED: librx not installed fjf480b.pas: SKIPPED: librx not installed fjf480c.pas: SKIPPED: librx not installed fjf582.pas: failed [Exception c00000fd (stack overflow)] fjf663.pas: failed [runs forever -- aborted by ulimit] gettexttest.pas: SKIPPED: libintl not installed gmptest.pas: SKIPPED: libgmp not installed pipetest.pas: SKIPPED: IOSelect not yet implemented for mingw regextest.pas: SKIPPED: librx not installed
# of GPC tests 2855 # of GPC tests passed 2843 # of GPC tests skipped 10 # of GPC tests failed 2
"fjf582" fails because GPC allocates about 144KB of stack with -O0 and -O1 but allocates about 4.1MB with -O2 and -O3. The default stack reserve set in "ld" is 2MB. Increasing the default manually allows "fsf582" to succeed. Specifically, the generated code is:
[with -O0 and -O1]
_pascal_main_program: pushl %ebp movl %esp, %ebp movl $147976, %eax call __alloca ...
[with -O2 and -O3]
_pascal_main_program: pushl %ebp movl $4259848, %eax movl %esp, %ebp call __alloca ...
"fjf663" appears to loop indefinitely and is aborted due to time limit.
-- Dave