Fix build with llvm 22 for several packages (#494634)

This commit is contained in:
Alexandre Esteves
2026-07-28 22:53:32 +00:00
committed by GitHub
4 changed files with 17 additions and 4 deletions

View File

@@ -127,6 +127,7 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonEnable "launchd" stdenv.hostPlatform.isDarwin)
(lib.mesonEnable "systemd" enableSystemd)
"-Dselinux=disabled"
"-Dc_args=-Wno-error=incompatible-pointer-types"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# D-Bus defaults to launchd-activation on Darwin, but that requires the launch agent be installed. It also breaks

View File

@@ -82,7 +82,12 @@ stdenv.mkDerivation (finalAttrs: {
'';
# do not use x87's 80-bit arithmetic, rounding errors result in very different font binaries
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse";
env.NIX_CFLAGS_COMPILE = lib.join " " (
[
"-Wno-error=incompatible-pointer-types"
]
++ lib.optional stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse"
);
strictDeps = true;

View File

@@ -52,7 +52,12 @@ stdenv.mkDerivation (finalAttrs: {
#
# This might be a problem with our Clang, as it does not reproduce
# with Xcode, but we just work around it by silencing the warning.
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-c++17-attribute-extensions";
NIX_CFLAGS_COMPILE = lib.join " " (
[
"-Wno-error=c2y-extensions"
]
++ lib.optional stdenv.cc.isClang "-Wno-c++17-attribute-extensions"
);
}
// lib.optionalAttrs stdenv.hostPlatform.isGnu {
# For test:locale_impermeability_test

View File

@@ -74,8 +74,10 @@ mkAppleDerivation {
--replace-fail '/usr/local' "$out"
done
'';
env.NIX_CFLAGS_COMPILE = "-I${privateHeaders}/include";
env.NIX_CFLAGS_COMPILE = lib.join " " [
"-I${privateHeaders}/include"
"-Wno-error=incompatible-pointer-types"
];
buildInputs = [
libxo