Andy Polyakov | 1 Aug 2005 11:31
Picon
Picon

Re: mk1mf.pl doesn't generate makefile for Windows CE

>>OK, I can see that WCEVERSION is defined in 3rd party wcecompat.mak,
>>but I would feel better if we use variable set by VCVARS*.BAR or
>>whatever it's called in embedded C. Meaning that I'd like to rephrase
>>the question. Can you figure out variables set by VC, which we can use?
> 
> 
> They are OSVERSION, PLATFORM, WCEROOT, SDKROOT, PATH, INCLUDE, LIB, CC,
> TARGETCPU and CFG.
> 
> Here is a script from WCEARM.BAT.
> 
> if "%OSVERSION%"=="" set OSVERSION=WCE300
> if "%PLATFORM%"=="" set PLATFORM=ms pocket pc
> if "%WCEROOT%"=="" set WCEROOT=C:\Program Files\Microsoft eMbedded Visual Tools
> if "%SDKROOT%"=="" set SDKROOT=C:\Program Files\Windows CE Tools
> 
> set CC=clarm.exe
> 
> set TARGETCPU=ARM
> set CFG=none
> 
> 
> CEVersion is set by IDE, so you cannot utilize it from commandline.

And therefore I've decided to eliminate dependency on wcedefs.mak [from 
wcecompat] and implemented the corresponding logic directly to 
VC-32.mak. Grab latest snapshot to test it. For reference. Note that 
this change doesn't eliminate dependency on wcecompat [which is not the 
goal], but dependency on wcedefs.mak file from wcecompat. A.

(Continue reading)

Steven Reddie | 1 Aug 2005 17:18
Picon

RE: mk1mf.pl doesn't generate makefile for Windows CE

Hi Andy,

I haven't been keeping on top of the issues with CE builds (since they
worked for me with a few minor tweaks).  What was the problem with
wcedefs.mak?  I had made a whole lot of changes to better support some more
CE platforms but with it gone won't be able to role them in so easily.  The
reason for an external CE-specific makefile is that the settings vary
between the different dev kits (eVC3 and eVC4) and so it can take enough
code to straighten things out that it would clutter VC-32.pl more than may
be liked.  It's not a big deal if only ARM is supported, but CE supports
several other processors too.

One change that you may want to make is turning off the optimisations.  I
think the flags are /Ox /Ob2 /O2.  /Ox and /O2 will cause eVC4 to break with
internal compiler errors on a number of modules.

Regards,

Steven

-----Original Message-----
From: owner-openssl-dev <at> openssl.org [mailto:owner-openssl-dev <at> openssl.org]
On Behalf Of Andy Polyakov
Sent: Monday, 1 August 2005 7:32 PM
To: openssl-dev <at> openssl.org
Subject: Re: mk1mf.pl doesn't generate makefile for Windows CE

>>OK, I can see that WCEVERSION is defined in 3rd party wcecompat.mak, 
>>but I would feel better if we use variable set by VCVARS*.BAR or 
>>whatever it's called in embedded C. Meaning that I'd like to rephrase 
(Continue reading)

Andy Polyakov | 1 Aug 2005 18:24
Picon
Picon

Re: mk1mf.pl doesn't generate makefile for Windows CE

> I haven't been keeping on top of the issues with CE builds (since they
> worked for me with a few minor tweaks).  What was the problem with
> wcedefs.mak?

Lack of support for *arbitrary* CE version, most notably > 300, lack of 
support for commonly referred _WIN32_WCE and lack of support for 
*arbitrary* %PLATFORM% string. The vision is to reduce WCE-isms to #if 
defined(_WIN32_WCE) && _WIN32_WCE>=*minimally_required* and eventual 
#ifdef PLATFORM [there it's *proven* to be required]. The latter is 
currently broken as I now realize, by means of essentially meaningless 
-DWCEPLATFORM=$wceplatf [which was kind of copied from wcedefs.mak]. It 
should be -D$wceplatf [or why not -DWCE_$wceplatf], right? Note that all 
this doesn't exclude possibilty of wcecompat library being compiled with 
different _WIN32_CE for same CPU architecture, as long as binary 
compatibility is known to be preserved...

> I had made a whole lot of changes to better support some more
> CE platforms but with it gone won't be able to role them in so easily.

Goal is to make it compatible, so just tell what got broken in OpenSSL 
and we take it from there...

> The
> reason for an external CE-specific makefile is that the settings vary
> between the different dev kits (eVC3 and eVC4) and so it can take enough
> code to straighten things out that it would clutter VC-32.pl more than may
> be liked.  It's not a big deal if only ARM is supported, but CE supports
> several other processors too.

I don't see WCE *processor* dependencies in OpenSSL... The only real 
(Continue reading)

