From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id 178863858D3C for ; Sun, 28 May 2023 05:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 178863858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=Shaw.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=shaw.ca Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id 2syJqbfGyLAoI38dKqBPCW; Sun, 28 May 2023 05:07:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1685250478; bh=SrT3azZr/wDA2DGxRkT+DpIlOUeKwhzllEioZOs92Gc=; h=Date:Reply-To:Subject:To:Cc:References:From:In-Reply-To; b=u/Yu+l3txFmAqrAsfepuKZ+OMSB7yVy0nQdaArvkdBixUDk/1lCB7lI4NtDnP2GVR eNJjS1T/Lk+O0NLSWuvLaC/nDJs234/Q/gVQzXc6WNOpxUifqCS2Y7RPabmkfW0pMY 3Q1zmsme2vNzmNzunz1aVkkUV+vJnROkC9M98pqzFr+0A1FUXeZ8VceVP5qDUhW8VT WLxs9a04moJ3jWlv56qvDhkBbAqOACRNkhlv+XKa4ADXe5ehNXhWj90gjMQMnECxFo WC2vNCWGyPs1J6jY7kgBEC0x2AQ+fUYlyzK4kXj7ITIAE/iS5YaDUk7cFk5vEWhOsq ul9+4kQnib/Iw== Received: from [10.0.0.5] ([184.64.102.149]) by cmsmtp with ESMTP id 38dJqbvWRcyvu38dJqgDbs; Sun, 28 May 2023 05:07:58 +0000 X-Authority-Analysis: v=2.4 cv=VbHkgXl9 c=1 sm=1 tr=0 ts=6472e1ae a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 a=IkcTkHD0fZMA:10 a=pGLkceISAAAA:8 a=DU0EyFXtAAAA:8 a=mDV3o1hIAAAA:8 a=CCpqsmhAAAAA:8 a=Hj8MEK1LPgEjwK5AxNEA:9 a=QEXdDO2ut3YA:10 a=D7ou6IrCd84A:10 a=UCR5be5CC-YrbG9FbbB0:22 a=_FVE-zBwftR9WsbkzFJk:22 a=ul9cdbp4aOFLsgKbc677:22 Message-ID: Date: Sat, 27 May 2023 23:07:57 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Reply-To: Newlib Subject: Re: Build error with GCC13 + newlib 4.1.0 - error: 'float_t' undeclared Content-Language: en-CA To: Newlib Cc: Chris Packham References: From: Brian Inglis Organization: Inglis In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfEVCbtDoge5jTMxKkQJa8PUGhuY3wIBe3oJzkDPNleuS79w8Caa/rYUjwWhb6tFVFBUR4t9zgfYPqWuPc6BGUOfdG65HWkE8ASFGaW4fUMaL4Xo+E9kk x7bU4v246lNjc6J09hW6SSxuLnSMuXBS+3lwJihdFA4MLNDX3iEN9KkcUy4bHBIt7ET8n6PTJ/crLTefZU7mnSKA/9W2jxn/svSfKZs0qtdTpkxOlyCFsvsh X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-05-27 20:23, Chris Packham wrote: > On Sun, May 28, 2023 at 2:00 PM Chris Packham wrote: >> On Sun, May 28, 2023 at 12:28 PM Joel Sherrill wrote: >>> On Sat, May 27, 2023, 7:02 PM Chris Packham wrote: >>>> I user reported the following build error with newlib after GCC13.1 >>>> was added recently >>> By any chance did the default version of C change in 13 versus what worked.before? >>> FWIW It looks.like the bleeding edge RTEMS tool builds in our farm have >>> some issue with gdb. So I don't have a handy case to compare. >> https://gcc.gnu.org/gcc-13/changes.html doesn't mention it explicitly >> but I wouldn't be surprised if it has. >>>> src/newlib/newlib/libm/math/wf_log2.c:34:22: error: 'float_t' >>>> undeclared (first use in this function); did you mean 'float'? >>>> 34 | return (logf(x) / (float_t) M_LN2); >>>> | ^~~~~~~ >>>> | float >>>> From what I've been able to follow so far this may have something to >>>> do with how FLT_EVAL_METHOD is defined. It's not really mentioned in >>>> the GCC docs as something that has changed but I wonder if it is >>>> perhaps implied by a C standard the default of which probably has >>>> changed. >>>> Does this ring any bells for anyone? >> I'll also add that I've now double checked the same configuration >> works with GCC 12.2 > Looks like the following two upstream newlb changes might help > > https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=91f99d323b39dc0c06c40038791db9861d4b76b9 > https://sourceware.org/git?p=newlib-cygwin.git;a=commit;h=27f0913c17c216548b2f5eea79037ee90038f375 Commit https://sourceware.org/git/?p=newlib-cygwin.git;a=commitdiff;h=b060af2264c9cecd960d19cd9f223d6b66ff1acc was in newlib-2_0_0 end of 2012. C99+ is required to use, as are the low level definitions of FLT_EVAL_METHOD or __FLT_EVAL_METHOD__: $ touch null.c $ gcc -dM -E null.c | grep 'FLT_EVAL\|VERSION_' #define __FLT_EVAL_METHOD__ 0 #define __FLT_EVAL_METHOD_TS_18661_3__ 0 #define __VERSION__ "11.3.0" #define __STDC_VERSION__ 201710L > Which leads into another question. ct-ng currently has newlib-4.1.0. > Looking at https://sourceware.org/ftp/newlib/index.html are the 4.2.0 > and 4.3.0 dated snapshots the actual release or are they release > candidates? Both newlib and Cygwin are rolling releases, occasionally tagged for reference. Latest newlib annual snapshot is 4.3.0 early this year, instead of 4.2.0 tag was 20211231, 4.1.0 was end of 2020. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry