]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
MIPS assembly pack: default heuristic detection to little-endian.
authorAndy Polyakov <appro@openssl.org>
Wed, 14 Mar 2018 16:23:16 +0000 (17:23 +0100)
committerAndy Polyakov <appro@openssl.org>
Mon, 19 Mar 2018 13:31:30 +0000 (14:31 +0100)
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)

crypto/aes/asm/aes-mips.pl
crypto/sha/asm/sha1-mips.pl
crypto/sha/asm/sha512-mips.pl

index d81d76d77ad611d1c9f4789827d9b780e0f9b5f4..9334d8fbbfec7b3eef1bbc743c168edca42d43fd 100644 (file)
@@ -88,7 +88,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";
index 71dc722564a14d97a8d6df4786c2b77a248b1e4d..f6bbfb91111595e081d02e45a9a700757e7b7bde 100644 (file)
@@ -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";
index e6fd2687f887c1c7d5d340860002ce4f3aa4398a..285a7176604e95d07c85666a86580375ef546b00 100644 (file)
@@ -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";