cvise: disable blanket -Werror

`-Werror` flag usually causes build failures due to minor changes in
compiler versions. They might be useful for developers themselves but
are rarely useful for distributions.

For example right now `cvise` fails to compile on `gcc-13` due to
a `gcc` infelicity: https://gcc.gnu.org/PR107488

While this concrete instance is a compiler bug generally `-Werror` makes
users' lives harder. Specific `-Werror=<foo>` are better way to prevent
certain classes of bugs.

The change removes blanket `-Werror` with a `substituteInPlace` call.
This commit is contained in:
Sergei Trofimovich 2022-11-02 08:02:42 +00:00
parent 5a70f6da92
commit 1cbf12663c

View File

@ -32,6 +32,11 @@ buildPythonApplication rec {
];
postPatch = ''
# Avoid blanket -Werror to evade build failures on less
# tested compilers.
substituteInPlace CMakeLists.txt \
--replace " -Werror " " "
# 'cvise --command=...' generates a script with hardcoded shebang.
substituteInPlace cvise.py \
--replace "#!/bin/bash" "#!${bash}/bin/bash"