void-packages/srcpkgs/noise-repellent/patches/fix-cross.patch
UsernameRandomlyGenerated fa8fd2a3fd noise-repellent: update to 0.1.5.
Add patch made by ericonr to fix cross compilation.
2021-08-10 11:32:30 -03:00

29 lines
1 KiB
Diff

--- a/meson.build 2020-01-04 02:27:45.000000000 +0100
+++ b/meson.build 2021-08-10 16:17:03.828663592 +0200
@@ -17,19 +17,19 @@
if meson.get_compiler('c').get_id() == 'clang'
add_global_arguments('-mrecip', language : 'c')
endif
-cflags = ['-ffast-math','-fomit-frame-pointer','-fno-finite-math-only']
+cflags = ['-fomit-frame-pointer','-fno-finite-math-only']
cflags += ['-Wno-unused-function']
#install folder
install_folder = 'nrepel.lv2'
-#get the build operating system and configure install path and shared object extension
-current_os = build_machine.system()
-current_arch = build_machine.cpu_family()
+#get the host operating system and configure install path and shared object extension
+current_os = host_machine.system()
+current_arch = host_machine.cpu_family()
# Add x86_64 optimization where appropriate (not for ARM)
-if current_arch != 'aarch64'
- cflags += ['-msse','-msse2','-mfpmath=sse']
+if current_arch == 'x86_64'
+ cflags += ['-ffast-math','-msse','-msse2','-mfpmath=sse']
endif
# Add osx multiarch flags when appropriate