furnace, boringssl, gloox, xorg.xf86videovmware: gcc12 fixups

This commit is contained in:
Vladimír Čunát 2023-02-05 11:57:01 +01:00
parent c2fb9453ab
commit 44cb005294
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
4 changed files with 12 additions and 4 deletions

View File

@ -63,8 +63,8 @@ stdenv.mkDerivation rec {
"-DWARNINGS_ARE_ERRORS=ON"
];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
# Needed with GCC 12 but breaks on darwin (with clang)
"-Wno-error=mismatched-new-delete"
"-Wno-error=use-after-free"
];

View File

@ -30,8 +30,8 @@ buildGoModule {
export GOARCH=$(go env GOHOSTARCH)
'';
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
# Needed with GCC 12 but breaks on darwin (with clang)
"-Wno-error=stringop-overflow"
];

View File

@ -14,6 +14,13 @@ stdenv.mkDerivation rec{
sha256 = "1jgrd07qr9jvbb5hcmhrqz4w4lvwc51m30jls1fgxf1f5az6455f";
};
# needed since gcc12
postPatch = ''
sed '1i#include <ctime>' -i \
src/tests/{tag/tag_perf.cpp,zlib/zlib_perf.cpp} \
src/examples/*.cpp
'';
buildInputs = [ ]
++ lib.optional zlibSupport zlib
++ lib.optional sslSupport openssl

View File

@ -592,6 +592,7 @@ self: super:
xf86videovmware = super.xf86videovmware.overrideAttrs (attrs: {
buildInputs = attrs.buildInputs ++ [ mesa mesa.driversdev llvm ]; # for libxatracker
NIX_CFLAGS_COMPILE = [ "-Wno-error=address" ]; # gcc12
meta = attrs.meta // {
platforms = ["i686-linux" "x86_64-linux"];
};