From 1abbbc0ae5f2dd6706cb3b1ffcda7ef83d5f2d60 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Fri, 2 Jan 2026 14:44:19 +0800 Subject: [PATCH] ecl: import upstream patches for gcc15 compat Instead of downgrading to C17, import upstream patches for gcc15 compatibility. So downstream packages e.g. sage can build correctly without setting CFLAGS. --- pkgs/development/compilers/ecl/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ecl/default.nix b/pkgs/development/compilers/ecl/default.nix index 05209f0814a4..9d42368f724d 100644 --- a/pkgs/development/compilers/ecl/default.nix +++ b/pkgs/development/compilers/ecl/default.nix @@ -56,11 +56,24 @@ stdenv.mkDerivation rec { url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ecl/patches/write_error.patch"; sha256 = "0hfxacpgn4919hg0mn4wf4m8r7y592r4gw7aqfnva7sckxi6w089"; }) + # Fix gcc15 compat for downstream packages e.g. sage + # error: ‘bool’ cannot be defined via ‘typedef’ + (fetchpatch { + url = "https://gitlab.com/embeddable-common-lisp/ecl/-/commit/1aec8f741f69fd736f020b7fe4d3afc33e60ae6a.patch"; + sha256 = "sha256-/cA6iOOob0ATViQm5EwBbdin5peqRMjLPKa7RjkrJ94="; + }) + # error: too many arguments to function 'fn'; expected 0, have 1 + (fetchpatch { + url = "https://gitlab.com/embeddable-common-lisp/ecl/-/commit/5b4e9c4bbd7cce4a678eecd493e56c495490e8b5.patch"; + sha256 = "sha256-QHxswFiW2rfDAQ98Sl+VVmyP4M/eIjJWQEcR/B+m398="; + }) + (fetchpatch { + url = "https://gitlab.com/embeddable-common-lisp/ecl/-/commit/5ec9e02f6db9694dcdef7574036f1e320d64a8af.patch"; + sha256 = "sha256-ZRah0IqOt6OQZGqlCq0RKiToyxsRXQEXAiSUGgqZnKU="; + }) ]; 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"