2006-10-27 22:08:53 +02:00
|
|
|
{ stdenv, fetchurl, noSysDirs
|
|
|
|
, langC ? true, langCC ? true, langF77 ? false
|
|
|
|
, profiledCompiler ? false
|
|
|
|
, staticCompiler ? false
|
2007-10-28 21:19:43 +01:00
|
|
|
, gmp ? null
|
|
|
|
, mpfr ? null
|
2008-02-21 16:34:56 +01:00
|
|
|
, texinfo ? null
|
2006-10-27 22:08:53 +02:00
|
|
|
}:
|
|
|
|
|
2007-10-28 21:19:43 +01:00
|
|
|
assert langC || langF77;
|
2006-10-27 22:08:53 +02:00
|
|
|
|
2007-05-24 15:30:09 +02:00
|
|
|
with import ../../../lib;
|
|
|
|
|
2008-02-21 18:34:03 +01:00
|
|
|
stdenv.mkDerivation {
|
2007-05-24 15:30:09 +02:00
|
|
|
name = "gcc-4.1.2";
|
2007-10-28 21:19:43 +01:00
|
|
|
builder = if langF77 then ./fortran.sh else ./builder.sh;
|
2006-10-27 22:08:53 +02:00
|
|
|
|
|
|
|
src =
|
2007-11-21 20:28:54 +01:00
|
|
|
optional /*langC*/ true (fetchurl {
|
2007-08-27 14:44:01 +02:00
|
|
|
url = mirror://gnu/gcc/gcc-4.1.2/gcc-core-4.1.2.tar.bz2;
|
2007-05-24 15:30:09 +02:00
|
|
|
sha256 = "07binc1hqlr0g387zrg5sp57i12yzd5ja2lgjb83bbh0h3gwbsbv";
|
2007-11-21 20:28:54 +01:00
|
|
|
}) ++
|
|
|
|
optional /*langCC*/ true (fetchurl {
|
2007-08-27 14:44:01 +02:00
|
|
|
url = mirror://gnu/gcc/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2;
|
2007-05-24 15:30:09 +02:00
|
|
|
sha256 = "1qm2izcxna10jai0v4s41myki0xkw9174qpl6k1rnrqhbx0sl1hc";
|
2007-11-21 20:28:54 +01:00
|
|
|
}) ++
|
|
|
|
optional langF77 (fetchurl {
|
2007-08-27 14:44:01 +02:00
|
|
|
url = mirror://gnu/gcc/gcc-4.1.2/gcc-fortran-4.1.2.tar.bz2;
|
2007-05-24 15:30:09 +02:00
|
|
|
sha256 = "0772dhmm4gc10420h0d0mfkk2sirvjmjxz8j0ywm8wp5qf8vdi9z";
|
2007-11-21 20:28:54 +01:00
|
|
|
});
|
2006-10-27 22:08:53 +02:00
|
|
|
|
|
|
|
patches =
|
2007-05-24 15:30:09 +02:00
|
|
|
optional noSysDirs [./no-sys-dirs.patch];
|
2006-10-27 22:08:53 +02:00
|
|
|
|
2007-05-24 15:30:09 +02:00
|
|
|
inherit noSysDirs profiledCompiler staticCompiler;
|
2006-10-27 22:08:53 +02:00
|
|
|
|
2008-02-21 18:34:03 +01:00
|
|
|
buildInputs = [gmp mpfr texinfo];
|
|
|
|
|
2006-10-27 22:08:53 +02:00
|
|
|
configureFlags = "
|
|
|
|
--disable-multilib
|
|
|
|
--disable-libstdcxx-pch
|
2007-05-24 15:30:09 +02:00
|
|
|
--with-system-zlib
|
|
|
|
--enable-languages=${
|
|
|
|
concatStrings (intersperse ","
|
|
|
|
( optional langC "c"
|
|
|
|
++ optional langCC "c++"
|
2007-10-28 21:19:43 +01:00
|
|
|
++ optional langF77 "fortran"
|
2007-05-24 15:30:09 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
2006-10-27 22:08:53 +02:00
|
|
|
";
|
|
|
|
|
|
|
|
makeFlags = if staticCompiler then "LDFLAGS=-static" else "";
|
|
|
|
|
2007-05-24 15:30:09 +02:00
|
|
|
passthru = { inherit langC langCC langF77; };
|
|
|
|
|
2006-10-27 22:08:53 +02:00
|
|
|
meta = {
|
|
|
|
homepage = "http://gcc.gnu.org/";
|
|
|
|
license = "GPL/LGPL";
|
|
|
|
description = "GNU Compiler Collection, 4.1.x";
|
2007-05-31 15:00:49 +02:00
|
|
|
|
|
|
|
# Give the real GCC a lower priority than the GCC wrapper so that
|
|
|
|
# both can be installed at the same time.
|
|
|
|
priority = "7";
|
2006-10-27 22:08:53 +02:00
|
|
|
};
|
|
|
|
}
|