[Mesa-dev] [PATCH 5/5] Android: copy -fno*math* options from the autotools build

Emil Velikov emil.l.velikov at gmail.com
Fri Nov 24 14:25:06 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Add -fno-math-errno and -fno-trapping-math to the build.

Mesa does not depend on the functionality provided, thus this should
result in slightly faster code and smaller binaries.

Cc: Tapani Pälli <tapani.palli at intel.com>
Cc: Rob Herring <robh at kernel.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Gents, please do some basic runtime checks. This should work fine OOTB
although one can never be too sure considering the different compiler/C
runtime used on Android.
---
 Android.common.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Android.common.mk b/Android.common.mk
index 544d813c02d..d97974b1c84 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -68,6 +68,8 @@ LOCAL_CFLAGS += \
 	-DMAJOR_IN_SYSMACROS \
 	-Wundef \
 	-fvisibility=hidden \
+	-fno-math-errno \
+	-fno-trapping-math \
 	-Wno-sign-compare
 
 LOCAL_CPPFLAGS += \
-- 
2.14.1



More information about the mesa-dev mailing list