ARM64: Fix fdlibm compilation flags.
Currently fdlibm is compiled using the default C standard (gnu99).
This specifies a relaxed floating point model that enables fused
operations such as fused multiply-add (-ffp-contract=fast).
Since fdlibm is used to compute StrictMath operations this is too
permissive on targets that have support for fused operations such as
ARM64.
bug: 17663117
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
(cherry picked from commit 0eb593375b6e890846eedbf08ee6901e1d73beba)
Change-Id: I713acb6b273787ae70ce1d664bea012b0a347ccb
diff --git a/Android.mk b/Android.mk
index 734bfae..5cf8648 100644
--- a/Android.mk
+++ b/Android.mk
@@ -54,6 +54,9 @@
cflags += "-fno-strict-aliasing"
cflags += "-ffloat-store"
+# c99 specifies a less relaxed floating point model that does not enable
+# floating point expession contraction (e.g: fused multiply-add operations).
+cflags += "-std=c99"
#
# Build for the target (device).