2015-01-17 08:55:32 +00:00
|
|
|
{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, libmpc, ncurses, zlib, version}:
|
2010-06-12 18:42:33 +01:00
|
|
|
|
2010-06-12 21:54:35 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2013-02-23 13:57:31 +00:00
|
|
|
name = "dragonegg-${version}";
|
2010-06-12 18:42:33 +01:00
|
|
|
|
2014-01-21 01:19:53 +00:00
|
|
|
src = fetch "dragonegg" "1733czbvby1ww3xkwcwmm0km0bpwhfyxvf56wb0zv5gksp3kbgrl";
|
2010-06-12 21:54:35 +01:00
|
|
|
|
2014-05-30 10:03:54 +01:00
|
|
|
patches = [(fetchpatch {
|
|
|
|
url = "https://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/ABIHack.inc"
|
|
|
|
+ "?r1=208730&r2=208729&view=patch";
|
|
|
|
sha256 = "1al82gqz90hzjx24p0wls029lw2bgnlgd209kgvxsp82p4z1v1c1";
|
|
|
|
name = "bug-18548.patch";
|
|
|
|
})];
|
|
|
|
patchFlags = "-p2";
|
|
|
|
|
2010-06-12 21:54:35 +01:00
|
|
|
# The gcc the plugin will be built for (the same used building dragonegg)
|
|
|
|
GCC = "gcc";
|
|
|
|
|
2015-01-17 08:55:32 +00:00
|
|
|
buildInputs = [ llvm gmp mpfr libmpc ncurses zlib ];
|
2010-06-12 21:54:35 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/lib $out/share/doc/${name}
|
2010-06-12 21:54:35 +01:00
|
|
|
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";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2015-07-01 13:11:05 +01:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
2011-01-05 10:13:28 +00:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2015-04-01 13:30:07 +01:00
|
|
|
broken = true;
|
2010-06-12 21:54:35 +01:00
|
|
|
};
|
2010-06-12 18:42:33 +01:00
|
|
|
}
|