Following the license change, modify the boilerplates in crypto/sha/
[oweals/openssl.git] / crypto / sha / asm / sha1-parisc.pl
index 822288e66104a53f8b30ee64a4c914675564a787..11f5b39997091a443767fe4210df3db6b747bf74 100644 (file)
@@ -1,7 +1,7 @@
 #! /usr/bin/env perl
-# Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved.
+# Copyright 2009-2018 The OpenSSL Project Authors. All Rights Reserved.
 #
-# Licensed under the OpenSSL license (the "License").  You may not use
+# Licensed under the Apache License 2.0 (the "License").  You may not use
 # this file except in compliance with the License.  You can obtain a copy
 # in the file LICENSE in the source distribution or at
 # https://www.openssl.org/source/license.html
@@ -260,8 +260,20 @@ $code.=<<___;
        .STRINGZ "SHA1 block transform for PA-RISC, CRYPTOGAMS by <appro\@openssl.org>"
 ___
 
-$code =~ s/\`([^\`]*)\`/eval $1/gem;
-$code =~ s/,\*/,/gm            if ($SIZE_T==4);
-$code =~ s/\bbv\b/bve/gm       if ($SIZE_T==8);
-print $code;
+if (`$ENV{CC} -Wa,-v -c -o /dev/null -x assembler /dev/null 2>&1`
+       =~ /GNU assembler/) {
+    $gnuas = 1;
+}
+
+foreach(split("\n",$code)) {
+       s/\`([^\`]*)\`/eval $1/ge;
+
+       s/(\.LEVEL\s+2\.0)W/$1w/        if ($gnuas && $SIZE_T==8);
+       s/\.SPACE\s+\$TEXT\$/.text/     if ($gnuas && $SIZE_T==8);
+       s/\.SUBSPA.*//                  if ($gnuas && $SIZE_T==8);
+       s/,\*/,/                        if ($SIZE_T==4);
+       s/\bbv\b/bve/                   if ($SIZE_T==8);
+
+       print $_,"\n";
+}
 close STDOUT;