summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/cctools
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-23 17:45:27 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-30 10:09:31 -0400
commit95c8277701fb746ad4d91841de494ee869886991 (patch)
tree120ec8dad2d1a6d1c678f3d51778328f5ad2a110 /pkgs/os-specific/darwin/cctools
parentd61c22341b00171b53697164cb8241184979d14c (diff)
downloadnixpkgs-95c8277701fb746ad4d91841de494ee869886991.tar
nixpkgs-95c8277701fb746ad4d91841de494ee869886991.tar.gz
nixpkgs-95c8277701fb746ad4d91841de494ee869886991.tar.bz2
nixpkgs-95c8277701fb746ad4d91841de494ee869886991.tar.lz
nixpkgs-95c8277701fb746ad4d91841de494ee869886991.tar.xz
nixpkgs-95c8277701fb746ad4d91841de494ee869886991.tar.zst
nixpkgs-95c8277701fb746ad4d91841de494ee869886991.zip
misc pkgs: Remove unneeded *Platform == *Platform comparisons
PR #26007 used these to avoid causing a mass rebuild. Now that we know
things work, we do that to clean up.
Diffstat (limited to 'pkgs/os-specific/darwin/cctools')
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 222c51603fd..9fdb00d66be 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -1,10 +1,12 @@
 { stdenv, fetchFromGitHub, makeWrapper, autoconf, automake, libtool_2
 , llvm, libcxx, libcxxabi, clang, libuuid
 , libobjc ? null, maloader ? null, xctoolchain ? null
-, buildPlatform, hostPlatform, targetPlatform
+, hostPlatform, targetPlatform
 }:
 
 let
+  # The prefix prepended to binary names to allow multiple binuntils on the
+  # PATH to both be usable.
   prefix = stdenv.lib.optionalString
     (targetPlatform != hostPlatform)
     "${targetPlatform.config}-";
@@ -38,13 +40,10 @@ let
 
     enableParallelBuilding = true;
 
+    # TODO(@Ericson2314): Always pass "--target" and always prefix.
+    configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
     configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [
       "CXXFLAGS=-I${libcxx}/include/c++/v1"
-    ] ++ stdenv.lib.optionals (targetPlatform != buildPlatform) [
-      # TODO make unconditional next hash break
-      "--build=${buildPlatform.config}"
-      "--host=${hostPlatform.config}"
-      "--target=${targetPlatform.config}"
     ];
 
     postPatch = ''
@@ -104,6 +103,10 @@ let
         done
       '';
 
+    passthru = {
+      inherit prefix;
+    };
+
     meta = {
       homepage = "http://www.opensource.apple.com/source/cctools/";
       description = "Mac OS X Compiler Tools (cross-platform port)";