From patchwork Sun Mar 16 20:22:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malte Forkel X-Patchwork-Id: 330733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 91A382C00A5 for ; Mon, 17 Mar 2014 07:22:30 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=BNz f8BrLAPcBDaBTHxt/mWJUdJzyZeWOBhoQCIdWlDmNpDBqXhe+EOEoSMmNJKrsEHf 4t3jkh1fQyPbQ0ayosjkCeKZSnmYParHzpY6IcIwRlSqrFQGEBufX+Ymhjq2FTXg J0boAacIxFjTzgw7BMl8Q1XHvVAXggar6Y9b4we4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=OlqgFF6Cl 1FzjQG9Is1icdL4LSI=; b=qmYA5qd6Rp3oZztzf4B/Y7Rr7EJ7pevENJvhYxDcF H5XNHQwflSIiNMlSbNkwGa/SzXN63D2bcECG0wZnZrO3RBonIvJB10sq7RZdUbTM Tpr1X2BUygi2Qpc2zuDqeZCcW+FPBk2H077qTAAaTNfbxd7uWh+hOZsOqgPe+i0x OE= Received: (qmail 13687 invoked by alias); 16 Mar 2014 20:22:22 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 13673 invoked by uid 89); 16 Mar 2014 20:22:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: david.daybyday.de Received: from david.daybyday.de (HELO david.daybyday.de) (213.191.85.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 16 Mar 2014 20:22:19 +0000 Received: from [10.0.1.223] (p4FC97C85.dip0.t-ipconnect.de [79.201.124.133]) (Authenticated sender: malte.forkel@berlin.de) by david.daybyday.de (Postfix) with ESMTPSA id 348C81D03C6 for ; Sun, 16 Mar 2014 21:22:12 +0100 (CET) Message-ID: <532607F3.7040901@berlin.de> Date: Sun, 16 Mar 2014 21:22:11 +0100 From: Malte Forkel User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: crossgcc@sourceware.org Subject: [Patch] Avoid redefinition in PPL Hello, While building a toolchain with crosstool-NG 0.19.0, I ran into a conflict between GMP 5.1.1 and PPL 0.11.2: .build/src/ppl-0.11.2/src/mp_std_bits.defs.hh:48:7: error: redefinition of 'class std::numeric_limits<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >' I backported the attached patch from the PPL mailing list [1] to PPL 0.11.2 and successfully used it in crosstool-ng as ct-ng.1.19.0/patches/ppl/0.11.2/400-fix-redefinition-numeric-limits.patch. Please let me know if this is not the proper way to suggest a patch to crosstool-ng. Thanks, Malte [1] http://www.cs.unipr.it/pipermail/ppl-devel/2012-December/018574.html --- For unsubscribe information see http://sourceware.org/lists.html#faq diff --git a/src/mp_std_bits.cc b/src/mp_std_bits.cc --- a/src/mp_std_bits.cc +++ b/src/mp_std_bits.cc @@ -26,6 +26,9 @@ #include #include "mp_std_bits.defs.hh" +#if __GNU_MP_VERSION < 5 \ + || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) + const bool std::numeric_limits::is_specialized; const int std::numeric_limits::digits; const int std::numeric_limits::digits10; @@ -71,3 +74,6 @@ 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 --git a/src/mp_std_bits.defs.hh b/src/mp_std_bits.defs.hh --- a/src/mp_std_bits.defs.hh +++ b/src/mp_std_bits.defs.hh @@ -39,6 +39,9 @@ #endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS) void swap(mpq_class& x, mpq_class& y); +#if __GNU_MP_VERSION < 5 \ + || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) + namespace std { #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS @@ -165,6 +168,9 @@ } // namespace std +#endif // __GNU_MP_VERSION < 5 + // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1) + #include "mp_std_bits.inlines.hh" #endif // !defined(PPL_mp_std_bits_defs_hh)