hi,
is there any change to get into the upstream openssl?
it'd be very useful and important to be able to generate win32 binary on
linux.
thnaks in advance.

Alon Bar-Lev wrote:
> Hello,
> 
> An update.
> 1. The issue with OPENSSL_IMPLEMENT_GLOBAL is gone now.
> 2. Merged with Roumen Petrov's patch:
> http://rt.openssl.org/Ticket/Display.html?id=1552
> 
> Except of not postfix engine dlls with eay32.
> 
> Best Regards,
> Alon Bar-Lev.
> 
> ---
> 
> diff -urNp openssl-SNAP-20070901/Configure 
> openssl-SNAP-20070901.mingw32-2/Configure
> --- openssl-SNAP-20070901/Configure   2007-08-30 12:00:13.000000000 +0300
> +++ openssl-SNAP-20070901.mingw32-2/Configure 2007-09-01 19:36:32.000000000 
> +0300
> @@ -481,7 +481,7 @@ my %table=(
>  "BC-32","bcc32::::WIN32::BN_LLONG DES_PTR RC4_INDEX 
> EXPORT_VAR_AS_FN:${no_asm}:win32",
>  
>  # MinGW
> -"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
> -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
> EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
> -DOPENSSL_USE_APPLINK:-mno-cygwin -shared:.dll.a",
> +"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 
> -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} 
> EXPORT_VAR_AS_FN:${x86_coff_asm}:win32:cygwin-shared:-D_WINDLL 
> -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
>  
>  # UWIN 
>  "UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} 
> ${x86_gcc_opts}:${no_asm}:win32",
> @@ -1169,13 +1169,16 @@ if (!$no_shared)
>  
>  if (!$IsMK1MF)
>       {
> +     # add {no-}static-engine to options to allow mkdef.pl to work without 
> extra arguments
>       if ($no_shared)
>               {
>               $openssl_other_defines.="#define OPENSSL_NO_DYNAMIC_ENGINE\n";
> +             $options.=" static-engine";
>               }
>       else
>               {
>               $openssl_other_defines.="#define OPENSSL_NO_STATIC_ENGINE\n";
> +             $options.=" no-static-engine";
>               }
>       }
>  
> diff -urNp openssl-SNAP-20070901/engines/ccgost/Makefile 
> openssl-SNAP-20070901.mingw32-2/engines/ccgost/Makefile
> --- openssl-SNAP-20070901/engines/ccgost/Makefile     2007-05-18 
> 19:02:28.000000000 +0300
> +++ openssl-SNAP-20070901.mingw32-2/engines/ccgost/Makefile   2007-09-01 
> 19:48:02.000000000 +0300
> @@ -44,20 +44,24 @@ install:  
>       if [ -n "$(SHARED_LIBS)" ]; then \
>               set -e; \
>               echo installing $(LIBNAME); \
> +             l=${LIBNAME}; \
>               if [ "$(PLATFORM)" != "Cygwin" ]; then \
> +                     pfx=lib; \
> +                     sfx="so"; \
>                       case "$(CFLAGS)" in \
>                       *DSO_BEOS*) sfx="so";; \
>                       *DSO_DLFCN*) sfx="so";; \
>                       *DSO_DL*) sfx="sl";; \
> +                     *DSO_WIN32*) sfx="dll"; pfx=;; \
>                       *) sfx="bad";; \
>                       esac; \
> -                     cp lib$(LIBNAME).$$sfx 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
>               else \
> +                     pfx="cyg"; \
>                       sfx="so"; \
> -                     cp cyg$(LIBNAME).dll 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
>               fi; \
> -             chmod 555 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new; \
> -             mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$(LIBNAME).$$sfx; \
> +             cp $$pfx$$l.$$sfx 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new; \
> +             chmod 555 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new; \
> +             mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx; \
>       fi
>  
>  links:
> diff -urNp openssl-SNAP-20070901/engines/Makefile 
> openssl-SNAP-20070901.mingw32-2/engines/Makefile
> --- openssl-SNAP-20070901/engines/Makefile    2007-05-17 21:01:28.000000000 
> +0300
> +++ openssl-SNAP-20070901.mingw32-2/engines/Makefile  2007-09-01 
> 19:47:39.000000000 +0300
> @@ -106,19 +106,21 @@ install:
>               for l in $(LIBNAMES); do \
>                       ( echo installing $$l; \
>                         if [ "$(PLATFORM)" != "Cygwin" ]; then \
> +                             pfx=lib; \
>                               case "$(CFLAGS)" in \
>                               *DSO_BEOS*)     sfx="so";;      \
>                               *DSO_DLFCN*)    sfx="so";;      \
>                               *DSO_DL*)       sfx="sl";;      \
> +                             *DSO_WIN32*)    sfx="dll"; pfx=;;       \
>                               *)              sfx="bad";;     \
>                               esac; \
> -                             cp lib$$l.$$sfx 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
>                         else \
> +                             pfx="cyg"; \
>                               sfx="so"; \
> -                             cp cyg$$l.dll 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
>                         fi; \
> -                       chmod 555 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
> -                       mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
> +                       cp $$pfx$$l.$$sfx 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new; \
> +                       chmod 555 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new; \
> +                       mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/$$pfx$$l.$$sfx ); \
>               done; \
>       fi
>       @target=install; $(RECURSIVE_MAKE)
> diff -urNp openssl-SNAP-20070901/Makefile.org 
> openssl-SNAP-20070901.mingw32-2/Makefile.org
> --- openssl-SNAP-20070901/Makefile.org        2007-08-29 01:00:18.000000000 
> +0300
> +++ openssl-SNAP-20070901.mingw32-2/Makefile.org      2007-09-01 
> 19:36:32.000000000 +0300
> @@ -279,6 +279,8 @@ clean-shared:
>               ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
>               if [ "$(PLATFORM)" = "Cygwin" ]; then \
>                       ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a 
> ); \
> +             elif [ "$(PLATFORM)" = "mingw" ]; then \
> +                     ( set -x; rm -f $$i32$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a 
> ); \
>               fi; \
>       done
>  
> @@ -516,19 +518,37 @@ install_sw:
>               do \
>                       if [ -f "$$i" -o -f "$$i.a" ]; then \
>                       (       echo installing $$i; \
> -                             if [ "$(PLATFORM)" != "Cygwin" ]; then \
> +                             if [ "$(PLATFORM)" = "Cygwin" ]; then \
> +                                     c=`echo $$i | sed 
> 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
> +                                     cp $$c 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
> +                                     chmod 755 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
> +                                     mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
>                                       cp $$i 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
> -                                     chmod 555 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
> +                                     chmod 644 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
>                                       mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
> -                             else \
> -                                     c=`echo $$i | sed 
> 's/^lib\(.*\)\.dll\.a/cyg\1-$(SHLIB_VERSION_NUMBER).dll/'`; \
> +                             elif [ "$(PLATFORM)" = "mingw" ]; then \
> +                                     c=`echo $$i | sed 
> 's/^lib\(.*\)\.dll\.a/\132.dll/'`; \
>                                       cp $$c 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
>                                       chmod 755 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new; \
>                                       mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
>                                       cp $$i 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
>                                       chmod 644 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
>                                       mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
> +                             else \
> +                                     cp $$i 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
> +                                     chmod 555 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new; \
> +                                     mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
>                               fi ); \
> +                             if expr $(PLATFORM) : 'mingw' > /dev/null; then 
> \
> +                             (       case $$i in \
> +                                             *crypto*) i=libeay32.dll;; \
> +                                             *ssl*)    i=ssleay32.dll;; \
> +                                     esac; \
> +                                     echo installing $$i; \
> +                                     cp $$i 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
> +                                     chmod 755 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new; \
> +                                     mv -f 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i.new 
> $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \
> +                             fi; \
>                       fi; \
>               done; \
>               (       here="`pwd`"; \
> diff -urNp openssl-SNAP-20070901/Makefile.shared 
> openssl-SNAP-20070901.mingw32-2/Makefile.shared
> --- openssl-SNAP-20070901/Makefile.shared     2007-08-26 18:00:10.000000000 
> +0300
> +++ openssl-SNAP-20070901.mingw32-2/Makefile.shared   2007-09-01 
> 19:36:32.000000000 +0300
> @@ -248,16 +248,21 @@ link_o.cygwin:
>       INHIBIT_SYMLINKS=yes; \
>       SHLIB=cyg$(LIBNAME); \
>       base=-Wl,--enable-auto-image-base; \
> +     deffile=; \
>       if expr $(PLATFORM) : 'mingw' > /dev/null; then \
> -              SHLIB=$(LIBNAME); base=; \
> +             SHLIB=$(LIBNAME); base=; \
> +             if test -f $(LIBNAME).def; then \
> +                     deffile=$(LIBNAME).def; \
> +             fi; \
>       fi; \
>       SHLIB_SUFFIX=.dll; \
>       LIBVERSION="$(LIBVERSION)"; \
>       SHLIB_SOVER=${LIBVERSION:+"-$(LIBVERSION)"}; \
>       ALLSYMSFLAGS='-Wl,--whole-archive'; \
>       NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
> -     SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base 
> -Wl,-s,-Bsymbolic"; \
> +     SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base $$deffile 
> -Wl,-s,-Bsymbolic"; \
>       $(LINK_SO_O)
> +#for mingw target if def-file is in use dll-name should match library-name
>  link_a.cygwin:
>       @ $(CALC_VERSIONS); \
>       INHIBIT_SYMLINKS=yes; \
> @@ -265,9 +270,13 @@ link_a.cygwin:
>       dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \
>       base=-Wl,--enable-auto-image-base; \
>       if expr $(PLATFORM) : 'mingw' > /dev/null; then \
> -             SHLIB=$(LIBNAME); SHLIB_SOVER=32; \
> +             case $(LIBNAME) in \
> +                     crypto) SHLIB=libeay;; \
> +                     ssl) SHLIB=ssleay;; \
> +             esac; \
> +             SHLIB_SOVER=32; \
>               extras="$(LIBNAME).def"; \
> -             $(PERL) util/mkdef.pl 32 $(LIBNAME) > $$extras; \
> +             $(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \
>               base=; [ $(LIBNAME) = "crypto" ] && 
> base=-Wl,--image-base,0x63000000; \
>       fi; \
>       dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
> diff -urNp openssl-SNAP-20070901/ms/mingw32.bat 
> openssl-SNAP-20070901.mingw32-2/ms/mingw32.bat
> --- openssl-SNAP-20070901/ms/mingw32.bat      2003-02-22 21:15:49.000000000 
> +0200
> +++ openssl-SNAP-20070901.mingw32-2/ms/mingw32.bat    2007-09-01 
> 19:36:32.000000000 +0300
> @@ -79,7 +79,7 @@ mingw32-make -f ms/mingw32a.mak
>  if errorlevel 1 goto end
>  
>  echo Generating the DLLs and input libraries
> -dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def 
> ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32
> +dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def 
> ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
>  if errorlevel 1 goto end
>  dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def 
> ms/ssleay32.def out/libssl.a out/libeay32.a
>  if errorlevel 1 goto end
> diff -urNp openssl-SNAP-20070901/ms/mw.bat 
> openssl-SNAP-20070901.mingw32-2/ms/mw.bat
> --- openssl-SNAP-20070901/ms/mw.bat   2003-02-22 21:15:49.000000000 +0200
> +++ openssl-SNAP-20070901.mingw32-2/ms/mw.bat 2007-09-01 19:36:32.000000000 
> +0300
> @@ -15,7 +15,7 @@ make -f ms/mingw32.mak
>  if errorlevel 1 goto end
>  
>  @rem Generate the DLLs and input libraries
> -dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def 
> ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32
> +dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def 
> ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
>  if errorlevel 1 goto end
>  dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def 
> ms/ssleay32.def out/libssl.a out/libeay32.a
>  if errorlevel 1 goto end
> diff -urNp openssl-SNAP-20070901/shlib/win32.bat 
> openssl-SNAP-20070901.mingw32-2/shlib/win32.bat
> --- openssl-SNAP-20070901/shlib/win32.bat     1998-12-21 12:52:46.000000000 
> +0200
> +++ openssl-SNAP-20070901.mingw32-2/shlib/win32.bat   2007-09-01 
> 19:36:32.000000000 +0300
> @@ -14,5 +14,5 @@ cl /Focrypto.obj -DWIN32 %OPTIONS% -c cr
>  cl /Fossl.obj -DWIN32 %OPTIONS% -c ssl\ssl.c
>  cl /Foeay.obj -DWIN32 %OPTIONS% -c apps\eay.c
>  
> -cl /Fessleay.exe %OPTIONS% eay.obj ssl.obj crypto.obj 
> crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj 
> crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib 
> wsock32.lib
> +cl /Fessleay.exe %OPTIONS% eay.obj ssl.obj crypto.obj 
> crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj 
> crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib 
> ws2_32.lib
>  
> diff -urNp openssl-SNAP-20070901/shlib/win32dll.bat 
> openssl-SNAP-20070901.mingw32-2/shlib/win32dll.bat
> --- openssl-SNAP-20070901/shlib/win32dll.bat  1998-12-21 12:52:46.000000000 
> +0200
> +++ openssl-SNAP-20070901.mingw32-2/shlib/win32dll.bat        2007-09-01 
> 19:36:32.000000000 +0300
> @@ -5,9 +5,9 @@ set OPTIONS2=/W3 /WX /Ox /Gf /nologo
>  
>  set OPTIONS=%OPTIONS1% %OPTIONS2%
>  
> -cl /Felibeay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\libeay32.def 
> crypto\crypto.c crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj 
> crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib 
> wsock32.lib
> +cl /Felibeay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\libeay32.def 
> crypto\crypto.c crypto\bf\asm\b-win32.obj crypto\des\asm\c-win32.obj 
> crypto\des\asm\d-win32.obj crypto\bn\asm\x86nt32.obj user32.lib gdi32.lib 
> ws2_32.lib
>  
>  cl /Fessleay32.dll /GD /MD /LD -DWIN32 %OPTIONS% ms\ssleay32.def ssl\ssl.c 
> libeay32.lib
>  
> -cl /Fessleay.exe /MD -DWIN32 %OPTIONS% apps\eay.c ssleay32.lib libeay32.lib 
> user32.lib wsock32.lib
> +cl /Fessleay.exe /MD -DWIN32 %OPTIONS% apps\eay.c ssleay32.lib libeay32.lib 
> user32.lib ws2_32.lib
>  
> diff -urNp openssl-SNAP-20070901/util/mkerr.pl 
> openssl-SNAP-20070901.mingw32-2/util/mkerr.pl
> --- openssl-SNAP-20070901/util/mkerr.pl       2007-04-05 21:01:50.000000000 
> +0300
> +++ openssl-SNAP-20070901.mingw32-2/util/mkerr.pl     2007-09-01 
> 19:36:32.000000000 +0300
> @@ -377,6 +377,10 @@ foreach $lib (keys %csrc)
>  "#ifndef HEADER_${lib}_ERR_H\n",
>  "#define HEADER_${lib}_ERR_H\n",
>  "\n",
> +"#ifdef  __cplusplus\n",
> +"extern \"C\" {\n",
> +"#endif\n",
> +"\n",
>  "/* BEGIN ERROR CODES */\n";
>       }
>       open (OUT, ">$hfile") || die "Can't Open File $hfile for writing\n";
> diff -urNp openssl-SNAP-20070901/util/pl/BC-32.pl 
> openssl-SNAP-20070901.mingw32-2/util/pl/BC-32.pl
> --- openssl-SNAP-20070901/util/pl/BC-32.pl    2005-09-20 11:00:28.000000000 
> +0300
> +++ openssl-SNAP-20070901.mingw32-2/util/pl/BC-32.pl  2007-09-01 
> 19:36:32.000000000 +0300
> @@ -117,7 +117,7 @@ ___
>       else
>               {
>               local($ex)=($target =~ /O_SSL/)?' $(L_CRYPTO)':'';
> -             $ex.=' wsock32.lib gdi32.lib';
> +             $ex.=' ws2_32.lib gdi32.lib';
>               $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target /def:ms/${Name}.def 
> @<<\n  \$(SHLIB_EX_OBJ) $objs $ex\n<<\n";
>               }
>       $ret.="\n";
> diff -urNp openssl-SNAP-20070901/util/pl/Mingw32.pl 
> openssl-SNAP-20070901.mingw32-2/util/pl/Mingw32.pl
> --- openssl-SNAP-20070901/util/pl/Mingw32.pl  2003-06-26 15:00:14.000000000 
> +0300
> +++ openssl-SNAP-20070901.mingw32-2/util/pl/Mingw32.pl        2007-09-01 
> 19:36:32.000000000 +0300
> @@ -55,7 +55,7 @@ $link='${CC}';
>  $lflags='${CFLAGS}';
>  $efile='-o ';
>  $exep='';
> -$ex_libs="-lwsock32 -lgdi32";
> +$ex_libs="-lws2_32 -lgdi32";
>  
>  # static library stuff
>  $mklib='ar r';
> 


-- 
  Levente                               "Si vis pacem para bellum!"


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to