From 98b2568a0f763257c03ff24df3eabf8fad577f60 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Sun, 28 Oct 2007 20:19:43 +0000 Subject: [PATCH] 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 --- pkgs/development/compilers/gcc-4.0/default.nix | 8 +++++++- pkgs/development/compilers/gcc-4.1/default.nix | 11 ++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/gcc-4.0/default.nix b/pkgs/development/compilers/gcc-4.0/default.nix index 49a87de057b..5d81ecbfd74 100644 --- a/pkgs/development/compilers/gcc-4.0/default.nix +++ b/pkgs/development/compilers/gcc-4.0/default.nix @@ -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" ) ) } diff --git a/pkgs/development/compilers/gcc-4.1/default.nix b/pkgs/development/compilers/gcc-4.1/default.nix index 39b3e4a28eb..1b55469b5b5 100644 --- a/pkgs/development/compilers/gcc-4.1/default.nix +++ b/pkgs/development/compilers/gcc-4.1/default.nix @@ -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";