Prof. A Olowofoyeku (The African Chief) wrote:
With Mingw, you'd be advised to stick with gcc-3.2.3 until the predefines issue is sorted out.
I started out with gcc-3.2.3-20030504-1-src.tar.gz, but the tar file is apparently corrupt. I posted a message about that to mingw-users@lists.sf.net.
AFAICS you can only build a Mingw GNU compiler with a cross compiler. Even the Mingw-MSYS environment is a cross compiler, since, it is simply a fork of the Cygwin project, relies on a (large) DLL to provide the POSIX emulation, and has its own "native" binaries (i.e., that rely on the DLL).
In this context, I mean with a "cross compiler" a compiler where host and target are running on different hardware and operating systems. I do understand about the POSIX emulation DLL. I think there are two issues:
- the compiler using the POSIX emulation DLL for its operation. However, this doesn't apply to a cross-compiler hosted on a OS with a POSIX compatible UNIX kernel, like Linux or Mac OS X (and many others). Actually, this suggests that a Win32 targeted cross-compiler running on a UNIX host is more stable than one running under POSIX emulation on Wintel itself. - runtime library code, using POSIX calls rather than "native" Win32 calls, e.g. ReadLn using "read" rather than "ReadFile". If the POSIX emulation DLL isn't stable or 100 % compatible (I really don't know) I think there are two ways out (a) adapt the RTS to use Win32 calls (b) use Win32 calls instead of the RTS at the application level.
So whether a cross-compiler is reliable or not depends on which cross compiler. Some (e.g., MSYS) are reliable, and I am sure that there are some that are not.
How compatible, stable and fast is the RTS, as compared to "native" Win32 calls ?
Is it reasonable to rely on native testsuite results on both the host and the target ?
AFAIK you cannot run a "native" Mingw testsuite, since the testsuite (from what I can see - I may be wrong) requires at least (ba)sh and one or two things, for which there are no native Windows versions that can hack it.
Yeah, but you could run the testsuite on a Wintel machine under MingW. Or compile the testsuite on the host machine to a "programs" directory, transfer it to the target machine and then run the executables there.
As far as "cross compilers" go, I once handcrafted one for building Mingw compilers (simple job of replacing the files in the 'include' and 'lib' directories, and 'libgcc.a' and such, with the Mingw versions. Worked like a dream - and it only took me a few minutes to achieve. Maybe it was so easy because it was a Cygwin toolchain that I emasculated so - but I doubt it.
Sorry ?
Regards,
Adriaan van Os