ecl: only apply gcc15 compat patches for gcc

Because the default C version of clang is not synchronized with gcc, to
avoid further propagation of overriding CFLAGS to downstream packages,
only apply gcc15 compat patches when the compiler is gcc. Therefore, it
can be compiled with clang as well.

Follow up for pr #476147.

Co-authored-by: Aleksana <me@aleksana.moe>
This commit is contained in:
Jiajie Chen
2026-01-03 12:56:07 +08:00
co-authored by Aleksana
parent d4fbd6e1fb
commit e3dd4d0319
@@ -56,6 +56,8 @@ stdenv.mkDerivation rec {
url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ecl/patches/write_error.patch";
sha256 = "0hfxacpgn4919hg0mn4wf4m8r7y592r4gw7aqfnva7sckxi6w089";
})
]
++ lib.optionals stdenv.cc.isGNU [
# Fix gcc15 compat for downstream packages e.g. sage
# error: bool cannot be defined via typedef
(fetchpatch {