Per a discussion with ktietz (mingw-w64 developer) in
irc.oftc.net/#mingw-w64 when mingw-w64 is compiled as
a cross-compiler on linux the gendef/genidl tools are
supposed to be compiled as native ELF binaries and not
cross-compiled as win32 pe executables.
Created attachment 565808 [details]
Created attachment 565810 [details]
Created attachment 565812 [details]
what it says on the tin
Was original bug report about build failure?
(In reply to Fedja Beader from comment #3)
> Created attachment 565812 [details]
> what it says on the tin
> configure:3432: i686-w64-mingw32-gcc -O2 -pipe -fomit-frame-pointer -march=core2 -I/tmp/portage/cross-i686-w64-mingw32/mingw64-runtime-6.0.0-r1/temp/tmproot/include -Wl,-O1 -Wl,--as-needed conftest.c >&5
> /usr/libexec/gcc/i686-w64-mingw32/ld: cannot find crt2.o: No such file or directory
> /usr/libexec/gcc/i686-w64-mingw32/ld: cannot find -lmingw32
Do you have full cross-compiler installed to use USE=tools?
Try 'USE=-tools crossdev ...' if it works.
USE="-tools -hardened" FEATURES="-fail-clean" crossdev --ov-output /var/portage/crossdev/ --overlays gentoo -t i686-w64-mingw32
Produces a toolchain without failure.
Thank you! Let's see if we can just skip tools building at headers-only stage.
(In reply to Sergei Trofimovich from comment #4)
> Was original bug report about build failure?
No, it was about a 'successful' build which built the genidl/etc
executables as windows binaries which are 'unusable' (without wine
or so) on linux.
Thank you! Updated the title.
(In reply to Sergei Trofimovich from comment #7)
> Thank you! Let's see if we can just skip tools building at headers-only
They already seem to be.
But this fails at *any* stage, because it's trying to build them for the wrong platform (which isn't bootstrapped yet)
Created attachment 636272 [details]
I am having this issue as well, it seems to be trying to build for a target that doesn't exist yet. I have tried all sorts of things but no workaround gets this to work and it is difficult to find anyone who knows anything about it, and mostly it just seems what it is trying to do is bizarre, as checking for whether the c compiler is capable of making an executable seems antiethical to the entire point of mingw in the first place.
you might want to try to bootstrap the whole toolchain with USE="-tools" (flipping the libraries use flag might be also a good choice) and readd the useflags to cross-x86_64-w64-mingw32/mingw64-runtime when you're done with that. This way it should build, but the tools are still build as executables for windows.
(In reply to anna from comment #11)
> Created attachment 636272 [details]
I see you have --with-tools enabled. How do you enable USE=tools? Is it intentional?