From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 77020 invoked by alias); 23 Mar 2017 20:05:27 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 77010 invoked by uid 89); 23 Mar 2017 20:05:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=UD:ieeefp.h, H*f:sk:854be01, ieeefph, ieeefp.h X-HELO: mail02.lgsinnovations.com Received: from mail02.lgsinnovations.com (HELO mail02.lgsinnovations.com) (63.149.110.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Mar 2017 20:05:25 +0000 Subject: Re: newlib ieeefp.h again To: References: <854be012-0f1f-b0bf-b7a8-bc615452fa0e@aps.anl.gov> <58D37229.70306@embedded-brains.de> From: Craig Howland Message-ID: <8a60b8b5-b92f-394c-3777-d89e207f0a0b@LGSInnovations.com> Date: Thu, 23 Mar 2017 20:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <58D37229.70306@embedded-brains.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LGS-EX05.lgsdirect.com (135.22.48.227) To LGS-EX01.lgsdirect.com (135.22.77.164) X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00215.txt.bz2 On 03/23/2017 02:58 AM, Sebastian Huber wrote: > On 23/03/17 00:17, Andrew Johnson wrote: >> Hi Joel & Craig, >> >> Hopefully you remember this email conversation from November: >> >> https://sourceware.org/ml/newlib/2016/msg01117.html >> >> I just built the RTEMS master branch for the uC5282 BSP, and found the >> same problem with the ieeefp.h header when building EPICS Base using the >> result. I think I can explain what's happening. >> >> Newlib's setting for _LDBL_EQ_DBL (in newlib.h) needs to change based on >> the particular CPU being compiled for. Here's some evidence: > > Yes, this definition of _LDBL_EQ_DBL is wrong, since it depends on the > multilib. For example we have in the GCC build tree: > > grep _LDBL_EQ_DBL `find -name newlib.h` > ./m68k-rtems4.12/m68040/softfp/newlib/newlib.h:/* #undef _LDBL_EQ_DBL */ > ... > > In the installation tree: > > grep _LDBL_EQ_DBL `find -name newlib.h` > ./m68k-rtems4.12/include/newlib.h:/* #undef _LDBL_EQ_DBL */ > > So, only one random newlib.h is copied to the installation tree, therefore all > newlib.h of the build tree must be identical. > > I would move the _LDBL_EQ_DBL definition to based on compiler > provided defines. > The primary question is whether this is truly possible or not, which will depend upon both what compiler and how old of a compiler version newlib wants to support. Back in 2009 when _LDBL_EQ_DBL was added to newlib.hin, this was not really possible as both float.h and compiler predefines were spotty. As long as we don't need to go back too many versions, it ought to be fine to do it at build time now. Craig