pkg-config: Fix MinGW build

- MinGW build of pkg-config was failing due to fprintf format
errors (-Werror=format=, see
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat).
  - Added "-Wno-error=format" flag to silence this error.
This commit is contained in:
Samuel Evans-Powell 2023-12-07 11:42:20 +08:00
parent e8bd6dadaf
commit 209c66f3b7
No known key found for this signature in database
GPG Key ID: 652CB5A9AFCC7234

View File

@ -35,8 +35,12 @@ stdenv.mkDerivation rec {
"ac_cv_func_posix_getgrgid_r=yes"
];
# Silence "incompatible integer to pointer conversion passing 'gsize'" when building with Clang.
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-int-conversion";
env.NIX_CFLAGS_COMPILE = builtins.toString (
# Silence "incompatible integer to pointer conversion passing 'gsize'" when building with Clang.
lib.optionals stdenv.cc.isClang ["-Wno-int-conversion"] ++
# Silence fprintf format errors when building for Windows.
lib.optionals stdenv.hostPlatform.isWindows ["-Wno-error=format"]
);
enableParallelBuilding = true;
doCheck = true;