Tried to fortran-tune (insuccessfully) gcc expressions. They must accept mpfr and gmp anyway if we ever will build fortran.

svn path=/nixpkgs/trunk/; revision=9545
This commit is contained in:
Michael Raskin 2007-10-28 20:19:43 +00:00
parent 4ff2543e03
commit 98b2568a0f
2 changed files with 15 additions and 4 deletions

View file

@ -1,6 +1,7 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
, profiledCompiler ? false
,gmp ? null , mpfr ? null
}:
assert langC;
@ -20,6 +21,11 @@ stdenv.mkDerivation {
inherit noSysDirs langC langCC langF77 profiledCompiler;
buildInputs = []
++ (if gmp != null then [gmp] else [])
++ (if mpfr != null then [mpfr] else [])
;
configureFlags = "
--disable-multilib
--disable-libstdcxx-pch
@ -29,7 +35,7 @@ stdenv.mkDerivation {
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langF77 "f77"
++ optional langF77 "f95"
)
)
}

View file

@ -2,15 +2,17 @@
, langC ? true, langCC ? true, langF77 ? false
, profiledCompiler ? false
, staticCompiler ? false
, gmp ? null
, mpfr ? null
}:
assert langC;
assert langC || langF77;
with import ../../../lib;
stdenv.mkDerivation {
name = "gcc-4.1.2";
builder = ./builder.sh;
builder = if langF77 then ./fortran.sh else ./builder.sh;
src =
[(fetchurl {
@ -39,7 +41,7 @@ stdenv.mkDerivation {
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langF77 "f77"
++ optional langF77 "fortran"
)
)
}
@ -50,6 +52,9 @@ stdenv.mkDerivation {
passthru = { inherit langC langCC langF77; };
buildInputs = [] ++ (if gmp != null then [gmp] else [])
++ (if mpfr != null then [mpfr] else []);
meta = {
homepage = "http://gcc.gnu.org/";
license = "GPL/LGPL";