Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mono: fix build on gcc 14 #370711

Merged
merged 3 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkgs/development/compilers/mono/4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions pkgs/development/compilers/mono/5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
})
3 changes: 2 additions & 1 deletion pkgs/development/compilers/mono/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
enableParallelBuilding ? true,
srcArchiveSuffix ? "tar.bz2",
extraPatches ? [ ],
env ? { },
}:

let
llvm = callPackage ./llvm.nix { };
in
stdenv.mkDerivation rec {
pname = "mono";
inherit version;
inherit version env;

src = fetchurl {
inherit sha256;
Expand Down
6 changes: 1 addition & 5 deletions pkgs/development/libraries/gtk-sharp/2.0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/gtk-sharp/3.0.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down