Hi,

> This is the ppccap.c's patch for Mac OS X with PowerPC G3.
> OpenSSL with PowerPC G3 is working fine. But always clash without 
> OPENSSL_ppccap=0.

If by crash you mean http://www.openssl.org/support/faq.html#PROG17,
i.e. you suffer from it when debugging, then answer is deal with it.
E.g. by setting the environment variable when debugging. Otherwise you
shouldn't notice it, because the exception is handled. But in either
case suggested patch wouldn't not qualify as solution. Note that with
the compiler flags used to build OpenSSL on MacOS X for PPC __ALTIVEC__
is *not* defined. This means that proposed patch would disable the probe
and consequently Altivec code even on Altivec-capable processors.
Altivec works without __ALTIVEC__ defined at compile time, because all
Altivec code resides in assembly modules. Well, "modules" is not really
correct, because there is only one for the moment, the
Vector-Permutation AES.

Anyway, if there is problem besides when debugging, then describe it. If
 solution is indeed required, then sysctl should be the way to go about
fixing it.

> -----------------------------------------------------------------------------------
> diff -urNd openssl-1.0.1i.orig/crypto/ppccap.c openssl-1.0.1i/crypto/ppccap.c
> --- openssl-1.0.1i.orig/crypto/ppccap.c       2014-08-07 06:10:56.000000000 
> +0900
> +++ openssl-1.0.1i/crypto/ppccap.c    2014-09-30 20:20:05.000000000 +0900
> @@ -84,6 +84,10 @@
>  
>       OPENSSL_ppccap_P = 0;
>  
> +#if (defined(__APPLE__) && !defined(__ALTIVEC__))
> +     return;
> +#endif
> +
>  #if defined(_AIX)
>       if (sizeof(size_t)==4
>  # if defined(_SC_AIX_KERNEL_BITMODE)
> 
> -----------------------------------------------------------------------------------


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to