Match output filename more precisely/carefully in sha512-{armv8, x86_64}.pl.

The output path is usually in a directory with a (hex) numerical name, and
it is very possible that that name may contain the substring "512". If so,
the old regex will do the wrong thing, generating the SHA-512 code twice
instead of generating one copy of the SHA-256 code and one copy of the
SHA-512 code. This has actually happened on Travis CI.
This commit is contained in:
Brian Smith 2017-03-18 13:32:54 -10:00
parent dd659d2994
commit d46aaf15bd
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ die "can't locate arm-xlate.pl";
open OUT,"| \"$^X\" $xlate $flavour $output";
*STDOUT=*OUT;
if ($output =~ /512/) {
if ($output =~ /sha512-armv8/) {
$BITS=512;
$SZ=8;
@Sigma0=(28,34,39);

View File

@ -120,7 +120,7 @@ $avx=1 if (!$shaext && $avx);
open OUT,"| \"$^X\" \"$xlate\" $flavour \"$output\"";
*STDOUT=*OUT;
if ($output =~ /512/) {
if ($output =~ /sha512-x86_64/) {
$func="GFp_sha512_block_data_order";
$TABLE="K512";
$SZ=8;