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 [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id C8444385803B for ; Mon, 13 Sep 2021 16:51:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C8444385803B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-585-nKeR9JWtMkScVks2Qs9aQQ-1; Mon, 13 Sep 2021 12:51:19 -0400 X-MC-Unique: nKeR9JWtMkScVks2Qs9aQQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA324835DE0; Mon, 13 Sep 2021 16:51:17 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 321C677F35; Mon, 13 Sep 2021 16:51:16 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.16.1/8.16.1) with ESMTPS id 18DGpE5J401894 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 Sep 2021 18:51:15 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.16.1/8.16.1/Submit) id 18DGp5lm401892; Mon, 13 Sep 2021 18:51:05 +0200 Date: Mon, 13 Sep 2021 18:51:05 +0200 From: Jakub Jelinek To: Tobias Burnus Cc: Gerald Pfeifer , Sandra Loosemore , Andreas Tobler , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: [PATCH, Fortran] Revert to non-multilib-specific ISO_Fortran_binding.h Message-ID: <20210913165105.GJ304296@tucnak> Reply-To: Jakub Jelinek References: <4c32e0e7-7156-835a-30b-ada8c4b4482d@pfeifer.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.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_H2, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2021 16:51:23 -0000 On Mon, Sep 13, 2021 at 06:32:56PM +0200, Tobias Burnus wrote: > On 13.09.21 17:56, Gerald Pfeifer wrote: > > This broke bootstrap on i586-unknown-freebsd11: > > > > In file included from .../GCC-HEAD/libgfortran/runtime/ISO_Fortran_binding.c:30: > > .../GCC-HEAD/libgfortran/ISO_Fortran_binding.h:255:2: > > error: #error "Can't determine kind of long double" > > 255 | #error "Can't determine kind of long double" > > | ^~~~~ > > > > Does this work on i586-*-linux? > > > > > > % egrep -r '#define.*LDBL_(MANT_DIG|MIN_EXP|MAX_EXP)' /usr/include/ > > /usr/include/x86/float.h:#define LDBL_MANT_DIG 64 > > /usr/include/x86/float.h:#define LDBL_MIN_EXP (-16381) > > /usr/include/x86/float.h:#define LDBL_MAX_EXP 16384 > > > > This looks like it matches existing Linux case already in place? > > Can you run 'echo | cpp -E -g3|grep DBL' to (or in the build dir: echo | > ./gcc/cc1 -E -g3 -dD|grep DBL) to check what's the output? > > It might be that /usr/include/x86/float.h is not used; e.g. there is > $(gcc-src)/ginclude/float.h which undef's the LDBL_MAX_EXP to replace it > by a #define using __LDBL_MAX_EXP. Thus, if those are different from the > values under /usr/include, it might be the reason for the fail? > > I think it works under Linux, at least the "x86-64 -m32" > libgfortran.{so,a}  build and the -m32 testsuite runs do work. Wouldn't it be better to use the __LDBL_* macros anyway and not rely on float.h? The header doesn't want to test what float.h tells about the long double type, but what the compiler knows about it. Jakub