aboutsummaryrefslogtreecommitdiff
path: root/update.sh
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2019-01-20 19:56:07 -0600
committerBrent Cook <busterb@gmail.com>2019-01-20 20:03:37 -0600
commit72bb1ed61834c37819c9d4fce516a0360ca0095e (patch)
tree2921206ebe196551cf3d74b5a759653fa4836460 /update.sh
parent74553e53aa4a5486b800f91bf42c50fedb16d65d (diff)
downloadportable-72bb1ed61834c37819c9d4fce516a0360ca0095e.tar.gz
portable-72bb1ed61834c37819c9d4fce516a0360ca0095e.tar.bz2
portable-72bb1ed61834c37819c9d4fce516a0360ca0095e.zip
generate masm and mingw64 assembly
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/update.sh b/update.sh
index 7c656c2..4646bd1 100755
--- a/update.sh
+++ b/update.sh
@@ -161,7 +161,11 @@ $GREP -v OPENSSL_ia32cap_P $libcrypto_src/Symbols.list | $GREP '^[A-Za-z0-9_]' >
161# generate assembly crypto algorithms 161# generate assembly crypto algorithms
162asm_src=$libcrypto_src 162asm_src=$libcrypto_src
163gen_asm_stdout() { 163gen_asm_stdout() {
164 perl $asm_src/$2 $1 > $3.tmp 164 if [ $1 = "mingw64" ]; then
165 CC=true perl $asm_src/$2 $1 > $3.tmp
166 else
167 perl $asm_src/$2 $1 > $3.tmp
168 fi
165 [ $1 = "elf" ] && cat <<-EOF >> $3.tmp 169 [ $1 = "elf" ] && cat <<-EOF >> $3.tmp
166 #if defined(HAVE_GNU_STACK) 170 #if defined(HAVE_GNU_STACK)
167 .section .note.GNU-stack,"",%progbits 171 .section .note.GNU-stack,"",%progbits
@@ -170,7 +174,11 @@ gen_asm_stdout() {
170 $MV $3.tmp $3 174 $MV $3.tmp $3
171} 175}
172gen_asm() { 176gen_asm() {
173 perl $asm_src/$2 $1 $3.tmp 177 if [ $1 = "mingw64" ]; then
178 CC=true perl $asm_src/$2 $1 $3.tmp
179 else
180 perl $asm_src/$2 $1 $3.tmp
181 fi
174 [ $1 = "elf" ] && cat <<-EOF >> $3.tmp 182 [ $1 = "elf" ] && cat <<-EOF >> $3.tmp
175 #if defined(HAVE_GNU_STACK) 183 #if defined(HAVE_GNU_STACK)
176 .section .note.GNU-stack,"",%progbits 184 .section .note.GNU-stack,"",%progbits
@@ -191,7 +199,7 @@ $CP $libcrypto_src/armv4cpuid.S crypto
191$CP $libcrypto_src/armcap.c crypto 199$CP $libcrypto_src/armcap.c crypto
192$CP $libcrypto_src/arm_arch.h crypto 200$CP $libcrypto_src/arm_arch.h crypto
193 201
194for abi in elf macosx; do 202for abi in elf macosx masm mingw64; do
195 echo generating x86_64 ASM source for $abi 203 echo generating x86_64 ASM source for $abi
196 gen_asm_stdout $abi aes/asm/aes-x86_64.pl crypto/aes/aes-$abi-x86_64.S 204 gen_asm_stdout $abi aes/asm/aes-x86_64.pl crypto/aes/aes-$abi-x86_64.S
197 gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl crypto/aes/vpaes-$abi-x86_64.S 205 gen_asm_stdout $abi aes/asm/vpaes-x86_64.pl crypto/aes/vpaes-$abi-x86_64.S