[packages/mpich] - remove obsolete patches - add build fixes for ix86
baggins
baggins at pld-linux.org
Thu Sep 24 01:02:56 CEST 2026
commit 107e8f6fdbe8ad5cfea5fb61fbb1b7b34d195ed2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Sep 24 01:02:30 2026 +0200
- remove obsolete patches
- add build fixes for ix86
ix86.patch | 68 +++++++++++++++++++++++++++++++++++++++++++
mpich-sh.patch | 13 ---------
mpich.spec | 11 ++-----
x32-misdetected-as-i386.patch | 29 ------------------
4 files changed, 70 insertions(+), 51 deletions(-)
---
diff --git a/mpich.spec b/mpich.spec
index ec3d8b1..99285bc 100644
--- a/mpich.spec
+++ b/mpich.spec
@@ -11,8 +11,7 @@ License: BSD-like
Group: Development/Libraries
Source0: https://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: d6a8c0f6c8225e2d1bd7a9f88320bdb3
-Patch0: %{name}-sh.patch
-Patch1: x32-misdetected-as-i386.patch
+Patch0: ix86.patch
URL: https://www.mpich.org/
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1:1.12.3
@@ -159,8 +158,7 @@ Biblioteka statyczna MPICH dla Fortranu.
%prep
%setup -q
-#p%atch -P0 -p1
-#patch -P1 -p1
+%patch -P0 -p1
%build
%{__libtoolize}
@@ -168,11 +166,6 @@ Biblioteka statyczna MPICH dla Fortranu.
%{__autoconf}
%{__autoheader}
%{__automake}
-%define gfortran_version %(gfortran -dumpversion)
-%if "%{_ver_ge '%{gfortran_version}' '10.0'}" == "1"
-FFLAGS="%{rpmcflags} -fallow-argument-mismatch"
-FCFLAGS="%{rpmcflags} -fallow-argument-mismatch"
-%endif
%configure \
--disable-silent-rules \
%{?with_blcr:--enable-checkpointing} \
diff --git a/ix86.patch b/ix86.patch
new file mode 100644
index 0000000..1a40079
--- /dev/null
+++ b/ix86.patch
@@ -0,0 +1,68 @@
+diff -ur mpich-5.0.1/modules/libfabric/prov/psm3/inc/ofi_cma.h mpich-5.0.1.ix86/modules/libfabric/prov/psm3/inc/ofi_cma.h
+--- mpich-5.0.1/modules/libfabric/prov/psm3/inc/ofi_cma.h 2025-09-23 18:08:14.000000000 +0200
++++ mpich-5.0.1.ix86/modules/libfabric/prov/psm3/inc/ofi_cma.h 2026-09-23 23:46:37.971488812 +0200
+@@ -64,8 +64,8 @@
+ if (!total)
+ return FI_SUCCESS;
+
+- ofi_consume_iov(local, &local_cnt, (size_t) ret);
+- ofi_consume_iov(remote, &remote_cnt, (size_t) ret);
++ ofi_consume_iov(local, (size_t *)&local_cnt, (size_t) ret);
++ ofi_consume_iov(remote, (size_t *)&remote_cnt, (size_t) ret);
+ }
+ }
+
+diff -ur mpich-5.0.1/modules/libfabric/prov/psm3/psm3/psm_mq_internal.h mpich-5.0.1.ix86/modules/libfabric/prov/psm3/psm3/psm_mq_internal.h
+--- mpich-5.0.1/modules/libfabric/prov/psm3/psm3/psm_mq_internal.h 2025-09-23 18:08:14.000000000 +0200
++++ mpich-5.0.1.ix86/modules/libfabric/prov/psm3/psm3/psm_mq_internal.h 2026-09-24 00:16:49.346999220 +0200
+@@ -409,10 +409,12 @@
+ hash_src_tag(psm2_epaddr_t src, psm2_mq_tag_t *tagsel, psm2_mq_tag_t *tag))
+ {
+ // hash on middle bits of src, these will vary the most
+-#if 0
++#if 1
+ //uint32_t res = _mm_crc32_u64(0, (uint64_t)(uintptr_t)src);
+ uint32_t res = _mm_crc32_u32(0, (uint32_t)((uintptr_t)src>>6));
+- res = _mm_crc32_u64(res, tag->tag64 & tagsel->tag64);
++ res = _mm_crc32_u32(res, (uint32_t)(tag->tag64 >> 32) & (uint32_t)(tagsel->tag64 >> 32));
++ res = _mm_crc32_u32(res, (uint32_t)(tag->tag64 & 0xffff) & (uint32_t)(tagsel->tag64 & 0xffff));
++ res = _mm_crc32_u32(res, tag->tag64 & tagsel->tag64);
+ return _mm_crc32_u32(res, tag->rem32 & tagsel->rem32);
+ #else
+ // this computes 2x faster than above
+diff -ur mpich-5.0.1/modules/libfabric/prov/shm/src/smr_ep.c mpich-5.0.1.ix86/modules/libfabric/prov/shm/src/smr_ep.c
+--- mpich-5.0.1/modules/libfabric/prov/shm/src/smr_ep.c 2025-09-23 18:08:14.000000000 +0200
++++ mpich-5.0.1.ix86/modules/libfabric/prov/shm/src/smr_ep.c 2026-09-23 23:50:44.510605822 +0200
+@@ -349,7 +349,7 @@
+ cmd->msg.data.ipc_info.device = device;
+ ret = ofi_hmem_get_base_addr(cmd->msg.data.ipc_info.iface, ptr, len,
+ &base,
+- &cmd->msg.data.ipc_info.base_length);
++ (size_t *)&cmd->msg.data.ipc_info.base_length);
+ if (ret)
+ return ret;
+
+diff -ur mpich-5.0.1/modules/libfabric/prov/sm2/src/sm2_ep.c mpich-5.0.1.ix86/modules/libfabric/prov/sm2/src/sm2_ep.c
+--- mpich-5.0.1/modules/libfabric/prov/sm2/src/sm2_ep.c 2025-09-23 18:08:14.000000000 +0200
++++ mpich-5.0.1.ix86/modules/libfabric/prov/sm2/src/sm2_ep.c 2026-09-23 23:52:11.090297228 +0200
+@@ -261,7 +261,7 @@
+ ipc_info->device = device;
+
+ ret = ofi_hmem_get_base_addr(ipc_info->iface, ptr, len, &base,
+- &ipc_info->base_length);
++ (size_t *)&ipc_info->base_length);
+ if (ret)
+ return ret;
+
+diff -ur mpich-5.0.1/modules/libfabric/prov/sm2/src/sm2_progress.c mpich-5.0.1.ix86/modules/libfabric/prov/sm2/src/sm2_progress.c
+--- mpich-5.0.1/modules/libfabric/prov/sm2/src/sm2_progress.c 2025-09-23 18:08:14.000000000 +0200
++++ mpich-5.0.1.ix86/modules/libfabric/prov/sm2/src/sm2_progress.c 2026-09-23 23:51:40.187073972 +0200
+@@ -73,7 +73,7 @@
+
+ ret = ofi_hmem_get_base_addr(ipc_info->iface, device_ptr,
+ xfer_entry->hdr.size, &base,
+- &ipc_info->base_length);
++ (size_t *)&ipc_info->base_length);
+ if (ret) {
+ FI_WARN(&sm2_prov, FI_LOG_EP_CTRL,
+ "Failed to get device memory base address. Error code: "
diff --git a/mpich-sh.patch b/mpich-sh.patch
deleted file mode 100644
index 2848b5a..0000000
--- a/mpich-sh.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- mpich-3.1.3/configure.ac.orig 2014-10-07 23:50:23.000000000 +0200
-+++ mpich-3.1.3/configure.ac 2014-11-22 17:11:16.917471496 +0100
-@@ -117,8 +117,8 @@
- [http://www.mpich.org/])
-
- if test "x$prefix" != "xNONE" && test -d "$prefix"; then
-- if test "x`(cd \"$prefix\"; echo \"$PWD\")`" = "x`(cd \"$srcdir\"; echo \"$PWD\")`" ||\
-- test "x`(cd \"$prefix\"; echo \"$PWD\")`" = "x$PWD" ; then
-+ if test "x$( (cd "$prefix"; pwd) )" = "x$( (cd "$srcdir"; pwd) )" ||\
-+ test "x$$ (cd "$prefix"; pwd) )" = "x$(pwd)" ; then
- AC_MSG_ERROR([The install directory (--prefix=) cannot be the same as the build or src directory.])
- fi
- fi
diff --git a/x32-misdetected-as-i386.patch b/x32-misdetected-as-i386.patch
deleted file mode 100644
index 8bf023d..0000000
--- a/x32-misdetected-as-i386.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- mpich-3.1.orig/configure.ac
-+++ mpich-3.1/configure.ac
-@@ -4434,7 +4434,7 @@ long int oldval = 10;
- long int newval = 20;
- char ret;
- long int readval;
--__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
-+__asm__ __volatile__ ("push %%ecx; pop %%ecx; lock; cmpxchgl %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval) : "memory");
- return (compval == 20) ? 0 : -1;
-@@ -4454,12 +4454,12 @@ AC_MSG_CHECKING([for gcc __asm__ and AMD
- AC_TRY_RUN([
- int main(int argc, char *argv[])
- {
--long int compval = 10;
--volatile long int *p = &compval;
--long int oldval = 10;
--long int newval = 20;
-+long long int compval = 10;
-+volatile long long int *p = &compval;
-+long long int oldval = 10;
-+long long int newval = 20;
- char ret;
--long int readval;
-+long long int readval;
- __asm__ __volatile__ ("lock; cmpxchgq %3, %1; sete %0"
- : "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval) : "memory");
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mpich.git/commitdiff/107e8f6fdbe8ad5cfea5fb61fbb1b7b34d195ed2
More information about the pld-cvs-commit
mailing list