summaryrefslogtreecommitdiffstats
path: root/crypto/sha
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2018-03-14 17:23:16 +0100
committerAndy Polyakov <appro@openssl.org>2018-03-19 14:31:30 +0100
commit9d3cab4bdb03ed740e009503088b0d3c21072eea (patch)
tree40ebe1f89b769d925e757cd4dfd72fb5cc09306f /crypto/sha
parentConfigurations/15-android.conf: refine clang support. (diff)
downloadopenssl-9d3cab4bdb03ed740e009503088b0d3c21072eea.tar.xz
openssl-9d3cab4bdb03ed740e009503088b0d3c21072eea.zip
MIPS assembly pack: default heuristic detection to little-endian.
Current endianness detection is somewhat opportunistic and can fail in cross-compile scenario. Since we are more likely to cross-compile for little-endian now, adjust the default accordingly. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5613)
Diffstat (limited to 'crypto/sha')
-rw-r--r--crypto/sha/asm/sha1-mips.pl2
-rw-r--r--crypto/sha/asm/sha512-mips.pl2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/sha/asm/sha1-mips.pl b/crypto/sha/asm/sha1-mips.pl
index 71dc722564..f6bbfb9111 100644
--- a/crypto/sha/asm/sha1-mips.pl
+++ b/crypto/sha/asm/sha1-mips.pl
@@ -75,7 +75,7 @@ if ($flavour =~ /64|n32/i) {
#
######################################################################
-$big_endian=(`echo MIPSEL | $ENV{CC} -E -`=~/MIPSEL/)?1:0 if ($ENV{CC});
+$big_endian=(`echo MIPSEB | $ENV{CC} -E -`=~/MIPSEB/)?0:1 if ($ENV{CC});
for (@ARGV) { $output=$_ if (/\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";
diff --git a/crypto/sha/asm/sha512-mips.pl b/crypto/sha/asm/sha512-mips.pl
index e6fd2687f8..285a717660 100644
--- a/crypto/sha/asm/sha512-mips.pl
+++ b/crypto/sha/asm/sha512-mips.pl
@@ -81,7 +81,7 @@ $pf = ($flavour =~ /nubi/i) ? $t0 : $t2;
#
######################################################################
-$big_endian=(`echo MIPSEL | $ENV{CC} -E -`=~/MIPSEL/)?1:0 if ($ENV{CC});
+$big_endian=(`echo MIPSEB | $ENV{CC} -E -`=~/MIPSEB/)?0:1 if ($ENV{CC});
for (@ARGV) { $output=$_ if (/\w[\w\-]*\.\w+$/); }
open STDOUT,">$output";