git: 07722f6ed2aa - main - net/openmpi: Fix 16 byte atomic operations on amd64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 12 Mar 2025 01:20:26 UTC
The branch main has been updated by vvd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=07722f6ed2aa26e76ae830cfc26341788f4b7195
commit 07722f6ed2aa26e76ae830cfc26341788f4b7195
Author: Laurent Chardon <laurent.chardon@gmail.com>
AuthorDate: 2025-03-12 01:16:12 +0000
Commit: Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-03-12 01:16:12 +0000
net/openmpi: Fix 16 byte atomic operations on amd64
Clang does not support 16 byte atomic operations without -mcx16 on amd64
Upstream issue: https://github.com/open-mpi/ompi/issues/13134
PR: 285341
MFH: 2025Q1
---
net/openmpi/Makefile | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/openmpi/Makefile b/net/openmpi/Makefile
index 1d26831d000c..d29cef1341ce 100644
--- a/net/openmpi/Makefile
+++ b/net/openmpi/Makefile
@@ -1,5 +1,6 @@
PORTNAME= openmpi
DISTVERSION= 5.0.7
+PORTREVISION= 1
CATEGORIES= net parallel
MASTER_SITES= https://download.open-mpi.org/release/open-mpi/v${PORTVERSION:R}/
@@ -41,6 +42,7 @@ CONFIGURE_ARGS+= --program-prefix= \
--with-wrapper-ldflags=-Wl,-rpath=-Wl,-rpath=${LOCALBASE}/lib/gcc${_GCC_VER}
TEST_TARGET= check
CFLAGS+= ${CFLAGS_F2018}
+PIE_UNSAFE= yes
CONFLICTS_INSTALL= openmpi4-4*
DOCSDIR= ${PREFIX}/${MPIDIR}/share/doc
@@ -49,8 +51,6 @@ BINARY_ALIAS= python3=${PYTHON_CMD}
PLIST_SUB+= MPIDIR=${MPIDIR}
PORTDOCS= *
-PIE_UNSAFE= yes
-
OPTIONS_DEFINE= AVX DEBUG DOCS IPV6 ROMIO SLURM
OPTIONS_DEFAULT= ROMIO
OPTIONS_EXCLUDE_aarch64= AVX
@@ -99,6 +99,12 @@ PLIST_SUB+= SHORTFLOAT=""
PLIST_SUB+= SHORTFLOAT="@comment "
.endif
+# clang does not support 16 byte atomic operations without -mcx16 on amd64
+# See https://github.com/open-mpi/ompi/issues/13134
+.if ${ARCH} == amd64 && ${COMPILER_TYPE} == clang
+CFLAGS+= -mcx16
+.endif
+
LIBDIR2FIX= oshmem/tools/wrappers opal/tools/wrappers \
3rd-party/openpmix ompi/tools/wrappers