From 95464f6ad3cb64bcc56b4761cfcb4261944679e9 Mon Sep 17 00:00:00 2001 From: John Cotton Ericson Date: Wed, 25 Dec 2019 01:21:34 -0500 Subject: [PATCH] treewide: Check `stdenv.isi686` before checking `stdenv.cc.isGNU` This makes us a bit more robust to various splicing nastiness. May splicing someday go so we don't have to resort to such hacks. --- pkgs/top-level/all-packages.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9b9277c78a8..db8a92321ea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8138,7 +8138,7 @@ in llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 ({ isl = isl_0_14; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; }); @@ -8146,7 +8146,7 @@ in inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_39.tools; targetLlvmLibraries = targetPackages.llvmPackages_39.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; }); @@ -8154,7 +8154,7 @@ in inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_4.tools; targetLlvmLibraries = targetPackages.llvmPackages_4.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; }); @@ -8162,7 +8162,7 @@ in inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_5.tools; targetLlvmLibraries = targetPackages.llvmPackages_5.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); @@ -8170,7 +8170,7 @@ in inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_6.tools; targetLlvmLibraries = targetPackages.llvmPackages_6.libraries; - } // stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { # with gcc-7 on i686: undefined reference to `__divmoddi4' # Failing tests with gcc8. stdenv = overrideCC stdenv (if stdenv.hostPlatform.isi686 then gcc6 else gcc7); @@ -8180,7 +8180,7 @@ in inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_7.tools; targetLlvmLibraries = targetPackages.llvmPackages_7.libraries; - } // stdenv.lib.optionalAttrs (buildPackages.stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); @@ -8188,7 +8188,7 @@ in inherit (stdenvAdapters) overrideCC; buildLlvmTools = buildPackages.llvmPackages_8.tools; targetLlvmLibraries = targetPackages.llvmPackages_8.libraries; - } // stdenv.lib.optionalAttrs (buildPackages.stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }); @@ -8973,7 +8973,7 @@ in spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { }; spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix ({ inherit (darwin) libobjc; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // (stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); spidermonkey_52 = callPackage ../development/interpreters/spidermonkey/52.nix { }; @@ -11347,27 +11347,27 @@ in icu58 = callPackage (import ../development/libraries/icu/58.nix fetchurl) ({ nativeBuildRoot = buildPackages.icu58.override { buildRootOnly = true; }; } // - (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + (stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu59 = callPackage ../development/libraries/icu/59.nix ({ nativeBuildRoot = buildPackages.icu59.override { buildRootOnly = true; }; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // (stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu60 = callPackage ../development/libraries/icu/60.nix ({ nativeBuildRoot = buildPackages.icu60.override { buildRootOnly = true; }; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // (stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu63 = callPackage ../development/libraries/icu/63.nix ({ nativeBuildRoot = buildPackages.icu63.override { buildRootOnly = true; }; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // (stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' })); icu64 = callPackage ../development/libraries/icu/64.nix ({ nativeBuildRoot = buildPackages.icu64.override { buildRootOnly = true; }; - } // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + } // (stdenv.lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.cc.isGNU) { stdenv = gcc6Stdenv; # with gcc-7: undefined reference to `__divmoddi4' }));