From cad35edf30b1955c534567ea08d2f5cd4e7a9c27 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 15 Apr 2022 00:31:58 +0200 Subject: [PATCH] llvmPackage: Only force GCC stdenv for native x86_32 Per ee35de1861fa37c968619b3868a6a0e5b8caa949 the condition that was there before was not quite right, to avoid infinite recurion. This one is probably also not quite right, but good enough for now. Co-Authored-By: John Ericson --- pkgs/top-level/all-packages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 98e3c19b45ec..415b66ae5144 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13268,7 +13268,7 @@ with pkgs; inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_11.tools; targetLlvmLibraries = targetPackages.llvmPackages_11.libraries or llvmPackages_11.libraries; - } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { + } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { stdenv = gcc7Stdenv; })); @@ -13276,7 +13276,7 @@ with pkgs; inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_12.tools; targetLlvmLibraries = targetPackages.llvmPackages_12.libraries or llvmPackages_12.libraries; - } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { + } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { stdenv = gcc7Stdenv; })); @@ -13284,7 +13284,7 @@ with pkgs; inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_13.tools; targetLlvmLibraries = targetPackages.llvmPackages_13.libraries or llvmPackages_13.libraries; - } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { + } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { stdenv = gcc7Stdenv; })); @@ -13292,7 +13292,7 @@ with pkgs; inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_14.tools; targetLlvmLibraries = targetPackages.llvmPackages_14.libraries or llvmPackages_14.libraries; - } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { + } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) { stdenv = gcc7Stdenv; }));