[Mesa-dev] [PATCH 2/7] mesa: Add -fno-trapping-math to CFLAGS.

Roland Scheidegger sroland at vmware.com
Fri Jul 31 17:02:23 PDT 2015


Am 01.08.2015 um 01:26 schrieb Matt Turner:
> Cuts about 1k of .text size.
> 
>    text    data     bss     dec     hex filename
> 4983676  197808   26328 5207812  4f7704 i965_dri.so before
> 4982522  197800   26328 5206650  4f727a i965_dri.so after
> ---
>  configure.ac | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 15a9a3d..65d195f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -284,8 +284,8 @@ if test "x$GCC" = xyes; then
>      # Work around aliasing bugs - developers should comment this out
>      CFLAGS="$CFLAGS -fno-strict-aliasing"
>  
> -    # We don't want floating-point math functions to set errno
> -    CFLAGS="$CFLAGS -fno-math-errno"
> +    # We don't want floating-point math functions to set errno or trap
> +    CFLAGS="$CFLAGS -fno-math-errno -fno-trapping-math"
>  
>      # gcc's builtin memcmp is slower than glibc's
>      # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
> 

I'm wondering if we should add that to the scons build as well (both of
these, of course).

Reviewed-by: Roland Scheidegger <sroland at vmware.com>


More information about the mesa-dev mailing list