From d3e0b6b42d80544059f67079615a4f0d60c1d4ea Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Fri, 14 Jul 2023 10:39:02 +0800 Subject: [PATCH] Fix complication failed due to gcc update to 12.3.1 --- ..._cmpxchg-remove-compile-breaking-bad.patch | 30 +++++++++++++++++++ infinipath-psm.spec | 7 ++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Fix-psm-gcc12-ips_cmpxchg-remove-compile-breaking-bad.patch diff --git a/Fix-psm-gcc12-ips_cmpxchg-remove-compile-breaking-bad.patch b/Fix-psm-gcc12-ips_cmpxchg-remove-compile-breaking-bad.patch new file mode 100644 index 0000000..99dce45 --- /dev/null +++ b/Fix-psm-gcc12-ips_cmpxchg-remove-compile-breaking-bad.patch @@ -0,0 +1,30 @@ +From 4b52b4f64809960ae354da8dc826b1052c85161d Mon Sep 17 00:00:00 2001 +From: starlet-dx <15929766099@163.com> +Date: Fri, 14 Jul 2023 11:25:49 +0800 +Subject: [PATCH 1/1] ips_cmpxchg: remove compile-breaking bad cast-to-struct. + +Origin: https://github.com/cornelisnetworks/opa-psm2/commit/c3a7d9468d5623c0164b783346bada8664a9a2c9 +--- + include/linux-i386/sysdep.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/include/linux-i386/sysdep.h b/include/linux-i386/sysdep.h +index ef99d1d..8c5c1b2 100644 +--- a/include/linux-i386/sysdep.h ++++ b/include/linux-i386/sysdep.h +@@ -104,11 +104,10 @@ static __inline__ uint32_t ips_cmpxchg(volatile uint32_t *ptr, + uint32_t old, uint32_t new) + { + uint32_t prev; +- struct xchg_dummy { uint32_t a[100]; }; + + asm volatile(LOCK_PREFIX "cmpxchgl %1,%2" + : "=a"(prev) +- : "q"(new), "m"(*(struct xchg_dummy *)ptr), "0"(old) ++ : "q"(new), "m"(*ptr), "0"(old) + : "memory"); + + return prev; +-- +2.39.1 + diff --git a/infinipath-psm.spec b/infinipath-psm.spec index 1608831..d131891 100644 --- a/infinipath-psm.spec +++ b/infinipath-psm.spec @@ -1,6 +1,6 @@ Name: infinipath-psm Version: 3.3 -Release: 12 +Release: 13 License: GPLv2 or BSD Summary: Libraries for Intel Performance Scaled Messaging URL: https://github.com/01org/psm @@ -29,6 +29,8 @@ Patch0006: extend-fdesc-array.patch Patch0007: fix-stringop-truncation-build-error.patch # Fix multiple definitions build error Patch0008: psm-multiple-definition.patch +# ips_cmpxchg: remove compile-breaking bad cast-to-struct +Patch0009: Fix-psm-gcc12-ips_cmpxchg-remove-compile-breaking-bad.patch %description PSM API is Intel's low-level user-level communications interface for the True Scale family of products. @@ -80,6 +82,9 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/udev/rules.d/60-ipath.rule %{_includedir}/{psm.h,psm_mq.h} %changelog +* Fri Jul 14 2023 yaoxin - 3.3-13 +- Fix complication failed due to gcc update to 12.3.1 + * Mon Aug 02 2021 wangyong - 3.3-12 - Fix build error caused by GCC upgrade to GCC-10