Andy Polyakov wrote:
I've investigated various ways of building OpenSSL (release 0.9.8) for
Win32 with gcc.
There are at least three ways to do this
1. Using mingw32 compiler (from http://www.mingw.org)
2. Using cygwin compiler with -mno-cygwin switch to create executables
which do not depend on cygwin.dll
3. Using cross-compiler on some Unix system. I've used cross-compiler
included in Debian GNU/Linux ver./g 3.1 (sarge) as package mingw32
The roadmap is to scrap #1 and make #2 work on both cygwin and msys.
We already build using the mingw32 compiler under msys. I've been a bit
lax about sending back patches lately, but as I recall there were only a
few small tweaks to Configure needed. IMO the Cygwin environment is
worthless; it is several times slower than MinGW/MSYS for no real benefit.
Resulting libraries are in all cases compatible with Microsoft Visual C.
In addition #2 should/will generate .def files and use them when linking
.dll. Idea is to be able to generate drop-in replacement .dlls for those
compiled with MSVC.
This has "just worked" for me for quite a long time now.
3. Using cross-compiler.
GNU C cross-compilers can be invoked in two ways
1. Using -B option to gcc
2. Using name which looks like <architecture>-<system>-gcc, in this case
i586-mingw32msvc-gcc.
I recommend using the second way, because we need to call
cross-versions of some binutils programs, such as ranlib, and they do
not have -B option.
I'd create a /some/place/i586-mingw32mscv catalog, create small wrapper
scripts called gcc, ranlib, etc. with 'exec i586-mingw32mscv-$0 "$@"'
line, and prepend your $PATH with /some/place/i586-mingw32mscv prior
running make:-) A.
I've done this type of setup before, with complete toolchains in
/some/place/<architecture>. You just need to put /some/place/<arch> in
front of your path, then you don't need any wrappers.
If the idea is to use a single gcc compiler driver to automatically
invoke the right cross-compiler based on commandline args, I guess you
can go to the trouble of setting up all the pathnames that gcc expects,
but it seems like wasted effort to me. It's only useful if you're
spawning multiple builds from the same location, and you don't want to
muck with your path for each build. But it's pretty irrelevant - you can
setup your Makefile such that
make sparcv9-solaris8
make i686-mingw
all do the right thing, whatever your toolchain setup is. It's really up
to you to do something consistent/easy to manage.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager [EMAIL PROTECTED]