From d92fa0bf37c63401c4084c441e0e610df0eb444d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Jul 2004 12:17:53 +0000 Subject: [PATCH] * Add an option to GCC to build a profiled compiler (which is about 5-10% faster). svn path=/nixpkgs/trunk/; revision=1108 --- pkgs/development/compilers/gcc-3.4/builder.sh | 6 +++++- pkgs/development/compilers/gcc-3.4/default.nix | 3 ++- pkgs/system/all-packages-generic.nix | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc-3.4/builder.sh b/pkgs/development/compilers/gcc-3.4/builder.sh index 48d333dddc92..a49eb03cbd13 100644 --- a/pkgs/development/compilers/gcc-3.4/builder.sh +++ b/pkgs/development/compilers/gcc-3.4/builder.sh @@ -67,6 +67,10 @@ preConfigure() { preConfigure=preConfigure -makeFlags="bootstrap" +if test -z "$profiledCompiler"; then + makeFlags="bootstrap" +else + makeFlags="profiledbootstrap" +fi genericBuild diff --git a/pkgs/development/compilers/gcc-3.4/default.nix b/pkgs/development/compilers/gcc-3.4/default.nix index c7fcd6218068..3adfc5e41625 100644 --- a/pkgs/development/compilers/gcc-3.4/default.nix +++ b/pkgs/development/compilers/gcc-3.4/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, patch, noSysDirs , langC ? true, langCC ? true, langF77 ? false +, profiledCompiler ? false }: assert langC; @@ -14,5 +15,5 @@ stdenv.mkDerivation { # !!! apply only if noSysDirs is set patches = [./no-sys-dirs.patch]; buildInputs = [patch]; - inherit noSysDirs langC langCC langF77; + inherit noSysDirs langC langCC langF77 profiledCompiler; } diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 246cfb3416a6..db2959611b31 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -213,6 +213,7 @@ rec { gcc = (import ../development/compilers/gcc-3.4) { inherit fetchurl stdenv noSysDirs; patch = gnupatch; + profiledCompiler = true; }; binutils = stdenv.gcc.binutils; glibc = stdenv.gcc.glibc;