patches/ppl/0.11.2/400-fix-build-with-gmp-5.1.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Sun May 11 13:38:12 2014 +0200 (2014-05-11)
changeset 3313 ad14212ebf54
permissions -rw-r--r--
config: switch cc with libc in the config order

Some of the compiler options depend on the C library choice, (e.g.
whether core passes are needed).

Since the compiler menu comes before the C library menu, those options
may or may not be visible until the C library is chosen, leading to
either options being visible by the user (thus be puzzling as they would
not apply to his case), or invisible to him (yet again puzzling him).

Invert the order of the compiler and the C library in the menuconfig. It
anyway looks more rational, in the end.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
bernhard@3253
     1
From 9f843aecc23981aec6ed1eaa8be06e6786a47f0d Mon Sep 17 00:00:00 2001
bernhard@3253
     2
From: Roberto Bagnara <bagnara@cs.unipr.it>
bernhard@3253
     3
Date: Wed, 19 Dec 2012 08:42:19 +0100
bernhard@3253
     4
Subject: [PATCH] GMP version 5.1.0 (and, presumably, later versions) defines
bernhard@3253
     5
 std::numeric_limits.
bernhard@3253
     6
bernhard@3253
     7
---
bernhard@3253
     8
 src/mp_std_bits.cc      |    6 ++++++
bernhard@3253
     9
 src/mp_std_bits.defs.hh |    6 ++++++
bernhard@3253
    10
 2 files changed, 12 insertions(+)
bernhard@3253
    11
bernhard@3253
    12
--- a/src/mp_std_bits.cc
bernhard@3253
    13
+++ b/src/mp_std_bits.cc
bernhard@3253
    14
@@ -26,6 +26,9 @@ site: http://www.cs.unipr.it/ppl/ . */
bernhard@3253
    15
 #include <ppl-config.h>
bernhard@3253
    16
 #include "mp_std_bits.defs.hh"
bernhard@3253
    17
 
bernhard@3253
    18
+#if __GNU_MP_VERSION < 5 \
bernhard@3253
    19
+  || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
bernhard@3253
    20
+
bernhard@3253
    21
 const bool std::numeric_limits<mpz_class>::is_specialized;
bernhard@3253
    22
 const int std::numeric_limits<mpz_class>::digits;
bernhard@3253
    23
 const int std::numeric_limits<mpz_class>::digits10;
bernhard@3253
    24
@@ -71,3 +74,6 @@ const bool std::numeric_limits<mpq_class
bernhard@3253
    25
 const bool std::numeric_limits<mpq_class>::traps;
bernhard@3253
    26
 const bool std::numeric_limits<mpq_class>::tininess_before;
bernhard@3253
    27
 const std::float_round_style std::numeric_limits<mpq_class>::round_style;
bernhard@3253
    28
+
bernhard@3253
    29
+#endif // __GNU_MP_VERSION < 5
bernhard@3253
    30
+       // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
bernhard@3253
    31
--- a/src/mp_std_bits.defs.hh
bernhard@3253
    32
+++ b/src/mp_std_bits.defs.hh
bernhard@3253
    33
@@ -39,6 +39,9 @@ void swap(mpz_class& x, mpz_class& y);
bernhard@3253
    34
 #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
bernhard@3253
    35
 void swap(mpq_class& x, mpq_class& y);
bernhard@3253
    36
 
bernhard@3253
    37
+#if __GNU_MP_VERSION < 5 \
bernhard@3253
    38
+  || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
bernhard@3253
    39
+
bernhard@3253
    40
 namespace std {
bernhard@3253
    41
 
bernhard@3253
    42
 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
bernhard@3253
    43
@@ -165,6 +168,9 @@ public:
bernhard@3253
    44
 
bernhard@3253
    45
 } // namespace std
bernhard@3253
    46
 
bernhard@3253
    47
+#endif // __GNU_MP_VERSION < 5
bernhard@3253
    48
+       // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
bernhard@3253
    49
+
bernhard@3253
    50
 #include "mp_std_bits.inlines.hh"
bernhard@3253
    51
 
bernhard@3253
    52
 #endif // !defined(PPL_mp_std_bits_defs_hh)