Mesa (master): mesa: Add -fno-math-errno to CFLAGS.

Matt Turner mattst88 at kemper.freedesktop.org
Mon Aug 3 16:21:51 UTC 2015


Module: Mesa
Branch: master
Commit: 875458b778e8d389e00f42269e716a3cb2761fab
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=875458b778e8d389e00f42269e716a3cb2761fab

Author: Matt Turner <mattst88 at gmail.com>
Date:   Fri Jul 31 12:18:37 2015 -0700

mesa: Add -fno-math-errno to CFLAGS.

Cuts about 9k of .text size.

   text    data     bss     dec     hex filename
4992804  197808   26328 5216940  4f9aac i965_dri.so before
4983676  197808   26328 5207812  4f7704 i965_dri.so after

Also, Darwin's libm does not ever set errno, so if we care about those
systems we shouldn't rely on errno anyway.

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

---

 configure.ac |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index 248f618..dc9272d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,6 +286,9 @@ 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"
+
     # gcc's builtin memcmp is slower than glibc's
     # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
     CFLAGS="$CFLAGS -fno-builtin-memcmp"




More information about the mesa-commit mailing list