From e7e8b6cc33dababfefad8f12cd37c173bba7841b Mon Sep 17 00:00:00 2001 From: ghpzin Date: Mon, 24 Nov 2025 08:47:47 +0300 Subject: [PATCH] ecl: fix build with gcc15 - add "CFLAGS=-std=gnu17" to `configureFlags`. There are patches upstream to make it build with `-std=gnu23` (default in gcc15): https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/325 https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/345 but applying them makes it not build with `-std=gnu17` (default in gcc14) instead. Fixes build failure with gcc15: ``` /build/ecl-24.5.10/src/c/dpp.c:112:13: error: 'bool' cannot be defined via 'typedef' 112 | typedef int bool; | ^~~~ /build/ecl-24.5.10/src/c/dpp.c:112:13: note: 'bool' is a keyword with '-std=c23' onwards /build/ecl-24.5.10/src/c/dpp.c:112:1: warning: useless type name in empty declaration 112 | typedef int bool; | ^~~~~~~ ``` --- pkgs/development/compilers/ecl/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix index c937ad95afa4..644ce3cc6be6 100644 --- a/pkgs/development/compilers/ecl/default.nix +++ b/pkgs/development/compilers/ecl/default.nix @@ -59,6 +59,8 @@ stdenv.mkDerivation rec { ]; configureFlags = [ + # Fix build with gcc15 + "CFLAGS=-std=gnu17" (if threadSupport then "--enable-threads" else "--disable-threads") "--with-gmp-incdir=${lib.getDev gmp}/include" "--with-gmp-libdir=${lib.getLib gmp}/lib"