X509_LOOKUP_store: new X509_LOOKUP_METHOD that works by OSSL_STORE URI
[openssl.git] / crypto / armv4cpuid.pl
index 3a7be6e54136b1a9f458941c8f3fb95ee1b70120..6367cbffd71508efc8f402183ccc83b1a0901762 100644 (file)
@@ -7,21 +7,23 @@
 # https://www.openssl.org/source/license.html
 
 
-$flavour = shift;
-$output  = shift;
+# $output is the last argument if it looks like a file (it has an extension)
+# $flavour is the first argument if it doesn't look like a file
+$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
+$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
 
 $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or
 ( $xlate="${dir}perlasm/arm-xlate.pl" and -f $xlate) or
 die "can't locate arm-xlate.pl";
 
-open OUT,"| \"$^X\" $xlate $flavour $output";
+open OUT,"| \"$^X\" $xlate $flavour \"$output\""
+    or die "can't call $xlate: $!";
 *STDOUT=*OUT;
 
 $code.=<<___;
 #include "arm_arch.h"
 
-.text
 #if defined(__thumb2__) && !defined(__APPLE__)
 .syntax        unified
 .thumb
@@ -30,6 +32,8 @@ $code.=<<___;
 #undef __thumb2__
 #endif
 
+.text
+
 .align 5
 .global        OPENSSL_atomic_add
 .type  OPENSSL_atomic_add,%function