mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
First draft for WCE PortSDK support. Once again! It's *draft* which requires
more work, i.e. more modifications are due...
This commit is contained in:
parent
f858d222f2
commit
176a614899
77
INSTALL.WCE
77
INSTALL.WCE
@ -4,27 +4,36 @@
|
|||||||
|
|
||||||
Building OpenSSL for Windows CE requires the following external tools:
|
Building OpenSSL for Windows CE requires the following external tools:
|
||||||
|
|
||||||
* Microsoft eMbedded Visual C++ 3.0
|
* Microsoft eMbedded Visual C++ 3.0 or later
|
||||||
* wcecompat compatibility library (www.essemer.com.au)
|
* Appropriate SDK might be required
|
||||||
* Optionally ceutils for running automated tests (www.essemer.com.au)
|
* Perl for Win32 [commonly recommended ActiveState Perl is available
|
||||||
|
from http://www.activestate.com/Products/ActivePerl/]
|
||||||
|
|
||||||
You also need Perl for Win32. You will need ActiveState Perl, available
|
* wcecompat compatibility library available at
|
||||||
from http://www.activestate.com/ActivePerl.
|
http://www.essemer.com.au/windowsce/
|
||||||
|
* Optionally ceutils for running automated tests (same location)
|
||||||
|
|
||||||
Windows CE support in OpenSSL relies on wcecompat and therefore it's
|
_or_
|
||||||
appropriate to check http://www.essemer.com.au/windowsce/ for updates in
|
|
||||||
case of compilation problems. As for the moment of this writing version
|
|
||||||
1.1 is available and actually required for WCE 4.2 and newer platforms.
|
|
||||||
All Windows CE specific issues should be directed to www.essemer.com.au.
|
|
||||||
|
|
||||||
The C Runtime Library implementation for Windows CE that is included with
|
* PocketConsole driver and PortSDK available at
|
||||||
Microsoft eMbedded Visual C++ 3.0 is incomplete and in some places
|
http://www.symbolictools.de/public/pocketconsole/
|
||||||
incorrect. wcecompat plugs the holes and tries to bring the Windows CE
|
* CMD command interpreter (same location)
|
||||||
CRT to a level that is more compatible with ANSI C. wcecompat goes further
|
|
||||||
and provides low-level IO and stream IO support for stdin/stdout/stderr
|
As Windows CE support in OpenSSL relies on 3rd party compatibility
|
||||||
(which Windows CE does not provide). This IO functionality is not needed
|
library, it's appropriate to check corresponding URL for updates. For
|
||||||
by the OpenSSL library itself but is used for the tests and openssl.exe.
|
example if you choose wcecompat, note that as for the moment of this
|
||||||
More information is available at www.essemer.com.au.
|
writing version 1.2 is available and actually required for WCE 4.2
|
||||||
|
and newer platforms. All wcecompat issues should be directed to
|
||||||
|
www.essemer.com.au.
|
||||||
|
|
||||||
|
Why compatibility library at all? The C Runtime Library implementation
|
||||||
|
for Windows CE that is included with Microsoft eMbedded Visual C++ is
|
||||||
|
incomplete and in some places incorrect. Compatibility library plugs
|
||||||
|
the holes and tries to bring the Windows CE CRT to [more] usable level.
|
||||||
|
Most gaping hole in CRT is support for stdin/stdout/stderr IO, which
|
||||||
|
proposed compatibility libraries solve in two different ways: wcecompat
|
||||||
|
redirects IO to active sync link, while PortSDK - to NT-like console
|
||||||
|
driver on the handheld itself.
|
||||||
|
|
||||||
Building
|
Building
|
||||||
--------
|
--------
|
||||||
@ -34,9 +43,21 @@
|
|||||||
|
|
||||||
> "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
|
> "C:\Program Files\Microsoft eMbedded Tools\EVC\WCE300\BIN\WCEARM.BAT"
|
||||||
|
|
||||||
Next indicate where wcecompat is located:
|
Next pick compatibility library according to your preferences.
|
||||||
|
|
||||||
> set WCECOMPAT=C:\wcecompat
|
1. To choose wcecompat set up WCECOMPAT environment variable pointing
|
||||||
|
at the location of wcecompat tree "root":
|
||||||
|
|
||||||
|
> set WCECOMPAT=C:\wcecompat
|
||||||
|
> set PORTSDK_LIBPATH=
|
||||||
|
|
||||||
|
2. To choose PortSDK set up PORTSDK_LIBPATH to point at hardware-
|
||||||
|
specific location where your portlib.lib is installed:
|
||||||
|
|
||||||
|
> set PORTSDK_LIBPATH=C:\PortSDK\lib\ARM
|
||||||
|
> set WCECOMPAT=
|
||||||
|
|
||||||
|
Note that you may not set both variables.
|
||||||
|
|
||||||
Next you should run Configure:
|
Next you should run Configure:
|
||||||
|
|
||||||
@ -52,16 +73,16 @@
|
|||||||
|
|
||||||
Then from the VC++ environment at a prompt do:
|
Then from the VC++ environment at a prompt do:
|
||||||
|
|
||||||
- to build static libraries:
|
|
||||||
|
|
||||||
> nmake -f ms\ce.mak
|
|
||||||
|
|
||||||
- or to build DLLs:
|
|
||||||
|
|
||||||
> nmake -f ms\cedll.mak
|
> nmake -f ms\cedll.mak
|
||||||
|
|
||||||
If all is well it should compile and you will have some static libraries and
|
[note that static builds are not supported under CE]
|
||||||
executables in out32, or some DLLs and executables in out32dll. If you want
|
|
||||||
|
If all is well it should compile and you will have some DLLs and executables
|
||||||
|
in out32dll*.
|
||||||
|
|
||||||
|
<<< everyting below needs revision in respect to wcecompat vs. PortSDK >>>
|
||||||
|
|
||||||
|
If you want
|
||||||
to try the tests then make sure the ceutils are in the path and do:
|
to try the tests then make sure the ceutils are in the path and do:
|
||||||
|
|
||||||
> cd out32
|
> cd out32
|
||||||
|
4
e_os.h
4
e_os.h
@ -283,7 +283,9 @@ static unsigned int _strlen31(const char *str)
|
|||||||
|
|
||||||
# ifdef OPENSSL_SYS_WINCE
|
# ifdef OPENSSL_SYS_WINCE
|
||||||
# define OPENSSL_NO_POSIX_IO
|
# define OPENSSL_NO_POSIX_IO
|
||||||
# include <winsock_extras.h>
|
# if defined(_WIN32_WCE) && _WIN32_WCE<410
|
||||||
|
# include <winsock_extras.h>
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# define ssize_t long
|
# define ssize_t long
|
||||||
|
@ -79,8 +79,10 @@ elsif ($FLAVOR =~ /CE/)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$cc='$(CC)';
|
$cc='$(CC)';
|
||||||
$base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -I$(WCECOMPAT)/include -DOPENSSL_SMALL_FOOTPRINT';
|
$base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
|
||||||
$base_cflags.=" $wcecdefs";
|
$base_cflags.=" $wcecdefs";
|
||||||
|
$base_cflags.=' $(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'}));
|
||||||
|
$base_cflags.=' $(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));
|
||||||
$opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics...
|
$opt_cflags=' /MC /O1i'; # optimize for space, but with intrinsics...
|
||||||
$dbg_clfags=' /MC /Od -DDEBUG -D_DEBUG';
|
$dbg_clfags=' /MC /Od -DDEBUG -D_DEBUG';
|
||||||
$lflags="/nologo /opt:ref $wcelflag";
|
$lflags="/nologo /opt:ref $wcelflag";
|
||||||
@ -124,7 +126,8 @@ else { $ex_libs='wsock32.lib'; }
|
|||||||
|
|
||||||
if ($FLAVOR =~ /CE/)
|
if ($FLAVOR =~ /CE/)
|
||||||
{
|
{
|
||||||
$ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib';
|
$ex_libs.=' $(WCECOMPAT)/lib/wcecompatex.lib' if (defined($ENV{'WCECOMPAT'}));
|
||||||
|
$ex_libs.=' $(PORTSDK_LIBPATH)/portlib.lib' if (defined($ENV{'PORTSDK_LIBPATH'}));
|
||||||
$ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86");
|
$ex_libs.=' /nodefaultlib:oldnames.lib coredll.lib corelibc.lib' if ($ENV{'TARGETCPU'} eq "X86");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -225,6 +228,7 @@ ___
|
|||||||
elsif ($shlib && $FLAVOR =~ /CE/)
|
elsif ($shlib && $FLAVOR =~ /CE/)
|
||||||
{
|
{
|
||||||
$mlflags.=" $lflags /dll";
|
$mlflags.=" $lflags /dll";
|
||||||
|
$lflags.=' /entry:mainCRTstartup' if(defined($ENV{'PORTSDK_LIBPATH'}));
|
||||||
$lib_cflag=" -D_WINDLL -D_DLL";
|
$lib_cflag=" -D_WINDLL -D_DLL";
|
||||||
$out_def='out32dll_$(TARGETCPU)';
|
$out_def='out32dll_$(TARGETCPU)';
|
||||||
$tmp_def='tmp32dll_$(TARGETCPU)';
|
$tmp_def='tmp32dll_$(TARGETCPU)';
|
||||||
@ -259,7 +263,9 @@ sub do_lib_rule
|
|||||||
{}
|
{}
|
||||||
elsif ($FLAVOR =~ /CE/)
|
elsif ($FLAVOR =~ /CE/)
|
||||||
{
|
{
|
||||||
$ex.=' winsock.lib $(WCECOMPAT)/lib/wcecompatex.lib';
|
$ex.=' winsock.lib';
|
||||||
|
$ex.=' $(WCECOMPAT)/lib/wcecompatex.lib' if (defined($ENV{'WCECOMPAT'}));
|
||||||
|
$ex.=' $(PORTSDK_LIBPATH)/portlib.lib' if (defined($ENV{'PORTSDK_LIBPATH'}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user