On Tue, Jul 06, 2010 at 12:39:39PM +0200, Peter Stuge wrote:
> > 
> > Could you point out some documentation and/or GUI explaining how to
> > cross compile?
> 
> No GUI, don't know much documentation either. Start testing. Test
> simple stuff first. Get a cross-compiler toolchain. On Gentoo it's
> trivial:
> 
> emerge crossdev
> crossdev -t i686-w64-mingw32
> crossdev -t x86_64-w64-mingw32
> 
> And you'll have a 32-bit and a 64-bit cross-toolchain for Windows.
> 
> Then, for any autotools package, you build it using:
> 
> ./configure --host=x86_64-w64-mingw32

For OpenSSL I created a patch to cross compile it on linux for windows hosts:

0.9.8X:
http://xca.git.sourceforge.net/git/gitweb.cgi?p=xca/xca;a=blob_plain;f=misc/openssl-1.0.0-mingw32-cross.patch;hb=HEAD

1.0.0:
http://xca.git.sourceforge.net/git/gitweb.cgi?p=xca/xca;a=blob_plain;f=misc/openssl-1.0.0-mingw32-cross.patch;hb=HEAD

After applying the patch, call "sh ms/mingw32-cross.sh"
in the openssl directory

For my convenience, I created a script to cross-compile windows dll and
exe on my linux box (it includes the OpenSSL step above):
  OpenSSL, Libtool, Libp11, Engine_PKCS#11 and OpenSC.
It downloads the packages too, if needed:

http://xca.git.sourceforge.net/git/gitweb.cgi?p=xca/xca;a=blob_plain;f=misc/build-w32.sh;hb=HEAD

It installs all libs and binaries in a subdirectory: $INSTALL_DIR

It uses the i586-mingw32msvc-* toolchain:
 $ apt-get install mingw32 mingw32-binutils mingw32-runtime nsis


maybe it saves you some time, I spent to figure it all out....

Cheers

        Christian

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to