On 3 Apr 2004 at 17:12, Markus Gerwinski wrote:
Prof A Olowofoyeku (The African Chief) wrote:
I don't remember ever seeing these errors. What version of gcc sources are you building on?
The ones from gcc-core-3.2.1.tar.gz.
That should be (mostly) fine. I prefer to use the "mingw special" versions of the gcc sources (i.e., the ones available from the Mingw download site), because they have been patched for Mingw use.
Good to know...
What arguments do you pass to "configure"?
Only "--enable-languages=pascal".
Attached is a copy of the shell script that I use to build GPC for Mingw (I have commented out other things that I do).
Thanks. It seemingly gets another step further: Now `make` aborts with the error message
make[1]: Circular libgcc.a <- pascal dependency dropped. ...../libgpc.a(rts.o)(.text+0xf0d):rts.c: undefined reference to `readdir' ...../libgpc.a(rts.o)(.text+0xef1):rts.c: undefined reference to `opendir' ...../libgpc.a(rts.o)(.text+0xf2c):rts.c: undefined reference to `closedir' make[2]: *** [binobj.exe] Error 1 make[1]: *** [pascal.utils] Error 2 make: *** [all-gcc] Error 2
What now?
If you got to that point, it means that the compiler and runtime system have been built successfully. It also probably proves that you don't have a "Mingw special" source tarball. You need to patch your gcc/config/i386/mingw32.h. Check that file for this:
/* Include in the mingw32 libraries with libgcc */ #undef LIBGCC_SPEC #define LIBGCC_SPEC \
In the next line (starting with something like "%{mthreads:...") insert "-lmingwex" just before "-lmsvcrt", save, and then run "make" again. That should solve the problem. You can achieve the same result by passing "-lmingwex" at the command line - but really this should be in the SPECS file - and patching mingw32.h as above is how to get it there each time you rebuild the compiler.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/