2006-10-27 22:08:53 +02:00
|
|
|
{ stdenv, fetchurl, noSysDirs
|
|
|
|
, langC ? true, langCC ? true, langF77 ? false
|
|
|
|
, profiledCompiler ? false
|
|
|
|
, staticCompiler ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert langC;
|
|
|
|
|
2007-05-24 15:30:09 +02:00
|
|
|
with import ../../../lib;
|
|
|
|
|
2006-10-27 22:08:53 +02:00
|
|
|
stdenv.mkDerivation {
|
2007-05-24 15:30:09 +02:00
|
|
|
name = "gcc-4.1.2";
|
2006-10-27 22:08:53 +02:00
|
|
|
builder = ./builder.sh;
|
|
|
|
|
|
|
|
src =
|
|
|
|
[(fetchurl {
|
2007-05-24 15:30:09 +02:00
|
|
|
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.1.2/gcc-core-4.1.2.tar.bz2;
|
|
|
|
sha256 = "07binc1hqlr0g387zrg5sp57i12yzd5ja2lgjb83bbh0h3gwbsbv";
|
2006-10-27 22:08:53 +02:00
|
|
|
})] ++
|
|
|
|
(if /*langCC*/ true then [(fetchurl {
|
2007-05-24 15:30:09 +02:00
|
|
|
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2;
|
|
|
|
sha256 = "1qm2izcxna10jai0v4s41myki0xkw9174qpl6k1rnrqhbx0sl1hc";
|
2006-10-27 22:08:53 +02:00
|
|
|
})] else []) ++
|
|
|
|
(if langF77 then [(fetchurl {
|
2007-05-24 15:30:09 +02:00
|
|
|
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.1.2/gcc-fortran-4.1.2.tar.bz2;
|
|
|
|
sha256 = "0772dhmm4gc10420h0d0mfkk2sirvjmjxz8j0ywm8wp5qf8vdi9z";
|
2006-10-27 22:08:53 +02:00
|
|
|
})] else []);
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
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++"
|
|
|
|
++ optional langF77 "f77"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
${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";
|
|
|
|
};
|
|
|
|
}
|