2015-02-03 23:26:16 +01:00
|
|
|
{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, libmpc, ncurses, zlib, version}:
|
2015-02-03 22:58:32 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "dragonegg-${version}";
|
|
|
|
|
2015-02-20 14:51:24 +01:00
|
|
|
src = fetch "dragonegg" "1v1lc9h2nfk3lsk9sx1k4ckwddz813hqjmlp2bx2kwxx9hw364ar";
|
2015-02-03 22:58:32 +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";
|
|
|
|
|
|
|
|
# The gcc the plugin will be built for (the same used building dragonegg)
|
|
|
|
GCC = "gcc";
|
|
|
|
|
2015-02-03 23:26:16 +01:00
|
|
|
buildInputs = [ llvm gmp mpfr libmpc ncurses zlib ];
|
2015-02-03 22:58:32 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $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";
|
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric shlevy];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|