Merge pull request #25227 from obsidiansystems/cross-purge-binutilsCross

Purge binutilsCross
This commit is contained in:
John Ericson 2017-04-26 09:09:06 -04:00 committed by GitHub
commit 761af14778
15 changed files with 55 additions and 61 deletions

View File

@ -89,6 +89,8 @@ rec {
msvc = {}; msvc = {};
eabi = {}; eabi = {};
androideabi = {}; androideabi = {};
gnueabi = {};
gnueabihf = {};
unknown = {}; unknown = {};
}; };

View File

@ -20,7 +20,6 @@
, enableMultilib ? false , enableMultilib ? false
, name ? "gcc" , name ? "gcc"
, cross ? null , cross ? null
, binutilsCross ? null
, libcCross ? null , libcCross ? null
, crossStageStatic ? true , crossStageStatic ? true
, gnat ? null , gnat ? null
@ -225,7 +224,7 @@ stdenv.mkDerivation ({
++ (optional langJava boehmgc) ++ (optional langJava boehmgc)
++ (optionals langJava [zip unzip]) ++ (optionals langJava [zip unzip])
++ (optionals javaAwtGtk ([gtk2 pkgconfig libart_lgpl] ++ xlibs)) ++ (optionals javaAwtGtk ([gtk2 pkgconfig libart_lgpl] ++ xlibs))
++ (optionals (cross != null) [binutilsCross]) ++ (optionals (cross != null) [binutils])
++ (optionals langAda [gnatboot]) ++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat]) ++ (optionals langVhdl [gnat])
; ;

View File

@ -26,7 +26,6 @@
, enablePlugin ? true # whether to support user-supplied plug-ins , enablePlugin ? true # whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, cross ? null , cross ? null
, binutilsCross ? null
, libcCross ? null , libcCross ? null
, crossStageStatic ? true , crossStageStatic ? true
, gnat ? null , gnat ? null
@ -171,8 +170,8 @@ let version = "4.8.5";
else " --with-headers=${libcCross.dev}/include") + else " --with-headers=${libcCross.dev}/include") +
# Ensure that -print-prog-name is able to find the correct programs. # Ensure that -print-prog-name is able to find the correct programs.
(stdenv.lib.optionalString (crossMingw || crossDarwin) ( (stdenv.lib.optionalString (crossMingw || crossDarwin) (
" --with-as=${binutilsCross}/bin/${cross.config}-as" + " --with-as=${binutils}/bin/${cross.config}-as" +
" --with-ld=${binutilsCross}/bin/${cross.config}-ld" " --with-ld=${binutils}/bin/${cross.config}-ld"
)) + )) +
" --enable-__cxa_atexit" + " --enable-__cxa_atexit" +
" --enable-long-long" + " --enable-long-long" +
@ -294,7 +293,7 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (cross != null) [binutilsCross]) ++ (optionals (cross != null) [binutils])
++ (optionals langAda [gnatboot]) ++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat]) ++ (optionals langVhdl [gnat])

View File

@ -26,7 +26,6 @@
, enablePlugin ? true # whether to support user-supplied plug-ins , enablePlugin ? true # whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, cross ? null , cross ? null
, binutilsCross ? null
, libcCross ? null , libcCross ? null
, crossStageStatic ? true , crossStageStatic ? true
, gnat ? null , gnat ? null
@ -172,8 +171,8 @@ let version = "4.9.4";
else " --with-headers=${libcCross.dev}/include") + else " --with-headers=${libcCross.dev}/include") +
# Ensure that -print-prog-name is able to find the correct programs. # Ensure that -print-prog-name is able to find the correct programs.
(stdenv.lib.optionalString (crossMingw || crossDarwin) ( (stdenv.lib.optionalString (crossMingw || crossDarwin) (
" --with-as=${binutilsCross}/bin/${cross.config}-as" + " --with-as=${binutils}/bin/${cross.config}-as" +
" --with-ld=${binutilsCross}/bin/${cross.config}-ld" " --with-ld=${binutils}/bin/${cross.config}-ld"
)) + )) +
" --enable-__cxa_atexit" + " --enable-__cxa_atexit" +
" --enable-long-long" + " --enable-long-long" +
@ -299,7 +298,7 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (cross != null) [binutilsCross]) ++ (optionals (cross != null) [binutils])
++ (optionals langAda [gnatboot]) ++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat]) ++ (optionals langVhdl [gnat])

