diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 92a7addecc2b..619b3a922f31 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -224,6 +224,12 @@ in .${majorVersion} or [ ] ) +++ optional (targetPlatform.isWindows || targetPlatform.isCygwin) (fetchpatch { + name = "libstdc-fix-compilation-in-freestanding-win32.patch"; + url = "https://inbox.sourceware.org/gcc-patches/20250922182808.2599390-2-corngood@gmail.com/raw"; + hash = "sha256-+EYW9lG8CviVX7RyNHp+iX+8BRHUjt5b07k940khbbY="; +}) + ++ optionals targetPlatform.isCygwin [ (fetchpatch { name = "cygwin-fix-compilation-with-inhibit_libc.patch";