First. There is invalid operation of script gentoo.config. It tries detect i586-pc-winnt or *-winnt*, but crossdev does not support these targets. When it is fixed then gentoo.config produces target "winnt-parity" which is not valid too. Possible targets for Configure are "mingw" or "mingw64" only. After fixing it compiling begins, but stops on first call to cross ar (in my case i686-mingw32-ar) with error about invalid option --noexecstack After fixing compilation stops on linking libeay32.dll with error: i686-mingw32-gcc: rc.o: no such file or directory Previously log contains error: /bin/sh: line 17: windres: command not found In Makefile.shared is line: $(CROSS_COMPILE)windres -o rc.o But CROSS_COMPILE variable is not set on building: required key --cross-compile-prefix=i686-mingw32- which is not passed to Configure When I add this key to gentoo.config output, I receive error about not found compiler i686-mingw32-i686-mingw32-gcc. Also possible such problems with AR and RANLIB. I solve it by unsetting variables CC AR and RANLIB in ebuild. Next try compile finishes on problem with capi. I solve it adding configure option disable-capieng. This problem is expected - I cannot compile openssl-1.0.0a without this error using mingw compiler. Next problem caused on undefined reference to something like _BIO_f_zlib. I disable use flag zlib... But building finishes on linking bntest.exe because /usr/libexec/gcc/i686-mingw32/ld: cannot find -lcrypt... Manual compilation (not via i686-mingw32-emerge) successfull: ./Configure --cross-compile-prefix=i686-mingw32- disable-capieng --prefix=/usr/i686-mingw32/usr && make && sudo make install Reproducible: Always Steps to Reproduce: 1. crossdev -t i686-mingw32 2. i686-mingw32-emerge --nodeps openssl Actual Results: build failed Expected Results: success
the winnt targets are for prefix systems. if you want openssl to cross-compile for mingw, then feel free to post patches to do it. i'm not interested in making this work myself.