From 5378f9a6c2d061ebd95b64e95a23d515fa49ffc6 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:52:46 +0300 Subject: [PATCH] gccgo: fix build --- pkgs/development/compilers/gcc/common/configure-flags.nix | 2 +- pkgs/development/compilers/gcc/common/libgcc.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index e0f7ccc7b59a339..771c16d84b7b81a 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -45,7 +45,7 @@ let buildPlatform hostPlatform targetPlatform; # See https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903 - disableBootstrap' = disableBootstrap && !langFortran; + disableBootstrap' = disableBootstrap && !langFortran && !langGo; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; diff --git a/pkgs/development/compilers/gcc/common/libgcc.nix b/pkgs/development/compilers/gcc/common/libgcc.nix index 198b5d446b81c39..312525dcf88ff7d 100644 --- a/pkgs/development/compilers/gcc/common/libgcc.nix +++ b/pkgs/development/compilers/gcc/common/libgcc.nix @@ -12,7 +12,7 @@ in outputs = previousAttrs.outputs ++ lib.optionals enableLibGccOutput [ "libgcc" ]; # This is a separate phase because gcc assembles its phase scripts # in bash instead of nix (we should fix that). - preFixupPhases = (previousAttrs.preFixupPhases or []) ++ [ "preFixupLibGccPhase" ]; + preFixupPhases = (previousAttrs.preFixupPhases or []) ++ lib.optionals ((!langC) || enableLibGccOutput) [ "preFixupLibGccPhase" ]; preFixupLibGccPhase = # delete extra/unused builds of libgcc_s in non-langC builds # (i.e. libgccjit, gnat, etc) to avoid potential confusion