git: 0be8c2b26aa7 - main - security/nettle: fix build on powerpc64*

Piotr Kubaj pkubaj at FreeBSD.org
Tue Apr 6 12:30:29 UTC 2021


The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0be8c2b26aa7569164cf4103d11bce97404667fd

commit 0be8c2b26aa7569164cf4103d11bce97404667fd
Author:     Piotr Kubaj <pkubaj at FreeBSD.org>
AuthorDate: 2021-04-06 12:29:52 +0000
Commit:     Piotr Kubaj <pkubaj at FreeBSD.org>
CommitDate: 2021-04-06 12:29:52 +0000

    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
---
 .../patch-powerpc64-p8-aes-decrypt-internal.asm       | 19 +++++++++++++++++++
 .../patch-powerpc64-p8-aes-encrypt-internal.asm       | 19 +++++++++++++++++++
 2 files changed, 38 insertions(+)

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')


More information about the dev-commits-ports-all mailing list