[openssl.org #1977] Make openssl 0.9.8k for Mingw

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown [openssl.org #1977] Make openssl 0.9.8k for Mingw

by Bernhard Rosenkränzer via RT :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

there are 2 points:

1 you have possibly heard already, as I discovered it from
https://www.wagner.pp.ru/~vitus/articles/openssl-mingw.html
is that to cross-compile for Mingw you need to comment the invocation of
is_msys() in Configure as it won't return the correct value

2 is that the macro
[definition in include/openssl/e_os2.h : 264]
[invocations so far = 2 @ crypto/des/enc_read.c : 67,
crypto/des/set_key.c : 71]
 OPENSSL_IMPLEMENT_GLOBAL(type,name)
causes compiler errors

enc_read.c:66: error: static declaration of ‘_hide_DES_rw_mode’ follows
non-static declaration
enc_read.c:66: error: previous declaration of ‘_hide_DES_rw_mode’ was here
make[2]: *** [enc_read.o] Error 1

I simply replaced the macro invocations with full code as

static int _hide_DES_check_key;
int *_shadow_DES_check_key(void) { return &_hide_DES_check_key; }

static int _hide_DES_rw_mode = DES_PCBC_MODE;
int *_shadow_DES_rw_mode(void) { return &_hide_DES_rw_mode; }

it's clear that in that particular compile environment at least, it
needs a more appropriate macro [2 macros really as you need to declare
the hide_ var ahead of the function, while in one case you need to
define it too]

Best

Mark

http://www.halloit.com

Key ID 046B65CF


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

Re: [openssl.org #1977] Make openssl 0.9.8k for Mingw

by Roumen Petrov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mark via RT wrote:

> Hi there,
>
> there are 2 points:
>
> 1 you have possibly heard already, as I discovered it from
> https://www.wagner.pp.ru/~vitus/articles/openssl-mingw.html
> is that to cross-compile for Mingw you need to comment the invocation of
> is_msys() in Configure as it won't return the correct value
>
> 2 is that the macro
> [definition in include/openssl/e_os2.h : 264]
> [invocations so far = 2 @ crypto/des/enc_read.c : 67,
> crypto/des/set_key.c : 71]
>  OPENSSL_IMPLEMENT_GLOBAL(type,name)
> causes compiler errors

May be you could use patch from 1552 and in addition from 1747(capi
support).

Mingw build(native or cross) is supported by trunk(head).

Roumen
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@...
Automated List Manager                           majordomo@...