From 5cf5a3c6e347b1a6a0423fd08ce34783edb5645c Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Tue, 14 May 2024 18:32:49 -0700 Subject: [PATCH] libomxil-bellagio: fix compiling with llvm Adds a new check which adds cflags when building with LLVM. Ref: https://github.com/NixOS/nixpkgs/issues/311001 --- pkgs/development/libraries/libomxil-bellagio/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libomxil-bellagio/default.nix b/pkgs/development/libraries/libomxil-bellagio/default.nix index 027c0b8f499d..2b5d37fad2ec 100644 --- a/pkgs/development/libraries/libomxil-bellagio/default.nix +++ b/pkgs/development/libraries/libomxil-bellagio/default.nix @@ -35,7 +35,9 @@ stdenv.mkDerivation rec { env.NIX_CFLAGS_COMPILE = # stringop-truncation: see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028978 if stdenv.cc.isGNU then "-Wno-error=array-bounds -Wno-error=stringop-overflow=8 -Wno-error=stringop-truncation" - else "-Wno-error=absolute-value -Wno-error=enum-conversion -Wno-error=logical-not-parentheses -Wno-error=non-literal-null-conversion"; + else let + isLLVM17 = stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"; + in "-Wno-error=absolute-value -Wno-error=enum-conversion -Wno-error=logical-not-parentheses -Wno-error=non-literal-null-conversion${lib.optionalString (isLLVM17) " -Wno-error=unused-but-set-variable"}"; meta = with lib; { homepage = "https://omxil.sourceforge.net/";