2015-01-17 09:55:32 +01:00
|
|
|
{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, libmpc, ncurses, zlib, version}:
|
2010-06-12 19:42:33 +02:00
|
|
|
|
2010-06-12 22:54:35 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2013-02-23 14:57:31 +01:00
|
|
|
name = "dragonegg-${version}";
|
2010-06-12 19:42:33 +02:00
|
|
|
|
2014-01-21 02:19:53 +01:00
|
|
|
src = fetch "dragonegg" "1733czbvby1ww3xkwcwmm0km0bpwhfyxvf56wb0zv5gksp3kbgrl";
|
2010-06-12 22:54:35 +02:00
|
|
|
|
2014-05-30 11:03:54 +02: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 22:54:35 +02:00
|
|
|
# The gcc the plugin will be built for (the same used building dragonegg)
|
|
|
|
GCC = "gcc";
|
|
|
|
|
2015-01-17 09:55:32 +01:00
|
|
|
buildInputs = [ llvm gmp mpfr libmpc ncurses zlib ];
|
2010-06-12 22:54:35 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/lib $out/share/doc/${name}
|
2010-06-12 22:54:35 +02: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 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2015-07-01 14:11:05 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
2011-01-05 11:13:28 +01:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
2015-04-01 14:30:07 +02:00
|
|
|
broken = true;
|
2010-06-12 22:54:35 +02:00
|
|
|
};
|
2010-06-12 19:42:33 +02:00
|
|
|
}
|