mono: fix build on gcc 14 (#370711)

This commit is contained in:
Kevin Cox
2025-01-07 08:12:16 -05:00
committed by GitHub
5 changed files with 13 additions and 6 deletions
+7
View File
@@ -12,4 +12,11 @@ callPackage ./generic.nix ({
sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq";
enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645
extraPatches = lib.optionals stdenv.hostPlatform.isLinux [ ./mono4-glibc.patch ];
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=implicit-function-declaration"
"-Wno-error=implicit-int"
"-Wno-error=incompatible-pointer-types"
"-Wno-error=int-conversion"
"-Wno-error=return-mismatch"
];
})
+1
View File
@@ -9,4 +9,5 @@ callPackage ./generic.nix ({
version = "5.20.1.34";
sha256 = "12vw5dkhmp1vk9l658pil8jiqirkpdsc5z8dm5mpj595yr6d94fd";
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types -Wno-error=implicit-function-declaration";
})
+2 -1
View File
@@ -29,6 +29,7 @@
enableParallelBuilding ? true,
srcArchiveSuffix ? "tar.bz2",
extraPatches ? [ ],
env ? { },
}:
let
@@ -36,7 +37,7 @@ let
in
stdenv.mkDerivation rec {
pname = "mono";
inherit version;
inherit version env;
src = fetchurl {
inherit sha256;
+1 -5
View File
@@ -64,11 +64,7 @@ stdenv.mkDerivation rec {
./bootstrap-${lib.versions.majorMinor version}
'';
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-Wno-error=int-conversion"
]
);
env.NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion";
dontStrip = true;
@@ -31,6 +31,8 @@ stdenv.mkDerivation rec {
libxml2
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
patches = [
# Fixes MONO_PROFILE_ENTER_LEAVE undeclared when compiling against newer versions of mono.
# @see https://github.com/mono/gtk-sharp/pull/266