mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
0b352c58db
PR: 732 Submitted by: Ilya Zakharevich <nospam-abuse@ilyaz.org> Submitter's comment: This patch: a) Introduces a new file os2/backwardify.pl. b) Introduces a new mk1mf.pl variable $preamble. As you can see, it may be used also to move some OS-specific code to VC-CE too (the the first chunk of the patch); c) The DESCRIPTION specifier of the .def file is made more informative: now it contains the version number too. On OS/2 it is made conformant to OS/2 conventions; in particular, when one runs the standard command BLDLEVEL this.DLL one can see: Vendor: www.openssl.org/ Revision: 0.9.7c Description: OpenSSL: implementation of Secure Socket Layer; DLL for library crypto. Build for EMX -Zmtd [I did not make Win32 descriptions as informative as this - I'm afraid to break something. Be welcome to fix this.] d) On OS/2 the generated DLL was hardly usable (it had a shared initialized data segment). e) On OS/2 the generated DLLs had names like ssl.dll. However, DLL names on OS/2 are "global data". It is hard to have several DLLs with the same name on the system. Thus this precluded coexistence of OpenSSL with DLLs for other SLL implementations - or other name clashes. I transparently changed the names of the DLLs to open_ssl.dll and cryptssl.dll. f) The file added in (a) is used to create "forwarder" DLLs, so the applications expecting the "old" DLL names may use the new DLLs transparently. (A presence of these DLLs on the system nullifies (e), but makes old applications work. This is a stopgap measure until the old applications are relinked. Systems with no old applications do not need these DLLs, so may enjoy all the benefits of (e).) The new DLLs are placed in os2/ and os2/noname subdirectories. g) The makefiles created with os2/OS2-EMX.cmd did not work (some mysterious meaningless failures). The change to util/pl/OS2-EMX.pl uses the variable introduced in (b) to switch the Makefiles to SHELL=sh syntax. All these backslashes are removed, and the generated Makefiles started to work. h) Running os2/OS2-EMX.cmd now prints out what to do next.
103 lines
2.3 KiB
Batchfile
103 lines
2.3 KiB
Batchfile
@echo off
|
|
|
|
perl Configure OS2-EMX
|
|
perl util\mkfiles.pl > MINFO
|
|
|
|
@rem create make file
|
|
perl util\mk1mf.pl OS2-EMX > OS2-EMX.mak
|
|
perl util\mk1mf.pl dll OS2-EMX > OS2-EMX-DLL.mak
|
|
|
|
echo Generating export definition files
|
|
perl util\mkdef.pl crypto OS2 > os2\crypto.def
|
|
perl util\mkdef.pl ssl OS2 > os2\ssl.def
|
|
|
|
echo Generating x86 for GNU assember
|
|
|
|
echo Bignum
|
|
cd crypto\bn\asm
|
|
rem perl x86.pl a.out > bn-os2.asm
|
|
perl bn-586.pl a.out > bn-os2.asm
|
|
perl co-586.pl a.out > co-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo DES
|
|
cd crypto\des\asm
|
|
perl des-586.pl a.out > d-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo crypt(3)
|
|
cd crypto\des\asm
|
|
perl crypt586.pl a.out > y-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo Blowfish
|
|
cd crypto\bf\asm
|
|
perl bf-586.pl a.out > b-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo CAST5
|
|
cd crypto\cast\asm
|
|
perl cast-586.pl a.out > c-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo RC4
|
|
cd crypto\rc4\asm
|
|
perl rc4-586.pl a.out > r4-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo MD5
|
|
cd crypto\md5\asm
|
|
perl md5-586.pl a.out > m5-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo SHA1
|
|
cd crypto\sha\asm
|
|
perl sha1-586.pl a.out > s1-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo RIPEMD160
|
|
cd crypto\ripemd\asm
|
|
perl rmd-586.pl a.out > rm-os2.asm
|
|
cd ..\..\..
|
|
|
|
echo RC5\32
|
|
cd crypto\rc5\asm
|
|
perl rc5-586.pl a.out > r5-os2.asm
|
|
cd ..\..\..
|
|
|
|
cd os2
|
|
|
|
if exist noname\backward_ssl.def goto nomkdir
|
|
mkdir noname
|
|
:nomkdir
|
|
|
|
perl backwardify.pl crypto.def >backward_crypto.def
|
|
perl backwardify.pl ssl.def >backward_ssl.def
|
|
perl backwardify.pl -noname crypto.def >noname\backward_crypto.def
|
|
perl backwardify.pl -noname ssl.def >noname\backward_ssl.def
|
|
|
|
echo Creating backward compatibility forwarder dlls:
|
|
echo crypto.dll
|
|
gcc -Zomf -Zdll -Zcrtdll -o crypto.dll backward_crypto.def 2>&1 | grep -v L4085
|
|
echo ssl.dll
|
|
gcc -Zomf -Zdll -Zcrtdll -o ssl.dll backward_ssl.def 2>&1 | grep -v L4085
|
|
|
|
echo Creating smaller backward compatibility forwarder dlls:
|
|
echo These DLLs are not good for runtime resolution of symbols.
|
|
echo noname\crypto.dll
|
|
gcc -Zomf -Zdll -Zcrtdll -o noname/crypto.dll noname/backward_crypto.def 2>&1 | grep -v L4085
|
|
echo noname\ssl.dll
|
|
gcc -Zomf -Zdll -Zcrtdll -o noname/ssl.dll noname/backward_ssl.def 2>&1 | grep -v L4085
|
|
|
|
echo Compressing forwarders (it is ok if lxlite is not found):
|
|
lxlite *.dll noname/*.dll
|
|
|
|
cd ..
|
|
|
|
echo Now run:
|
|
echo For static build:
|
|
echo make -f OS2-EMX.mak
|
|
echo For dynamic build:
|
|
echo make -f OS2-EMX-DLL.mak
|
|
echo then rename crypto.dll to cryptssl.dll, ssl.dll to open_ssl.dll
|