From 1babf6ea14e12cdd1d69dfffd72d020ac6df4dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 12 Jun 2010 20:54:35 +0000 Subject: [PATCH] Cleaning a bit what I commited about llvm, and making dragonegg build. If passing to gcc4.5 the compile flag: "-fplugin=dragonegg.so" it will use the llvm optimizers and code generators. In that previous commit I enabled link time optimization and plugin support in gcc 4.5.0 svn path=/nixpkgs/trunk/; revision=22235 --- pkgs/development/compilers/llvm/default.nix | 9 ++++++- .../libraries/dragonegg/default.nix | 26 ++++++++++++++----- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/llvm/default.nix b/pkgs/development/compilers/llvm/default.nix index f01a7acf261f..607a15c9da74 100644 --- a/pkgs/development/compilers/llvm/default.nix +++ b/pkgs/development/compilers/llvm/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, gcc, flex, perl, libtool, groff }: +{stdenv, fetchurl, gcc, flex, perl, libtool, groff}: stdenv.mkDerivation { name = "llvm-2.7"; @@ -8,4 +8,11 @@ stdenv.mkDerivation { }; buildInputs = [ gcc flex perl libtool groff ]; + + meta = { + homepage = http://llvm.org/; + description = "Collection of modular and reusable compiler and toolchain technologies"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; all; + }; } diff --git a/pkgs/development/libraries/dragonegg/default.nix b/pkgs/development/libraries/dragonegg/default.nix index 46dcf5e90010..810807cd1d17 100644 --- a/pkgs/development/libraries/dragonegg/default.nix +++ b/pkgs/development/libraries/dragonegg/default.nix @@ -1,15 +1,29 @@ -{stdenv, fetchsvn, llvm}: +{stdenv, fetchsvn, llvm, gmp, mpfr, mpc}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "dragonegg-2.7"; - GCC = "gcc"; - - buildInputs = [ llvm ]; - src = fetchsvn { url = http://llvm.org/svn/llvm-project/dragonegg/branches/release_27; rev = 105882; sha256 = "0j0mj3zm1nd8kaj3b28b3w2dlzc1xbywq4mcdxk5nq4yds6rx5np"; }; + + # The gcc the plugin will be built for (the same used building dragonegg) + GCC = "gcc"; + + buildInputs = [ llvm gmp mpfr mpc ]; + + installPhase = '' + ensureDir $out/lib $out/share/doc/${name} + cp -d dragonegg.so $out/lib + cp README COPYING $out/share/doc/${name} + ''; + + meta = { + homepage = http://dragonegg.llvm.org/; + description = "gcc plugin that replaces gcc's optimizers and code generators by those in LLVM"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; all; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 37d3e301db7e..d1ec97614689 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3710,7 +3710,7 @@ let }; dragonegg = import ../development/libraries/dragonegg { - inherit fetchsvn llvm; + inherit fetchsvn llvm gmp mpfr mpc; stdenv = overrideGCC stdenv gcc45; };