build: opt out of unsafe math optimizations in reference and base
authorØyvind Kolås <pippin@gimp.org>
Fri, 8 Nov 2019 18:07:47 +0000 (19:07 +0100)
committerØyvind Kolås <pippin@gimp.org>
Fri, 8 Nov 2019 18:07:50 +0000 (19:07 +0100)
This makes the reference code paths used for verifying conversions in
extensions not involve for instance fast reciprocal approximations, see issue
 #49. The extensions are still compiled with full optimizations.

babl/base/meson.build
babl/meson.build

index 97ec38b23c6502d9123ee51d8e96ce608b2893cb..06728def416e481ff1eada2661300c4245b49bb8 100644 (file)
@@ -16,6 +16,12 @@ babl_base_sources = [
   'type-u8.c',
 ]
 
+babl_base_c_args = [
+  sse2_cflags,
+  '-DLIBDIR="@0@"'.format(babl_libdir),
+  '-fno-unsafe-math-optimizations'
+]
+
 babl_base = static_library('babl_base',
   babl_base_sources,
   include_directories: [ rootInclude, bablInclude, ],
index 542bb622a365cc40c561f1f4bc2d89f2fed1cdce..a60beb8f1642bd9b00c36dd350fb5ca878465edf 100644 (file)
@@ -27,6 +27,7 @@ version_script_target = custom_target(version_script,
 babl_c_args = [
   sse2_cflags,
   '-DLIBDIR="@0@"'.format(babl_libdir),
+  '-fno-unsafe-math-optimizations'
 ]
 
 # Linker arguments