2005-04-22 14:14:55 +02:00
|
|
|
{ stdenv, fetchurl, noSysDirs
|
|
|
|
, langC ? true, langCC ? true, langF77 ? false
|
|
|
|
, profiledCompiler ? false
|
2007-10-28 21:19:43 +01:00
|
|
|
,gmp ? null , mpfr ? null
|
2005-04-22 14:14:55 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert langC;
|
|
|
|
|
2007-08-07 14:05:10 +02:00
|
|
|
with import ../../../lib;
|
|
|
|
|
2005-04-22 14:14:55 +02:00
|
|
|
stdenv.mkDerivation {
|
2007-08-07 14:05:10 +02:00
|
|
|
name = "gcc-4.0.4";
|
2005-04-22 14:14:55 +02:00
|
|
|
builder = ./builder.sh;
|
|
|
|
src = fetchurl {
|
2007-08-07 14:05:10 +02:00
|
|
|
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.0.4/gcc-4.0.4.tar.bz2;
|
|
|
|
sha256 = "0izwr8d69ld3a1yr8z94s7y7k861wi613mplys2c0bvdr58y1zgk";
|
2005-04-22 14:14:55 +02:00
|
|
|
};
|
2007-08-07 14:05:10 +02:00
|
|
|
|
|
|
|
patches =
|
|
|
|
optional noSysDirs [./no-sys-dirs.patch];
|
|
|
|
|
2005-04-22 14:14:55 +02:00
|
|
|
inherit noSysDirs langC langCC langF77 profiledCompiler;
|
2006-03-10 17:12:46 +01:00
|
|
|
|
2007-10-28 21:19:43 +01:00
|
|
|
buildInputs = []
|
|
|
|
++ (if gmp != null then [gmp] else [])
|
|
|
|
++ (if mpfr != null then [mpfr] else [])
|
|
|
|
;
|
|
|
|
|
2007-08-07 14:05:10 +02:00
|
|
|
configureFlags = "
|
|
|
|
--disable-multilib
|
|
|
|
--disable-libstdcxx-pch
|
|
|
|
--disable-libmudflap
|
|
|
|
--with-system-zlib
|
|
|
|
--enable-languages=${
|
|
|
|
concatStrings (intersperse ","
|
|
|
|
( optional langC "c"
|
|
|
|
++ optional langCC "c++"
|
2007-10-28 21:19:43 +01:00
|
|
|
++ optional langF77 "f95"
|
2007-08-07 14:05:10 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
|
|
|
";
|
|
|
|
|
2006-03-10 17:12:46 +01:00
|
|
|
meta = {
|
|
|
|
homepage = "http://gcc.gnu.org/";
|
|
|
|
license = "GPL/LGPL";
|
|
|
|
description = "GNU Compiler Collection, 4.0.x";
|
|
|
|
};
|
2005-04-22 14:14:55 +02:00
|
|
|
}
|