On 26 Oct 2004 at 11:26, Adriaan van Os wrote:
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.
Ok. But you can still use the bog-standard (i.e., pristine) gcc-3.2.3.
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.
Yes, I am aware of that.
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.
That does not necessarily follow. The Cygwin and MSYS environments are pretty stable. In fact, the main purpose of MSYS is to provide an environment for building native Win32 GNU stuff.
- 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.
I am not sure what this is all about. The runtime library code generated by your cross compiler will be the same as that produced by any other Mingw-targetted cross compiler (including MSYS). The Mingw libraries that are linked into the Mingw compilers and RTS are built using native Win32 calls.
I was simply making the point that there is no "native" Mingw toolchain upon which GNU tools can be built, and that you always require a "cross compiler" (widely defined) to build native Win32 versions of GNU tools.
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 ?
To the extent that the RTS consists of native Win32 calls, there is no difference. Of course there is a slight (probably insignificant) overhead that wouldn't be there if you simply called the API directly (e.g., calling the ReadFile API call instead of BlockRead).
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.
That is what I said was impossible. The testsuite depends on the existence of at least a minimal GNU toolchain (at the very least, bash/sh, tee, echo, sed, etc.) for which there are no (or no proper) native Win32 versions. Even under Windows, you will still need a POSIX environment such as Cygwin or MSYS to run the testsuite for the Mingw compiler.
Or compile the testsuite on the host machine to a "programs" directory, transfer it to the target machine and then run the executables there.
Yes, that is possible.
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 ?
About what?
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/