Andy Polyakov | 2 Aug 2005 16:00
Picon
Picon

Re: mk1mf.pl doesn't generate makefile for Windows CE

>> One change that you may want to make is turning off the optimisations.  I
>> think the flags are /Ox /Ob2 /O2.  /Ox and /O2 will cause eVC4 to 
>> break with
>> internal compiler errors on a number of modules.
> 
> 
> Well, let's set them to "least common denominator"

How does /O1i sound? 1 means optimize for space (should be appropriate 
for embedded systems:-), i - enables intrinsics (to gain some 
performance "back"). A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev <at> openssl.org
Automated List Manager                           majordomo <at> openssl.org

Andy Polyakov | 2 Aug 2005 14:23
Picon
Picon

Re: mk1mf.pl doesn't generate makefile for Windows CE

> The vision is to reduce WCE-isms to #if 
> defined(_WIN32_WCE) && _WIN32_WCE>=*minimally_required* and eventual 
> #ifdef PLATFORM [there it's *proven* to be required]. The latter is 
> currently broken as I now realize, by means of essentially meaningless 
> -DWCEPLATFORM=$wceplatf

In rand_win.c we could read

#if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO

Well, WCEPLATFORM!=MS_HPC_PRO condition is *never* met... Meaning that 
CryptGenRandom was never called on *any* WCE platform, instead of all 
but MS_HPC_PRO... Fixed by replacing it with _WIN32_WCE>=210 condition, 
which is minimum requirement according to MSDN.

> [which was kind of copied from wcedefs.mak]. It 
> should be -D$wceplatf [or why not -DWCE_$wceplatf], right?

I've chosen to settle for -DWCE_PLATFORM_$wceplatf, because that's what 
is apparently set by Visual Studio IDE [as some references at MSDN 
suggest]. In the above case would result in WCE_PLATFOMR_MS_HPC_PRO 
macro being defined. A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev <at> openssl.org
Automated List Manager                           majordomo <at> openssl.org

Satoshi Nakamura | 2 Aug 2005 16:37

Re: mk1mf.pl doesn't generate makefile for Windows CE

Hi,

At 01 Aug 2005 11:31:57 +0200 Andy Polyakov wrote:
> And therefore I've decided to eliminate dependency on wcedefs.mak [from
> wcecompat] and implemented the corresponding logic directly to VC-32.mak.
>  Grab latest snapshot to test it. For reference. Note that this change
> doesn't eliminate dependency on wcecompat [which is not the goal], but
> dependency on wcedefs.mak file from wcecompat. A.

I got openssl-0.9.8-stable-SNAP-20050801.tar.gz and found some problems.

1. Use /MC instead of /MD and /MDd
/MD and /MDd are not supported for Windows CE.

2. Define UNDER_CE as well as _WIN32_WCE.
Some system headers use UNDER_CE instead of _WIN32_CE.

3. Define CPU dependent macros such as _X86_ or _ARM_
System headers use them.

4. /Gs0 is not supported by the compiler for SH3 and SH4

5. /Qsh4 is required for SH4

Here is a patch.

I've tested it for Pocket PC platforms, but not tested for other
platforms and emulartion environments. I'll do it later.

--- openssl-0.9.8-stable-SNAP-20050801.orig/util/pl/VC-32.pl	2005-07-31 05:05:40.000000000 +0900
(Continue reading)

Olli Savia via RT | 2 Aug 2005 15:11
Picon
Favicon

