Bug 1399679 - Disable math inlines on Linux x86 draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 26 Dec 2017 14:58:01 +0900
changeset 722005 3c9bb7785ea41840af834554359aea333ace2a0e
parent 722004 2068b1b7c07de99f32911c375fddbdb79f56656d
child 722006 1b16ff553751be6966fc321a6c7430857863ee3f
push id96025
push userbmo:mh+mozilla@glandium.org
push dateThu, 18 Jan 2018 09:37:19 +0000
bugs1399679
milestone59.0a1
Bug 1399679 - Disable math inlines on Linux x86 On CentOS 6, the glibc headers only have math.h inlines for the signbit function. On Debian wheezy, they have much more, including ceil and floor, which changes the codegen for every place ceil or floor are used, since call to libm functions are replaced with inline code.
moz.configure
--- a/moz.configure
+++ b/moz.configure
@@ -543,16 +543,20 @@ def nsis_flags(host):
     if host.kernel != 'WINNT':
         return '-nocd'
     return ''
 
 set_config('MAKENSISU_FLAGS', nsis_flags)
 
 check_prog('7Z', ('7z', '7za'), allow_missing=True, when=target_is_windows)
 
+set_define(
+    '__NO_MATH_INLINES', True,
+    when=depends(target)(lambda t: t.kernel == 'Linux' and t.cpu == 'x86'))
+
 # Fallthrough to autoconf-based configure
 include('build/moz.configure/old.configure')
 
 @imports('__sandbox__')
 def all_paths():
     return __sandbox__._all_paths
 
 set_config('ALL_CONFIGURE_PATHS', all_paths())