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;
      | ^~~~~~~
```
This commit is contained in:
ghpzin
2025-11-24 08:47:47 +03:00
parent 7ef56ab3f0
commit e7e8b6cc33

View File

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