[openssl.org #1178] [PATCH] OpenSSL LynxOS port


Hi,

This patch includes port of OpenSSL to LynxOS. The patch is against
version openssl-SNAP-20050801. Here is a brief description of changes:

Configure		Added LynxOS specific options
apps/apps.c		Added missing prototype
apps/ca.c		Added missing prototype
apps/speed.c		Added LynxOS to the list systems that define USE_TOD
crypto/cryptlib.h	Added #include <stdarg.h> which is needed on LynxOS
crypto/o_str.c		Added missing prototypes
crypto/o_time.c		LynxOS 3.x gmtime_r() wants params in opposite order
ssl/ssltest.c		Added #include <stdarg.h> which is needed on LynxOS

Would it be possible to include these changes in the future
release of OpenSSL?

Thanks,
Olli

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev <at> openssl.org
Automated List Manager                           majordomo <at> openssl.org

Andy Polyakov | 2 Aug 2005 17:14
Picon
Picon

Re: mk1mf.pl doesn't generate makefile for Windows CE

> I got openssl-0.9.8-stable-SNAP-20050801.tar.gz and found some problems.
> 
> 1. Use /MC instead of /MD and /MDd
> /MD and /MDd are not supported for Windows CE.

For my reference. What's /MC? I can't find it on MSDN... Can you post 
output from 'cl /help'?

> 2. Define UNDER_CE as well as _WIN32_WCE.
> Some system headers use UNDER_CE instead of _WIN32_CE.
> 
> 3. Define CPU dependent macros such as _X86_ or _ARM_
> System headers use them.

How is this handled otherwise? I mean does Studio IDE set them up? This 
is also for my reference... Is there anything else IDE sets up?

> 4. /Gs0 is not supported by the compiler for SH3 and SH4

I'd remove it altogether. /Gs is set implicitly by /O anyway. Note that 
optimization level is suggested to be changed to /O1i. A.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev <at> openssl.org
Automated List Manager                           majordomo <at> openssl.org

Satoshi Nakamura | 2 Aug 2005 17:15

Re: mk1mf.pl doesn't generate makefile for Windows CE

Hi,

At 02 Aug 2005 14:23:17 +0200 Andy Polyakov wrote:
> In rand_win.c we could read
> 
> #if defined(OPENSSL_SYS_WINCE) && WCEPLATFORM!=MS_HPC_PRO
> 
> Well, WCEPLATFORM!=MS_HPC_PRO condition is *never* met... Meaning that
> CryptGenRandom was never called on *any* WCE platform, instead of all
> but MS_HPC_PRO... Fixed by replacing it with _WIN32_WCE>=210 condition,
> which is minimum requirement according to MSDN.

I agree with this change.

Here is a patch which eliminates some 'unreferenced local variable'
warnings. In addition to that, change not to call GetVersion because it
is not supported.

diff -ur openssl-0.9.8-stable-SNAP-20050802.orig/crypto/rand/rand_win.c openssl-0.9.8-stable-SNAP-20050802/crypto/rand/rand_win.c
--- openssl-0.9.8-stable-SNAP-20050802.orig/crypto/rand/rand_win.c	2005-05-21
23:00:22.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050802/crypto/rand/rand_win.c	2005-08-02 23:51:45.833052600 +0900
 <at>  <at>  -195,10 +195,14  <at>  <at> 
 	HCRYPTPROV hProvider = 0;
 	BYTE buf[64];
 	DWORD w;
+#ifndef OPENSSL_SYS_WINCE
 	HWND h;
+#endif
 	int good = 0;
(Continue reading)

Satoshi Nakamura | 2 Aug 2005 17:18

Re: mk1mf.pl doesn't generate makefile for Windows CE

Hi,

At 02 Aug 2005 23:37:43 +0900 Satoshi Nakamura wrote:
> Here is a patch.

Sorry, there was a small bug. This is the correct one against
snapshot-20050802.

diff -ur openssl-0.9.8-stable-SNAP-20050802.orig/util/pl/VC-32.pl openssl-0.9.8-stable-SNAP-20050802/util/pl/VC-32.pl
--- openssl-0.9.8-stable-SNAP-20050802.orig/util/pl/VC-32.pl	2005-07-31 05:05:40.000000000 +0900
+++ openssl-0.9.8-stable-SNAP-20050802/util/pl/VC-32.pl	2005-08-02 23:48:49.721423400 +0900
 <at>  <at>  -41,6 +41,7  <at>  <at> 
     $wcevers = $ENV{'OSVERSION'};			# WCENNN
     die '%OSVERSION% value is insane'	if ($wcevers !~ /^WCE([1-9])([0-9]{2})$/);
     $wcecdefs = "-D_WIN32_WCE=$1$2";		# -D_WIN32_WCE=NNN
+    $wcecdefs .= " -DUNDER_CE=$1$2";		    # -DUNDER_CE=NNN
     $wcelflag = "/subsystem:windowsce,$1.$2";	# ...,N.NN
     if ($ENV{'TARGETCPU'} =~ /^X86/)
     {	$wcelflag .= " /machine:X86";			}
 <at>  <at>  -49,12 +50,24  <at>  <at> 
     $wceplatf =  $ENV{'PLATFORM'};
     $wceplatf =~ tr/a-z0-9 /A-Z0-9_/d;
     $wcecdefs .= " -DWCEPLATFORM=$wceplatf";
+    if ($ENV{'TARGETCPU'} =~ /^X86/)
+    {	$wcecdefs .= " -Dx86 -D_X86_"								}
+    elsif ($ENV{'TARGETCPU'} =~ /^R4[0-9]{3}/)
+    {	$wcecdefs .= " -DMIPS -D_MIPS_ -DMIPS_R4000"				}
+    elsif ($ENV{'TARGETCPU'} =~ /^ARM/)
+    {	$wcecdefs .= " -DARM -D_ARM_"								}
+    else
(Continue reading)


Gmane