From: Pieter T. <pie...@in...> - 2003-09-11 10:46:39
|
On Wednesday 10 September 2003 22:09, Tom wrote: > Hi, I am new to this list and MinGW so forgive me if this has been > addressed before. I have bootstrapped the latest release of mingw-gcc on > MSYS but I wondered whether it is possible to build a mingw targetted gcc > from the main gcc release (from gcc.gnu.org); I can see that at least some > part of the mingw target is in there but my builds have failed both on MSYS > and when trying to build a cross compiler on linux. My question is whether > the mingw target in the main distribution is meant to work and if not, how > did it get in there? Is there something different about mingw that means it > can't be part of the main gcc release? (please forgive my newbieness I am > just trying to understand how it works) What version of gcc have you tried? cross-compiling gcc 3.2.x for mingw target should work for C and C++ at least (I have done this) cross-compiling gcc 3.3.x for mingw target works for C but not C++ (compile fails on libstdc++ (basic_file)), the Java libs don't compile and neither does the Ada runtime (I have tried this) cross-compiling gcc from CVS (what will be gcc 3.4) works again for C++ and Java, but I only tried that on a cygwin host, not on a linux one So I'd say most (if not all) mingw stuff eventually ends up in the main gcc distribution, but I can't really tell you how many months/years "eventually" takes. The same thing goes for the binutils too, I suppose. I don't know whether the binutils 2.14.90 (or something like that) on the mingw site are a snapshot of the main binutils tree (i.e. whether the features found in mingw binutils 2.14.90 will be in the official next binutils release (2.15 ?)) It's not clear from your post whether you know it or not, but in order to build a mingw targetted cross-compiler on a linux host, you have to 1. build mingw targetted binutils and put them in your PATH 2. install header files from w32api and mingw-runtime packages 3. build C-only minimal cross-compiler and 4. build w32api 5. build mingw-runtime 6. build full cross-compiler Building the mingw-runtime from source also requires you to patch the makefiles; in my case, it refused to pick up the right include path to the w32api headers, and in the Makefile, where it says something along the lines of "fixme: is it CC or CC_FOR_TARGET ?", it indeed needs fixing ;-) (change cc to i686-pc-mingw32-gcc or whatever is the name of your minimal cross-compiler) I have posted a more complete description of my experiences with mingw in the past so you could find them by searching the list archives Pieter |