aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2022-12-05 15:58:23 +0000
committerCy Schubert <cy@FreeBSD.org>2022-12-05 19:52:37 +0000
commitc35577ebc10af5ae8c509e4c73a44a06ac5b05d4 (patch)
tree5d6d4a4bedbb5c7689a0ed16dd25c8ea935ce814
parente5e31e3f2f02d5128c018fa0d2a035da8648297b (diff)
downloadports-c35577ebc10af5ae8c509e4c73a44a06ac5b05d4.tar.gz
ports-c35577ebc10af5ae8c509e4c73a44a06ac5b05d4.zip
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
-rw-r--r--security/libgcrypt/Makefile4
-rw-r--r--security/libgcrypt/files/patch-tests_basic.c29
2 files changed, 33 insertions, 0 deletions
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
+
+