From 44cb005294e79bca38d4d8490bbde0044a0043b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 5 Feb 2023 11:57:01 +0100 Subject: [PATCH] furnace, boringssl, gloox, xorg.xf86videovmware: gcc12 fixups --- pkgs/applications/audio/furnace/default.nix | 4 ++-- pkgs/development/libraries/boringssl/default.nix | 4 ++-- pkgs/development/libraries/gloox/default.nix | 7 +++++++ pkgs/servers/x11/xorg/overrides.nix | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/furnace/default.nix b/pkgs/applications/audio/furnace/default.nix index f3f7c3f624ba..3d3b87e3c5dc 100644 --- a/pkgs/applications/audio/furnace/default.nix +++ b/pkgs/applications/audio/furnace/default.nix @@ -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" ]; diff --git a/pkgs/development/libraries/boringssl/default.nix b/pkgs/development/libraries/boringssl/default.nix index b5d9d33a811f..955157d055a2 100644 --- a/pkgs/development/libraries/boringssl/default.nix +++ b/pkgs/development/libraries/boringssl/default.nix @@ -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" ]; diff --git a/pkgs/development/libraries/gloox/default.nix b/pkgs/development/libraries/gloox/default.nix index 8fc57d865fd7..69243a13ef30 100644 --- a/pkgs/development/libraries/gloox/default.nix +++ b/pkgs/development/libraries/gloox/default.nix @@ -14,6 +14,13 @@ stdenv.mkDerivation rec{ sha256 = "1jgrd07qr9jvbb5hcmhrqz4w4lvwc51m30jls1fgxf1f5az6455f"; }; + # needed since gcc12 + postPatch = '' + sed '1i#include ' -i \ + src/tests/{tag/tag_perf.cpp,zlib/zlib_perf.cpp} \ + src/examples/*.cpp + ''; + buildInputs = [ ] ++ lib.optional zlibSupport zlib ++ lib.optional sslSupport openssl diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix index cc32e29188f7..6ce9243d2cf2 100644 --- a/pkgs/servers/x11/xorg/overrides.nix +++ b/pkgs/servers/x11/xorg/overrides.nix @@ -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"]; };