From 0feaada94a35c3041757f53d4e6532a2aff0244c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 14 Jun 2010 14:02:14 +0000 Subject: [PATCH] Adding a new gcc in the middle of the linux stdenv build, so we can have a final stdenv gcc with ppl. svn path=/nixpkgs/branches/stdenv-updates/; revision=22258 --- pkgs/stdenv/linux/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index dd5647bec45..2a58a9de0cf 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -132,6 +132,11 @@ rec { stdenv = stdenvLinuxBoot0; }; + # Helper function to override the compiler in stdenv for specific packages. + overrideGCC = stdenv: gcc: stdenv // + { mkDerivation = args: stdenv.mkDerivation (args // { NIX_GCC = gcc; }); + }; + # Create the first "real" standard environment. This one consists # of bootstrap tools only, and a minimal Glibc to keep the GCC @@ -180,6 +185,17 @@ rec { stdenvLinuxBoot2Pkgs = allPackages { inherit system; bootStdenv = stdenvLinuxBoot2; + config = { + packageOverrides = pkgs : { + # The stdenv's gcc will not be built with 'ppl' + # but the resulting 'gcc' attribute of these pkgs will. + # (that allows bootstrapping from bootstrapTools with old gmp) + stdenv = overrideGCC pkgs.stdenv (pkgs.wrapGCC (pkgs.gcc.gcc.override { + ppl = null; + cloogppl = null; + })); + }; + }; };