diff --git a/pkgs/development/compilers/ghc/9.4.2.nix b/pkgs/development/compilers/ghc/9.4.2.nix index afe78cbb87c06..5094c3c7c0540 100644 --- a/pkgs/development/compilers/ghc/9.4.2.nix +++ b/pkgs/development/compilers/ghc/9.4.2.nix @@ -288,6 +288,10 @@ stdenv.mkDerivation (rec { 'MinBootGhcVersion="8.10"' ''; + # Silence unused function warning due to `popcount16` being defined on all platforms but used only + # on x86_64. This results in an error due to `-Werror`. + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && !targetPlatform.isx86_64) "-Wno-unused-function"; + # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target"; diff --git a/pkgs/development/compilers/ghc/9.4.3.nix b/pkgs/development/compilers/ghc/9.4.3.nix index a2ae0cf400c7a..6aba2a7b0940d 100644 --- a/pkgs/development/compilers/ghc/9.4.3.nix +++ b/pkgs/development/compilers/ghc/9.4.3.nix @@ -288,6 +288,10 @@ stdenv.mkDerivation (rec { 'MinBootGhcVersion="8.10"' ''; + # Silence unused function warning due to `popcount16` being defined on all platforms but used only + # on x86_64. This results in an error due to `-Werror`. + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && !targetPlatform.isx86_64) "-Wno-unused-function"; + # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target"; diff --git a/pkgs/development/compilers/ghc/9.4.4.nix b/pkgs/development/compilers/ghc/9.4.4.nix index 13d01a3426377..d06bab66bde26 100644 --- a/pkgs/development/compilers/ghc/9.4.4.nix +++ b/pkgs/development/compilers/ghc/9.4.4.nix @@ -288,6 +288,10 @@ stdenv.mkDerivation (rec { 'MinBootGhcVersion="8.10"' ''; + # Silence unused function warning due to `popcount16` being defined on all platforms but used only + # on x86_64. This results in an error due to `-Werror`. + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && !targetPlatform.isx86_64) "-Wno-unused-function"; + # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target"; diff --git a/pkgs/development/compilers/ghc/9.4.5.nix b/pkgs/development/compilers/ghc/9.4.5.nix index da333a6138003..07809232b0b97 100644 --- a/pkgs/development/compilers/ghc/9.4.5.nix +++ b/pkgs/development/compilers/ghc/9.4.5.nix @@ -288,6 +288,10 @@ stdenv.mkDerivation (rec { 'MinBootGhcVersion="8.10"' ''; + # Silence unused function warning due to `popcount16` being defined on all platforms but used only + # on x86_64. This results in an error due to `-Werror`. + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && !targetPlatform.isx86_64) "-Wno-unused-function"; + # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target"; diff --git a/pkgs/development/compilers/ghc/9.4.6.nix b/pkgs/development/compilers/ghc/9.4.6.nix index 95cb31a411ff1..5b264706c234a 100644 --- a/pkgs/development/compilers/ghc/9.4.6.nix +++ b/pkgs/development/compilers/ghc/9.4.6.nix @@ -284,6 +284,10 @@ stdenv.mkDerivation (rec { 'MinBootGhcVersion="8.10"' ''; + # Silence unused function warning due to `popcount16` being defined on all platforms but used only + # on x86_64. This results in an error due to `-Werror`. + env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && !targetPlatform.isx86_64) "-Wno-unused-function"; + # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";