binutilsCross: Remove and use `binutils` instead always

See previous commit for what was done to `binutils` to make this
possible.

There were some uses of `forcedNativePackages` added. The
combination of overrides with that attribute is highly spooky: it's
often important that if an overridden package comes from it, the
replaced arguments for that package come from it. Long term this
package set and all the spookiness should be gone and irrelevant:

"Move along, nothing to see here!"

No hashes should be changed with this commit

+40 -53
+1 -2
pkgs/development/compilers/gcc/4.5/default.nix
··· 20 20 , enableMultilib ? false 21 21 , name ? "gcc" 22 22 , cross ? null 23 - , binutilsCross ? null 24 23 , libcCross ? null 25 24 , crossStageStatic ? true 26 25 , gnat ? null ··· 225 224 ++ (optional langJava boehmgc) 226 225 ++ (optionals langJava [zip unzip]) 227 226 ++ (optionals javaAwtGtk ([gtk2 pkgconfig libart_lgpl] ++ xlibs)) 228 - ++ (optionals (cross != null) [binutilsCross]) 227 + ++ (optionals (cross != null) [binutils]) 229 228 ++ (optionals langAda [gnatboot]) 230 229 ++ (optionals langVhdl [gnat]) 231 230 ;
+3 -4
pkgs/development/compilers/gcc/4.8/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , cross ? null 29 - , binutilsCross ? null 30 29 , libcCross ? null 31 30 , crossStageStatic ? true 32 31 , gnat ? null ··· 171 170 else " --with-headers=${libcCross.dev}/include") + 172 171 # Ensure that -print-prog-name is able to find the correct programs. 173 172 (stdenv.lib.optionalString (crossMingw || crossDarwin) ( 174 - " --with-as=${binutilsCross}/bin/${cross.config}-as" + 175 - " --with-ld=${binutilsCross}/bin/${cross.config}-ld" 173 + " --with-as=${binutils}/bin/${cross.config}-as" + 174 + " --with-ld=${binutils}/bin/${cross.config}-ld" 176 175 )) + 177 176 " --enable-__cxa_atexit" + 178 177 " --enable-long-long" + ··· 294 293 ++ (optional (zlib != null) zlib) 295 294 ++ (optionals langJava [ boehmgc zip unzip ]) 296 295 ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) 297 - ++ (optionals (cross != null) [binutilsCross]) 296 + ++ (optionals (cross != null) [binutils]) 298 297 ++ (optionals langAda [gnatboot]) 299 298 ++ (optionals langVhdl [gnat]) 300 299
+3 -4
pkgs/development/compilers/gcc/4.9/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , cross ? null 29 - , binutilsCross ? null 30 29 , libcCross ? null 31 30 , crossStageStatic ? true 32 31 , gnat ? null ··· 172 171 else " --with-headers=${libcCross.dev}/include") + 173 172 # Ensure that -print-prog-name is able to find the correct programs. 174 173 (stdenv.lib.optionalString (crossMingw || crossDarwin) ( 175 - " --with-as=${binutilsCross}/bin/${cross.config}-as" + 176 - " --with-ld=${binutilsCross}/bin/${cross.config}-ld" 174 + " --with-as=${binutils}/bin/${cross.config}-as" + 175 + " --with-ld=${binutils}/bin/${cross.config}-ld" 177 176 )) + 178 177 " --enable-__cxa_atexit" + 179 178 " --enable-long-long" + ··· 299 298 ++ (optional (zlib != null) zlib) 300 299 ++ (optionals langJava [ boehmgc zip unzip ]) 301 300 ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) 302 - ++ (optionals (cross != null) [binutilsCross]) 301 + ++ (optionals (cross != null) [binutils]) 303 302 ++ (optionals langAda [gnatboot]) 304 303 ++ (optionals langVhdl [gnat]) 305 304
+3 -4
pkgs/development/compilers/gcc/5/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , cross ? null 29 - , binutilsCross ? null 30 29 , libcCross ? null 31 30 , crossStageStatic ? true 32 31 , gnat ? null ··· 176 175 else " --with-headers=${getDev libcCross}/include") + 177 176 # Ensure that -print-prog-name is able to find the correct programs. 178 177 (stdenv.lib.optionalString (crossMingw || crossDarwin) ( 179 - " --with-as=${binutilsCross}/bin/${cross.config}-as" + 180 - " --with-ld=${binutilsCross}/bin/${cross.config}-ld" 178 + " --with-as=${binutils}/bin/${cross.config}-as" + 179 + " --with-ld=${binutils}/bin/${cross.config}-ld" 181 180 )) + 182 181 " --enable-__cxa_atexit" + 183 182 " --enable-long-long" + ··· 309 308 ++ (optional (zlib != null) zlib) 310 309 ++ (optionals langJava [ boehmgc zip unzip ]) 311 310 ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) 312 - ++ (optionals (cross != null) [binutilsCross]) 311 + ++ (optionals (cross != null) [binutils]) 313 312 ++ (optionals langAda [gnatboot]) 314 313 ++ (optionals langVhdl [gnat]) 315 314
+3 -4
pkgs/development/compilers/gcc/6/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , cross ? null 29 - , binutilsCross ? null 30 29 , libcCross ? null 31 30 , crossStageStatic ? true 32 31 , gnat ? null ··· 172 171 else " --with-headers=${getDev libcCross}/include") + 173 172 # Ensure that -print-prog-name is able to find the correct programs. 174 173 (stdenv.lib.optionalString (crossMingw || crossDarwin) ( 175 - " --with-as=${binutilsCross}/bin/${cross.config}-as" + 176 - " --with-ld=${binutilsCross}/bin/${cross.config}-ld" 174 + " --with-as=${binutils}/bin/${cross.config}-as" + 175 + " --with-ld=${binutils}/bin/${cross.config}-ld" 177 176 )) + 178 177 " --enable-__cxa_atexit" + 179 178 " --enable-long-long" + ··· 297 296 ++ (optional (zlib != null) zlib) 298 297 ++ (optionals langJava [ boehmgc zip unzip ]) 299 298 ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) 300 - ++ (optionals (cross != null) [binutilsCross]) 299 + ++ (optionals (cross != null) [binutils]) 301 300 ++ (optionals langAda [gnatboot]) 302 301 ++ (optionals langVhdl [gnat]) 303 302
+3 -4
pkgs/development/compilers/gcc/snapshot/default.nix
··· 26 26 , enablePlugin ? true # whether to support user-supplied plug-ins 27 27 , name ? "gcc" 28 28 , cross ? null 29 - , binutilsCross ? null 30 29 , libcCross ? null 31 30 , crossStageStatic ? true 32 31 , gnat ? null ··· 172 171 else " --with-headers=${getDev libcCross}/include") + 173 172 # Ensure that -print-prog-name is able to find the correct programs. 174 173 (stdenv.lib.optionalString (crossMingw || crossDarwin) ( 175 - " --with-as=${binutilsCross}/bin/${cross.config}-as" + 176 - " --with-ld=${binutilsCross}/bin/${cross.config}-ld" 174 + " --with-as=${binutils}/bin/${cross.config}-as" + 175 + " --with-ld=${binutils}/bin/${cross.config}-ld" 177 176 )) + 178 177 " --enable-__cxa_atexit" + 179 178 " --enable-long-long" + ··· 297 296 ++ (optional (zlib != null) zlib) 298 297 ++ (optionals langJava [ boehmgc zip unzip ]) 299 298 ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) 300 - ++ (optionals (cross != null) [binutilsCross]) 299 + ++ (optionals (cross != null) [binutils]) 301 300 ++ (optionals langAda [gnatboot]) 302 301 ++ (optionals langVhdl [gnat]) 303 302
+6 -6
pkgs/development/compilers/ghc/head.nix
··· 99 99 100 100 configureFlags = [ 101 101 "CC=${stdenv.ccCross}/bin/${cross.config}-cc" 102 - "LD=${stdenv.binutilsCross}/bin/${cross.config}-ld" 103 - "AR=${stdenv.binutilsCross}/bin/${cross.config}-ar" 104 - "NM=${stdenv.binutilsCross}/bin/${cross.config}-nm" 105 - "RANLIB=${stdenv.binutilsCross}/bin/${cross.config}-ranlib" 102 + "LD=${stdenv.binutils}/bin/${cross.config}-ld" 103 + "AR=${stdenv.binutils}/bin/${cross.config}-ar" 104 + "NM=${stdenv.binutils}/bin/${cross.config}-nm" 105 + "RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib" 106 106 "--target=${cross.config}" 107 107 "--enable-bootstrap-with-devel-snapshot" 108 108 ] ++ 109 109 # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ 110 110 lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; 111 111 112 - buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutilsCross ]; 112 + buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ]; 113 113 114 114 dontSetConfigureCross = true; 115 115 ··· 118 118 119 119 cc = "${stdenv.ccCross}/bin/${cross.config}-cc"; 120 120 121 - ld = "${stdenv.binutilsCross}/bin/${cross.config}-ld"; 121 + ld = "${stdenv.binutils}/bin/${cross.config}-ld"; 122 122 }; 123 123 })
+2 -2
pkgs/os-specific/windows/mingw-w64/default.nix
··· 1 - { stdenv, fetchurl, binutilsCross ? null, gccCross ? null 1 + { stdenv, fetchurl, binutils ? null, gccCross ? null 2 2 , onlyHeaders ? false 3 3 , onlyPthreads ? false 4 4 }: ··· 27 27 cd mingw-w64-libraries/winpthreads 28 28 ''; 29 29 } else { 30 - buildInputs = [ gccCross binutilsCross ]; 30 + buildInputs = [ gccCross binutils ]; 31 31 32 32 crossConfig = gccCross.crossConfig; 33 33
+2 -2
pkgs/os-specific/windows/mingwrt/default.nix
··· 1 - {stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}: 1 + {stdenv, fetchurl, binutils ? null, gccCross ? null, onlyHeaders ? false}: 2 2 3 3 let 4 4 name = "mingwrt-3.20"; ··· 20 20 cp -R include $out 21 21 ''; 22 22 } else { 23 - buildInputs = [ gccCross binutilsCross ]; 23 + buildInputs = [ gccCross binutils ]; 24 24 25 25 crossConfig = gccCross.crossConfig; 26 26
+2 -2
pkgs/os-specific/windows/w32api/default.nix
··· 1 - { stdenv, fetchurl, xz, binutilsCross ? null 1 + { stdenv, fetchurl, xz, binutils ? null 2 2 , gccCross ? null, onlyHeaders ? false }: 3 3 4 4 let ··· 23 23 cp -R include $out 24 24 ''; 25 25 } else { 26 - buildInputs = [ gccCross binutilsCross ]; 26 + buildInputs = [ gccCross binutils ]; 27 27 28 28 crossConfig = gccCross.crossConfig; 29 29
+3 -3
pkgs/stdenv/adapters.nix
··· 56 56 57 57 # Return a modified stdenv that adds a cross compiler to the 58 58 # builds. 59 - makeStdenvCross = stdenv: cross: binutilsCross: gccCross: stdenv // { 59 + makeStdenvCross = stdenv: cross: binutils: gccCross: stdenv // { 60 60 61 61 # Overrides are surely not valid as packages built with this run on a 62 62 # different platform. ··· 91 91 name = name + "-" + cross.config; 92 92 nativeBuildInputs = nativeBuildInputs 93 93 ++ nativeInputsFromBuildInputs 94 - ++ [ gccCross binutilsCross ] 94 + ++ [ gccCross binutils ] 95 95 ++ stdenv.lib.optional selfNativeBuildInput nativeDrv 96 96 # without proper `file` command, libtool sometimes fails 97 97 # to recognize 64-bit DLLs ··· 110 110 crossConfig = cross.config; 111 111 } // args.crossAttrs or {}); 112 112 113 - inherit gccCross binutilsCross; 113 + inherit gccCross binutils; 114 114 ccCross = gccCross; 115 115 116 116 };
+1 -1
pkgs/stdenv/cross/default.nix
··· 39 39 binutils cc 40 40 else buildPackages.makeStdenvCross 41 41 buildPackages.stdenv crossSystem 42 - buildPackages.binutilsCross buildPackages.gccCrossStageFinal; 42 + buildPackages.binutils buildPackages.gccCrossStageFinal; 43 43 }) 44 44 45 45 ]
+8 -15
pkgs/top-level/all-packages.nix
··· 4982 4982 libcCross = libcCross1; 4983 4983 enableShared = false; 4984 4984 # Why is this needed? 4985 - inherit (forcedNativePackages) binutilsCross; 4985 + inherit (forcedNativePackages) binutils; 4986 4986 }; 4987 4987 libc = libcCross1; 4988 - binutils = binutilsCross; 4988 + inherit (forcedNativePackages) binutils; 4989 4989 cross = targetPlatform; 4990 4990 }; 4991 4991 ··· 4993 4993 gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapGCCCross { 4994 4994 gcc = gccCrossStageStatic.gcc; 4995 4995 libc = windows.mingw_headers2; 4996 - binutils = binutilsCross; 4996 + inherit (forcedNativePackages) binutils; 4997 4997 cross = targetPlatform; 4998 4998 }; 4999 4999 ··· 5006 5006 # <http://hydra.nixos.org/build/4268232>), so don't even try. 5007 5007 langCC = targetPlatform.config != "i686-pc-mingw32"; 5008 5008 # Why is this needed? 5009 - inherit (forcedNativePackages) binutilsCross; 5009 + inherit (forcedNativePackages) binutils; 5010 5010 }; 5011 5011 libc = libcCross; 5012 - binutils = binutilsCross; 5012 + inherit (forcedNativePackages) binutils; 5013 5013 cross = targetPlatform; 5014 5014 }; 5015 5015 ··· 6345 6345 binutils_nogold = lowPrio (binutils-raw.override { 6346 6346 gold = false; 6347 6347 }); 6348 - 6349 - binutilsCross = assert targetPlatform != buildPlatform; lowPrio ( 6350 - if targetPlatform.libc == "libSystem" then darwin.cctools_cross 6351 - else forcedNativePackages.binutils.override { 6352 - noSysDirs = true; 6353 - cross = targetPlatform; 6354 - }); 6355 6348 6356 6349 bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { }; 6357 6350 bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { }; ··· 12305 12298 12306 12299 w32api = callPackage ../os-specific/windows/w32api { 12307 12300 gccCross = gccCrossStageStatic; 12308 - binutilsCross = binutilsCross; 12301 + binutils = binutils; 12309 12302 }; 12310 12303 12311 12304 w32api_headers = w32api.override { ··· 12314 12307 12315 12308 mingw_runtime = callPackage ../os-specific/windows/mingwrt { 12316 12309 gccCross = gccCrossMingw2; 12317 - binutilsCross = binutilsCross; 12310 + binutils = binutils; 12318 12311 }; 12319 12312 12320 12313 mingw_runtime_headers = mingw_runtime.override { ··· 12338 12331 12339 12332 mingw_w64 = callPackage ../os-specific/windows/mingw-w64 { 12340 12333 gccCross = gccCrossStageStatic; 12341 - binutilsCross = binutilsCross; 12334 + binutils = binutils; 12342 12335 }; 12343 12336 12344 12337 mingw_w64_headers = callPackage ../os-specific/windows/mingw-w64 {