Hi,

I just found the perl script for x86_64 assembly failed to detect Xcode 7 
environment (Apple LLVM 7.x), and skipped generating AVX code for MAC OS ($avx 
variable is always false). The reason is Apple since Xcode 7.0 removed string 
"based on LLVM x.y.z" from version information. Now the clang -v command 
returns:


Apple LLVM version 7.0.0 (clang-700.1.76)

Target: x86_64-apple-darwin15.0.0

Thread model: posix

So the way to detect compiler version becomes to check either "LLVM version" or 
"clang-". Here is a patch to check the first string (take rsaz-avx2.pl as an 
example):


if (!$avx && `$ENV{CC} -v 2>&1` =~ /LLVM version ([0-9]+)\./) {

$avx = ($1>=5) + ($1>=5);

$addx = ($1>=5);

}

Version number 5 is used but not 7 due to the reason Apple start AVX support 
from Xcode 5 (LLVM 5).

A list of Xcode records can be found here:
https://gist.github.com/yamaya/2924292
[https://avatars0.githubusercontent.com/u/278790?v=3&s=400]<https://gist.github.com/yamaya/2924292>

Xcode clang version record ยท GitHub
After today's update of command line tools/xcode I get: About Xcode: Version 
6.3 (6D570) /usr/bin/clang++ --version Apple LLVM version 6.1.0 
(clang-602.0.49) (based ...
Read more...<https://gist.github.com/yamaya/2924292>





This email and any attachments are for the sole use of the intended recipients 
and may be privileged or confidential. Any distribution, printing or other use 
by anyone else is prohibited. If you are not an intended recipient, please 
contact the sender immediately, and permanently delete this email and 
attachments.

_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-...@openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod
_______________________________________________
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to