Hi OpenSSL I managed to Cross Compile OpenSSL on Linux so that I can develop OpenSSL applications that run on Windows entireliy inside a Linux build environment.
It even builds the executables and the DLLs on Linux. Please add my changes to the official "Configure" script. The patch is in the attachment. Remark after some testing: As far as I see, the change in the MinGW target (below "2. Change Link Arguments") is no more necessary in OpenSSL 1.0.0d. Just remove the "die"-Line and everything is fine. :-) Full documentation and Details of the patch are on my Homepage: http://marc.waeckerlin.org/computer/blog/openssl_fuer_windows_mingw_unter_linux_crosscomilieren >From the Homepage: ------------------------------------------------------------------------------------- Details of the Patch 1. Remove "die"-Line Without the patch, you first drop into the error message: > ./config --cross-compile-prefix=i586-mingw32msvc- --prefix=/tmp/openssl > shared mingw Operating system: x86_64-whatever-linux2 Configuring for linux-x86_64 target already defined - linux-x86_64 (offending arg: mingw) That's why the die-line is commented out. 2. Change Link Arguments According to http://wagner.pp.ru/~vitus/articles/openssl-mingw.html, symbols are not exported by default, that's why there is need for adding -Wl,–export-all -shared. ------------------------------------------------------------------------------------- Thanks, Regards Marc -- SwissSign AG > extreme security & identity Sägereistrasse 25 > CH - 8152 Glattbrugg > Tel: +41-44/838'36'93 marc.waecker...@tech.swisssign.com > http://swisssign.com SwissSign, ein Unternehmen der Schweizerischen Post, schützt und beschleunigt Ihre Geschäftsprozesse mit einfachen Lösungen für eindeutige Identifikation, digitale Signatur und sichere Kommunikation E-Mail Richtlinien: http://marc.waeckerlin.org/computer/internet/email Bitte korrekt zitieren: mit '>' am Zeilenanfang
--- openssl-1.0.0d.orig/Configure 2010-11-30 23:19:26.000000000 +0100 +++ openssl-1.0.0d/Configure 2011-04-27 08:48:48.898242218 +0200 @@ -505,7 +505,7 @@ "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX EXPORT_VAR_AS_FN:${no_asm}:win32", # MinGW -"mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a", +"mingw", "gcc:-mno-cygwin -DL_ENDIAN -DWIN32_LEAN_AND_MEAN -fomit-frame-pointer -O3 -march=i486 -Wall::-D_MT:MINGW32:-lws2_32 -lgdi32 -lcrypt32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin -Wl,--export-all -shared:.dll.a", # As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll # compiled with one compiler with application compiled with another # compiler. It's possible to engage Applink support in mingw64 build, @@ -869,7 +869,7 @@ } else { - die "target already defined - $target (offending arg: $_)\n" if ($target ne ""); + #die "target already defined - $target (offending arg: $_)\n" if ($target ne ""); $target=$_; }