Ticket #47035: fix-Apple-clang-version-detection.patch
File fix-Apple-clang-version-detection.patch, 9.2 KB (added by neverpanic (Clemens Lang), 9 years ago) |
---|
-
./crypto/aes/asm/aesni-mb-x86_64.pl
old new 63 63 $avx = ($1>=10) + ($1>=11); 64 64 } 65 65 66 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 66 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:clang|LLVM) version) ([2-9]\.[0-9]+)/) { 67 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 68 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 69 # see http://trac.macports.org/wiki/XcodeVersionInfo 70 $avx = ($2>=2.1) + ($2>=3.1); 71 } 72 73 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 67 74 $avx = ($2>=3.0) + ($2>3.0); 68 75 } 69 76 -
./crypto/aes/asm/aesni-sha1-x86_64.pl
old new 94 94 $avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) && 95 95 `ml64 2>&1` =~ /Version ([0-9]+)\./ && 96 96 $1>=10); 97 $avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/ && $2>=3.0); 97 # Apple clang 2.1 and 3.0 correspond to LLVM 3.0, see http://trac.macports.org/wiki/XcodeVersionInfo 98 $avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/ && $2>=2.1); 99 $avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/ && $2>=3.0); 98 100 99 101 $shaext=1; ### set to zero if compiling for 1.0.1 100 102 -
./crypto/aes/asm/aesni-sha256-x86_64.pl
old new 59 59 $avx = ($1>=10) + ($1>=12); 60 60 } 61 61 62 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 62 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:clang|LLVM) version) ([2-9]\.[0-9]+)/) { 63 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 64 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 65 # see http://trac.macports.org/wiki/XcodeVersionInfo 66 $avx = ($2>=2.1) + ($2>=3.1); 67 } 68 69 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 63 70 $avx = ($2>=3.0) + ($2>3.0); 64 71 } 65 72 -
./crypto/bn/asm/rsaz-x86_64.pl
old new 113 113 $addx = ($1>=12); 114 114 } 115 115 116 if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { 116 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:clang|LLVM) version) ([5-9])\.([0-9]+)/) { 117 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 118 $addx = ($ver>=5.00); # Apple LLVM version 5.0 corresponds to LLVM 3.3, see http://trac.macports.org/wiki/XcodeVersionInfo 119 } 120 121 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9])\.([0-9]+)/) { 117 122 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 118 123 $addx = ($ver>=3.03); 119 124 } -
./crypto/bn/asm/x86_64-mont.pl
old new 68 68 $addx = ($1>=12); 69 69 } 70 70 71 if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { 71 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:clang|LLVM) version) ([5-9])\.([0-9]+)/) { 72 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 73 $addx = ($ver>=5.00); # Apple LLVM version 5.0 corresponds to LLVM 3.3, see http://trac.macports.org/wiki/XcodeVersionInfo 74 } 75 76 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9])\.([0-9]+)/) { 72 77 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 73 78 $addx = ($ver>=3.03); 74 79 } -
./crypto/bn/asm/x86_64-mont5.pl
old new 53 53 $addx = ($1>=12); 54 54 } 55 55 56 if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { 56 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:clang|LLVM) version) ([5-9])\.([0-9]+)/) { 57 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 58 $addx = ($ver>=5.00); # Apple LLVM version 5.0 corresponds to LLVM 3.3, see http://trac.macports.org/wiki/XcodeVersionInfo 59 } 60 61 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9])\.([0-9]+)/) { 57 62 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 58 63 $addx = ($ver>=3.03); 59 64 } -
./crypto/ec/asm/ecp_nistz256-x86_64.pl
old new 81 81 $addx = ($1>=12); 82 82 } 83 83 84 if (!$addx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9])\.([0-9]+)/) { 84 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:clang|LLVM) version) ([2-9])\.([0-9]+)/) { 85 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 86 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 87 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 88 $avx = ($ver>=2.01) + ($ver>=3.01); 89 # Apple LLVM version 5.0 corresponds to LLVM 3.3 90 $addx = ($ver>=5.00); 91 } 92 93 if (!$addx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9])\.([0-9]+)/) { 85 94 my $ver = $2 + $3/100.0; # 3.1->3.01, 3.10->3.10 86 95 $avx = ($ver>=3.0) + ($ver>=3.01); 87 96 $addx = ($ver>=3.03); -
./crypto/modes/asm/aesni-gcm-x86_64.pl
old new 56 56 $avx = ($1>=10) + ($1>=11); 57 57 } 58 58 59 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 59 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/) { 60 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 61 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 62 $avx = ($2>=2.1) + ($2>=3.1); 63 } 64 65 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 60 66 $avx = ($2>=3.0) + ($2>3.0); 61 67 } 62 68 -
./crypto/modes/asm/ghash-x86_64.pl
old new 105 105 $avx = ($1>=10) + ($1>=11); 106 106 } 107 107 108 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 108 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/) { 109 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 110 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 111 $avx = ($2>=2.1) + ($2>=3.1); 112 } 113 114 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 109 115 $avx = ($2>=3.0) + ($2>3.0); 110 116 } 111 117 -
./crypto/sha/asm/sha1-mb-x86_64.pl
old new 58 58 $avx = ($1>=10) + ($1>=11); 59 59 } 60 60 61 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 61 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/) { 62 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 63 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 64 $avx = ($2>=2.1) + ($2>=3.1); 65 } 66 67 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 62 68 $avx = ($2>=3.0) + ($2>3.0); 63 69 } 64 70 -
./crypto/sha/asm/sha1-x86_64.pl
old new 107 107 $avx = ($1>=10) + ($1>=11); 108 108 } 109 109 110 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([2-9]\.[0-9]+)/) { 110 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/) { 111 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 112 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 113 $avx = ($2>=2.1) + ($2>=3.1); 114 } 115 116 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 111 117 $avx = ($2>=3.0) + ($2>3.0); 112 118 } 113 119 -
./crypto/sha/asm/sha256-mb-x86_64.pl
old new 59 59 $avx = ($1>=10) + ($1>=11); 60 60 } 61 61 62 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 62 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/) { 63 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 64 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 65 $avx = ($2>=2.1) + ($2>=3.1); 66 } 67 68 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 63 69 $avx = ($2>=3.0) + ($2>3.0); 64 70 } 65 71 -
./crypto/sha/asm/sha512-x86_64.pl
old new 124 124 $avx = ($1>=10) + ($1>=11); 125 125 } 126 126 127 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|based on LLVM) ([3-9]\.[0-9]+)/) { 127 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^Apple (?:^clang|LLVM) version) ([2-9]\.[0-9]+)/) { 128 # Apple clang versions 2.1 and 3.0 correspond to LLVM 3.0 129 # Apple clang versions 3.1 and 4.1 correspond to LLVM 3.1 130 $avx = ($2>=2.1) + ($2>=3.1); 131 } 132 133 if (!$avx && `$ENV{CC} -v 2>&1` =~ /(^clang version|based on LLVM) ([3-9]\.[0-9]+)/) { 128 134 $avx = ($2>=3.0) + ($2>3.0); 129 135 } 130 136