From 9a96bf85309d70a4c21b629bca0ced3876fb891e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 17 Apr 2022 09:41:26 +0200 Subject: [PATCH] glm: fixup with other compilers than gcc >= 11 Amends 9464bf0ad6. The flag isn't recognized on older gcc or clang. https://hydra.nixos.org/eval/1756014?filter=glm.#tabs-still-fail --- pkgs/development/libraries/glm/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/glm/default.nix b/pkgs/development/libraries/glm/default.nix index 9957df4cdd4..d4c836b6912 100644 --- a/pkgs/development/libraries/glm/default.nix +++ b/pkgs/development/libraries/glm/default.nix @@ -28,8 +28,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823 - NIX_CFLAGS_COMPILE = "-fno-ipa-modref"; + NIX_CFLAGS_COMPILE = + lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") [ + "-fno-ipa-modref" # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823 + ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=OFF"