aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2021-04-06 12:29:52 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2021-04-06 12:29:52 +0000
commit0be8c2b26aa7569164cf4103d11bce97404667fd (patch)
tree0b9570363896b7dffe2027e70bc5e7cf68e64a4b /security
parent2efdd7b5cb59bf6e747f77722b0e0b8cf0e4dac2 (diff)
downloadports-0be8c2b26aa7569164cf4103d11bce97404667fd.tar.gz
ports-0be8c2b26aa7569164cf4103d11bce97404667fd.zip
security/nettle: fix build on powerpc64*
Due to the string "swap_mask" being replaced with the vector register, the assembly label pointing at the local data variable .swap_mask was being replaced as well, causing the local label to be named ".0", which the clang integrated assembler treats as a syntax error. Change the name to .swap_data. Submitted by: bdragon
Diffstat (limited to 'security')
-rw-r--r--security/nettle/patch-powerpc64-p8-aes-decrypt-internal.asm19
-rw-r--r--security/nettle/patch-powerpc64-p8-aes-encrypt-internal.asm19
2 files changed, 38 insertions, 0 deletions
diff --git a/security/nettle/patch-powerpc64-p8-aes-decrypt-internal.asm b/security/nettle/patch-powerpc64-p8-aes-decrypt-internal.asm
new file mode 100644
index 000000000000..2ade3b44fdaa
--- /dev/null
+++ b/security/nettle/patch-powerpc64-p8-aes-decrypt-internal.asm
@@ -0,0 +1,19 @@
+--- powerpc64/p8/aes-decrypt-internal.asm.orig 2021-04-03 16:33:37.883035000 -0500
++++ powerpc64/p8/aes-decrypt-internal.asm 2021-04-03 16:34:24.022307000 -0500
+@@ -71,7 +71,7 @@ define(`FUNC_ALIGN', `5')
+ PROLOGUE(_nettle_aes_decrypt)
+ vxor ZERO,ZERO,ZERO
+
+- DATA_LOAD_VEC(swap_mask,.swap_mask,r5)
++ DATA_LOAD_VEC(swap_mask,.swap_data,r5)
+
+ subi ROUNDS,ROUNDS,1
+ srdi LENGTH,LENGTH,4
+@@ -351,6 +351,6 @@ EPILOGUE(_nettle_aes_decrypt)
+
+ .data
+ .align 4
+-.swap_mask:
++.swap_data:
+ IF_LE(`.byte 8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7')
+ IF_BE(`.byte 3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12')
diff --git a/security/nettle/patch-powerpc64-p8-aes-encrypt-internal.asm b/security/nettle/patch-powerpc64-p8-aes-encrypt-internal.asm
new file mode 100644
index 000000000000..effecd530cc8
--- /dev/null
+++ b/security/nettle/patch-powerpc64-p8-aes-encrypt-internal.asm
@@ -0,0 +1,19 @@
+--- powerpc64/p8/aes-encrypt-internal.asm.orig 2021-04-03 16:33:26.104735000 -0500
++++ powerpc64/p8/aes-encrypt-internal.asm 2021-04-03 16:34:43.805790000 -0500
+@@ -63,7 +63,7 @@ define(`S7', `v9')
+
+ define(`FUNC_ALIGN', `5')
+ PROLOGUE(_nettle_aes_encrypt)
+- DATA_LOAD_VEC(swap_mask,.swap_mask,r5)
++ DATA_LOAD_VEC(swap_mask,.swap_data,r5)
+
+ subi ROUNDS,ROUNDS,1
+ srdi LENGTH,LENGTH,4
+@@ -328,6 +328,6 @@ EPILOGUE(_nettle_aes_encrypt)
+
+ .data
+ .align 4
+-.swap_mask:
++.swap_data:
+ IF_LE(`.byte 8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7')
+ IF_BE(`.byte 3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12')