> We have been building OpenSSL on ppc64 and S390X platforms with Linux
> and have found some Configure errors in the 0.9.8 tree when compiling
> for 64 bit. These errors include:
> 
> 1. Building as 64bit on ppc64 or s390x is broken
> 
> Platforms are 64bit (ppc64 and s390x) both ReadHat and SuSE need both
> __arch64__ manually set on the gcc compile line (or on the Configure
> line). We must set __arch64__ in order to meet the requirement to have a
> 64 bit entity for SHA_LONG64.

If __arch64__ is not defined, then 'long long' is used and 'long long' 
is still 64-bit in gcc on all [known] platforms. In other words 
__arch64__ should not be required to meet the above mentioned 
requirement. Moreover, very few compilers define this macro, yet it's 
known to work on whole range of 64-bit platforms. I therefore wonder 
what makes you say that you must set __arch64___? What is your compiler? 
For reference, originally corresponding #ifdef was introduced 
exclusively to eliminate OSF1/Tru64 compiler *warnings*.

> 2. Building ripemd on ppc64 or s390x is broken
> 
> Platforms are 64bit (ppc64 and s390x) both ReadHat and SuSE (both Big
> Endian 64 bit machines) and either -D__ILP64__ must be set or no-ripemd
> set on the Configure line or the ripemd tests fails with the last
> (longest) test value.

It's more likely that compiler is broken. gcc has record of generating 
bad code for message hashes and on 64-bit platforms, see ./PROBLEMS. Do 
test [and confirm] is dropping optimization level makes the test pass.

> The only way we are able to make a build with ripemd configured that
> passes all the tests, is by defining __ILP64__, which has the effectof
> changing SHA_LONG and all its cohorts that are mapped into HASH_LONG
> from 32 bit entities into a 64 bit entities

Defining __ILP64__ is inappropriate, because this macro belongs 
exclusively in system headers and is not to be overridden. Not to 
mention that these platforms are not ILP64 [ILP64 stands for size of 
Integer, Long and Pointer is 64], but LP64, aren't they? If defining 
HASH_LONG as long does make it possible to work around compiler bug, 
then it can be considered for coding, but it won't be solved by defining 
__ILP64__.

> 3. S390X is not linux-generic32
> 
> Seperate patches required for all 0.9.8 versions (as both Configure
> and config are different for prime, a, b, and c/d).

Can you verify linux-generic64? The intention behind introducing 
*-generic[32|64] targets was to *reduce* amount of config lines and I 
fail to see the reason to re-introduce lines for s390[x]. A.


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

Reply via email to