Resurrect old cloog and isl for gcc-4.9

Fixes #7723

Refs 8af39c1cf7
Refs 5cd11989c5
This commit is contained in:
Shea Levy 2015-05-06 08:32:03 -04:00
parent 09af6d4572
commit 3aff74a7a2
4 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1,65 @@
{ fetchurl, stdenv, gmp, isl }:
stdenv.mkDerivation rec {
name = "cloog-0.18.0";
src = fetchurl {
url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./${name}.tar.gz";
sha256 = "1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228";
};
buildInputs = [ gmp ];
propagatedBuildInputs = [ isl ];
configureFlags = [ "--with-isl=system" ];
enableParallelBuilding = true;
doCheck = true;
meta = {
description = "Library that generates loops for scanning polyhedra";
longDescription = ''
CLooG is a free software library to generate code for scanning
Z-polyhedra. That is, it finds a code (e.g., in C, FORTRAN...) that
reaches each integral point of one or more parameterized polyhedra.
CLooG has been originally written to solve the code generation problem
for optimizing compilers based on the polytope model. Nevertheless it
is used now in various area e.g., to build control automata for
high-level synthesis or to find the best polynomial approximation of a
function. CLooG may help in any situation where scanning polyhedra
matters. While the user has full control on generated code quality,
CLooG is designed to avoid control overhead and to produce a very
effective code.
'';
homepage = http://www.cloog.org/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.shlevy ];
/* Leads to an ICE on Cygwin:
make[3]: Entering directory `/tmp/nix-build-9q5gw5m37q5l4f0kjfv9ar8fsc9plk27-ppl-0.10.2.drv-1/ppl-0.10.2/src'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -c -o Box.lo Box.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I.. -I../src -g -O2 -frounding-math -W -Wall -c Box.cc -DDLL_EXPORT -DPIC -o .libs/Box.o
In file included from checked.defs.hh:595,
from Checked_Number.defs.hh:27,
from Coefficient.types.hh:15,
from Coefficient.defs.hh:26,
from Box.defs.hh:28,
from Box.cc:24:
checked.inlines.hh: In function `Parma_Polyhedra_Library::Result Parma_Polyhedra_Library::Checked::input_generic(Type&, std::istream&, Parma_Polyhedra_Library::Rounding_Dir)':
checked.inlines.hh:607: internal compiler error: in invert_truthvalue, at fold-const.c:2719
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://cygwin.com/problems.html> for instructions.
make[3]: *** [Box.lo] Error 1
*/
platforms = with stdenv.lib.platforms; allBut cygwin;
};
}

View File

@ -0,0 +1,23 @@
{ stdenv, fetchurl, gmp }:
stdenv.mkDerivation rec {
name = "isl-0.11.1"; # CLooG 0.16.3 fails to build with ISL 0.08.
src = fetchurl {
url = "http://pkgs.fedoraproject.org/repo/pkgs/gcc/isl-0.11.1.tar.bz2/bce1586384d8635a76d2f017fb067cd2/isl-0.11.1.tar.bz2";
sha256 = "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9";
};
buildInputs = [ gmp ];
patches = [ ./fix-gcc-build.diff ];
enableParallelBuilding = true;
meta = {
homepage = http://www.kotnet.org/~skimo/isl/;
license = stdenv.lib.licenses.lgpl21;
description = "A library for manipulating sets and relations of integer points bounded by linear constraints";
maintainers = [ stdenv.lib.maintainers.shlevy ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -0,0 +1,12 @@
diff -ru isl-0.11.1/include/isl/int.h isl-0.11.1.new/include/isl/int.h
--- isl-0.11.1/include/isl/int.h 2012-11-29 09:47:32.000000000 +0100
+++ isl-0.11.1.new/include/isl/int.h 2013-10-27 15:35:31.348553812 +0100
@@ -14,7 +14,7 @@
#include <string.h>
#include <gmp.h>
#if defined(__cplusplus)
-#include <iostream>
+#include <ostream>
#endif
#if defined(__cplusplus)

View File

@ -1063,6 +1063,9 @@ let
};
cloog = callPackage ../development/libraries/cloog { };
cloog_0_18_0 = callPackage ../development/libraries/cloog/0.18.0.nix {
isl = isl_0_11;
};
cloogppl = callPackage ../development/libraries/cloog-ppl { };
@ -1766,6 +1769,7 @@ let
ised = callPackage ../tools/misc/ised {};
isl = callPackage ../development/libraries/isl { };
isl_0_11 = callPackage ../development/libraries/isl/0.11.1.nix { };
isl_0_12 = callPackage ../development/libraries/isl/0.12.2.nix { };
isl_0_14 = callPackage ../development/libraries/isl/0.14.1.nix { };
@ -3613,6 +3617,10 @@ let
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
then gnu.libpthreadCross
else null;
isl = isl_0_11;
cloog = cloog_0_18_0;
}));
gcc51 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/5.1 {