I wrote wcecompat solely for the OpenSSL port (but with a view to using it
for other things), so I guess you could say I'm more of an OpenSSL-er than a
Windows CE-er.

Do you know if a similar change needs to be made for ARMV4T?

I believe your include problem below relates to the possible install issue I
mentioned in the other response.  If your %INCLUDE% is set to the wrong
directory then windows.h won't be found.  The fix is to correct %INCLUDE%
(probably by reinstalling eVC4 + SDKs) rather than modify the
wcecompat/OpenSSL makefiles.

Regards,

Steven

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael Wang
Sent: Wednesday, 10 August 2005 3:15 AM
To: openssl-users@openssl.org
Subject: Re: openssl-0.9.8-stable-SNAP-20050805 on WinCE5.0

Oh Hi Steven,

I am pleasently surprised to see that you are monitoring the list. 
Thanks for the changes in wcecompat.  I downloaded your latest version and I
also had to make two minor changes for my environment.  I'm not sure how
motivated you are to actually incorporate them....  In any case, at least it
is documented now, so hopefully others can find it.

The first change in wcedefs.mak was for my ARMV4I CPU.  I had to make sure
that _ARM_ and ARM was defined, not just ARMV4I and _ARMV4I_.

The second change in makefile was to add another include line so I can pick
up windows.h.  Not sure why this line was missing from both wcecompat and
openssl compiles.....

The patches are below.

Thanks,
Michael


*** wcedefs.mak Wed Jul 27 14:20:12 2005
--- wcedefs.mak.new     Tue Aug  9 10:00:11 2005
***************
*** 62,67 ****
--- 62,71 ----
  WCETARGETCPU=ARM
  WCETARGETCPUDEFS=-DARM -D_ARM_ -D_M_ARM
  WCECC=clarm
+ !ELSEIF "$(TARGETCPU)"=="ARMV4I"
+ WCETARGETCPU=ARM
+ WCETARGETCPUDEFS=-DARM -D_ARM_ -DARMV4I -D_ARMV4I_ WCECC=clarm
  !ELSE
  WCETARGETCPU=$(TARGETCPU)
  WCETARGETCPUDEFS=-D$(TARGETCPU) -D_$(TARGETCPU)_
*** makefile    Tue Dec  3 00:25:14 2002
--- makefile.new        Tue Aug  9 10:00:22 2005
***************
*** 1,6 ****
  !INCLUDE <wcedefs.mak>
  
! CFLAGS=/W3 /WX /Ox /O2 /Ob2 /GF /Gy /nologo $(WCETARGETDEFS)
-DWIN32_PLATFORM_PSPC -DUNICODE -D_UNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN
-Iinclude -D_WINDLL -D_DLL /Foobj/ -D_MSC_VER=1200
  
  SRC =                                                 \
        src/args.cpp                            \
--- 1,6 ----
  !INCLUDE <wcedefs.mak>
  
! CFLAGS=/W3 /WX /Ox /O2 /Ob2 /GF /Gy /nologo $(WCETARGETDEFS)
-DWIN32_PLATFORM_PSPC -DUNICODE -D_UNICODE -DWIN32 -DWIN32_LEAN_AND_MEAN
-Iinclude -I"C:\Program Files\Windows CE
Tools\wce420\STANDARDSDK_420\Include\Armv4i" -D_WINDLL -D_DLL /Foobj/
-D_MSC_VER=1200
  
  SRC =                                                 \
        src/args.cpp                            \


On 8/8/05, Steven Reddie <[EMAIL PROTECTED]> wrote:
> Hi Michael,
> 
> I've put a new wcecompat.zip up at essemer.com.au which includes 
> ENOMEM and EAGAIN.  The remainder of the problems need to be corrected in
OpenSSL.
> 
> Regards,
> 
> Steven
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Michael Wang
> Sent: Tuesday, 9 August 2005 5:01 AM
> To: openssl-users@openssl.org
> Subject: openssl-0.9.8-stable-SNAP-20050805 on WinCE5.0
> 
> Hi,
> 
> I downloaded openssl-0.9.8-stable-SNAP-20050805 and compiled it for my 
> Windows CE platform and had a few problems.  In general though, the 
> code (for WinCE) has been much improved over the 0.9.8 release; good 
> job openlssl developers!
> 
> Here are a couple of issues I had.
> 
> 1. In the CFLAGS define, the compiler didn't like the /wd4959.  It 
> said it was unrecognized and refused to go further.  So I took it out.
> 
> 2. cryptlib.c tried to include windows.h, which the compiler could not
find.
> I had to add the following to CFLAGS after the
> -I$(WCECOMPAT)/include:
> 
>   -I"C:\Program Files\Windows CE
> Tools\wce420\STANDARDSDK_420\Include\Armv4i"
> 
> It would probably be better to use macros instead of a hardcoded path 
> like I have for people who are not compiling for Arm or who has 
> installed their
> eVC++ somewhere else.  (But I don't know what those macros are.... sorry).
> 
> 3. In bf_skey, memcpy was undefined, and /WX caused the compilation to
stop.
> I just took out the /WX flag.  But it might be better to actually fix 
> the root cause.  If some developer wants to work on this, he can fix 
> the bf_skey file, and when I get the next stable SNAP, I can keep 
> compiling to see what other files generate warnings.
> 
> 4. lpdir_win.c has ENOMEM undefined.  I just added -DENONMEM=1 in CFLAGS.
> 
> 5. bss_dgram.c has EAGAIN undefined.  I just added -DEAGAIN=14 in CFLAGS.
> 
> 6. r2c_skey.c had an "Internal compiler error".  I was reading on MSDN 
> that the arm compiler sometimes blows up trying to optimize loops or 
> something like that.  So I took out the /O1i option in CFLAGS.
> 
> 7. The MFLAGS and probably the LFLAGS need /LIBPATH:$(SDK_LIBPATH), 
> where SDK_LIBPATH is something I added that looks like:
> 
>   SDK_LIBPATH="C:\Program Files\Windows CE 
> Tools\wce420\STANDARDSDK_420\Lib\Armv4i"
> 
> 8. On that same line, the linker did not like /machine:ARMV4I.
> Surprisingly, it also threw an error when I changed it to 
> /machine:ARM.  It was happy when I changed it /machine:thumb.  Not 
> sure how it knew I has compiling for thumb and not vanilla ARM.
> Somewhere along the line, I saw that for thumb, the following defines 
> are also good:
> 
> -QRarch4T -DTHUMBSUPPORT -QRinterwork-return
> 
> I'll have to experiment some more to figure out if these defines are 
> really needed.
> 
> Michael
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           [EMAIL PROTECTED]
> 
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to