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
This commit is contained in:
Vladimír Čunát 2022-04-17 09:41:26 +02:00
parent deb60260a7
commit 9a96bf8530
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -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"