This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Only build libm with -fno-math-errno
- From: Zack Weinberg <zackw at panix dot com>
- To: Aurelien Jarno <aurelien at aurel32 dot net>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sat, 22 Dec 2018 14:37:41 -0500
- Subject: Re: [PATCH] Only build libm with -fno-math-errno
- References: <20181222171618.15996-1-aurelien@aurel32.net>
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.
zw