This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] aarch64: Fix f{max,min}{f} build for GCC 4.9 and 5
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, libc-alpha at sourceware dot org
- Cc: nd at arm dot com
- Date: Fri, 17 Nov 2017 10:40:33 +0000
- Subject: Re: [PATCH] aarch64: Fix f{max,min}{f} build for GCC 4.9 and 5
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <1510914762-27547-1-git-send-email-adhemerval.zanella@linaro.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 17/11/17 10:32, Adhemerval Zanella wrote:
> GCC 4.9 and 5 do not generate a correct f{max,min}nm instruction for
> __builtin_{fmax,fmin}{f} without -ffinite-math-only. It is clear a
> compiler issue since the instruction can handle NaN and Inf correctly
> and GCC6+ does not show this issue.
>
> We backport a fix to GCC 5, raise the minimum required GCC version
> for aarch64 (since GCC 4.9 branch is now closed) and/or add configure
> check to check for this issue. However I think -ffinit-math-only
> should be safe for these specific implementation and it is a much
> simpler solution.
>
> Checked on aarch64-linux-gnu with GCC 5.3.1.
>
> * sysdeps/aarch64/fpu/Makefile (CFLAGS-s_fmax.c, CFLAGS-s_fmaxf.c,
> CFLAGS-s_fmin.c, CFLAGS-s_fminf.c): New rule: add -ffinite-math-only.
>
OK.