Proposed Changes To Win32 Build Environment

125 views
Skip to first unread message

Marton Anka

unread,
Sep 23, 2005, 2:14:02 PM9/23/05
to
------=_Part_431_17180256.1127499229539
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hello,

My name is Marton Anka and I have been an OpenSSL user for quite some time.
I am the CTO of 3am Labs, and our commercial products (the LogMeIn line and
RemotelyAnywhere) have relied on OpenSSL since their inception.

I'd like to suggest a few changes to the Win32 build process.

Our goal is to:

1. Provide a .pdb file for release builds as well as debug ones
2. Name debug libraries and dlls differently from the release builds
3. Link static libraries to the static C runtime, and DLL builds to
the DLL C runtime

The first change is to mkdef.pl. mkdef.pl can be invoked like this:

perl util\mkdef.pl 32 libeay > ms\libeay32.def

We've added an additional parameter that generates a module definition file
for debug builds:

perl util\mkdef.pl D 32 libeay > ms\libeay32d.def

The resulting debug module definition file refers to the library as
libeay32d (or ssleay32d) instead of libeay32 (or ssleay32).

The other change is to VC-32.pl. It does not modify how the script is
invoked, but changes the following:

1. Release static builds are called ssleay32st.lib and libeay32st.lib
2. Release DLL builds are called ssleay32.lib and libeay32.lib
3. Debug static builds are called ssleay32std.lib and libeay32std.lib
4. Debug DLL builds are called ssleay32d.lib and libeay32d.lib
5. Static builds are linked to the static C runtime, release builds
are linked to the DLL C runtime
6. Debug symbols (pdb files) are generated for both debug and release
builds, and the pdb files are named according to the naming convention
described in steps 1-4

Finally we've modified /ms/do_masm.bat and /ms/do_ms.bat so they call
mkdef.pl for every possible variation:

perl util\mkdef.pl 32 libeay > ms\libeay32.def
perl util\mkdef.pl D 32 libeay > ms\libeay32d.def
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
perl util\mkdef.pl D 32 ssleay > ms\ssleay32d.def

Please let me know if this could be rolled into the main codeline. I can
post diffs (I presume unified format would work) or the whole files
themselves.

We have been applying these changes to every release of OpenSSL since the
0.9.6 days, and find them immensely useful.

-Marton Anka

------=_Part_431_17180256.1127499229539
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<p class=3D"MsoNormal">Hello,</p>


<p class=3D"MsoNormal">My name is Marton Anka and I have been an OpenSSL us=
er for
quite some time. I am the CTO of 3am Labs, and our commercial products (the=
LogMeIn
line and RemotelyAnywhere) have relied on OpenSSL since their inception.</p=
>


<p class=3D"MsoNormal">I'd like to suggest a few changes to the Win32 build=
process.</p>


<p class=3D"MsoNormal">Our goal is to:</p>


<ol style=3D"margin-top: 0in;" start=3D"1" type=3D"1">
<li class=3D"MsoNormal" style=3D"">Provide
a .pdb file for release builds as well as debug ones</li><li class=3D"=
MsoNormal" style=3D"">Name
debug libraries and dlls differently from the release builds</li><li c=
lass=3D"MsoNormal" style=3D"">Link
static libraries to the static C runtime, and DLL builds to the DLL C
runtime</li>
</ol>


<p class=3D"MsoNormal">The first change is to mkdef.pl. mkdef.pl can be inv=
oked
like this:</p>


<p class=3D"MsoNormal">perl util\mkdef.pl 32 libeay &gt; ms\libeay32.def</p=
>


<p class=3D"MsoNormal">We've added an additional parameter that generates a=
module
definition file for debug builds:</p>


<p class=3D"MsoNormal">perl util\mkdef.pl D 32 libeay &gt; ms\libeay32d.def=
</p>


<p class=3D"MsoNormal">The resulting debug module definition file refers to=
the library as
libeay32d (or ssleay32d) instead of libeay32 (or ssleay32).</p>


<p class=3D"MsoNormal">The other change is to VC-32.pl. It does not modify =
how the
script is invoked, but changes the following:</p>


<ol style=3D"margin-top: 0in;" start=3D"1" type=3D"1">
<li class=3D"MsoNormal" style=3D"">Release
static builds are called ssleay32st.lib and libeay32st.lib</li><li cla=
ss=3D"MsoNormal" style=3D"">Release
DLL builds are called ssleay32.lib and libeay32.lib</li><li class=3D"M=
soNormal" style=3D"">Debug
static builds are called ssleay32std.lib and libeay32std.lib</li><li c=
lass=3D"MsoNormal" style=3D"">Debug
DLL builds are called ssleay32d.lib and libeay32d.lib</li><li class=3D=
"MsoNormal" style=3D"">Static
builds are linked to the static C runtime, release builds are linked t=
o
the DLL C runtime</li><li class=3D"MsoNormal" style=3D"">Debug
symbols (pdb files) are generated for both debug and release builds, a=
nd
the pdb files are named according to the naming convention described i=
n
steps 1-4</li>
</ol>


<p class=3D"MsoNormal">Finally we've modified /ms/do_masm.bat and /ms/do_ms=
.bat so they
call mkdef.pl for every possible variation:</p>


<p class=3D"MsoNormal">perl util\mkdef.pl 32 libeay &gt; ms\libeay32.def<br=
>
perl util\mkdef.pl D 32 libeay &gt; ms\libeay32d.def<br>
perl util\mkdef.pl 32 ssleay &gt; ms\ssleay32.def<br>
perl util\mkdef.pl D 32 ssleay &gt; ms\ssleay32d.def <br>
</p>


<p class=3D"MsoNormal">Please let me know if this could be rolled into the =
main
codeline. I can post diffs (I presume unified format would work) or the who=
le
files themselves.</p>
<p class=3D"MsoNormal">We have been applying these changes to every release=
of OpenSSL since the 0.9.6 days, and find them immensely useful.<br>
<br>
-Marton Anka</p>


------=_Part_431_17180256.1127499229539--
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List opens...@openssl.org
Automated List Manager majo...@openssl.org

t.brun...@gmail.com

unread,
Mar 17, 2016, 7:05:00 AM3/17/16
to
Hello ! I found your personal blog about "Improving the OpenSSL Win32 Build Process". Question: I use PHP 5.2.17 x86 VC6 and always latest OpenSSL. 1.0.2f was the latest working build but 1.0.2g breaks some compatibility so PHP wont startup. I tried to compile with all suggested options but nothing works. Do you have any idea how to get it back work on W2K3 x86 ?
Reply all
Reply to author
Forward
0 new messages