diff options
author | Brent Cook <bcook@openbsd.org> | 2014-12-07 18:33:22 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-12-07 18:50:58 -0600 |
commit | 6f6ca9dcf0a67715dbdc8fe49cfc5a149e8805ac (patch) | |
tree | c4168afb294a7e678c18135adbc07a8467f65d8a | |
parent | 5109e657df4a8b2e7e64633eea8db2811fab0ff3 (diff) | |
download | portable-6f6ca9dcf0a67715dbdc8fe49cfc5a149e8805ac.tar.gz portable-6f6ca9dcf0a67715dbdc8fe49cfc5a149e8805ac.tar.bz2 portable-6f6ca9dcf0a67715dbdc8fe49cfc5a149e8805ac.zip |
use the new $MV macro to generate assembly files
Avoid spurious rebuilds running update.sh by generating a temp file and
comparing the result to the existing one.
-rwxr-xr-x | update.sh | 46 |
1 files changed, 27 insertions, 19 deletions
@@ -119,27 +119,35 @@ $CP crypto/compat/ui_openssl_win.c crypto/ui | |||
119 | 119 | ||
120 | # generate assembly crypto algorithms | 120 | # generate assembly crypto algorithms |
121 | asm_src=$libssl_src/src/crypto | 121 | asm_src=$libssl_src/src/crypto |
122 | gen_asm_stdout() { | ||
123 | perl $asm_src/$2 $1 > $3.tmp | ||
124 | $MV $3.tmp $3 | ||
125 | } | ||
126 | gen_asm() { | ||
127 | perl $asm_src/$2 $1 $3.tmp | ||
128 | $MV $3.tmp $3 | ||
129 | } | ||
122 | for abi in elf macosx; do | 130 | for abi in elf macosx; do |
123 | echo generating ASM source for $abi | 131 | echo generating ASM source for $abi |
124 | perl $asm_src/aes/asm/aes-x86_64.pl $abi > crypto/aes/aes-${abi}-x86_64.s | 132 | gen_asm_stdout $abi aes/asm/aes-x86_64.pl crypto/aes/aes-$abi-x86_64.s |
125 | perl $asm_src/aes/asm/vpaes-x86_64.pl $abi > crypto/aes/vpaes-${abi}-x86_64.s | 133 | gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl crypto/aes/vpaes-$abi-x86_64.s |
126 | perl $asm_src/aes/asm/bsaes-x86_64.pl $abi > crypto/aes/bsaes-${abi}-x86_64.s | 134 | gen_asm_stdout $abi aes/asm/bsaes-x86_64.pl crypto/aes/bsaes-$abi-x86_64.s |
127 | perl $asm_src/aes/asm/aesni-x86_64.pl $abi > crypto/aes/aesni-${abi}-x86_64.s | 135 | gen_asm_stdout $abi aes/asm/aesni-x86_64.pl crypto/aes/aesni-$abi-x86_64.s |
128 | perl $asm_src/aes/asm/aesni-sha1-x86_64.pl $abi > crypto/aes/aesni-sha1-${abi}-x86_64.s | 136 | gen_asm_stdout $abi aes/asm/aesni-sha1-x86_64.pl crypto/aes/aesni-sha1-$abi-x86_64.s |
129 | perl $asm_src/bn/asm/modexp512-x86_64.pl $abi > crypto/bn/modexp512-${abi}-x86_64.s | 137 | gen_asm_stdout $abi bn/asm/modexp512-x86_64.pl crypto/bn/modexp512-$abi-x86_64.s |
130 | perl $asm_src/bn/asm/x86_64-mont.pl $abi > crypto/bn/mont-${abi}-x86_64.s | 138 | gen_asm_stdout $abi bn/asm/x86_64-mont.pl crypto/bn/mont-$abi-x86_64.s |
131 | perl $asm_src/bn/asm/x86_64-mont5.pl $abi > crypto/bn/mont5-${abi}-x86_64.s | 139 | gen_asm_stdout $abi bn/asm/x86_64-mont5.pl crypto/bn/mont5-$abi-x86_64.s |
132 | perl $asm_src/bn/asm/x86_64-gf2m.pl $abi > crypto/bn/gf2m-${abi}-x86_64.s | 140 | gen_asm_stdout $abi bn/asm/x86_64-gf2m.pl crypto/bn/gf2m-$abi-x86_64.s |
133 | perl $asm_src/camellia/asm/cmll-x86_64.pl $abi > crypto/camellia/cmll-${abi}-x86_64.s | 141 | gen_asm_stdout $abi camellia/asm/cmll-x86_64.pl crypto/camellia/cmll-$abi-x86_64.s |
134 | perl $asm_src/md5/asm/md5-x86_64.pl $abi > crypto/md5/md5-${abi}-x86_64.s | 142 | gen_asm_stdout $abi md5/asm/md5-x86_64.pl crypto/md5/md5-$abi-x86_64.s |
135 | perl $asm_src/modes/asm/ghash-x86_64.pl $abi > crypto/modes/ghash-${abi}-x86_64.s | 143 | gen_asm_stdout $abi modes/asm/ghash-x86_64.pl crypto/modes/ghash-$abi-x86_64.s |
136 | perl $asm_src/rc4/asm/rc4-x86_64.pl $abi > crypto/rc4/rc4-${abi}-x86_64.s | 144 | gen_asm_stdout $abi rc4/asm/rc4-x86_64.pl crypto/rc4/rc4-$abi-x86_64.s |
137 | perl $asm_src/rc4/asm/rc4-md5-x86_64.pl $abi > crypto/rc4/rc4-md5-${abi}-x86_64.s | 145 | gen_asm_stdout $abi rc4/asm/rc4-md5-x86_64.pl crypto/rc4/rc4-md5-$abi-x86_64.s |
138 | perl $asm_src/sha/asm/sha1-x86_64.pl $abi > crypto/sha/sha1-${abi}-x86_64.s | 146 | gen_asm_stdout $abi sha/asm/sha1-x86_64.pl crypto/sha/sha1-$abi-x86_64.s |
139 | perl $asm_src/sha/asm/sha512-x86_64.pl $abi crypto/sha/sha256-${abi}-x86_64.S | 147 | gen_asm $abi sha/asm/sha512-x86_64.pl crypto/sha/sha256-$abi-x86_64.S |
140 | perl $asm_src/sha/asm/sha512-x86_64.pl $abi crypto/sha/sha512-${abi}-x86_64.S | 148 | gen_asm $abi sha/asm/sha512-x86_64.pl crypto/sha/sha512-$abi-x86_64.S |
141 | perl $asm_src/whrlpool/asm/wp-x86_64.pl $abi > crypto/whrlpool/wp-${abi}-x86_64.s | 149 | gen_asm_stdout $abi whrlpool/asm/wp-x86_64.pl crypto/whrlpool/wp-$abi-x86_64.s |
142 | perl $asm_src/x86_64cpuid.pl $abi crypto/cpuid-${abi}-x86_64.S | 150 | gen_asm $abi x86_64cpuid.pl crypto/cpuid-$abi-x86_64.S |
143 | done | 151 | done |
144 | 152 | ||
145 | # copy libtls source | 153 | # copy libtls source |