Merge pull request #290162 from trofi/octopus-caller-gcc-13-fix

octopus-caller: fix `gcc-13` build failure (drop `-Werror`)
This commit is contained in:
Justin Bedő 2024-02-23 09:38:42 +11:00 committed by GitHub
commit 26037c1a65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,10 +19,17 @@ stdenv.mkDerivation rec {
sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY=";
}) ];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
];
postPatch = ''
# Disable -Werror to avoid build failure on fresh toolchains like
# gcc-13.
substituteInPlace lib/date/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace lib/ranger/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace lib/tandem/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace src/CMakeLists.txt --replace-fail ' -Werror ' ' '
# Fix gcc-13 build due to missing <cstdint> header.
sed -e '1i #include <cstdint>' -i src/core/tools/vargen/utils/assembler.hpp
'';
postInstall = ''
mkdir $out/bin