git: f96b08d9a280 - main - mail/usendmail: fix build on non-x86
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 10 Oct 2026 18:16:21 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=f96b08d9a280775b1cbdec5932d6ec2839065273
commit f96b08d9a280775b1cbdec5932d6ec2839065273
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-08 19:26:50 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-10 18:15:18 +0000
mail/usendmail: fix build on non-x86
Only use regparm on x86 instead of forcing GCC, whose current version
rejects the implicit declarations in the configure probes.
---
mail/usendmail/Makefile | 6 ------
mail/usendmail/files/patch-src_attributes.h | 11 +++++++++++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/mail/usendmail/Makefile b/mail/usendmail/Makefile
index 8097c53d0d55..0a5b2a849ab0 100644
--- a/mail/usendmail/Makefile
+++ b/mail/usendmail/Makefile
@@ -19,12 +19,6 @@ SUB_LIST= QMAIL_PREFIX=${QMAIL_PREFIX}
OPTIONS_DEFINE= DOCS
-.include <bsd.port.options.mk>
-
-.if ${ARCH} != amd64 && ${ARCH} != i386
-USES+= compiler:gcc-c++11-lib
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_PREFIX},' \
${WRKSRC}/src/usendmail.c
diff --git a/mail/usendmail/files/patch-src_attributes.h b/mail/usendmail/files/patch-src_attributes.h
new file mode 100644
index 000000000000..1a2becd4a3b7
--- /dev/null
+++ b/mail/usendmail/files/patch-src_attributes.h
@@ -0,0 +1,11 @@
+--- src/attributes.h.orig 2003-04-24 07:07:23 UTC
++++ src/attributes.h
+@@ -71,7 +71,7 @@
+
+ #define attribute_inline __inline__
+
+-#if GNUC_MINIMUM(2,7) /* doesn't work reliable before, IIRC */
++#if GNUC_MINIMUM(2,7) && (defined(__i386__) || defined(__x86_64__)) /* doesn't work reliable before, IIRC */
+ # define attribute_regparm(x) __attribute__((__regparm__((x))))
+ #else
+ # define attribute_regparm(x)