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.
This commit is contained in:
Jiajie Chen
2026-01-02 14:44:19 +08:00
parent 26f2138cfd
commit 1abbbc0ae5

View File

@@ -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"