From: Hugo Villeneuve Date: Sun, 30 Nov 2014 21:33:57 +0000 (-0500) Subject: Add ppl patch to fix bug when compiling without Perl (stage2) X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=b2caa476fe2b8b54e0952dfa11482004d1da4f33;p=hvlinux.git Add ppl patch to fix bug when compiling without Perl (stage2) --- diff --git a/stage0/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0.patch b/stage0/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0.patch index 1c1d1b8..47edc8b 100644 --- a/stage0/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0.patch +++ b/stage0/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0.patch @@ -1,20 +1,26 @@ -Submitted By: Hugo Villeneuve -Date: 2013-06-01 -Initial Package Version: 0.12.1 -Upstream Status: Not sent -Origin: https://raw.github.com/niXman/mingw-builds/master/patches/ppl/ppl-resolve-conflicts-with-gmp-5.1.0.patch -Description: Fix compilation errors similar to that: +Module: ppl/ppl +Branch: master +Commit: 9f843aecc23981aec6ed1eaa8be06e6786a47f0d +URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=9f843aecc23981aec6ed1eaa8be06e6786a47f0d - error: redefinition of 'class > std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' +Author: Roberto Bagnara +Date: Wed Dec 19 08:42:19 2012 +0100 GMP version 5.1.0 (and, presumably, later versions) defines std::numeric_limits. -diff -Naur ppl-0.12.1.orig/src/mp_std_bits.cc ppl-0.12.1.patched/src/mp_std_bits.cc ---- ppl-0.12.1.orig/src/mp_std_bits.cc 2012-04-16 08:12:30.000000000 -0400 -+++ ppl-0.12.1.patched/src/mp_std_bits.cc 2013-05-31 09:57:56.453911121 -0400 -@@ -25,6 +25,9 @@ +--- + + src/mp_std_bits.cc | 6 ++++++ + src/mp_std_bits.defs.hh | 6 ++++++ + 2 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/src/mp_std_bits.cc b/src/mp_std_bits.cc +index c8da535..918b9af 100644 +--- a/src/mp_std_bits.cc ++++ b/src/mp_std_bits.cc +@@ -25,6 +25,9 @@ site: http://bugseng.com/products/ppl/ . */ #include "ppl-config.h" - #include "mp_std_bits.defs.hh" + #include "mp_std_bits_defs.hh" +#if __GNU_MP_VERSION < 5 \ + || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) @@ -22,92 +28,17 @@ diff -Naur ppl-0.12.1.orig/src/mp_std_bits.cc ppl-0.12.1.patched/src/mp_std_bits const bool std::numeric_limits::is_specialized; const int std::numeric_limits::digits; const int std::numeric_limits::digits10; -@@ -70,3 +73,6 @@ +@@ -70,3 +73,6 @@ const bool std::numeric_limits::is_modulo; const bool std::numeric_limits::traps; const bool std::numeric_limits::tininess_before; const std::float_round_style std::numeric_limits::round_style; + +#endif // __GNU_MP_VERSION < 5 + // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) -diff -Naur ppl-0.12.1.orig/src/mp_std_bits.cc.orig ppl-0.12.1.patched/src/mp_std_bits.cc.orig ---- ppl-0.12.1.orig/src/mp_std_bits.cc.orig 1969-12-31 19:00:00.000000000 -0500 -+++ ppl-0.12.1.patched/src/mp_std_bits.cc.orig 2012-04-16 08:12:30.000000000 -0400 -@@ -0,0 +1,72 @@ -+/* Definitions of specializations of std::numeric_limits objects for -+ multi-precision types. -+ Copyright (C) 2001-2010 Roberto Bagnara -+ Copyright (C) 2010-2012 BUGSENG srl (http://bugseng.com) -+ -+This file is part of the Parma Polyhedra Library (PPL). -+ -+The PPL is free software; you can redistribute it and/or modify it -+under the terms of the GNU General Public License as published by the -+Free Software Foundation; either version 3 of the License, or (at your -+option) any later version. -+ -+The PPL is distributed in the hope that it will be useful, but WITHOUT -+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+You should have received a copy of the GNU General Public License -+along with this program; if not, write to the Free Software Foundation, -+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. -+ -+For the most up-to-date information see the Parma Polyhedra Library -+site: http://bugseng.com/products/ppl/ . */ -+ -+#include "ppl-config.h" -+#include "mp_std_bits.defs.hh" -+ -+const bool std::numeric_limits::is_specialized; -+const int std::numeric_limits::digits; -+const int std::numeric_limits::digits10; -+const bool std::numeric_limits::is_signed; -+const bool std::numeric_limits::is_integer; -+const bool std::numeric_limits::is_exact; -+const int std::numeric_limits::radix; -+const int std::numeric_limits::min_exponent; -+const int std::numeric_limits::min_exponent10; -+const int std::numeric_limits::max_exponent; -+const int std::numeric_limits::max_exponent10; -+const bool std::numeric_limits::has_infinity; -+const bool std::numeric_limits::has_quiet_NaN; -+const bool std::numeric_limits::has_signaling_NaN; -+const std::float_denorm_style std::numeric_limits::has_denorm; -+const bool std::numeric_limits::has_denorm_loss; -+const bool std::numeric_limits::is_iec559; -+const bool std::numeric_limits::is_bounded; -+const bool std::numeric_limits::is_modulo; -+const bool std::numeric_limits::traps; -+const bool std::numeric_limits::tininess_before; -+const std::float_round_style std::numeric_limits::round_style; -+ -+const bool std::numeric_limits::is_specialized; -+const int std::numeric_limits::digits; -+const int std::numeric_limits::digits10; -+const bool std::numeric_limits::is_signed; -+const bool std::numeric_limits::is_integer; -+const bool std::numeric_limits::is_exact; -+const int std::numeric_limits::radix; -+const int std::numeric_limits::min_exponent; -+const int std::numeric_limits::min_exponent10; -+const int std::numeric_limits::max_exponent; -+const int std::numeric_limits::max_exponent10; -+const bool std::numeric_limits::has_infinity; -+const bool std::numeric_limits::has_quiet_NaN; -+const bool std::numeric_limits::has_signaling_NaN; -+const std::float_denorm_style std::numeric_limits::has_denorm; -+const bool std::numeric_limits::has_denorm_loss; -+const bool std::numeric_limits::is_iec559; -+const bool std::numeric_limits::is_bounded; -+const bool std::numeric_limits::is_modulo; -+const bool std::numeric_limits::traps; -+const bool std::numeric_limits::tininess_before; -+const std::float_round_style std::numeric_limits::round_style; -diff -Naur ppl-0.12.1.orig/src/mp_std_bits.defs.hh ppl-0.12.1.patched/src/mp_std_bits.defs.hh ---- ppl-0.12.1.orig/src/mp_std_bits.defs.hh 2012-04-16 08:12:30.000000000 -0400 -+++ ppl-0.12.1.patched/src/mp_std_bits.defs.hh 2013-05-31 09:57:56.453911121 -0400 +diff --git a/src/mp_std_bits.defs.hh b/src/mp_std_bits.defs.hh +index f71595a..0d078ec 100644 (file) +--- a/src/mp_std_bits.defs.hh ++++ b/src/mp_std_bits.defs.hh @@ -38,6 +38,9 @@ #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS) void swap(mpq_class& x, mpq_class& y); diff --git a/stage2/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0-no-perl.patch b/stage2/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0-no-perl.patch new file mode 100644 index 0000000..9cb514e --- /dev/null +++ b/stage2/patches/common/ppl-0.12.1-resolve-conflicts-with-gmp-5.1.0-no-perl.patch @@ -0,0 +1,48 @@ +Submitted By: Hugo Villeneuve +Date: 2014-12-01 +Initial Package Version: 0.12.1 +Upstream Status: Not sent +Description: Fix compilation errors when PERL is not installed. + +The file src/ppl.hh is created from src/ppl.hh.dist. But gmp-5.1 and later +already define the class numeric_limits. Therefore, do not redefine it +if we are using gmp >= 5.1 + +diff -Naur ppl-0.12.1.orig/src/ppl.hh.dist ppl-0.12.1.new/src/ppl.hh.dist +--- ppl-0.12.1.orig/src/ppl.hh.dist 2012-04-16 08:15:08.000000000 -0400 ++++ ppl-0.12.1.new/src/ppl.hh.dist 2014-12-01 01:48:08.482395667 -0500 +@@ -779,6 +779,8 @@ + #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS + //! Specialization of std::numeric_limits. + #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS) ++#if __GNU_MP_VERSION < 5 \ ++ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) + template <> + class numeric_limits { + private: +@@ -836,10 +838,16 @@ + return static_cast(1); + } + }; ++#endif // __GNU_MP_VERSION < 5 ++ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) + + #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS + //! Specialization of std::numeric_limits. + #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS) ++ ++#if __GNU_MP_VERSION < 5 \ ++ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) ++ + template <> + class numeric_limits { + private: +@@ -897,6 +905,8 @@ + return static_cast(0); + } + }; ++#endif // __GNU_MP_VERSION < 5 ++ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) + + } // namespace std +