I have written a set of ebuilds for building a mingw cross-compiler as per the instructions on http://www.devolution.com/~slouken/SDL/Xmingw32/crossgcc/index.html I originally tried to fit it all into one ebuild but that proved impossible because certain components wouldn't build without others previously installed. The attached archive puts the ebuilds in dev-util but I really believe that there should be a dev-cross category for future cross-compilers (for embeded devices problably). Also, this uses *very* old versions of binutils, gcc and mingw but it works. I am going to attempt to build a cross-compiler based on gcc-2.95.3/4 but this is a start right?
Created attachment 923 [details] A set of ebuilds for xmingw
Created attachment 924 [details] A tar.gz with the Xmingw ebuilds
I am sorry about the problems with the attachments! I was hoping I could make it easy to download by adding the second one with a good MIME-type. Next time I will add the ebuilds individually as text - maybe I will do that yet! Anyway, I am new to Bugzilla - sorry, again!
No worries. Bugzilla sucks, but it's the best we could find. As for your suggestion about a dev-cross category, it shall be done. I have a few other cross-compilers as well, so it is time to put them all together in a sensible category. I'll take care of this within the next few hours.
I am most likely going to rename xmingw to i386-mingw32msvc, as to keep it in line with the other cross-compiler names.
calling it i386-mingw32msvc works for now, but this is using a very old verion of mingw - hence the name mingw32msvc. I believe new mingw based compilers are just i386-mingw. Just something to keep in mind.
Will do. Sorry about the delay. I'm a bit swamped just now.
Not to pester...but is there an ETA on dev-cross? Is there a reasonably elegant way to handle this? Another thing is that a user might want to have several different cross envs for the same arch. For example, I have one StrongARM board that uses glibc2.2 and another that is 2.4. How can I help?
A cygwin cross-compiler would be nice, too :-)
Sorry I wasn't able to finish the cross-compiling guidelines before the 1.4 freeze. I currently have three other cross-compilers that avait addition, but it's not going to happen until the ebuild freeze lifts.
Any chance you can take a look at this, with the recent updates to gcc-config and all?
David, any way for this to work with the gcc-config stuff?
I haven't worked with this ebuild in awhile. I originally put it together to get a software package building for Windows which now builds natively. So it would take some serious motavation for me to pick it up again. But I am wondering why you would want it to use gcc-config? This would serve to set the xmingw compiler as the default compiler ran by typing "gcc". When would this ever be useful? This is a cross compiler remember. When performing cross builds, a software package commonly needs access to the native compiler to build its own toolset.
I will have a go at making a set of ebuilds that provide a w32 compiling enviroment for gentoo, using new gcc, binutils and the required headers and libraries. It is possible as SDL has such a great tarball which works at http://www.libsdl.org/extras/win32/cross/README.txt The large tarball is what I want the ebuilds to produce, GNU assembler 2.13.90 20030111 i386-mingw32msvc-gcc (GCC) 3.2.3 (mingw special 20030504-1) and all the headers and libraries ( can get these from http://www.mingw.org/ ) I have tested it and it produces binaries which run great under wine.
As I said I would I have made a new set of ebuild which are: dev-util/xmingw-binutils-2.14.90.0.6 dev-util/xmingw-gcc-3.3.1 dev-util/xmingw-runtime-3.1 dev-util/xmingw-w32api-2.4 from the sources at http://www.mingw.org They install in /opt/xmingw a complete set of programs to compile Win32 apps. All are bootstrapped compleatly from source. To use emerge the above and then try: PATH=$PATH:/opt/mingw32/bin:/opt/mingw32/i386-mingw32msvc/bin i386-mingw32msvc-gcc hello.c -o hello.exe ( using a simple C program, to produce a MS hello.exe ) wine hello.exe ( to test it!! ) All done, closing bug