Fixed issue where DRBG_CTR fails if NO_DF is used - when entropy is called
[openssl.git] / crypto / pariscid.pl
index 3e26f8eccfdc1806c59bc80eb774acbc0fb9d37b..5a231c49f02a0a8df7a0b85b4f4db04c2d7630f2 100644 (file)
@@ -1,5 +1,5 @@
 #! /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
 # this file except in compliance with the License.  You can obtain a copy
@@ -255,9 +255,22 @@ L\$done2
        .PROCEND
 ___
 }
-$code =~ s/cmpib,\*/comib,/gm  if ($SIZE_T==4);
-$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/(\.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/cmpib,\*/comib,/              if ($SIZE_T==4);
+       s/,\*/,/                        if ($SIZE_T==4);
+       s/\bbv\b/bve/                   if ($SIZE_T==8);
+
+       print $_,"\n";
+}
 close STDOUT;