Make all x86_64 modules independent on current working directory.

This commit is contained in:
Andy Polyakov 2008-01-13 17:42:04 +00:00
parent a078befcbe
commit abe7f8b457
3 changed files with 17 additions and 3 deletions

View File

@ -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

View File

@ -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"; }

View File

@ -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