mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
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:
@@ -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" ""
|
||||
|
||||
Reference in New Issue
Block a user