@@ -0,0 +1,50 @@
1+{stdenv, fetchurl, glibc, bison, arm-frc-linux-gnueabi-eglibc}:
2+
3+stdenv.mkDerivation rec {
4+ _target = "arm-frc-linux-gnueabi";
5+
6+ version = "2.28";
7+ name = "${_target}-binutils-${version}";
8+
9+ src = fetchurl {
10+ url = "ftp://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.bz2";
11+ sha256 = "369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88";
12+ };
13+
14+ nativeBuildInputs = [ bison arm-frc-linux-gnueabi-eglibc ];
15+ buildInputs = [ glibc ];
16+
17+ configureFlags = ''
18+ --target=${_target}
19+ --with-pkgversion='GNU-Binutils-for-FRC'
20+ --with-sysroot=$out/${_target}
21+ --with-build-sysroot=/$out/${_target}
22+ --disable-multilib
23+ --disable-nls
24+ --enable-lto
25+ --disable-libiberty-install
26+ --enable-ld
27+ --enable-gold=default
28+ --enable-plugins
29+ '';
30+
31+ postConfigure = ''
32+ make configure-host
33+ '';
34+
35+ postInstall = ''
36+ rm -rf $out/share/info
37+ '';
38+
39+ meta = {
40+ description = "FRC binutils";
41+ longDescription = ''
42+ binutils used to build arm-frc-linux-gnueabi and user programs.
43+ '';
44+ license = stdenv.lib.licenses.gpl2;
45+ maintainers = [ stdenv.lib.maintainers.colescott ];
46+ platforms = stdenv.lib.platforms.linux;
47+
48+ priority = 3;
49+ };
50+}