hm: apply upstream patch for gcc 16

GCC 16 has better analysis of unused variables than previous versions.
Since HM builds with -Werror by default, this causes a build failure, so
we fetch the commit that fixed this issue upstream.

We elected to take a patch instead of suppressing the error (with
-Wno-error=…) since patches will be removed on the next update while
flags often sit untouched and unnoticed long after they're necessary.
This commit is contained in:
whispers
2026-07-27 17:54:43 -04:00
parent eb494090b1
commit 82e0078428

View File

@@ -20,6 +20,18 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-zWBwrnCNKi2sIopdu2XQj/7IoTsJQzlcIFNNKM0glDQ=";
};
patches = [
# GCC 16 has better analysis of unused variables than previous versions.
# Since HM builds with -Werror by default, this causes a build failure, so
# we fetch the commit that fixed this issue upstream until it makes it into
# a release.
(fetchpatch {
name = "gcc16-unused-variable.patch";
url = "https://vcgit.hhi.fraunhofer.de/jvet/HM/-/commit/884d704b9d04ac1728b2c6049174e47eb04987d2.patch";
hash = "sha256-UqZf7XFTEOpfE0Uyyrq+ydScR9GzMgR+JQVeZGFjc1c=";
})
];
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail "-msse4.1" ""