summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2008-01-13 17:42:04 +0000
committerAndy Polyakov <appro@openssl.org>2008-01-13 17:42:04 +0000
commitabe7f8b457c29af112005e821b57c0a355df82c5 (patch)
tree08cbc80a4d96fc0c183709def3ff9ca6b0db7cda /crypto
parenta078befcbef26abe2798504c81a787ea0967ba5d (diff)
Make all x86_64 modules independent on current working directory.
Diffstat (limited to 'crypto')
-rwxr-xr-xcrypto/md5/asm/md5-x86_64.pl8
-rw-r--r--crypto/whrlpool/asm/wp-x86_64.pl8
-rw-r--r--crypto/x86_64cpuid.pl4
3 files changed, 17 insertions, 3 deletions
diff --git a/crypto/md5/asm/md5-x86_64.pl b/crypto/md5/asm/md5-x86_64.pl
index 4330eddb17..493231401e 100755
--- a/crypto/md5/asm/md5-x86_64.pl
+++ b/crypto/md5/asm/md5-x86_64.pl
@@ -109,7 +109,13 @@ EOF
}
my $output = shift;
-open STDOUT,"| $^X ../perlasm/x86_64-xlate.pl $output";
+
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
+( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or
+( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
+die "can't locate x86_64-xlate.pl";
+
+open STDOUT,"| $^X $xlate $output";
$code .= <<EOF;
.text
diff --git a/crypto/whrlpool/asm/wp-x86_64.pl b/crypto/whrlpool/asm/wp-x86_64.pl
index 3855382036..41bf3b2025 100644
--- a/crypto/whrlpool/asm/wp-x86_64.pl
+++ b/crypto/whrlpool/asm/wp-x86_64.pl
@@ -31,7 +31,13 @@
# operand.
$output=shift;
-open STDOUT,"| $^X ../perlasm/x86_64-xlate.pl $output";
+
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; my $dir=$1; my $xlate;
+( $xlate="${dir}x86_64-xlate.pl" and -f $xlate ) or
+( $xlate="${dir}../../perlasm/x86_64-xlate.pl" and -f $xlate) or
+die "can't locate x86_64-xlate.pl";
+
+open STDOUT,"| $^X $xlate $output";
sub L() { $code.=".byte ".join(',',@_)."\n"; }
sub LL(){ $code.=".byte ".join(',',@_).",".join(',',@_)."\n"; }
diff --git a/crypto/x86_64cpuid.pl b/crypto/x86_64cpuid.pl
index a8049def18..18a2867036 100644
--- a/crypto/x86_64cpuid.pl
+++ b/crypto/x86_64cpuid.pl
@@ -99,7 +99,9 @@ OPENSSL_wipe_cpu:
___
-open STDOUT,"| $^X perlasm/x86_64-xlate.pl $output";
+$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
+open STDOUT,"| $^X $dir/perlasm/x86_64-xlate.pl $output";
+
print<<___;
.text