git: c35577ebc10a - main - security/libgcrypt: Circumvent WITH_DEBUG build failure
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 05 Dec 2022 19:53:09 UTC
The branch main has been updated by cy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c35577ebc10af5ae8c509e4c73a44a06ac5b05d4
commit c35577ebc10af5ae8c509e4c73a44a06ac5b05d4
Author: Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-12-05 15:58:23 +0000
Commit: Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-12-05 19:52:37 +0000
security/libgcrypt: Circumvent WITH_DEBUG build failure
Register allocation exaustion results within inline assembly when
WITH_DEBUG is specified. Therefore when WITH_DEBUG is used, disable
inline assembly.
PR: 268173
Reported by: bofh
MFH: 2022Q4
---
security/libgcrypt/Makefile | 4 ++++
security/libgcrypt/files/patch-tests_basic.c | 29 ++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/security/libgcrypt/Makefile b/security/libgcrypt/Makefile
index 85dd47823d00..d6a3c5aef1b8 100644
--- a/security/libgcrypt/Makefile
+++ b/security/libgcrypt/Makefile
@@ -45,6 +45,10 @@ STATIC_CONFIGURE_ENABLE= static
CONFIGURE_ARGS+= --disable-jent-support
.endif
+.if defined(WITH_DEBUG)
+CFLAGS+= -DWITH_DEBUG
+.endif
+
post-patch:
@${RM} ${WRKSRC}/doc/gcrypt.info*
@${REINPLACE_CMD} -e 's|ALIGN (3)|ALIGN (2)|g' ${WRKSRC}/mpi/i386/*.S
diff --git a/security/libgcrypt/files/patch-tests_basic.c b/security/libgcrypt/files/patch-tests_basic.c
new file mode 100644
index 000000000000..4735524ff689
--- /dev/null
+++ b/security/libgcrypt/files/patch-tests_basic.c
@@ -0,0 +1,29 @@
+--- tests/basic.c.orig 2021-08-22 04:56:06.000000000 -0700
++++ tests/basic.c 2022-12-05 07:46:59.768944000 -0800
+@@ -38,6 +38,10 @@
+ #else
+ # define ALWAYS_INLINE
+ #endif
++#ifdef WITH_DEBUG
++# undef ALWAYS_INLINE
++# define ALWAYS_INLINE
++#endif
+
+ typedef struct test_spec_pubkey_key
+ {
+@@ -214,6 +218,7 @@
+ }
+
+
++#ifndef WITH_DEBUG
+ #if defined(__x86_64__) && defined(HAVE_GCC_INLINE_ASM_SSSE3) && \
+ (defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) || \
+ defined(HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS))
+@@ -233,6 +238,7 @@
+ defined(__ARM_NEON)
+ # define CLUTTER_VECTOR_REGISTER_NEON 1
+ # define CLUTTER_VECTOR_REGISTER_COUNT 16
++#endif
+ #endif
+
+