From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 28F90385781E for ; Fri, 21 Jan 2022 13:27:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28F90385781E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642771640; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=3vD70zbqwNw0V8QVmFbYuKzRXecwChpc//wIS7mthko=; b=ftbYiL4nMzh3NWXv7qNp1qDVTp1jaFJqjhjaAdSOzBKlc6DNlZdJfo4RMVvbU4uqOojhU6 uVPD7rI6Ovev4AqeWofJBb2dM3SSXkCkkfgtkOYrbyxG8Yt+oduywBoomsRQb4FUD2ffze 7EU2LudsLakvYvT4olAhMcPf1ZDhdUc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-153-bvnVZz2QMmCW1wX2kegcMQ-1; Fri, 21 Jan 2022 08:27:19 -0500 X-MC-Unique: bvnVZz2QMmCW1wX2kegcMQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86047100D680 for ; Fri, 21 Jan 2022 13:27:18 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-112-9.ams2.redhat.com [10.36.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 553647B6C4 for ; Fri, 21 Jan 2022 13:27:18 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id DC327A8065D; Fri, 21 Jan 2022 14:27:16 +0100 (CET) Date: Fri, 21 Jan 2022 14:27:16 +0100 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: [PATCH] newlib: switch to autoconf long double wider macro Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20220121050411.23094-1-vapier@gentoo.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vinschen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2022 13:27:25 -0000 On Jan 21 07:39, Mike Frysinger wrote: > On 21 Jan 2022 12:27, Corinna Vinschen wrote: > > On Jan 21 00:04, Mike Frysinger wrote: > > > Now that we require a recent version of autoconf, we can rely on this > > > macro existing. It has inverted semantics from the existing test (it > > > looks for "is wider" instead of "is equal"), so we have to invert the > > > check when creating our _LDBL_EQ_DBL. > > > --- > > > newlib/configure | 72 +++++++++++++++++++++++++++++---------------- > > > newlib/configure.ac | 22 ++------------ > > > newlib/newlib.hin | 4 +++ > > > 3 files changed, 53 insertions(+), 45 deletions(-) > > > > Looks right to me, please push. > > for posterity, i'll note that autoconf uses a different (more comprehensive) > testing method that ultimately arrives at a diff answer than what newlib is > atm. for aarch64, _LDBL_EQ_DBL is now defined when it wasn't before. > > newlib today is doing: > #if DBL_MANT_DIG == LDBL_MANT_DIG && \ > LDBL_MIN_EXP == DBL_MIN_EXP && \ > LDBL_MAX_EXP == DBL_MAX_EXP > #define _LDBL_EQ_DBL > #else > #error "LDBL != DBL" > #endif > > while autoconf is doing: > (0 < ((DBL_MAX_EXP < LDBL_MAX_EXP) > + (DBL_MANT_DIG < LDBL_MANT_DIG) > - (LDBL_MAX_EXP < DBL_MAX_EXP) > - (LDBL_MANT_DIG < DBL_MANT_DIG))) > && (int) LDBL_EPSILON == 0 > -mike Erm... that's kind of weird. The newlib expression doesn't look wrong. So, out of curiosity of somebody not being familiar with aarch64, why is that? Corinna