gcc: disable glibc<->libgcc circularity workaround for windows and LLVM

This essentially reverts #238154 if `isWindows` or `useLLVM`, the
two cases where it caused breakage:

  https://github.com/NixOS/nixpkgs/pull/238154#issuecomment-1633752094

Since #238154 exists mainly for `isGNU` (i.e. due to the
glibc<->libgcc circular dependency) disabling it here isn't a big deal.
This commit is contained in:
Adam Joseph
2023-06-30 01:39:58 -07:00
parent 6a05eeb515
commit 91ef45c98a
2 changed files with 10 additions and 1 deletions
@@ -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
+8
View File
@@ -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;