2019-02-14 15:29:42 +08:00
|
|
|
{ stdenv, buildPackages
|
|
|
|
, fetchurl, zlib
|
2019-08-25 09:27:12 +08:00
|
|
|
, platform, target
|
2019-02-14 15:29:42 +08:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
basename = "binutils";
|
2019-08-25 09:27:12 +08:00
|
|
|
inherit platform;
|
2019-02-14 15:29:42 +08:00
|
|
|
version = "2.30";
|
2019-08-26 10:17:17 +08:00
|
|
|
name = "${basename}-${platform}-${version}";
|
2019-02-14 15:29:42 +08:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.bz2";
|
|
|
|
sha256 = "028cklfqaab24glva1ks2aqa1zxa6w6xmc8q34zs1sb7h22dxspg";
|
|
|
|
};
|
|
|
|
configureFlags =
|
2019-08-25 09:27:12 +08:00
|
|
|
[ "--enable-shared" "--enable-deterministic-archives" "--target=${target}"];
|
2019-02-14 15:29:42 +08:00
|
|
|
outputs = [ "out" "info" "man" ];
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = {
|
|
|
|
description = "Tools for manipulating binaries (linker, assembler, etc.)";
|
|
|
|
longDescription = ''
|
|
|
|
The GNU Binutils are a collection of binary tools. The main
|
|
|
|
ones are `ld' (the GNU linker) and `as' (the GNU assembler).
|
|
|
|
They also include the BFD (Binary File Descriptor) library,
|
|
|
|
`gprof', `nm', `strip', etc.
|
|
|
|
'';
|
|
|
|
homepage = http://www.gnu.org/software/binutils/;
|
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
|
|
|
/* Give binutils a lower priority than gcc-wrapper to prevent a
|
|
|
|
collision due to the ld/as wrappers/symlinks in the latter. */
|
|
|
|
priority = "10";
|
|
|
|
};
|
|
|
|
}
|