From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47901 invoked by alias); 29 Nov 2017 17:55:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 47892 invoked by uid 89); 29 Nov 2017 17:55:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Nov 2017 17:55:43 +0000 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vATHsJKn173614 for ; Wed, 29 Nov 2017 12:55:41 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ej1pbg3df-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 29 Nov 2017 12:55:41 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Nov 2017 17:55:39 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 29 Nov 2017 17:55:37 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vATHtb0H39387336; Wed, 29 Nov 2017 17:55:37 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E0FB452045; Wed, 29 Nov 2017 16:48:58 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.164.153.34]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id CD34452043; Wed, 29 Nov 2017 16:48:58 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id A27B8D80320; Wed, 29 Nov 2017 18:55:36 +0100 (CET) Subject: Re: [RFC v2][2/2] Target FP: Make use of MPFR if available To: jhb@freebsd.org (John Baldwin) Date: Wed, 29 Nov 2017 17:55:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <1983636.dILOnyREsD@ralph.baldwin.cx> from "John Baldwin" at Nov 28, 2017 04:36:57 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17112917-0020-0000-0000-000003D21533 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112917-0021-0000-0000-00004267827B Message-Id: <20171129175536.A27B8D80320@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-29_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711290231 X-SW-Source: 2017-11/txt/msg00785.txt.bz2 John Baldwin wrote: > FreeBSD's stdint.h uses _SYS_STDINT_H_ as it's include guard for , > so this check doesn't work. Perhaps GDB's sources should just define > MPFR_USE_INTMAX_T explicitly after ensuring is included? That > would seem to be the most portable approach and I think is what the > "Portable software should not rely on these tests" implies. I agree. GDB now requires C++11, which always has intmax_t, so it should be fine to simply always require this. > target-float.c always includes via "defs.h" -> > "common/common-defs.h", so just adding the #define should be sufficient. > > Indeed, this does fix the build on FreeBSD: > > diff --git a/gdb/target-float.c b/gdb/target-float.c > index 32237ec9d9..b40b6416c1 100644 > --- a/gdb/target-float.c > +++ b/gdb/target-float.c > @@ -1147,6 +1147,8 @@ host_float_ops::compare (const gdb_byte *x, const > struct type *type_x, > > #ifdef HAVE_LIBMPFR > > +#define MPFR_USE_INTMAX_T > + > #include > > class mpfr_float_ops : public target_float_ops This looks good to me. Can you check this in? Thanks, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com