This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] In _IEEE_LIBM mode, use weak symbols instead of wrapper funcs [v2]


Keith Packard wrote:
> Craig Howland <howland@LGSInnovations.com> writes:
>> Taking a step back, there's a higher-level question.  The Newlib math libary is 
>> already quite goofy with the variations in error handing, making multiple 
>> flavors, etc.  Is it perhaps time to give this strangeness up and just make them 
>> so that they are C/POSIX compliant?  This too would achieve the desired goal of 
>> getting rid of the wrappers.

Agreed, I don't see a point in adding yet another additional layer of complexity when
a much better solution is to remove the existing layers.

> I would actually prefer the IEEE behavior as that doesn't return errors
> in 'errno'. I was happy to find this mode already available in the
> library as it matches what I feel are the right semantics for a deeply
> embedded system.

Yes most applications do not want or need errno support for math functions.
So the best option is to remove all the wrapper files with all the complex errno
handling which nobody actually requires. Check out what the new optimized math
functions do - there are no wrappers anymore, and errno can be supported with
zero overhead if required (unlike the existing wrappers which add a huge overhead).

So the question is, is there any reason why _IEEE_LIBM should not be the default?

Wilco

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]