From 0db0ac301a44d8230ef8a7845fd8a2e37cf29bdb Mon Sep 17 00:00:00 2001 From: David McFarland Date: Tue, 9 Sep 2025 14:00:49 -0300 Subject: [PATCH] gcc: fix cross-win32 build of libstdc++ --- pkgs/development/compilers/gcc/patches/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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";