View File

@ -26,7 +26,6 @@
, enablePlugin ? true # whether to support user-supplied plug-ins , enablePlugin ? true # whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, cross ? null , cross ? null
, binutilsCross ? null
, libcCross ? null , libcCross ? null
, crossStageStatic ? true , crossStageStatic ? true
, gnat ? null , gnat ? null
@ -176,8 +175,8 @@ let version = "5.4.0";
else " --with-headers=${getDev libcCross}/include") + else " --with-headers=${getDev libcCross}/include") +
# Ensure that -print-prog-name is able to find the correct programs. # Ensure that -print-prog-name is able to find the correct programs.
(stdenv.lib.optionalString (crossMingw || crossDarwin) ( (stdenv.lib.optionalString (crossMingw || crossDarwin) (
" --with-as=${binutilsCross}/bin/${cross.config}-as" + " --with-as=${binutils}/bin/${cross.config}-as" +
" --with-ld=${binutilsCross}/bin/${cross.config}-ld" " --with-ld=${binutils}/bin/${cross.config}-ld"
)) + )) +
" --enable-__cxa_atexit" + " --enable-__cxa_atexit" +
" --enable-long-long" + " --enable-long-long" +
@ -315,7 +314,7 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (cross != null) [binutilsCross]) ++ (optionals (cross != null) [binutils])
++ (optionals langAda [gnatboot]) ++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat]) ++ (optionals langVhdl [gnat])

View File

@ -26,7 +26,6 @@
, enablePlugin ? true # whether to support user-supplied plug-ins , enablePlugin ? true # whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, cross ? null , cross ? null
, binutilsCross ? null
, libcCross ? null , libcCross ? null
, crossStageStatic ? true , crossStageStatic ? true
, gnat ? null , gnat ? null
@ -172,8 +171,8 @@ let version = "6.3.0";
else " --with-headers=${getDev libcCross}/include") + else " --with-headers=${getDev libcCross}/include") +
# Ensure that -print-prog-name is able to find the correct programs. # Ensure that -print-prog-name is able to find the correct programs.
(stdenv.lib.optionalString (crossMingw || crossDarwin) ( (stdenv.lib.optionalString (crossMingw || crossDarwin) (
" --with-as=${binutilsCross}/bin/${cross.config}-as" + " --with-as=${binutils}/bin/${cross.config}-as" +
" --with-ld=${binutilsCross}/bin/${cross.config}-ld" " --with-ld=${binutils}/bin/${cross.config}-ld"
)) + )) +
" --enable-__cxa_atexit" + " --enable-__cxa_atexit" +
" --enable-long-long" + " --enable-long-long" +
@ -297,7 +296,7 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (cross != null) [binutilsCross]) ++ (optionals (cross != null) [binutils])
++ (optionals langAda [gnatboot]) ++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat]) ++ (optionals langVhdl [gnat])

View File

