about summary refs log tree commit diff
diff options
context:
space:
mode:
authorkirillrdy <kirillrdy@gmail.com>2024-02-20 18:41:40 +1100
committerGitHub <noreply@github.com>2024-02-20 18:41:40 +1100
commit6a327002870d5443c76f441221567601c6f98f21 (patch)
tree96e7c2e4aeac7cee52181986b07e2d6d7644f4cb
parente102d7a8753fc5323c1d9fd4ae7a214e3c41e6cf (diff)
parent70f9aaa0f49cb85c555d2206952d8aafc94bb463 (diff)
Merge pull request #290043 from trofi/mps-gcc-13-fix
mps: fix `gcc-13` build failure by dropping `-Werror`
-rw-r--r--pkgs/development/libraries/mps/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/development/libraries/mps/default.nix b/pkgs/development/libraries/mps/default.nix
index 3cc6d9ce35100..fd6e5d60bf7b8 100644
--- a/pkgs/development/libraries/mps/default.nix
+++ b/pkgs/development/libraries/mps/default.nix
@@ -16,17 +16,17 @@ stdenv.mkDerivation rec {
     hash = "sha256-3ql3jWLccgnQHKf23B1en+nJ9rxqmHcWd7aBr93YER0=";
   };
 
+  postPatch = ''
+    # Disable -Werror to avoid biuld failure on fresh toolchains like
+    # gcc-13.
+    substituteInPlace code/gc.gmk --replace-fail '-Werror ' ' '
+    substituteInPlace code/gp.gmk --replace-fail '-Werror ' ' '
+    substituteInPlace code/ll.gmk --replace-fail '-Werror ' ' '
+  '';
+
   nativeBuildInputs = [ autoreconfHook ];
   buildInputs = [ sqlite ];
 
-  # needed for 1.116.0 to build with gcc7
-  env.NIX_CFLAGS_COMPILE = toString [
-    "-Wno-implicit-fallthrough"
-    "-Wno-error=clobbered"
-    "-Wno-error=cast-function-type"
-  ];
-
-
   meta = {
     description = "A flexible memory management and garbage collection library";
     homepage    = "https://www.ravenbrook.com/project/mps";