libffi_3_3: fix gcc-15 build

Without the chnage the build fails in `master` as
https://hydra.nixos.org/build/329329821:

```
FAIL: libffi.call/va_struct2.c -W -Wall -Wno-psabi -O0 (test for excess errors)
FAIL: libffi.call/va_struct2.c -W -Wall -Wno-psabi -O2 (test for excess errors)
FAIL: libffi.call/va_struct3.c -W -Wall -Wno-psabi -O0 (test for excess errors)
FAIL: libffi.call/va_struct3.c -W -Wall -Wno-psabi -O2 (test for excess errors)
```

ZHF: #516381
This commit is contained in:
Sergei Trofimovich
2026-05-25 08:56:32 +01:00
parent 43b7138226
commit bc58993f99

View File

@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
doCheck ? true, # test suite depends on dejagnu which cannot be used during bootstrapping
dejagnu,
@@ -16,7 +17,15 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-cvunkicD3fp6Ao1ROsFahcjVTI1n9V+lpIAohdxlIFY=";
};
patches = [ ];
patches = [
# Backport gcc-15 fix:
# https://github.com/libffi/libffi/pull/861
(fetchpatch {
name = "gcc-15.patch";
url = "https://github.com/libffi/libffi/commit/0859f8431242d5adff21420b9cab538d2af527b5.patch";
hash = "sha256-Py4ZAhVyXsfLxr4pnYAH7/lcsQOmpToFgvjQvLg9XVc=";
})
];
outputs = [
"out"