@ -26,7 +26,6 @@
, enablePlugin ? true # whether to support user-supplied plug-ins , enablePlugin ? true # whether to support user-supplied plug-ins
, name ? "gcc" , name ? "gcc"
, cross ? null , cross ? null
, binutilsCross ? null
, libcCross ? null , libcCross ? null
, crossStageStatic ? true , crossStageStatic ? true
, gnat ? null , gnat ? null
@ -172,8 +171,8 @@ let version = "7-20170409";
else " --with-headers=${getDev libcCross}/include") + else " --with-headers=${getDev libcCross}/include") +
# Ensure that -print-prog-name is able to find the correct programs. # Ensure that -print-prog-name is able to find the correct programs.
(stdenv.lib.optionalString (crossMingw || crossDarwin) ( (stdenv.lib.optionalString (crossMingw || crossDarwin) (
" --with-as=${binutilsCross}/bin/${cross.config}-as" + " --with-as=${binutils}/bin/${cross.config}-as" +
" --with-ld=${binutilsCross}/bin/${cross.config}-ld" " --with-ld=${binutils}/bin/${cross.config}-ld"
)) + )) +
" --enable-__cxa_atexit" + " --enable-__cxa_atexit" +
" --enable-long-long" + " --enable-long-long" +
@ -297,7 +296,7 @@ stdenv.mkDerivation ({
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
++ (optionals (cross != null) [binutilsCross]) ++ (optionals (cross != null) [binutils])
++ (optionals langAda [gnatboot]) ++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat]) ++ (optionals langVhdl [gnat])

View File

@ -99,17 +99,17 @@ in stdenv.mkDerivation (rec {
configureFlags = [ configureFlags = [
"CC=${stdenv.ccCross}/bin/${cross.config}-cc" "CC=${stdenv.ccCross}/bin/${cross.config}-cc"
"LD=${stdenv.binutilsCross}/bin/${cross.config}-ld" "LD=${stdenv.binutils}/bin/${cross.config}-ld"
"AR=${stdenv.binutilsCross}/bin/${cross.config}-ar" "AR=${stdenv.binutils}/bin/${cross.config}-ar"
"NM=${stdenv.binutilsCross}/bin/${cross.config}-nm" "NM=${stdenv.binutils}/bin/${cross.config}-nm"
"RANLIB=${stdenv.binutilsCross}/bin/${cross.config}-ranlib" "RANLIB=${stdenv.binutils}/bin/${cross.config}-ranlib"
"--target=${cross.config}" "--target=${cross.config}"
"--enable-bootstrap-with-devel-snapshot" "--enable-bootstrap-with-devel-snapshot"
] ++ ] ++
# fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space"; lib.optional (cross.config or null == "aarch64-apple-darwin14") "--disable-large-address-space";
buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutilsCross ]; buildInputs = commonBuildInputs ++ [ stdenv.ccCross stdenv.binutils ];
dontSetConfigureCross = true; dontSetConfigureCross = true;
@ -118,6 +118,6 @@ in stdenv.mkDerivation (rec {
cc = "${stdenv.ccCross}/bin/${cross.config}-cc"; cc = "${stdenv.ccCross}/bin/${cross.config}-cc";
ld = "${stdenv.binutilsCross}/bin/${cross.config}-ld"; ld = "${stdenv.binutils}/bin/${cross.config}-ld";
}; };
}) })

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, binutilsCross ? null, gccCross ? null { stdenv, fetchurl, binutils ? null, gccCross ? null
, onlyHeaders ? false , onlyHeaders ? false
, onlyPthreads ? false , onlyPthreads ? false
}: }:
@ -27,7 +27,7 @@ stdenv.mkDerivation ({
cd mingw-w64-libraries/winpthreads cd mingw-w64-libraries/winpthreads
''; '';
} else { } else {
buildInputs = [ gccCross binutilsCross ]; buildInputs = [ gccCross binutils ];
crossConfig = gccCross.crossConfig; crossConfig = gccCross.crossConfig;

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, binutilsCross ? null, gccCross ? null, onlyHeaders ? false}: {stdenv, fetchurl, binutils ? null, gccCross ? null, onlyHeaders ? false}:
let let
name = "mingwrt-3.20"; name = "mingwrt-3.20";
@ -20,7 +20,7 @@ stdenv.mkDerivation (rec {
cp -R include $out cp -R include $out
''; '';
} else { } else {
buildInputs = [ gccCross binutilsCross ]; buildInputs = [ gccCross binutils ];
crossConfig = gccCross.crossConfig; crossConfig = gccCross.crossConfig;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, xz, binutilsCross ? null { stdenv, fetchurl, xz, binutils ? null
, gccCross ? null, onlyHeaders ? false }: , gccCross ? null, onlyHeaders ? false }:
let let
@ -23,7 +23,7 @@ stdenv.mkDerivation ({
cp -R include $out cp -R include $out
''; '';
} else { } else {
buildInputs = [ gccCross binutilsCross ]; buildInputs = [ gccCross binutils ];
crossConfig = gccCross.crossConfig; crossConfig = gccCross.crossConfig;

View File

@ -56,7 +56,7 @@ rec {
# Return a modified stdenv that adds a cross compiler to the # Return a modified stdenv that adds a cross compiler to the
# builds. # builds.
makeStdenvCross = stdenv: cross: binutilsCross: gccCross: stdenv // { makeStdenvCross = stdenv: cross: binutils: gccCross: stdenv // {
# Overrides are surely not valid as packages built with this run on a # Overrides are surely not valid as packages built with this run on a
# different platform. # different platform.
@ -91,7 +91,7 @@ rec {
name = name + "-" + cross.config; name = name + "-" + cross.config;
nativeBuildInputs = nativeBuildInputs nativeBuildInputs = nativeBuildInputs
++ nativeInputsFromBuildInputs ++ nativeInputsFromBuildInputs
++ [ gccCross binutilsCross ] ++ [ gccCross binutils ]
++ stdenv.lib.optional selfNativeBuildInput nativeDrv ++ stdenv.lib.optional selfNativeBuildInput nativeDrv
# without proper `file` command, libtool sometimes fails # without proper `file` command, libtool sometimes fails
# to recognize 64-bit DLLs # to recognize 64-bit DLLs
@ -110,7 +110,7 @@ rec {
crossConfig = cross.config; crossConfig = cross.config;
} // args.crossAttrs or {}); } // args.crossAttrs or {});
inherit gccCross binutilsCross; inherit gccCross binutils;
ccCross = gccCross; ccCross = gccCross;
}; };

View File

@ -39,7 +39,7 @@ in bootStages ++ [
binutils cc binutils cc
else buildPackages.makeStdenvCross else buildPackages.makeStdenvCross
buildPackages.stdenv crossSystem buildPackages.stdenv crossSystem
buildPackages.binutilsCross buildPackages.gccCrossStageFinal; buildPackages.binutils buildPackages.gccCrossStageFinal;
}) })
] ]

