2009-11-27 11:56:07 +01:00
|
|
|
{ stdenv, fetchurl, noSysDirs
|
|
|
|
, langC ? true, langCC ? true, langF77 ? false
|
|
|
|
, profiledCompiler ? false
|
|
|
|
, gmp ? null, mpfr ? null, bison ? null, flex ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert langC;
|
|
|
|
assert stdenv.isDarwin;
|
|
|
|
assert langF77 -> gmp != null;
|
|
|
|
|
2011-08-30 15:08:33 +02:00
|
|
|
let
|
|
|
|
version = "4.2.1"; # Upstream GCC version, from `gcc/BASE-VER'.
|
|
|
|
revision = "5666.3"; # Apple's fork revision number.
|
|
|
|
in
|
2009-11-27 11:56:07 +01:00
|
|
|
stdenv.mkDerivation ({
|
2011-08-30 15:08:33 +02:00
|
|
|
name = "gcc-apple-${version}.${revision}";
|
|
|
|
|
2009-11-27 11:56:07 +01:00
|
|
|
builder = ./builder.sh;
|
2011-08-30 15:08:33 +02:00
|
|
|
|
|
|
|
src =
|
2009-11-27 11:56:07 +01:00
|
|
|
stdenv.lib.optional /*langC*/ true (fetchurl {
|
2011-08-30 15:08:33 +02:00
|
|
|
url = "http://www.opensource.apple.com/tarballs/gcc/gcc-${revision}.tar.gz";
|
|
|
|
sha256 = "0nq1szgqx9ryh1qsn5n6yd55gpvf56wr8f7w1jzabb8idlvz8ikc";
|
2009-11-27 11:56:07 +01:00
|
|
|
}) ++
|
|
|
|
stdenv.lib.optional langCC (fetchurl {
|
|
|
|
url = http://www.opensource.apple.com/tarballs/libstdcxx/libstdcxx-39.tar.gz ;
|
2011-08-30 15:08:33 +02:00
|
|
|
sha256 = "ccf4cf432c142778c766affbbf66b61001b6c4f1107bc2b2c77ce45598786b6d";
|
2009-11-27 11:56:07 +01:00
|
|
|
}) ;
|
|
|
|
|
Enable parallel building of gcc, glibc, gmp, mpfr, ncurses, coreutils, perl, python, git, and qt4.
If a build expressions has set "enableParallelBuilding = true", then the
generic builder may utilize more than one CPU core to build that particular
expression. This feature works out of the box for GNU Make. Expressions that
use other build drivers like Boost.Jam or SCons have to specify appropriate
flags such as "-j${NIX_BUILD_CORES}" themselves.
svn path=/nixpkgs/trunk/; revision=23042
2010-08-08 20:51:42 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2009-11-27 11:56:07 +01:00
|
|
|
libstdcxx = "libstdcxx-39";
|
2011-08-30 15:08:33 +02:00
|
|
|
sourceRoot = "gcc-${revision}/";
|
2009-11-27 11:56:07 +01:00
|
|
|
patches =
|
|
|
|
[./pass-cxxcpp.patch ]
|
|
|
|
++ (if noSysDirs then [./no-sys-dirs.patch] else []);
|
|
|
|
inherit noSysDirs langC langCC langF77 profiledCompiler;
|
|
|
|
} // (if langF77 then {buildInputs = [gmp mpfr bison flex];} else {}))
|