From b863a7c8c261b650d2f87479ee30ef8b0fb88135 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 17 May 2021 23:46:07 +0200 Subject: [PATCH] gccStdenv: actually force gcc if not already used Previously the `cc` of the stdenv wasn't changed if `!stdenv.cc.isGNU` which meant that gccStdenv didn't actually use gcc -- in contrast to all the versioned `gcc*Stdenv`s. --- pkgs/top-level/all-packages.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f7376fc183..45ab94f46e2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10402,12 +10402,16 @@ in }; }) else ccWrapper; - gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override { - allowedRequisites = null; - # Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses - # clang's internal assembler). - extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; - }; + gccStdenv = + if stdenv.cc.isGNU + then stdenv + else stdenv.override { + cc = buildPackages.gcc; + allowedRequisites = null; + # Remove libcxx/libcxxabi, and add clang for AS if on darwin (it uses + # clang's internal assembler). + extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; + }; gcc49Stdenv = overrideCC gccStdenv buildPackages.gcc49; gcc6Stdenv = overrideCC gccStdenv buildPackages.gcc6;