This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] Only build libm with -fno-math-errno


On 2018-12-22 14:37, Zack Weinberg wrote:
> On Sat, Dec 22, 2018 at 12:16 PM Aurelien Jarno <aurelien@aurel32.net> wrote:
> >
> > Commit 1294b1892e ("Add support for sqrt asm redirects") added the
> > -fno-math-errno flag to build most of the glibc in order to enable GCC
> > to inline math function. This allows GCC to optimize-out saving and
> > restoring errno around function calls. In turn this causes strerror to
> > set errno value to ENOMEM in case of an invalid error number and memory
> > allocation error, which is not allowed by POSIX.
> 
> LGTM, except please mention GCC bug #88576 in the commit message.
> Hopefully we'll be able to turn -fno-math-errno back on for libc when
> that's fixed.

Thanks for the review. Now that we know it's a GCC bug, the commit
message clearly needs to be reworked.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


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