Control: tags 984057 + patch pending Christoph Biedl wrote...
> After staring at this for a while I think upstream did some creepy > things gcc is understandably un > happy, but overall this code in sysdep.h > > | 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) > | : "memory"); > | > | return prev; > | } > > is okay-ish. And so, unless someone finds a saner way (I guess it's > replacing the 100 with a better value, possibly architecture-dependent), > I'd just disable the warning, patch attached, makes the build pass. After some more discussion on this here at the Karlsruhe BSP, also playing with godbolt, we figured this is indeed rather an overcautious gcc warning, and muting it should not do harm. So here we go: to fix the issues with this package, I've prepared an NMU for infinipath-psm (versioned as 3.3+20.604758e7-6.2), debdiff below. An upload to DELAYED/5 will follow shortly. Please feel free to tell me if I should delay it longer. Regards, Christoph
diff -Nru infinipath-psm-3.3+20.604758e7/debian/changelog infinipath-psm-3.3+20.604758e7/debian/changelog --- infinipath-psm-3.3+20.604758e7/debian/changelog 2021-01-03 08:42:58.000000000 +0100 +++ infinipath-psm-3.3+20.604758e7/debian/changelog 2022-10-16 13:18:17.000000000 +0200 @@ -1,3 +1,10 @@ +infinipath-psm (3.3+20.604758e7-6.2) unstable; urgency=medium + + * Non-maintainer upload + * Work around FTBFS with gcc-12. Closes: #984057 + + -- Christoph Biedl <debian.a...@manchmal.in-ulm.de> Sun, 16 Oct 2022 13:18:17 +0200 + infinipath-psm (3.3+20.604758e7-6.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru infinipath-psm-3.3+20.604758e7/debian/patches/0004-gcc-11-warning.patch infinipath-psm-3.3+20.604758e7/debian/patches/0004-gcc-11-warning.patch --- infinipath-psm-3.3+20.604758e7/debian/patches/0004-gcc-11-warning.patch 1970-01-01 01:00:00.000000000 +0100 +++ infinipath-psm-3.3+20.604758e7/debian/patches/0004-gcc-11-warning.patch 2022-10-16 13:18:17.000000000 +0200 @@ -0,0 +1,22 @@ +Description: Disable warning in the cmpxchgl wrapper +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Origin: no # upstream is dead +Bug-Debian: https://bugs.debian.org/984057 +Last-Update: 2022-10-16 + +--- a/include/linux-i386/sysdep.h ++++ b/include/linux-i386/sysdep.h +@@ -106,10 +106,13 @@ + uint32_t prev; + struct xchg_dummy { uint32_t a[100]; }; + ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Warray-bounds" + asm volatile(LOCK_PREFIX "cmpxchgl %1,%2" + : "=a"(prev) + : "q"(new), "m"(*(struct xchg_dummy *)ptr), "0"(old) + : "memory"); ++#pragma GCC diagnostic pop + + return prev; + } diff -Nru infinipath-psm-3.3+20.604758e7/debian/patches/series infinipath-psm-3.3+20.604758e7/debian/patches/series --- infinipath-psm-3.3+20.604758e7/debian/patches/series 2021-01-03 08:42:58.000000000 +0100 +++ infinipath-psm-3.3+20.604758e7/debian/patches/series 2022-10-16 13:18:17.000000000 +0200 @@ -1,3 +1,4 @@ 0001-Fix-truncation-warnings-with-gcc7.patch 0002-Include-sys-sysmacros.h-to-avoid-warning-about-minor.patch 0003-gcc8.patch +0004-gcc-11-warning.patch
signature.asc
Description: PGP signature