View File

@ -70,8 +70,6 @@ let
pkgs = pkgsFun ({inherit system;} // selectedCrossSystem); pkgs = pkgsFun ({inherit system;} // selectedCrossSystem);
inherit (pkgs.buildPackages) stdenv nukeReferences cpio binutilsCross;
glibc = pkgs.buildPackages.libcCross; glibc = pkgs.buildPackages.libcCross;
bash = pkgs.bash; bash = pkgs.bash;
findutils = pkgs.findutils; findutils = pkgs.findutils;
@ -126,11 +124,15 @@ rec {
build = build =
stdenv.mkDerivation { pkgs.buildPackages.stdenv.mkDerivation {
name = "stdenv-bootstrap-tools-cross"; name = "stdenv-bootstrap-tools-cross";
crossConfig = pkgs.hostPlatform.config; crossConfig = pkgs.hostPlatform.config;
buildInputs = [nukeReferences cpio binutilsCross]; buildInputs = [
pkgs.buildPackages.nukeReferences
pkgs.buildPackages.cpio
pkgs.buildPackages.binutils
];
buildCommand = '' buildCommand = ''
set -x set -x
@ -261,7 +263,7 @@ rec {
allowedReferences = []; allowedReferences = [];
}; };
dist = stdenv.mkDerivation { dist = pkgs.buildPackages.stdenv.mkDerivation {
name = "stdenv-bootstrap-tools-cross"; name = "stdenv-bootstrap-tools-cross";
buildCommand = '' buildCommand = ''

View File

@ -4988,10 +4988,10 @@ with pkgs;
libcCross = libcCross1; libcCross = libcCross1;
enableShared = false; enableShared = false;
# Why is this needed? # Why is this needed?
inherit (forcedNativePackages) binutilsCross; inherit (forcedNativePackages) binutils;
}; };
libc = libcCross1; libc = libcCross1;
binutils = binutilsCross; inherit (forcedNativePackages) binutils;
cross = targetPlatform; cross = targetPlatform;
}; };
@ -4999,7 +4999,7 @@ with pkgs;
gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapGCCCross { gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapGCCCross {
gcc = gccCrossStageStatic.gcc; gcc = gccCrossStageStatic.gcc;
libc = windows.mingw_headers2; libc = windows.mingw_headers2;
binutils = binutilsCross; inherit (forcedNativePackages) binutils;
cross = targetPlatform; cross = targetPlatform;
}; };
@ -5012,10 +5012,10 @@ with pkgs;
# <http://hydra.nixos.org/build/4268232>), so don't even try. # <http://hydra.nixos.org/build/4268232>), so don't even try.
langCC = targetPlatform.config != "i686-pc-mingw32"; langCC = targetPlatform.config != "i686-pc-mingw32";
# Why is this needed? # Why is this needed?
inherit (forcedNativePackages) binutilsCross; inherit (forcedNativePackages) binutils;
}; };
libc = libcCross; libc = libcCross;
binutils = binutilsCross; inherit (forcedNativePackages) binutils;
cross = targetPlatform; cross = targetPlatform;
}; };
@ -6342,20 +6342,16 @@ with pkgs;
binutils = if stdenv.isDarwin then darwin.binutils else binutils-raw; binutils = if stdenv.isDarwin then darwin.binutils else binutils-raw;
binutils-raw = callPackage ../development/tools/misc/binutils { inherit noSysDirs; }; binutils-raw = callPackage ../development/tools/misc/binutils {
# FHS sys dirs presumably only have stuff for the build platform
noSysDirs = (targetPlatform != buildPlatform) || noSysDirs;
cross = if targetPlatform != hostPlatform then targetPlatform else null;
};
binutils_nogold = lowPrio (callPackage ../development/tools/misc/binutils { binutils_nogold = lowPrio (binutils-raw.override {
inherit noSysDirs;
gold = false; gold = false;
}); });
binutilsCross = assert targetPlatform != buildPlatform; lowPrio (
if targetPlatform.libc == "libSystem" then darwin.cctools_cross
else forcedNativePackages.binutils.override {
noSysDirs = true;
cross = targetPlatform;
});
bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { }; bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { };
bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { }; bison3 = callPackage ../development/tools/parsing/bison/3.x.nix { };
bison = bison3; bison = bison3;
@ -12312,7 +12308,7 @@ with pkgs;
w32api = callPackage ../os-specific/windows/w32api { w32api = callPackage ../os-specific/windows/w32api {
gccCross = gccCrossStageStatic; gccCross = gccCrossStageStatic;
binutilsCross = binutilsCross; binutils = binutils;
}; };
w32api_headers = w32api.override { w32api_headers = w32api.override {
@ -12321,7 +12317,7 @@ with pkgs;
mingw_runtime = callPackage ../os-specific/windows/mingwrt { mingw_runtime = callPackage ../os-specific/windows/mingwrt {
gccCross = gccCrossMingw2; gccCross = gccCrossMingw2;
binutilsCross = binutilsCross; binutils = binutils;
}; };
mingw_runtime_headers = mingw_runtime.override { mingw_runtime_headers = mingw_runtime.override {
@ -12345,7 +12341,7 @@ with pkgs;
mingw_w64 = callPackage ../os-specific/windows/mingw-w64 { mingw_w64 = callPackage ../os-specific/windows/mingw-w64 {
gccCross = gccCrossStageStatic; gccCross = gccCrossStageStatic;
binutilsCross = binutilsCross; binutils = binutils;
}; };
mingw_w64_headers = callPackage ../os-specific/windows/mingw-w64 { mingw_w64_headers = callPackage ../os-specific/windows/mingw-w64 {