build: issue #41 builds without mmx/sse etc extensions do not work
authorØyvind Kolås <pippin@gimp.org>
Fri, 2 Aug 2019 11:53:44 +0000 (13:53 +0200)
committerØyvind Kolås <pippin@gimp.org>
Fri, 2 Aug 2019 12:11:17 +0000 (14:11 +0200)
The warnings about the SIMD flags specific variables not being set goes
away with this commit. Setting empty strings do not work since then gcc
ends up looking for input files that are the empty string, thus this patch
re-adds -Wall instead of setting an empty string.

meson.build

index 66aa981e572626e77c0c6a769358e7f147d55d3f..85a8554607bd13c20d0c4423b54db0bfefc1af94 100644 (file)
@@ -215,6 +215,8 @@ if cc.has_argument('-mmmx') and get_option('enable-mmx')
                 sse4_1_cflags = '-msse4.1'
                 conf.set('USE_SSE4_1', 1, description:
                   'Define to 1 if sse4.1 assembly is available.')
+              else
+                sse4_1_cflags = '-Wall'
               endif
 
               # avx2 assembly
@@ -224,11 +226,21 @@ if cc.has_argument('-mmmx') and get_option('enable-mmx')
                   avx2_cflags = '-mavx2'
                   conf.set('USE_AVX2', 1, description:
                     'Define to 1 if avx2 assembly is available.')
+                else
+                  avx2_cflags = '-Wall'
                 endif
+              else
+                avx2_cflags = '-Wall'
               endif
             endif
+          else
+            sse2_cflags = '-Wall'
           endif
+        else
+          sse2_args = ['-Wall']
         endif
+      else
+        sse_args = ['-Wall']
       endif
       if cc.has_argument('-mf16c') and get_option('enable-f16c')
         if cc.compiles(
@@ -242,8 +254,14 @@ if cc.has_argument('-mmmx') and get_option('enable-mmx')
             'Define to 1 if f16c intrinsics are available.')
         endif
       endif
+    else
+      sse_args = '-Wall'
     endif
+  else
+    mmx_args = '-Wall'
   endif
+else
+  mmx_args = '-Wall'
 endif
 
 ################################################################################