diff --git a/pkgs/development/compilers/gcc/common/libgcc.nix b/pkgs/development/compilers/gcc/common/libgcc.nix index 528d9d7d13ac7..626b14835c9a0 100644 --- a/pkgs/development/compilers/gcc/common/libgcc.nix +++ b/pkgs/development/compilers/gcc/common/libgcc.nix @@ -19,7 +19,7 @@ drv: lib.pipe drv (pkg: pkg.overrideAttrs (previousAttrs: lib.optionalAttrs ( targetPlatform != hostPlatform && - enableShared && + (enableShared || targetPlatform.libc == "msvcrt") && withoutTargetLibc ) { makeFlags = [ "all-gcc" "all-target-libgcc" ]; @@ -40,6 +40,7 @@ lib.optional (lib.versionAtLeast version "11.0") else "${targetPlatform.config}/"; enableLibGccOutput = + (!stdenv.targetPlatform.isWindows || (with stdenv; targetPlatform == hostPlatform)) && !langJit && !stdenv.hostPlatform.isDarwin && enableShared diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 33f821ec597c4..70b88faadf242 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15369,6 +15369,14 @@ with pkgs; langCC = false; libcCross = libcCross1; targetPackages.stdenv.cc.bintools = binutilsNoLibc; + enableShared = + stdenv.targetPlatform.hasSharedLibraries + + # temporarily disabled due to breakage; + # see https://github.com/NixOS/nixpkgs/pull/243249 + && !stdenv.targetPlatform.isWindows + && !(stdenv.targetPlatform.useLLVM or false) + ; }; bintools = binutilsNoLibc; libc = libcCross1;