summaryrefslogtreecommitdiff
path: root/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch')
-rw-r--r--gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch b/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch
new file mode 100644
index 000000000000..df464810e1b3
--- /dev/null
+++ b/gui-apps/waypipe/files/waypipe-0.7.2-no-simd.patch
@@ -0,0 +1,38 @@
+make simd instructions optional
+
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -5,3 +5,7 @@ option('with_lz4', type : 'feature', value : 'auto', description : 'Support LZ4
+ option('with_zstd', type : 'feature', value : 'auto', description : 'Support ZStandard as a compression mechanism')
+ option('with_vaapi', type : 'feature', value : 'auto', description : 'Link with libva and use VAAPI to perform hardware video output color space conversions on GPU')
+ option('with_systemtap', type: 'boolean', value: true, description: 'Enable tracing using sdt and provide static tracepoints for profiling')
++option('with_avx512f', type: 'boolean', value: true, description: 'Enable avx512f SIMD instructions')
++option('with_avx2', type: 'boolean', value: true, description: 'Enable avx2 SIMD instructions')
++option('with_sse3', type: 'boolean', value: true, description: 'Enable sse3 SIMD instructions')
++option('with_neon_opts', type: 'boolean', value: true, description: 'Enable optimizations for ARM64 neon cpus')
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -25,19 +25,19 @@ endif
+ # Conditionally compile SIMD-optimized code.
+ # (The meson simd module is a bit too limited for this)
+ kernel_libs = []
+-if cc.has_argument('-mavx512f') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi')
++if cc.has_argument('-mavx512f') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi') and get_option('with_avx512f')
+ kernel_libs += static_library('kernel_avx512f', 'kernel_avx512f.c', c_args:['-mavx512f', '-mlzcnt', '-mbmi'])
+ config_data.set('HAVE_AVX512F', 1, description: 'Compiler supports AVX-512F')
+ endif
+-if cc.has_argument('-mavx2') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi')
++if cc.has_argument('-mavx2') and cc.has_argument('-mlzcnt') and cc.has_argument('-mbmi') and get_option('with_avx2')
+ kernel_libs += static_library('kernel_avx2', 'kernel_avx2.c', c_args:['-mavx2', '-mlzcnt', '-mbmi'])
+ config_data.set('HAVE_AVX2', 1, description: 'Compiler supports AVX2')
+ endif
+-if cc.has_argument('-msse3')
++if cc.has_argument('-msse3') and get_option('with_sse3')
+ kernel_libs += static_library('kernel_sse3', 'kernel_sse3.c', c_args:['-msse3'])
+ config_data.set('HAVE_SSE3', 1, description: 'Compiler supports SSE 3')
+ endif
+-if host_machine.cpu_family() == 'aarch64' or cc.has_argument('-mfpu=neon')
++if ( host_machine.cpu_family() == 'aarch64' or cc.has_argument('-mfpu=neon') ) and get_option('with_neon_opts')
+ neon_args = host_machine.cpu_family() == 'aarch64' ? [] : ['-mfpu=neon']
+
+ # Clang additionally enforces that NEON code only be compiled