the xmingw-gcc build doesn't have any use flags to determine whether it should build the fortran compiler (g77), objective c, or java. I haven't tried to build it with objective c or java, but have successfully built it with the fortran compiler. Reproducible: Always Steps to Reproduce: 1. emerge xmingw-gcc 2. 3. Actual Results: i386-mingw32msvc-g77 was not built Expected Results: expect i386-mingw32msvc-g77 to be built and installed I have attached a small diff which includes a fortran use flags. This really should be extended to include other options too. I feel that this whole ebuild should eventually be re-written, especially since if you didn't install xmingw-runtime and xmingw-w32api first, it doesn't build a c++ compiler! The c++ should also be a use flags, and automatically install xmingw-runtime and xmingw-w32api if needed.
Created attachment 40121 [details, diff] patch to add fortran use flags
I hope you know the concept of bootstrapping a cross compiler. Because to build xmingw-runtime you first need to build i386-mingw32msvc-gcc (the C compiler) first as it uses it to compile things. But to build i386-mingw32msvc-g++ and maybe i386-mingw32msvc-g77 (not tested) you need xmingw-runtime. Thus the chicken and the egg situation. So you need to emerge xmingw-gcc twice to get g++ (and maybe g77) Could you unmerge xmingw-gcc and xmingw-runtime and then emerge xmingw-gcc with your patch? Does g77 build ok without xmingw-runtime or does it need it?
Sorry, I didn't realize that the cross-compiled c compiler was used to compile things. The: use f77 && lang="${lang},f77" could just be moved up a couple lines inside the block where it checks if xmingw-runtime is installed, and then build fortran on the second install. Is there a better way to do this, so that xmingw-gcc is automatically built twice ?
When bootstrapping a system you normally have to compile gcc twice, see the gentoo stage1 bootstrap building, gcc is emerged twice. About making it automatic, not sure if portage supports it and will just annoy people who only want gcc so do not want to emerge gcc twice. Will just add a comment at the end of the ebuild I think. Will add the fortran stuff after I have tested it out, and check it does or does not need xmingw-runtime.
the fortran stuff did not compile for me unless I had runtime already installed.
See xmingw-gcc-3.4.1-r1.ebuild Added and tested the compiler, it compiles a trivial bit of fortran code and it runs fine under wine. Thanks