summary refs log tree commit diff
path: root/Makeconfig
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2012-05-08 09:00:44 +0200
committerAndreas Jaeger <aj@suse.de>2012-05-08 09:00:44 +0200
commit29ba805c7bb1e33c4ea911c67af26c7e301b1e76 (patch)
tree49ca3bdf5be45364023cc5dbae556e809a1a0c7f /Makeconfig
parentabb66a672f5575a328d05c0790403af673d0f76c (diff)
downloadglibc-29ba805c7bb1e33c4ea911c67af26c7e301b1e76.tar.gz
glibc-29ba805c7bb1e33c4ea911c67af26c7e301b1e76.tar.xz
glibc-29ba805c7bb1e33c4ea911c67af26c7e301b1e76.zip
Revert "Revert "Build glibc with -frounding-math""
This reverts commit 20f244a03fda84d1556674584b340e2459ef3d99.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makeconfig b/Makeconfig
index 5c78ee497b..f68a752766 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -574,6 +574,11 @@ endif
 # actually different, so allow the compiler to merge them all.
 +merge-constants = -fmerge-all-constants
 
+# We have to assume that glibc functions are called in any rounding
+# mode and also change the rounding mode in a few functions. So,
+# disable any optimization that assume default rounding mode.
++math-flags = -frounding-math
+
 # This is the program that generates makefile dependencies from C source files.
 # The -MP flag tells GCC >= 3.2 (which we now require) to produce dummy
 # targets for headers so that removed headers don't break the build.
@@ -633,7 +638,7 @@ ifeq	"$(strip $(+cflags))" ""
 +cflags	:= $(default_cflags)
 endif	# $(+cflags) == ""
 
-+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants)
++cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags)
 +gcc-nowarn := -w
 
 # Don't duplicate options if we inherited variables from the parent.