binutils on darwin: Clean up the rats nest

- No more *Cross duplication for binutils on darwin either.
   `cctools_cross` is merged into plain `cctools`, so `buildPackages`
   chains alone are used to disambiguate.

 - Always use a mashup of cctools and actual GNU Binutils as `binutils`.
   Previously, this was only done in the native case as nobody had
   bothered to implement the masher in the cross case. Implemented it
   basically consisted of extending the wrapper to deal with prefixed
   binaries.
This commit is contained in:
John Ericson
2017-05-17 15:33:05 -04:00
parent bfa8f30499
commit 88ea6463a3
4 changed files with 68 additions and 40 deletions
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
./no-plugins.patch
];
# TODO: all outputs on all platform
outputs = [ "out" ]
++ optional (cross == null && !stdenv.isDarwin) "lib" # problems in Darwin stdenv
++ [ "info" ]
@@ -75,7 +76,7 @@ stdenv.mkDerivation rec {
configureFlags =
[ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ]
++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
++ optional (cross != null) "--target=${cross.config}"
++ optional (cross != null) "--target=${cross.config}" # TODO: make this unconditional
++ optionals gold [ "--enable-gold" "--enable-plugins" ]
++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";