diff --git a/crypto/aes/Makefile b/crypto/aes/Makefile index 71db995736b730a2a1af389acfc1a894238e5204..8ed82c923898a7d3ad6c0549df8ebbaf7954e93b 100644 --- a/crypto/aes/Makefile +++ b/crypto/aes/Makefile @@ -68,7 +68,7 @@ aes-parisc.s: asm/aes-parisc.pl $(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@ # GNU make "catch all" -aes-%.s: asm/aes-%.pl; $(PERL) $< $(CFLAGS) > $@ +aes-%.s: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl index 690244111a6ed9f51e7debeb6fb787bf0d761e9b..5a736744a90e42b50a6b08e34a66db0d76836eae 100644 --- a/crypto/aes/asm/aes-armv4.pl +++ b/crypto/aes/asm/aes-armv4.pl @@ -22,6 +22,9 @@ # # AES_set_[en|de]crypt_key is added. +while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} +open STDOUT,">$output"; + $s0="r0"; $s1="r1"; $s2="r2"; @@ -1029,3 +1032,4 @@ ___ $code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4 print $code; +close STDOUT; # enforce flush diff --git a/crypto/bn/Makefile b/crypto/bn/Makefile index 134b4a977704743f48c7645a394ca5ff94a73bd0..272dd48765ded6d378d931c4c1057699792aee54 100644 --- a/crypto/bn/Makefile +++ b/crypto/bn/Makefile @@ -114,7 +114,7 @@ alpha-mont.s: asm/alpha-mont.pl $(PERL) $< | $(CC) -E - | tee $@ > /dev/null # GNU make "catch all" -%-mont.s: asm/%-mont.pl; $(PERL) $< $(CFLAGS) > $@ +%-mont.s: asm/%-mont.pl; $(PERL) $< $(PERLASM_SCHEME) $@ files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/modes/Makefile b/crypto/modes/Makefile index 6617619fa965fcf885af4156d8c46ec3ce5a3ed9..cbda0522cf07870f2bf9d1985f9caaab3ee59285 100644 --- a/crypto/modes/Makefile +++ b/crypto/modes/Makefile @@ -55,8 +55,9 @@ ghash-alpha.s: asm/ghash-alpha.pl $(PERL) $< | $(CC) -E - | tee $@ > /dev/null ghash-parisc.s: asm/ghash-parisc.pl $($PERL) asm/ghash-parisc.pl $(PERLASM_SCHEME) $@ + # GNU make "catch all" -ghash-%.s: asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $(CFLAGS) > $@ +ghash-%.s: asm/ghash-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl index 5385d39d5bc7da8722f4720101e39c55946386b3..45d79b6000eccda6b468c942783f9f7680e639fd 100644 --- a/crypto/modes/asm/ghash-armv4.pl +++ b/crypto/modes/asm/ghash-armv4.pl @@ -39,6 +39,9 @@ # *native* byte order on current platform. See gcm128.c for working # example... +while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} +open STDOUT,">$output"; + $Xi="r0"; # argument block $Htbl="r1"; $inp="r2"; @@ -59,9 +62,6 @@ $nhi="r14"; $rem_4bit=$inp; # used in gcm_gmult_4bit $cnt=$len; -$output=shift; -open STDOUT,">$output"; - sub Zsmash() { my $i=12; my @args=@_; diff --git a/crypto/sha/Makefile b/crypto/sha/Makefile index 3431f497c6d2ede71fa0740fd8faea2ae88c349d..75a1d460de1552f70cf8f4e595e1a802bc235c1e 100644 --- a/crypto/sha/Makefile +++ b/crypto/sha/Makefile @@ -79,9 +79,9 @@ sha256-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCH sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@ # GNU make "catch all" -sha1-%.s: asm/sha1-%.pl; $(PERL) $< $@ -sha256-%.s: asm/sha512-%.pl; $(PERL) $< $@ -sha512-%.s: asm/sha512-%.pl; $(PERL) $< $@ +sha1-%.s: asm/sha1-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ +sha256-%.s: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ +sha512-%.s: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@ files: $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO diff --git a/crypto/sha/asm/sha1-armv4-large.pl b/crypto/sha/asm/sha1-armv4-large.pl index c85fdb261ef03394802d414f6865d1bfd6f3f7df..4a3b3d5e6f146104bf487ebc7e2fdca67d5e5e01 100644 --- a/crypto/sha/asm/sha1-armv4-large.pl +++ b/crypto/sha/asm/sha1-armv4-large.pl @@ -39,7 +39,7 @@ # small and always slower. # [***] which is also ~35% better than compiler generated code. -$output=shift; +while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} open STDOUT,">$output"; $ctx="r0"; diff --git a/crypto/sha/asm/sha256-armv4.pl b/crypto/sha/asm/sha256-armv4.pl index 48d846deec36810fffc4dbacae782ddb487e9a7f..db87434f915eb99552014b122e4c28f079f2b416 100644 --- a/crypto/sha/asm/sha256-armv4.pl +++ b/crypto/sha/asm/sha256-armv4.pl @@ -13,7 +13,7 @@ # lute" terms is ~2250 cycles per 64-byte block or ~35 cycles per # byte. -$output=shift; +while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} open STDOUT,">$output"; $ctx="r0"; $t0="r0"; diff --git a/crypto/sha/asm/sha512-armv4.pl b/crypto/sha/asm/sha512-armv4.pl index 4fbb94a914faf8129d5b177cc1c6405e71d1ee43..7d27f0b78d88d544660b829c9f618b7c4cd99555 100644 --- a/crypto/sha/asm/sha512-armv4.pl +++ b/crypto/sha/asm/sha512-armv4.pl @@ -22,7 +22,7 @@ $hi=0; $lo=4; # ==================================================================== -$output=shift; +while (($output=shift) && ($output!~/^\w[\w\-]*\.\w+$/)) {} open STDOUT,">$output"; $ctx="r0";