diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ada05947688f..eef806d93839 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5108,11 +5108,10 @@ with pkgs; # The GCC used to build libc for the target platform. Normal gccs will be # built with, and use, that cross-compiled libc. gccWithoutTargetLibc = - assert stdenv.targetPlatform != stdenv.hostPlatform; let libc1 = binutilsNoLibc.libc; in - wrapCCWith { + (wrapCCWith { cc = gccFun { # copy-pasted inherit noSysDirs; @@ -5138,7 +5137,14 @@ with pkgs; bintools = binutilsNoLibc; libc = libc1; extraPackages = [ ]; - }; + }).overrideAttrs + (prevAttrs: { + meta = prevAttrs.meta // { + badPlatforms = + (prevAttrs.meta.badPlatforms or [ ]) + ++ lib.optionals (stdenv.targetPlatform == stdenv.hostPlatform) [ stdenv.hostPlatform.system ]; + }; + }); inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; }) gcc9